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 SJAVAC_SERVER_DIR
 636 ENABLE_SJAVAC
 637 SJAVAC_SERVER_JAVA_FLAGS
 638 SJAVAC_SERVER_JAVA
 639 JAVA_TOOL_FLAGS_SMALL
 640 JAVA_FLAGS_SMALL
 641 JAVA_FLAGS_BIG
 642 JAVA_FLAGS
 643 JOBS
 644 MEMORY_SIZE
 645 NUM_CORES
 646 ENABLE_INTREE_EC
 647 SALIB_NAME
 648 HOTSPOT_MAKE_ARGS
 649 MSVCP_DLL
 650 MSVCR_DLL
 651 LIBCXX
 652 LLVM_LIBS
 653 LLVM_LDFLAGS
 654 LLVM_CFLAGS
 655 LLVM_CONFIG
 656 LIBFFI_LIBS
 657 LIBFFI_CFLAGS
 658 STATIC_CXX_SETTING
 659 LIBDL
 660 LIBM
 661 LIBZIP_CAN_USE_MMAP
 662 USE_EXTERNAL_LIBZ
 663 USE_EXTERNAL_LIBPNG
 664 PNG_LIBS
 665 PNG_CFLAGS
 666 USE_EXTERNAL_LCMS
 667 LCMS_LIBS
 668 LCMS_CFLAGS
 669 USE_EXTERNAL_LIBGIF
 670 USE_EXTERNAL_LIBJPEG
 671 ALSA_LIBS
 672 ALSA_CFLAGS
 673 FREETYPE_BUNDLE_LIB_PATH
 674 FREETYPE_LIBS
 675 FREETYPE_CFLAGS
 676 CUPS_CFLAGS
 677 X_EXTRA_LIBS
 678 X_LIBS
 679 X_PRE_LIBS
 680 X_CFLAGS
 681 XMKMF
 682 FIXPATH
 683 ZIP_DEBUGINFO_FILES
 684 ENABLE_DEBUG_SYMBOLS
 685 CFLAGS_WARNINGS_ARE_ERRORS
 686 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 687 ZERO_ARCHFLAG
 688 LDFLAGS_CXX_JDK
 689 LDFLAGS_JDKEXE_SUFFIX
 690 LDFLAGS_JDKLIB_SUFFIX
 691 LDFLAGS_JDKEXE
 692 LDFLAGS_JDKLIB
 693 CXXFLAGS_JDKEXE
 694 CXXFLAGS_JDKLIB
 695 CFLAGS_JDKEXE
 696 CFLAGS_JDKLIB
 697 MACOSX_VERSION_MIN
 698 LEGACY_EXTRA_LDFLAGS
 699 LEGACY_EXTRA_CXXFLAGS
 700 LEGACY_EXTRA_CFLAGS
 701 CXX_O_FLAG_NONE
 702 CXX_O_FLAG_DEBUG
 703 CXX_O_FLAG_NORM
 704 CXX_O_FLAG_HI
 705 CXX_O_FLAG_HIGHEST
 706 C_O_FLAG_NONE
 707 C_O_FLAG_DEBUG
 708 C_O_FLAG_NORM
 709 C_O_FLAG_HI
 710 C_O_FLAG_HIGHEST
 711 CXXFLAGS_DEBUG_OPTIONS
 712 CFLAGS_DEBUG_OPTIONS
 713 CXXFLAGS_DEBUG_SYMBOLS
 714 CFLAGS_DEBUG_SYMBOLS
 715 CXX_FLAG_DEPS
 716 C_FLAG_DEPS
 717 SET_SHARED_LIBRARY_MAPFILE
 718 SET_SHARED_LIBRARY_NAME
 719 SET_SHARED_LIBRARY_ORIGIN
 720 SET_EXECUTABLE_ORIGIN
 721 SHARED_LIBRARY_FLAGS
 722 CXX_FLAG_REORDER
 723 C_FLAG_REORDER
 724 SYSROOT_LDFLAGS
 725 SYSROOT_CFLAGS
 726 RC_FLAGS
 727 AR_OUT_OPTION
 728 LD_OUT_OPTION
 729 EXE_OUT_OPTION
 730 CC_OUT_OPTION
 731 POST_MCS_CMD
 732 POST_STRIP_CMD
 733 ARFLAGS
 734 COMPILER_TARGET_BITS_FLAG
 735 JT_HOME
 736 JTREGEXE
 737 USING_BROKEN_SUSE_LD
 738 PACKAGE_PATH
 739 LDEXECXX
 740 LDEXE
 741 USE_CLANG
 742 HOTSPOT_LD
 743 HOTSPOT_CXX
 744 HOTSPOT_RC
 745 HOTSPOT_MT
 746 BUILD_LD
 747 BUILD_CXX
 748 BUILD_CC
 749 ac_ct_OBJDUMP
 750 OBJDUMP
 751 ac_ct_OBJCOPY
 752 OBJCOPY
 753 ac_ct_NM
 754 ac_ct_STRIP
 755 MCS
 756 GNM
 757 NM
 758 STRIP
 759 MSBUILD
 760 DUMPBIN
 761 RC
 762 MT
 763 LIPO
 764 ac_ct_OBJC
 765 OBJCFLAGS
 766 OBJC
 767 ac_ct_AR
 768 AR
 769 AS
 770 LDCXX
 771 LD
 772 CXXCPP
 773 CPP
 774 ac_ct_CXX
 775 CXXFLAGS
 776 CXX
 777 ac_ct_PROPER_COMPILER_CXX
 778 PROPER_COMPILER_CXX
 779 TOOLCHAIN_PATH_CXX
 780 POTENTIAL_CXX
 781 OBJEXT
 782 EXEEXT
 783 ac_ct_CC
 784 CPPFLAGS
 785 LDFLAGS
 786 CFLAGS
 787 CC
 788 ac_ct_PROPER_COMPILER_CC
 789 PROPER_COMPILER_CC
 790 TOOLCHAIN_PATH_CC
 791 POTENTIAL_CC
 792 VS_LIB
 793 VS_INCLUDE
 794 VS_PATH
 795 CYGWIN_LINK
 796 EXE_SUFFIX
 797 OBJ_SUFFIX
 798 STATIC_LIBRARY
 799 SHARED_LIBRARY
 800 STATIC_LIBRARY_SUFFIX
 801 SHARED_LIBRARY_SUFFIX
 802 LIBRARY_PREFIX
 803 TOOLCHAIN_TYPE
 804 BUILD_HOTSPOT
 805 HOTSPOT_DIST
 806 BUILD_OUTPUT
 807 OVERRIDE_SRC_ROOT
 808 ADD_SRC_ROOT
 809 JDK_TOPDIR
 810 NASHORN_TOPDIR
 811 HOTSPOT_TOPDIR
 812 JAXWS_TOPDIR
 813 JAXP_TOPDIR
 814 CORBA_TOPDIR
 815 LANGTOOLS_TOPDIR
 816 JAVAC_FLAGS
 817 BOOT_JDK_SOURCETARGET
 818 JARSIGNER
 819 NATIVE2ASCII
 820 JAR
 821 JAVAH
 822 JAVAC
 823 JAVA
 824 BOOT_JDK
 825 JAVA_CHECK
 826 JAVAC_CHECK
 827 COOKED_BUILD_NUMBER
 828 JDK_VERSION
 829 COPYRIGHT_YEAR
 830 MACOSX_BUNDLE_ID_BASE
 831 MACOSX_BUNDLE_NAME_BASE
 832 COMPANY_NAME
 833 JDK_RC_PLATFORM_NAME
 834 PRODUCT_SUFFIX
 835 PRODUCT_NAME
 836 LAUNCHER_NAME
 837 MILESTONE
 838 JDK_BUILD_NUMBER
 839 JDK_UPDATE_VERSION
 840 JDK_MICRO_VERSION
 841 JDK_MINOR_VERSION
 842 JDK_MAJOR_VERSION
 843 USER_RELEASE_SUFFIX
 844 COMPRESS_JARS
 845 RMICONNECTOR_IIOP
 846 UNLIMITED_CRYPTO
 847 CACERTS_FILE
 848 TEST_IN_BUILD
 849 BUILD_HEADLESS
 850 SUPPORT_HEADFUL
 851 SUPPORT_HEADLESS
 852 BDEPS_FTP
 853 BDEPS_UNZIP
 854 OS_VERSION_MICRO
 855 OS_VERSION_MINOR
 856 OS_VERSION_MAJOR
 857 PKG_CONFIG
 858 BASH_ARGS
 859 CODESIGN
 860 XATTR
 861 DSYMUTIL
 862 IS_GNU_TIME
 863 TIME
 864 STAT
 865 HG
 866 READELF
 867 OTOOL
 868 LDD
 869 ZIP
 870 UNZIP
 871 FIND_DELETE
 872 OUTPUT_SYNC
 873 OUTPUT_SYNC_SUPPORTED
 874 MAKE
 875 CHECK_TOOLSDIR_MAKE
 876 CHECK_TOOLSDIR_GMAKE
 877 CHECK_MAKE
 878 CHECK_GMAKE
 879 PKGHANDLER
 880 OUTPUT_ROOT
 881 CONF_NAME
 882 SPEC
 883 SDKROOT
 884 XCODEBUILD
 885 BUILD_VARIANT_RELEASE
 886 DEBUG_CLASSFILES
 887 FASTDEBUG
 888 VARIANT
 889 DEBUG_LEVEL
 890 MACOSX_UNIVERSAL
 891 INCLUDE_SA
 892 JVM_VARIANT_CORE
 893 JVM_VARIANT_ZEROSHARK
 894 JVM_VARIANT_ZERO
 895 JVM_VARIANT_KERNEL
 896 JVM_VARIANT_MINIMAL1
 897 JVM_VARIANT_CLIENT
 898 JVM_VARIANT_SERVER
 899 JVM_VARIANTS
 900 JVM_INTERPRETER
 901 JDK_VARIANT
 902 SET_OPENJDK
 903 BUILD_LOG_WRAPPER
 904 BUILD_LOG_PREVIOUS
 905 BUILD_LOG
 906 TOPDIR
 907 PATH_SEP
 908 ZERO_ARCHDEF
 909 DEFINE_CROSS_COMPILE_ARCH
 910 LP64
 911 OPENJDK_TARGET_OS_EXPORT_DIR
 912 OPENJDK_TARGET_CPU_JLI_CFLAGS
 913 OPENJDK_TARGET_CPU_OSARCH
 914 OPENJDK_TARGET_CPU_ISADIR
 915 OPENJDK_TARGET_CPU_LIBDIR
 916 OPENJDK_TARGET_CPU_LEGACY_LIB
 917 OPENJDK_TARGET_CPU_LEGACY
 918 REQUIRED_OS_VERSION
 919 REQUIRED_OS_NAME
 920 COMPILE_TYPE
 921 OPENJDK_TARGET_CPU_ENDIAN
 922 OPENJDK_TARGET_CPU_BITS
 923 OPENJDK_TARGET_CPU_ARCH
 924 OPENJDK_TARGET_CPU
 925 OPENJDK_TARGET_OS_ENV
 926 OPENJDK_TARGET_OS_TYPE
 927 OPENJDK_TARGET_OS
 928 OPENJDK_BUILD_CPU_ENDIAN
 929 OPENJDK_BUILD_CPU_BITS
 930 OPENJDK_BUILD_CPU_ARCH
 931 OPENJDK_BUILD_CPU
 932 OPENJDK_BUILD_OS_ENV
 933 OPENJDK_BUILD_OS_TYPE
 934 OPENJDK_BUILD_OS
 935 OPENJDK_BUILD_AUTOCONF_NAME
 936 OPENJDK_TARGET_AUTOCONF_NAME
 937 target_os
 938 target_vendor
 939 target_cpu
 940 target
 941 host_os
 942 host_vendor
 943 host_cpu
 944 host
 945 build_os
 946 build_vendor
 947 build_cpu
 948 build
 949 CPIO
 950 SETFILE
 951 DF
 952 READLINK
 953 CYGPATH
 954 SED
 955 FGREP
 956 EGREP
 957 GREP
 958 AWK
 959 XARGS
 960 WHICH
 961 WC
 962 UNIQ
 963 UNAME
 964 TR
 965 TOUCH
 966 TEE
 967 TAR
 968 TAIL
 969 SORT
 970 SH
 971 RM
 972 PRINTF
 973 NAWK
 974 MV
 975 MKTEMP
 976 MKDIR
 977 LS
 978 LN
 979 HEAD
 980 FIND
 981 FILE
 982 EXPR
 983 ECHO
 984 DIRNAME
 985 DIFF
 986 DATE
 987 CUT
 988 CP
 989 COMM
 990 CMP
 991 CHMOD
 992 CAT
 993 BASH
 994 BASENAME
 995 DATE_WHEN_CONFIGURED
 996 ORIGINAL_PATH
 997 CONFIGURE_COMMAND_LINE
 998 target_alias
 999 host_alias
1000 build_alias
1001 LIBS
1002 ECHO_T
1003 ECHO_N
1004 ECHO_C
1005 DEFS
1006 mandir
1007 localedir
1008 libdir
1009 psdir
1010 pdfdir
1011 dvidir
1012 htmldir
1013 infodir
1014 docdir
1015 oldincludedir
1016 includedir
1017 localstatedir
1018 sharedstatedir
1019 sysconfdir
1020 datadir
1021 datarootdir
1022 libexecdir
1023 sbindir
1024 bindir
1025 program_transform_name
1026 prefix
1027 exec_prefix
1028 PACKAGE_URL
1029 PACKAGE_BUGREPORT
1030 PACKAGE_STRING
1031 PACKAGE_VERSION
1032 PACKAGE_TARNAME
1033 PACKAGE_NAME
1034 PATH_SEPARATOR
1035 SHELL'
1036 ac_subst_files=''
1037 ac_user_opts='
1038 enable_option_checking
1039 with_target_bits
1040 enable_openjdk_only
1041 with_custom_make_dir
1042 with_jdk_variant
1043 with_jvm_interpreter
1044 with_jvm_variants
1045 enable_debug
1046 with_debug_level
1047 with_devkit
1048 with_sys_root
1049 with_sysroot
1050 with_tools_dir
1051 with_toolchain_path
1052 with_extra_path
1053 with_sdk_name
1054 with_conf_name
1055 with_output_sync
1056 with_builddeps_conf
1057 with_builddeps_server
1058 with_builddeps_dir
1059 with_builddeps_group
1060 enable_headful
1061 enable_hotspot_test_in_build
1062 with_cacerts_file
1063 enable_unlimited_crypto
1064 enable_rmiconnector_iiop
1065 with_milestone
1066 with_update_version
1067 with_user_release_suffix
1068 with_build_number
1069 with_copyright_year
1070 with_boot_jdk
1071 with_add_source_root
1072 with_override_source_root
1073 with_adds_and_overrides
1074 with_override_langtools
1075 with_override_corba
1076 with_override_jaxp
1077 with_override_jaxws
1078 with_override_hotspot
1079 with_override_nashorn
1080 with_override_jdk
1081 with_import_hotspot
1082 with_toolchain_type
1083 with_toolchain_version
1084 with_jtreg
1085 with_extra_cflags
1086 with_extra_cxxflags
1087 with_extra_ldflags
1088 enable_debug_symbols
1089 enable_zip_debug_info
1090 with_x
1091 with_cups
1092 with_cups_include
1093 with_freetype
1094 with_freetype_include
1095 with_freetype_lib
1096 with_freetype_src
1097 enable_freetype_bundling
1098 with_alsa
1099 with_alsa_include
1100 with_alsa_lib
1101 with_libjpeg
1102 with_giflib
1103 with_lcms
1104 with_libpng
1105 with_zlib
1106 with_stdc__lib
1107 with_msvcr_dll
1108 with_msvcp_dll
1109 with_dxsdk
1110 with_dxsdk_lib
1111 with_dxsdk_include
1112 with_num_cores
1113 with_memory_size
1114 with_jobs
1115 with_boot_jdk_jvmargs
1116 with_sjavac_server_java
1117 enable_sjavac
1118 enable_precompiled_headers
1119 enable_ccache
1120 with_ccache_dir
1121 '
1122       ac_precious_vars='build_alias
1123 host_alias
1124 target_alias
1125 BASENAME
1126 BASH
1127 CAT
1128 CHMOD
1129 CMP
1130 COMM
1131 CP
1132 CUT
1133 DATE
1134 DIFF
1135 DIRNAME
1136 ECHO
1137 EXPR
1138 FILE
1139 FIND
1140 HEAD
1141 LN
1142 LS
1143 MKDIR
1144 MKTEMP
1145 MV
1146 NAWK
1147 PRINTF
1148 RM
1149 SH
1150 SORT
1151 TAIL
1152 TAR
1153 TEE
1154 TOUCH
1155 TR
1156 UNAME
1157 UNIQ
1158 WC
1159 WHICH
1160 XARGS
1161 AWK
1162 GREP
1163 EGREP
1164 FGREP
1165 SED
1166 CYGPATH
1167 READLINK
1168 DF
1169 SETFILE
1170 CPIO
1171 UNZIP
1172 ZIP
1173 LDD
1174 OTOOL
1175 READELF
1176 HG
1177 STAT
1178 TIME
1179 DSYMUTIL
1180 XATTR
1181 CODESIGN
1182 PKG_CONFIG
1183 JAVA
1184 JAVAC
1185 JAVAH
1186 JAR
1187 NATIVE2ASCII
1188 JARSIGNER
1189 CC
1190 CFLAGS
1191 LDFLAGS
1192 LIBS
1193 CPPFLAGS
1194 CXX
1195 CXXFLAGS
1196 CCC
1197 CPP
1198 CXXCPP
1199 AS
1200 AR
1201 OBJC
1202 OBJCFLAGS
1203 LIPO
1204 STRIP
1205 NM
1206 GNM
1207 MCS
1208 OBJCOPY
1209 OBJDUMP
1210 BUILD_CC
1211 BUILD_CXX
1212 BUILD_LD
1213 JTREGEXE
1214 XMKMF
1215 FREETYPE_CFLAGS
1216 FREETYPE_LIBS
1217 ALSA_CFLAGS
1218 ALSA_LIBS
1219 LCMS_CFLAGS
1220 LCMS_LIBS
1221 PNG_CFLAGS
1222 PNG_LIBS
1223 LIBFFI_CFLAGS
1224 LIBFFI_LIBS
1225 CCACHE'
1226 
1227 
1228 # Initialize some variables set by options.
1229 ac_init_help=
1230 ac_init_version=false
1231 ac_unrecognized_opts=
1232 ac_unrecognized_sep=
1233 # The variables have the same names as the options, with
1234 # dashes changed to underlines.
1235 cache_file=/dev/null
1236 exec_prefix=NONE
1237 no_create=
1238 no_recursion=
1239 prefix=NONE
1240 program_prefix=NONE
1241 program_suffix=NONE
1242 program_transform_name=s,x,x,
1243 silent=
1244 site=
1245 srcdir=
1246 verbose=
1247 x_includes=NONE
1248 x_libraries=NONE
1249 
1250 # Installation directory options.
1251 # These are left unexpanded so users can "make install exec_prefix=/foo"
1252 # and all the variables that are supposed to be based on exec_prefix
1253 # by default will actually change.
1254 # Use braces instead of parens because sh, perl, etc. also accept them.
1255 # (The list follows the same order as the GNU Coding Standards.)
1256 bindir='${exec_prefix}/bin'
1257 sbindir='${exec_prefix}/sbin'
1258 libexecdir='${exec_prefix}/libexec'
1259 datarootdir='${prefix}/share'
1260 datadir='${datarootdir}'
1261 sysconfdir='${prefix}/etc'
1262 sharedstatedir='${prefix}/com'
1263 localstatedir='${prefix}/var'
1264 includedir='${prefix}/include'
1265 oldincludedir='/usr/include'
1266 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1267 infodir='${datarootdir}/info'
1268 htmldir='${docdir}'
1269 dvidir='${docdir}'
1270 pdfdir='${docdir}'
1271 psdir='${docdir}'
1272 libdir='${exec_prefix}/lib'
1273 localedir='${datarootdir}/locale'
1274 mandir='${datarootdir}/man'
1275 
1276 ac_prev=
1277 ac_dashdash=
1278 for ac_option
1279 do
1280   # If the previous option needs an argument, assign it.
1281   if test -n "$ac_prev"; then
1282     eval $ac_prev=\$ac_option
1283     ac_prev=
1284     continue
1285   fi
1286 
1287   case $ac_option in
1288   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1289   *=)   ac_optarg= ;;
1290   *)    ac_optarg=yes ;;
1291   esac
1292 
1293   # Accept the important Cygnus configure options, so we can diagnose typos.
1294 
1295   case $ac_dashdash$ac_option in
1296   --)
1297     ac_dashdash=yes ;;
1298 
1299   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1300     ac_prev=bindir ;;
1301   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1302     bindir=$ac_optarg ;;
1303 
1304   -build | --build | --buil | --bui | --bu)
1305     ac_prev=build_alias ;;
1306   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1307     build_alias=$ac_optarg ;;
1308 
1309   -cache-file | --cache-file | --cache-fil | --cache-fi \
1310   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1311     ac_prev=cache_file ;;
1312   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1313   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1314     cache_file=$ac_optarg ;;
1315 
1316   --config-cache | -C)
1317     cache_file=config.cache ;;
1318 
1319   -datadir | --datadir | --datadi | --datad)
1320     ac_prev=datadir ;;
1321   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1322     datadir=$ac_optarg ;;
1323 
1324   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1325   | --dataroo | --dataro | --datar)
1326     ac_prev=datarootdir ;;
1327   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1328   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1329     datarootdir=$ac_optarg ;;
1330 
1331   -disable-* | --disable-*)
1332     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1333     # Reject names that are not valid shell variable names.
1334     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1335       as_fn_error $? "invalid feature name: $ac_useropt"
1336     ac_useropt_orig=$ac_useropt
1337     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1338     case $ac_user_opts in
1339       *"
1340 "enable_$ac_useropt"
1341 "*) ;;
1342       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1343          ac_unrecognized_sep=', ';;
1344     esac
1345     eval enable_$ac_useropt=no ;;
1346 
1347   -docdir | --docdir | --docdi | --doc | --do)
1348     ac_prev=docdir ;;
1349   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1350     docdir=$ac_optarg ;;
1351 
1352   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1353     ac_prev=dvidir ;;
1354   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1355     dvidir=$ac_optarg ;;
1356 
1357   -enable-* | --enable-*)
1358     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1359     # Reject names that are not valid shell variable names.
1360     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1361       as_fn_error $? "invalid feature name: $ac_useropt"
1362     ac_useropt_orig=$ac_useropt
1363     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1364     case $ac_user_opts in
1365       *"
1366 "enable_$ac_useropt"
1367 "*) ;;
1368       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1369          ac_unrecognized_sep=', ';;
1370     esac
1371     eval enable_$ac_useropt=\$ac_optarg ;;
1372 
1373   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1374   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1375   | --exec | --exe | --ex)
1376     ac_prev=exec_prefix ;;
1377   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1378   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1379   | --exec=* | --exe=* | --ex=*)
1380     exec_prefix=$ac_optarg ;;
1381 
1382   -gas | --gas | --ga | --g)
1383     # Obsolete; use --with-gas.
1384     with_gas=yes ;;
1385 
1386   -help | --help | --hel | --he | -h)
1387     ac_init_help=long ;;
1388   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1389     ac_init_help=recursive ;;
1390   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1391     ac_init_help=short ;;
1392 
1393   -host | --host | --hos | --ho)
1394     ac_prev=host_alias ;;
1395   -host=* | --host=* | --hos=* | --ho=*)
1396     host_alias=$ac_optarg ;;
1397 
1398   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1399     ac_prev=htmldir ;;
1400   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1401   | --ht=*)
1402     htmldir=$ac_optarg ;;
1403 
1404   -includedir | --includedir | --includedi | --included | --include \
1405   | --includ | --inclu | --incl | --inc)
1406     ac_prev=includedir ;;
1407   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1408   | --includ=* | --inclu=* | --incl=* | --inc=*)
1409     includedir=$ac_optarg ;;
1410 
1411   -infodir | --infodir | --infodi | --infod | --info | --inf)
1412     ac_prev=infodir ;;
1413   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1414     infodir=$ac_optarg ;;
1415 
1416   -libdir | --libdir | --libdi | --libd)
1417     ac_prev=libdir ;;
1418   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1419     libdir=$ac_optarg ;;
1420 
1421   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1422   | --libexe | --libex | --libe)
1423     ac_prev=libexecdir ;;
1424   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1425   | --libexe=* | --libex=* | --libe=*)
1426     libexecdir=$ac_optarg ;;
1427 
1428   -localedir | --localedir | --localedi | --localed | --locale)
1429     ac_prev=localedir ;;
1430   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1431     localedir=$ac_optarg ;;
1432 
1433   -localstatedir | --localstatedir | --localstatedi | --localstated \
1434   | --localstate | --localstat | --localsta | --localst | --locals)
1435     ac_prev=localstatedir ;;
1436   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1437   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1438     localstatedir=$ac_optarg ;;
1439 
1440   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1441     ac_prev=mandir ;;
1442   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1443     mandir=$ac_optarg ;;
1444 
1445   -nfp | --nfp | --nf)
1446     # Obsolete; use --without-fp.
1447     with_fp=no ;;
1448 
1449   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1450   | --no-cr | --no-c | -n)
1451     no_create=yes ;;
1452 
1453   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1454   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1455     no_recursion=yes ;;
1456 
1457   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1458   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1459   | --oldin | --oldi | --old | --ol | --o)
1460     ac_prev=oldincludedir ;;
1461   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1462   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1463   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1464     oldincludedir=$ac_optarg ;;
1465 
1466   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1467     ac_prev=prefix ;;
1468   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1469     prefix=$ac_optarg ;;
1470 
1471   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1472   | --program-pre | --program-pr | --program-p)
1473     ac_prev=program_prefix ;;
1474   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1475   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1476     program_prefix=$ac_optarg ;;
1477 
1478   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1479   | --program-suf | --program-su | --program-s)
1480     ac_prev=program_suffix ;;
1481   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1482   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1483     program_suffix=$ac_optarg ;;
1484 
1485   -program-transform-name | --program-transform-name \
1486   | --program-transform-nam | --program-transform-na \
1487   | --program-transform-n | --program-transform- \
1488   | --program-transform | --program-transfor \
1489   | --program-transfo | --program-transf \
1490   | --program-trans | --program-tran \
1491   | --progr-tra | --program-tr | --program-t)
1492     ac_prev=program_transform_name ;;
1493   -program-transform-name=* | --program-transform-name=* \
1494   | --program-transform-nam=* | --program-transform-na=* \
1495   | --program-transform-n=* | --program-transform-=* \
1496   | --program-transform=* | --program-transfor=* \
1497   | --program-transfo=* | --program-transf=* \
1498   | --program-trans=* | --program-tran=* \
1499   | --progr-tra=* | --program-tr=* | --program-t=*)
1500     program_transform_name=$ac_optarg ;;
1501 
1502   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1503     ac_prev=pdfdir ;;
1504   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1505     pdfdir=$ac_optarg ;;
1506 
1507   -psdir | --psdir | --psdi | --psd | --ps)
1508     ac_prev=psdir ;;
1509   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1510     psdir=$ac_optarg ;;
1511 
1512   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1513   | -silent | --silent | --silen | --sile | --sil)
1514     silent=yes ;;
1515 
1516   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1517     ac_prev=sbindir ;;
1518   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1519   | --sbi=* | --sb=*)
1520     sbindir=$ac_optarg ;;
1521 
1522   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1523   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1524   | --sharedst | --shareds | --shared | --share | --shar \
1525   | --sha | --sh)
1526     ac_prev=sharedstatedir ;;
1527   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1528   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1529   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1530   | --sha=* | --sh=*)
1531     sharedstatedir=$ac_optarg ;;
1532 
1533   -site | --site | --sit)
1534     ac_prev=site ;;
1535   -site=* | --site=* | --sit=*)
1536     site=$ac_optarg ;;
1537 
1538   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1539     ac_prev=srcdir ;;
1540   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1541     srcdir=$ac_optarg ;;
1542 
1543   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1544   | --syscon | --sysco | --sysc | --sys | --sy)
1545     ac_prev=sysconfdir ;;
1546   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1547   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1548     sysconfdir=$ac_optarg ;;
1549 
1550   -target | --target | --targe | --targ | --tar | --ta | --t)
1551     ac_prev=target_alias ;;
1552   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1553     target_alias=$ac_optarg ;;
1554 
1555   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1556     verbose=yes ;;
1557 
1558   -version | --version | --versio | --versi | --vers | -V)
1559     ac_init_version=: ;;
1560 
1561   -with-* | --with-*)
1562     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1563     # Reject names that are not valid shell variable names.
1564     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1565       as_fn_error $? "invalid package name: $ac_useropt"
1566     ac_useropt_orig=$ac_useropt
1567     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1568     case $ac_user_opts in
1569       *"
1570 "with_$ac_useropt"
1571 "*) ;;
1572       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1573          ac_unrecognized_sep=', ';;
1574     esac
1575     eval with_$ac_useropt=\$ac_optarg ;;
1576 
1577   -without-* | --without-*)
1578     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1579     # Reject names that are not valid shell variable names.
1580     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1581       as_fn_error $? "invalid package name: $ac_useropt"
1582     ac_useropt_orig=$ac_useropt
1583     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1584     case $ac_user_opts in
1585       *"
1586 "with_$ac_useropt"
1587 "*) ;;
1588       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1589          ac_unrecognized_sep=', ';;
1590     esac
1591     eval with_$ac_useropt=no ;;
1592 
1593   --x)
1594     # Obsolete; use --with-x.
1595     with_x=yes ;;
1596 
1597   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1598   | --x-incl | --x-inc | --x-in | --x-i)
1599     ac_prev=x_includes ;;
1600   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1601   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1602     x_includes=$ac_optarg ;;
1603 
1604   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1605   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1606     ac_prev=x_libraries ;;
1607   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1608   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1609     x_libraries=$ac_optarg ;;
1610 
1611   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1612 Try \`$0 --help' for more information"
1613     ;;
1614 
1615   *=*)
1616     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1617     # Reject names that are not valid shell variable names.
1618     case $ac_envvar in #(
1619       '' | [0-9]* | *[!_$as_cr_alnum]* )
1620       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1621     esac
1622     eval $ac_envvar=\$ac_optarg
1623     export $ac_envvar ;;
1624 
1625   *)
1626     # FIXME: should be removed in autoconf 3.0.
1627     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1628     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1629       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1630     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1631     ;;
1632 
1633   esac
1634 done
1635 
1636 if test -n "$ac_prev"; then
1637   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1638   as_fn_error $? "missing argument to $ac_option"
1639 fi
1640 
1641 if test -n "$ac_unrecognized_opts"; then
1642   case $enable_option_checking in
1643     no) ;;
1644     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1645     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1646   esac
1647 fi
1648 
1649 # Check all directory arguments for consistency.
1650 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1651                 datadir sysconfdir sharedstatedir localstatedir includedir \
1652                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1653                 libdir localedir mandir
1654 do
1655   eval ac_val=\$$ac_var
1656   # Remove trailing slashes.
1657   case $ac_val in
1658     */ )
1659       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1660       eval $ac_var=\$ac_val;;
1661   esac
1662   # Be sure to have absolute directory names.
1663   case $ac_val in
1664     [\\/$]* | ?:[\\/]* )  continue;;
1665     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1666   esac
1667   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1668 done
1669 
1670 # There might be people who depend on the old broken behavior: `$host'
1671 # used to hold the argument of --host etc.
1672 # FIXME: To remove some day.
1673 build=$build_alias
1674 host=$host_alias
1675 target=$target_alias
1676 
1677 # FIXME: To remove some day.
1678 if test "x$host_alias" != x; then
1679   if test "x$build_alias" = x; then
1680     cross_compiling=maybe
1681   elif test "x$build_alias" != "x$host_alias"; then
1682     cross_compiling=yes
1683   fi
1684 fi
1685 
1686 ac_tool_prefix=
1687 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1688 
1689 test "$silent" = yes && exec 6>/dev/null
1690 
1691 
1692 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1693 ac_ls_di=`ls -di .` &&
1694 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1695   as_fn_error $? "working directory cannot be determined"
1696 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1697   as_fn_error $? "pwd does not report name of working directory"
1698 
1699 
1700 # Find the source files, if location was not specified.
1701 if test -z "$srcdir"; then
1702   ac_srcdir_defaulted=yes
1703   # Try the directory containing this script, then the parent directory.
1704   ac_confdir=`$as_dirname -- "$as_myself" ||
1705 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1706          X"$as_myself" : 'X\(//\)[^/]' \| \
1707          X"$as_myself" : 'X\(//\)$' \| \
1708          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1709 $as_echo X"$as_myself" |
1710     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1711             s//\1/
1712             q
1713           }
1714           /^X\(\/\/\)[^/].*/{
1715             s//\1/
1716             q
1717           }
1718           /^X\(\/\/\)$/{
1719             s//\1/
1720             q
1721           }
1722           /^X\(\/\).*/{
1723             s//\1/
1724             q
1725           }
1726           s/.*/./; q'`
1727   srcdir=$ac_confdir
1728   if test ! -r "$srcdir/$ac_unique_file"; then
1729     srcdir=..
1730   fi
1731 else
1732   ac_srcdir_defaulted=no
1733 fi
1734 if test ! -r "$srcdir/$ac_unique_file"; then
1735   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1736   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1737 fi
1738 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1739 ac_abs_confdir=`(
1740         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1741         pwd)`
1742 # When building in place, set srcdir=.
1743 if test "$ac_abs_confdir" = "$ac_pwd"; then
1744   srcdir=.
1745 fi
1746 # Remove unnecessary trailing slashes from srcdir.
1747 # Double slashes in file names in object file debugging info
1748 # mess up M-x gdb in Emacs.
1749 case $srcdir in
1750 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1751 esac
1752 for ac_var in $ac_precious_vars; do
1753   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1754   eval ac_env_${ac_var}_value=\$${ac_var}
1755   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1756   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1757 done
1758 
1759 #
1760 # Report the --help message.
1761 #
1762 if test "$ac_init_help" = "long"; then
1763   # Omit some internal or obsolete options to make the list less imposing.
1764   # This message is too long to be a string in the A/UX 3.1 sh.
1765   cat <<_ACEOF
1766 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1767 
1768 Usage: $0 [OPTION]... [VAR=VALUE]...
1769 
1770 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1771 VAR=VALUE.  See below for descriptions of some of the useful variables.
1772 
1773 Defaults for the options are specified in brackets.
1774 
1775 Configuration:
1776   -h, --help              display this help and exit
1777       --help=short        display options specific to this package
1778       --help=recursive    display the short help of all the included packages
1779   -V, --version           display version information and exit
1780   -q, --quiet, --silent   do not print \`checking ...' messages
1781       --cache-file=FILE   cache test results in FILE [disabled]
1782   -C, --config-cache      alias for \`--cache-file=config.cache'
1783   -n, --no-create         do not create output files
1784       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1785 
1786 Installation directories:
1787   --prefix=PREFIX         install architecture-independent files in PREFIX
1788                           [$ac_default_prefix]
1789   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1790                           [PREFIX]
1791 
1792 By default, \`make install' will install all the files in
1793 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1794 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1795 for instance \`--prefix=\$HOME'.
1796 
1797 For better control, use the options below.
1798 
1799 Fine tuning of the installation directories:
1800   --bindir=DIR            user executables [EPREFIX/bin]
1801   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1802   --libexecdir=DIR        program executables [EPREFIX/libexec]
1803   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1804   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1805   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1806   --libdir=DIR            object code libraries [EPREFIX/lib]
1807   --includedir=DIR        C header files [PREFIX/include]
1808   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1809   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1810   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1811   --infodir=DIR           info documentation [DATAROOTDIR/info]
1812   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1813   --mandir=DIR            man documentation [DATAROOTDIR/man]
1814   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1815   --htmldir=DIR           html documentation [DOCDIR]
1816   --dvidir=DIR            dvi documentation [DOCDIR]
1817   --pdfdir=DIR            pdf documentation [DOCDIR]
1818   --psdir=DIR             ps documentation [DOCDIR]
1819 _ACEOF
1820 
1821   cat <<\_ACEOF
1822 
1823 X features:
1824   --x-includes=DIR    X include files are in DIR
1825   --x-libraries=DIR   X library files are in DIR
1826 
1827 System types:
1828   --build=BUILD     configure for building on BUILD [guessed]
1829   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1830   --target=TARGET   configure for building compilers for TARGET [HOST]
1831 _ACEOF
1832 fi
1833 
1834 if test -n "$ac_init_help"; then
1835   case $ac_init_help in
1836      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1837    esac
1838   cat <<\_ACEOF
1839 
1840 Optional Features:
1841   --disable-option-checking  ignore unrecognized --enable/--with options
1842   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1843   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1844   --enable-openjdk-only   suppress building custom source even if present
1845                           [disabled]
1846   --enable-debug          set the debug level to fastdebug (shorthand for
1847                           --with-debug-level=fastdebug) [disabled]
1848   --disable-headful       disable building headful support (graphical UI
1849                           support) [enabled]
1850   --enable-hotspot-test-in-build
1851                           run the Queens test after Hotspot build [disabled]
1852   --enable-unlimited-crypto
1853                           Enable unlimited crypto policy [disabled]
1854   --enable-rmiconnector-iiop
1855                           enable the JMX RMIConnector iiop transport
1856                           [disabled]
1857   --disable-debug-symbols disable generation of debug symbols [enabled]
1858   --disable-zip-debug-info
1859                           disable zipping of debug-info files [enabled]
1860   --disable-freetype-bundling
1861                           disable bundling of the freetype library with the
1862                           build result [enabled on Windows or when using
1863                           --with-freetype, disabled otherwise]
1864   --enable-sjavac         use sjavac to do fast incremental compiles
1865                           [disabled]
1866   --disable-precompiled-headers
1867                           disable using precompiled headers when compiling C++
1868                           [enabled]
1869   --enable-ccache         enable using ccache to speed up recompilations
1870                           [disabled]
1871 
1872 Optional Packages:
1873   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1874   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1875   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1876                           support it), e.g. --with-target-bits=32 [guessed]
1877   --with-custom-make-dir  Deprecated. Option is kept for backwards
1878                           compatibility and is ignored
1879   --with-jdk-variant      JDK variant to build (normal) [normal]
1880   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1881   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1882                           client, minimal1, kernel, zero, zeroshark, core)
1883                           [server]
1884   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1885                           optimized (HotSpot build only)) [release]
1886   --with-devkit           use this devkit for compilers, tools and resources
1887   --with-sys-root         alias for --with-sysroot for backwards compatability
1888   --with-sysroot          use this directory as sysroot
1889   --with-tools-dir        alias for --with-toolchain-path for backwards
1890                           compatibility
1891   --with-toolchain-path   prepend these directories when searching for
1892                           toolchain binaries (compilers etc)
1893   --with-extra-path       prepend these directories to the default path
1894   --with-sdk-name         use the platform SDK of the given name. [macosx]
1895   --with-conf-name        use this as the name of the configuration [generated
1896                           from important configuration options]
1897   --with-output-sync      set make output sync type if supported by make.
1898                           [recurse]
1899   --with-builddeps-conf   use this configuration file for the builddeps
1900   --with-builddeps-server download and use build dependencies from this server
1901                           url
1902   --with-builddeps-dir    store downloaded build dependencies here
1903                           [/localhome/builddeps]
1904   --with-builddeps-group  chgrp the downloaded build dependencies to this
1905                           group
1906   --with-cacerts-file     specify alternative cacerts file
1907   --with-milestone        Set milestone value for build [internal]
1908   --with-update-version   Set update version value for build [b00]
1909   --with-user-release-suffix
1910                           Add a custom string to the version string if build
1911                           number is not set.[username_builddateb00]
1912   --with-build-number     Set build number value for build [b00]
1913   --with-copyright-year   Set copyright year value for build [current year]
1914   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1915   --with-add-source-root  for each and every source directory, look in this
1916                           additional source root for the same directory; if it
1917                           exists and have files in it, include it in the build
1918   --with-override-source-root
1919                           for each and every source directory, look in this
1920                           override source root for the same directory; if it
1921                           exists, use that directory instead and ignore the
1922                           directory in the original source root
1923   --with-adds-and-overrides
1924                           use the subdirs 'adds' and 'overrides' in the
1925                           specified directory as add-source-root and
1926                           override-source-root
1927   --with-override-langtools
1928                           use this langtools dir for the build
1929   --with-override-corba   use this corba dir for the build
1930   --with-override-jaxp    use this jaxp dir for the build
1931   --with-override-jaxws   use this jaxws dir for the build
1932   --with-override-hotspot use this hotspot dir for the build
1933   --with-override-nashorn use this nashorn dir for the build
1934   --with-override-jdk     use this jdk dir for the build
1935   --with-import-hotspot   import hotspot binaries from this jdk image or
1936                           hotspot build dist dir instead of building from
1937                           source
1938   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1939                           to show possible values [platform dependent]
1940   --with-toolchain-version
1941                           the version of the toolchain to look for, use
1942                           '--help' to show possible values [platform
1943                           dependent]
1944   --with-jtreg            Regression Test Harness [probed]
1945   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1946   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1947   --with-extra-ldflags    extra flags to be used when linking jdk
1948   --with-x                use the X Window System
1949   --with-cups             specify prefix directory for the cups package
1950                           (expecting the headers under PATH/include)
1951   --with-cups-include     specify directory for the cups include files
1952   --with-freetype         specify prefix directory for the freetype package
1953                           (expecting the libraries under PATH/lib and the
1954                           headers under PATH/include)
1955   --with-freetype-include specify directory for the freetype include files
1956   --with-freetype-lib     specify directory for the freetype library
1957   --with-freetype-src     specify directory with freetype sources to
1958                           automatically build the library (experimental,
1959                           Windows-only)
1960   --with-alsa             specify prefix directory for the alsa package
1961                           (expecting the libraries under PATH/lib and the
1962                           headers under PATH/include)
1963   --with-alsa-include     specify directory for the alsa include files
1964   --with-alsa-lib         specify directory for the alsa library
1965   --with-libjpeg          use libjpeg from build system or OpenJDK source
1966                           (system, bundled) [bundled]
1967   --with-giflib           use giflib from build system or OpenJDK source
1968                           (system, bundled) [bundled]
1969   --with-lcms             use lcms2 from build system or OpenJDK source
1970                           (system, bundled) [bundled]
1971   --with-libpng           use libpng from build system or OpenJDK source
1972                           (system, bundled) [bundled]
1973   --with-zlib             use zlib from build system or OpenJDK source
1974                           (system, bundled) [bundled]
1975   --with-stdc++lib=<static>,<dynamic>,<default>
1976                           force linking of the C++ runtime on Linux to either
1977                           static or dynamic, default is static with dynamic as
1978                           fallback
1979   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1980                           (Windows only) [probed]
1981   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1982                           (Windows only) [probed]
1983   --with-dxsdk            Deprecated. Option is kept for backwards
1984                           compatibility and is ignored
1985   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1986                           compatibility and is ignored
1987   --with-dxsdk-include    Deprecated. Option is kept for backwards
1988                           compatibility and is ignored
1989   --with-num-cores        number of cores in the build system, e.g.
1990                           --with-num-cores=8 [probed]
1991   --with-memory-size      memory (in MB) available in the build system, e.g.
1992                           --with-memory-size=1024 [probed]
1993   --with-jobs             number of parallel jobs to let make run [calculated
1994                           based on cores and memory]
1995   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1996                           invocations of boot JDK, overriding the default
1997                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1998                           -enableassertions"
1999   --with-sjavac-server-java
2000                           use this java binary for running the sjavac
2001                           background server [Boot JDK java]
2002   --with-ccache-dir       where to store ccache files [~/.ccache]
2003 
2004 Some influential environment variables:
2005   BASENAME    Override default value for BASENAME
2006   BASH        Override default value for BASH
2007   CAT         Override default value for CAT
2008   CHMOD       Override default value for CHMOD
2009   CMP         Override default value for CMP
2010   COMM        Override default value for COMM
2011   CP          Override default value for CP
2012   CUT         Override default value for CUT
2013   DATE        Override default value for DATE
2014   DIFF        Override default value for DIFF
2015   DIRNAME     Override default value for DIRNAME
2016   ECHO        Override default value for ECHO
2017   EXPR        Override default value for EXPR
2018   FILE        Override default value for FILE
2019   FIND        Override default value for FIND
2020   HEAD        Override default value for HEAD
2021   LN          Override default value for LN
2022   LS          Override default value for LS
2023   MKDIR       Override default value for MKDIR
2024   MKTEMP      Override default value for MKTEMP
2025   MV          Override default value for MV
2026   NAWK        Override default value for NAWK
2027   PRINTF      Override default value for PRINTF
2028   RM          Override default value for RM
2029   SH          Override default value for SH
2030   SORT        Override default value for SORT
2031   TAIL        Override default value for TAIL
2032   TAR         Override default value for TAR
2033   TEE         Override default value for TEE
2034   TOUCH       Override default value for TOUCH
2035   TR          Override default value for TR
2036   UNAME       Override default value for UNAME
2037   UNIQ        Override default value for UNIQ
2038   WC          Override default value for WC
2039   WHICH       Override default value for WHICH
2040   XARGS       Override default value for XARGS
2041   AWK         Override default value for AWK
2042   GREP        Override default value for GREP
2043   EGREP       Override default value for EGREP
2044   FGREP       Override default value for FGREP
2045   SED         Override default value for SED
2046   CYGPATH     Override default value for CYGPATH
2047   READLINK    Override default value for READLINK
2048   DF          Override default value for DF
2049   SETFILE     Override default value for SETFILE
2050   CPIO        Override default value for CPIO
2051   UNZIP       Override default value for UNZIP
2052   ZIP         Override default value for ZIP
2053   LDD         Override default value for LDD
2054   OTOOL       Override default value for OTOOL
2055   READELF     Override default value for READELF
2056   HG          Override default value for HG
2057   STAT        Override default value for STAT
2058   TIME        Override default value for TIME
2059   DSYMUTIL    Override default value for DSYMUTIL
2060   XATTR       Override default value for XATTR
2061   CODESIGN    Override default value for CODESIGN
2062   PKG_CONFIG  path to pkg-config utility
2063   JAVA        Override default value for JAVA
2064   JAVAC       Override default value for JAVAC
2065   JAVAH       Override default value for JAVAH
2066   JAR         Override default value for JAR
2067   NATIVE2ASCII
2068               Override default value for NATIVE2ASCII
2069   JARSIGNER   Override default value for JARSIGNER
2070   CC          C compiler command
2071   CFLAGS      C compiler flags
2072   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2073               nonstandard directory <lib dir>
2074   LIBS        libraries to pass to the linker, e.g. -l<library>
2075   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2076               you have headers in a nonstandard directory <include dir>
2077   CXX         C++ compiler command
2078   CXXFLAGS    C++ compiler flags
2079   CPP         C preprocessor
2080   CXXCPP      C++ preprocessor
2081   AS          Override default value for AS
2082   AR          Override default value for AR
2083   OBJC        Objective C compiler command
2084   OBJCFLAGS   Objective C compiler flags
2085   LIPO        Override default value for LIPO
2086   STRIP       Override default value for STRIP
2087   NM          Override default value for NM
2088   GNM         Override default value for GNM
2089   MCS         Override default value for MCS
2090   OBJCOPY     Override default value for OBJCOPY
2091   OBJDUMP     Override default value for OBJDUMP
2092   BUILD_CC    Override default value for BUILD_CC
2093   BUILD_CXX   Override default value for BUILD_CXX
2094   BUILD_LD    Override default value for BUILD_LD
2095   JTREGEXE    Override default value for JTREGEXE
2096   XMKMF       Path to xmkmf, Makefile generator for X Window System
2097   FREETYPE_CFLAGS
2098               C compiler flags for FREETYPE, overriding pkg-config
2099   FREETYPE_LIBS
2100               linker flags for FREETYPE, overriding pkg-config
2101   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2102   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2103   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2104   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2105   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2106   PNG_LIBS    linker flags for PNG, overriding pkg-config
2107   LIBFFI_CFLAGS
2108               C compiler flags for LIBFFI, overriding pkg-config
2109   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2110   CCACHE      Override default value for CCACHE
2111 
2112 Use these variables to override the choices made by `configure' or to help
2113 it to find libraries and programs with nonstandard names/locations.
2114 
2115 Report bugs to <build-dev@openjdk.java.net>.
2116 OpenJDK home page: <http://openjdk.java.net>.
2117 _ACEOF
2118 ac_status=$?
2119 fi
2120 
2121 if test "$ac_init_help" = "recursive"; then
2122   # If there are subdirs, report their specific --help.
2123   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2124     test -d "$ac_dir" ||
2125       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2126       continue
2127     ac_builddir=.
2128 
2129 case "$ac_dir" in
2130 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2131 *)
2132   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2133   # A ".." for each directory in $ac_dir_suffix.
2134   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2135   case $ac_top_builddir_sub in
2136   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2138   esac ;;
2139 esac
2140 ac_abs_top_builddir=$ac_pwd
2141 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2142 # for backward compatibility:
2143 ac_top_builddir=$ac_top_build_prefix
2144 
2145 case $srcdir in
2146   .)  # We are building in place.
2147     ac_srcdir=.
2148     ac_top_srcdir=$ac_top_builddir_sub
2149     ac_abs_top_srcdir=$ac_pwd ;;
2150   [\\/]* | ?:[\\/]* )  # Absolute name.
2151     ac_srcdir=$srcdir$ac_dir_suffix;
2152     ac_top_srcdir=$srcdir
2153     ac_abs_top_srcdir=$srcdir ;;
2154   *) # Relative name.
2155     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2156     ac_top_srcdir=$ac_top_build_prefix$srcdir
2157     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2158 esac
2159 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2160 
2161     cd "$ac_dir" || { ac_status=$?; continue; }
2162     # Check for guested configure.
2163     if test -f "$ac_srcdir/configure.gnu"; then
2164       echo &&
2165       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2166     elif test -f "$ac_srcdir/configure"; then
2167       echo &&
2168       $SHELL "$ac_srcdir/configure" --help=recursive
2169     else
2170       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2171     fi || ac_status=$?
2172     cd "$ac_pwd" || { ac_status=$?; break; }
2173   done
2174 fi
2175 
2176 test -n "$ac_init_help" && exit $ac_status
2177 if $ac_init_version; then
2178   cat <<\_ACEOF
2179 OpenJDK configure jdk9
2180 generated by GNU Autoconf 2.69
2181 
2182 Copyright (C) 2012 Free Software Foundation, Inc.
2183 This configure script is free software; the Free Software Foundation
2184 gives unlimited permission to copy, distribute and modify it.
2185 _ACEOF
2186   exit
2187 fi
2188 
2189 ## ------------------------ ##
2190 ## Autoconf initialization. ##
2191 ## ------------------------ ##
2192 
2193 # ac_fn_c_try_compile LINENO
2194 # --------------------------
2195 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2196 ac_fn_c_try_compile ()
2197 {
2198   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199   rm -f conftest.$ac_objext
2200   if { { ac_try="$ac_compile"
2201 case "(($ac_try" in
2202   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203   *) ac_try_echo=$ac_try;;
2204 esac
2205 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206 $as_echo "$ac_try_echo"; } >&5
2207   (eval "$ac_compile") 2>conftest.err
2208   ac_status=$?
2209   if test -s conftest.err; then
2210     grep -v '^ *+' conftest.err >conftest.er1
2211     cat conftest.er1 >&5
2212     mv -f conftest.er1 conftest.err
2213   fi
2214   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215   test $ac_status = 0; } && {
2216          test -z "$ac_c_werror_flag" ||
2217          test ! -s conftest.err
2218        } && test -s conftest.$ac_objext; then :
2219   ac_retval=0
2220 else
2221   $as_echo "$as_me: failed program was:" >&5
2222 sed 's/^/| /' conftest.$ac_ext >&5
2223 
2224         ac_retval=1
2225 fi
2226   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2227   as_fn_set_status $ac_retval
2228 
2229 } # ac_fn_c_try_compile
2230 
2231 # ac_fn_cxx_try_compile LINENO
2232 # ----------------------------
2233 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2234 ac_fn_cxx_try_compile ()
2235 {
2236   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237   rm -f conftest.$ac_objext
2238   if { { ac_try="$ac_compile"
2239 case "(($ac_try" in
2240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241   *) ac_try_echo=$ac_try;;
2242 esac
2243 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244 $as_echo "$ac_try_echo"; } >&5
2245   (eval "$ac_compile") 2>conftest.err
2246   ac_status=$?
2247   if test -s conftest.err; then
2248     grep -v '^ *+' conftest.err >conftest.er1
2249     cat conftest.er1 >&5
2250     mv -f conftest.er1 conftest.err
2251   fi
2252   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253   test $ac_status = 0; } && {
2254          test -z "$ac_cxx_werror_flag" ||
2255          test ! -s conftest.err
2256        } && test -s conftest.$ac_objext; then :
2257   ac_retval=0
2258 else
2259   $as_echo "$as_me: failed program was:" >&5
2260 sed 's/^/| /' conftest.$ac_ext >&5
2261 
2262         ac_retval=1
2263 fi
2264   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2265   as_fn_set_status $ac_retval
2266 
2267 } # ac_fn_cxx_try_compile
2268 
2269 # ac_fn_c_try_cpp LINENO
2270 # ----------------------
2271 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2272 ac_fn_c_try_cpp ()
2273 {
2274   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275   if { { ac_try="$ac_cpp conftest.$ac_ext"
2276 case "(($ac_try" in
2277   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278   *) ac_try_echo=$ac_try;;
2279 esac
2280 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281 $as_echo "$ac_try_echo"; } >&5
2282   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2283   ac_status=$?
2284   if test -s conftest.err; then
2285     grep -v '^ *+' conftest.err >conftest.er1
2286     cat conftest.er1 >&5
2287     mv -f conftest.er1 conftest.err
2288   fi
2289   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290   test $ac_status = 0; } > conftest.i && {
2291          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2292          test ! -s conftest.err
2293        }; then :
2294   ac_retval=0
2295 else
2296   $as_echo "$as_me: failed program was:" >&5
2297 sed 's/^/| /' conftest.$ac_ext >&5
2298 
2299     ac_retval=1
2300 fi
2301   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302   as_fn_set_status $ac_retval
2303 
2304 } # ac_fn_c_try_cpp
2305 
2306 # ac_fn_cxx_try_cpp LINENO
2307 # ------------------------
2308 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2309 ac_fn_cxx_try_cpp ()
2310 {
2311   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312   if { { ac_try="$ac_cpp conftest.$ac_ext"
2313 case "(($ac_try" in
2314   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2315   *) ac_try_echo=$ac_try;;
2316 esac
2317 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2318 $as_echo "$ac_try_echo"; } >&5
2319   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2320   ac_status=$?
2321   if test -s conftest.err; then
2322     grep -v '^ *+' conftest.err >conftest.er1
2323     cat conftest.er1 >&5
2324     mv -f conftest.er1 conftest.err
2325   fi
2326   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2327   test $ac_status = 0; } > conftest.i && {
2328          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2329          test ! -s conftest.err
2330        }; then :
2331   ac_retval=0
2332 else
2333   $as_echo "$as_me: failed program was:" >&5
2334 sed 's/^/| /' conftest.$ac_ext >&5
2335 
2336     ac_retval=1
2337 fi
2338   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339   as_fn_set_status $ac_retval
2340 
2341 } # ac_fn_cxx_try_cpp
2342 
2343 # ac_fn_objc_try_compile LINENO
2344 # -----------------------------
2345 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2346 ac_fn_objc_try_compile ()
2347 {
2348   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349   rm -f conftest.$ac_objext
2350   if { { ac_try="$ac_compile"
2351 case "(($ac_try" in
2352   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353   *) ac_try_echo=$ac_try;;
2354 esac
2355 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356 $as_echo "$ac_try_echo"; } >&5
2357   (eval "$ac_compile") 2>conftest.err
2358   ac_status=$?
2359   if test -s conftest.err; then
2360     grep -v '^ *+' conftest.err >conftest.er1
2361     cat conftest.er1 >&5
2362     mv -f conftest.er1 conftest.err
2363   fi
2364   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365   test $ac_status = 0; } && {
2366          test -z "$ac_objc_werror_flag" ||
2367          test ! -s conftest.err
2368        } && test -s conftest.$ac_objext; then :
2369   ac_retval=0
2370 else
2371   $as_echo "$as_me: failed program was:" >&5
2372 sed 's/^/| /' conftest.$ac_ext >&5
2373 
2374         ac_retval=1
2375 fi
2376   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2377   as_fn_set_status $ac_retval
2378 
2379 } # ac_fn_objc_try_compile
2380 
2381 # ac_fn_c_try_link LINENO
2382 # -----------------------
2383 # Try to link conftest.$ac_ext, and return whether this succeeded.
2384 ac_fn_c_try_link ()
2385 {
2386   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2387   rm -f conftest.$ac_objext conftest$ac_exeext
2388   if { { ac_try="$ac_link"
2389 case "(($ac_try" in
2390   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2391   *) ac_try_echo=$ac_try;;
2392 esac
2393 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2394 $as_echo "$ac_try_echo"; } >&5
2395   (eval "$ac_link") 2>conftest.err
2396   ac_status=$?
2397   if test -s conftest.err; then
2398     grep -v '^ *+' conftest.err >conftest.er1
2399     cat conftest.er1 >&5
2400     mv -f conftest.er1 conftest.err
2401   fi
2402   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2403   test $ac_status = 0; } && {
2404          test -z "$ac_c_werror_flag" ||
2405          test ! -s conftest.err
2406        } && test -s conftest$ac_exeext && {
2407          test "$cross_compiling" = yes ||
2408          test -x conftest$ac_exeext
2409        }; then :
2410   ac_retval=0
2411 else
2412   $as_echo "$as_me: failed program was:" >&5
2413 sed 's/^/| /' conftest.$ac_ext >&5
2414 
2415         ac_retval=1
2416 fi
2417   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2418   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2419   # interfere with the next link command; also delete a directory that is
2420   # left behind by Apple's compiler.  We do this before executing the actions.
2421   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2422   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423   as_fn_set_status $ac_retval
2424 
2425 } # ac_fn_c_try_link
2426 
2427 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2428 # ---------------------------------------------------------
2429 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2430 # the include files in INCLUDES and setting the cache variable VAR
2431 # accordingly.
2432 ac_fn_cxx_check_header_mongrel ()
2433 {
2434   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435   if eval \${$3+:} false; then :
2436   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2437 $as_echo_n "checking for $2... " >&6; }
2438 if eval \${$3+:} false; then :
2439   $as_echo_n "(cached) " >&6
2440 fi
2441 eval ac_res=\$$3
2442                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443 $as_echo "$ac_res" >&6; }
2444 else
2445   # Is the header compilable?
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2447 $as_echo_n "checking $2 usability... " >&6; }
2448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2449 /* end confdefs.h.  */
2450 $4
2451 #include <$2>
2452 _ACEOF
2453 if ac_fn_cxx_try_compile "$LINENO"; then :
2454   ac_header_compiler=yes
2455 else
2456   ac_header_compiler=no
2457 fi
2458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2460 $as_echo "$ac_header_compiler" >&6; }
2461 
2462 # Is the header present?
2463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2464 $as_echo_n "checking $2 presence... " >&6; }
2465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2466 /* end confdefs.h.  */
2467 #include <$2>
2468 _ACEOF
2469 if ac_fn_cxx_try_cpp "$LINENO"; then :
2470   ac_header_preproc=yes
2471 else
2472   ac_header_preproc=no
2473 fi
2474 rm -f conftest.err conftest.i conftest.$ac_ext
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2476 $as_echo "$ac_header_preproc" >&6; }
2477 
2478 # So?  What about this header?
2479 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2480   yes:no: )
2481     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2482 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2483     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2484 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2485     ;;
2486   no:yes:* )
2487     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2488 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2489     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2490 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2491     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2492 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2493     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2494 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2495     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2496 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2497 ( $as_echo "## ----------------------------------------- ##
2498 ## Report this to build-dev@openjdk.java.net ##
2499 ## ----------------------------------------- ##"
2500      ) | sed "s/^/$as_me: WARNING:     /" >&2
2501     ;;
2502 esac
2503   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2504 $as_echo_n "checking for $2... " >&6; }
2505 if eval \${$3+:} false; then :
2506   $as_echo_n "(cached) " >&6
2507 else
2508   eval "$3=\$ac_header_compiler"
2509 fi
2510 eval ac_res=\$$3
2511                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512 $as_echo "$ac_res" >&6; }
2513 fi
2514   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515 
2516 } # ac_fn_cxx_check_header_mongrel
2517 
2518 # ac_fn_cxx_try_run LINENO
2519 # ------------------------
2520 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2521 # that executables *can* be run.
2522 ac_fn_cxx_try_run ()
2523 {
2524   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525   if { { ac_try="$ac_link"
2526 case "(($ac_try" in
2527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528   *) ac_try_echo=$ac_try;;
2529 esac
2530 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531 $as_echo "$ac_try_echo"; } >&5
2532   (eval "$ac_link") 2>&5
2533   ac_status=$?
2534   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2535   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
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_try") 2>&5
2543   ac_status=$?
2544   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2545   test $ac_status = 0; }; }; then :
2546   ac_retval=0
2547 else
2548   $as_echo "$as_me: program exited with status $ac_status" >&5
2549        $as_echo "$as_me: failed program was:" >&5
2550 sed 's/^/| /' conftest.$ac_ext >&5
2551 
2552        ac_retval=$ac_status
2553 fi
2554   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2555   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556   as_fn_set_status $ac_retval
2557 
2558 } # ac_fn_cxx_try_run
2559 
2560 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2561 # ---------------------------------------------------------
2562 # Tests whether HEADER exists and can be compiled using the include files in
2563 # INCLUDES, setting the cache variable VAR accordingly.
2564 ac_fn_cxx_check_header_compile ()
2565 {
2566   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2568 $as_echo_n "checking for $2... " >&6; }
2569 if eval \${$3+:} false; then :
2570   $as_echo_n "(cached) " >&6
2571 else
2572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2573 /* end confdefs.h.  */
2574 $4
2575 #include <$2>
2576 _ACEOF
2577 if ac_fn_cxx_try_compile "$LINENO"; then :
2578   eval "$3=yes"
2579 else
2580   eval "$3=no"
2581 fi
2582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2583 fi
2584 eval ac_res=\$$3
2585                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2586 $as_echo "$ac_res" >&6; }
2587   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2588 
2589 } # ac_fn_cxx_check_header_compile
2590 
2591 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2592 # ----------------------------------------------
2593 # Tries to find the compile-time value of EXPR in a program that includes
2594 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2595 # computed
2596 ac_fn_cxx_compute_int ()
2597 {
2598   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2599   if test "$cross_compiling" = yes; then
2600     # Depending upon the size, compute the lo and hi bounds.
2601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602 /* end confdefs.h.  */
2603 $4
2604 int
2605 main ()
2606 {
2607 static int test_array [1 - 2 * !(($2) >= 0)];
2608 test_array [0] = 0;
2609 return test_array [0];
2610 
2611   ;
2612   return 0;
2613 }
2614 _ACEOF
2615 if ac_fn_cxx_try_compile "$LINENO"; then :
2616   ac_lo=0 ac_mid=0
2617   while :; do
2618     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2619 /* end confdefs.h.  */
2620 $4
2621 int
2622 main ()
2623 {
2624 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2625 test_array [0] = 0;
2626 return test_array [0];
2627 
2628   ;
2629   return 0;
2630 }
2631 _ACEOF
2632 if ac_fn_cxx_try_compile "$LINENO"; then :
2633   ac_hi=$ac_mid; break
2634 else
2635   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2636                         if test $ac_lo -le $ac_mid; then
2637                           ac_lo= ac_hi=
2638                           break
2639                         fi
2640                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2641 fi
2642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2643   done
2644 else
2645   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2646 /* end confdefs.h.  */
2647 $4
2648 int
2649 main ()
2650 {
2651 static int test_array [1 - 2 * !(($2) < 0)];
2652 test_array [0] = 0;
2653 return test_array [0];
2654 
2655   ;
2656   return 0;
2657 }
2658 _ACEOF
2659 if ac_fn_cxx_try_compile "$LINENO"; then :
2660   ac_hi=-1 ac_mid=-1
2661   while :; do
2662     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2663 /* end confdefs.h.  */
2664 $4
2665 int
2666 main ()
2667 {
2668 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2669 test_array [0] = 0;
2670 return test_array [0];
2671 
2672   ;
2673   return 0;
2674 }
2675 _ACEOF
2676 if ac_fn_cxx_try_compile "$LINENO"; then :
2677   ac_lo=$ac_mid; break
2678 else
2679   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2680                         if test $ac_mid -le $ac_hi; then
2681                           ac_lo= ac_hi=
2682                           break
2683                         fi
2684                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2685 fi
2686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2687   done
2688 else
2689   ac_lo= ac_hi=
2690 fi
2691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692 fi
2693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2694 # Binary search between lo and hi bounds.
2695 while test "x$ac_lo" != "x$ac_hi"; do
2696   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2698 /* end confdefs.h.  */
2699 $4
2700 int
2701 main ()
2702 {
2703 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2704 test_array [0] = 0;
2705 return test_array [0];
2706 
2707   ;
2708   return 0;
2709 }
2710 _ACEOF
2711 if ac_fn_cxx_try_compile "$LINENO"; then :
2712   ac_hi=$ac_mid
2713 else
2714   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2715 fi
2716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2717 done
2718 case $ac_lo in #((
2719 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2720 '') ac_retval=1 ;;
2721 esac
2722   else
2723     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724 /* end confdefs.h.  */
2725 $4
2726 static long int longval () { return $2; }
2727 static unsigned long int ulongval () { return $2; }
2728 #include <stdio.h>
2729 #include <stdlib.h>
2730 int
2731 main ()
2732 {
2733 
2734   FILE *f = fopen ("conftest.val", "w");
2735   if (! f)
2736     return 1;
2737   if (($2) < 0)
2738     {
2739       long int i = longval ();
2740       if (i != ($2))
2741         return 1;
2742       fprintf (f, "%ld", i);
2743     }
2744   else
2745     {
2746       unsigned long int i = ulongval ();
2747       if (i != ($2))
2748         return 1;
2749       fprintf (f, "%lu", i);
2750     }
2751   /* Do not output a trailing newline, as this causes \r\n confusion
2752      on some platforms.  */
2753   return ferror (f) || fclose (f) != 0;
2754 
2755   ;
2756   return 0;
2757 }
2758 _ACEOF
2759 if ac_fn_cxx_try_run "$LINENO"; then :
2760   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2761 else
2762   ac_retval=1
2763 fi
2764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2765   conftest.$ac_objext conftest.beam conftest.$ac_ext
2766 rm -f conftest.val
2767 
2768   fi
2769   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2770   as_fn_set_status $ac_retval
2771 
2772 } # ac_fn_cxx_compute_int
2773 
2774 # ac_fn_cxx_try_link LINENO
2775 # -------------------------
2776 # Try to link conftest.$ac_ext, and return whether this succeeded.
2777 ac_fn_cxx_try_link ()
2778 {
2779   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780   rm -f conftest.$ac_objext conftest$ac_exeext
2781   if { { ac_try="$ac_link"
2782 case "(($ac_try" in
2783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784   *) ac_try_echo=$ac_try;;
2785 esac
2786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2787 $as_echo "$ac_try_echo"; } >&5
2788   (eval "$ac_link") 2>conftest.err
2789   ac_status=$?
2790   if test -s conftest.err; then
2791     grep -v '^ *+' conftest.err >conftest.er1
2792     cat conftest.er1 >&5
2793     mv -f conftest.er1 conftest.err
2794   fi
2795   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2796   test $ac_status = 0; } && {
2797          test -z "$ac_cxx_werror_flag" ||
2798          test ! -s conftest.err
2799        } && test -s conftest$ac_exeext && {
2800          test "$cross_compiling" = yes ||
2801          test -x conftest$ac_exeext
2802        }; then :
2803   ac_retval=0
2804 else
2805   $as_echo "$as_me: failed program was:" >&5
2806 sed 's/^/| /' conftest.$ac_ext >&5
2807 
2808         ac_retval=1
2809 fi
2810   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2811   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2812   # interfere with the next link command; also delete a directory that is
2813   # left behind by Apple's compiler.  We do this before executing the actions.
2814   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2815   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2816   as_fn_set_status $ac_retval
2817 
2818 } # ac_fn_cxx_try_link
2819 
2820 # ac_fn_cxx_check_func LINENO FUNC VAR
2821 # ------------------------------------
2822 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2823 ac_fn_cxx_check_func ()
2824 {
2825   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2827 $as_echo_n "checking for $2... " >&6; }
2828 if eval \${$3+:} false; then :
2829   $as_echo_n "(cached) " >&6
2830 else
2831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2832 /* end confdefs.h.  */
2833 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2834    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2835 #define $2 innocuous_$2
2836 
2837 /* System header to define __stub macros and hopefully few prototypes,
2838     which can conflict with char $2 (); below.
2839     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2840     <limits.h> exists even on freestanding compilers.  */
2841 
2842 #ifdef __STDC__
2843 # include <limits.h>
2844 #else
2845 # include <assert.h>
2846 #endif
2847 
2848 #undef $2
2849 
2850 /* Override any GCC internal prototype to avoid an error.
2851    Use char because int might match the return type of a GCC
2852    builtin and then its argument prototype would still apply.  */
2853 #ifdef __cplusplus
2854 extern "C"
2855 #endif
2856 char $2 ();
2857 /* The GNU C library defines this for functions which it implements
2858     to always fail with ENOSYS.  Some functions are actually named
2859     something starting with __ and the normal name is an alias.  */
2860 #if defined __stub_$2 || defined __stub___$2
2861 choke me
2862 #endif
2863 
2864 int
2865 main ()
2866 {
2867 return $2 ();
2868   ;
2869   return 0;
2870 }
2871 _ACEOF
2872 if ac_fn_cxx_try_link "$LINENO"; then :
2873   eval "$3=yes"
2874 else
2875   eval "$3=no"
2876 fi
2877 rm -f core conftest.err conftest.$ac_objext \
2878     conftest$ac_exeext conftest.$ac_ext
2879 fi
2880 eval ac_res=\$$3
2881                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2882 $as_echo "$ac_res" >&6; }
2883   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2884 
2885 } # ac_fn_cxx_check_func
2886 
2887 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2888 # -------------------------------------------------------
2889 # Tests whether HEADER exists and can be compiled using the include files in
2890 # INCLUDES, setting the cache variable VAR accordingly.
2891 ac_fn_c_check_header_compile ()
2892 {
2893   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2895 $as_echo_n "checking for $2... " >&6; }
2896 if eval \${$3+:} false; then :
2897   $as_echo_n "(cached) " >&6
2898 else
2899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2900 /* end confdefs.h.  */
2901 $4
2902 #include <$2>
2903 _ACEOF
2904 if ac_fn_c_try_compile "$LINENO"; then :
2905   eval "$3=yes"
2906 else
2907   eval "$3=no"
2908 fi
2909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2910 fi
2911 eval ac_res=\$$3
2912                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2913 $as_echo "$ac_res" >&6; }
2914   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2915 
2916 } # ac_fn_c_check_header_compile
2917 cat >config.log <<_ACEOF
2918 This file contains any messages produced by compilers while
2919 running configure, to aid debugging if configure makes a mistake.
2920 
2921 It was created by OpenJDK $as_me jdk9, which was
2922 generated by GNU Autoconf 2.69.  Invocation command line was
2923 
2924   $ $0 $@
2925 
2926 _ACEOF
2927 exec 5>>config.log
2928 {
2929 cat <<_ASUNAME
2930 ## --------- ##
2931 ## Platform. ##
2932 ## --------- ##
2933 
2934 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2935 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2936 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2937 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2938 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2939 
2940 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2941 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2942 
2943 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2944 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2945 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2946 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2947 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2948 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2949 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2950 
2951 _ASUNAME
2952 
2953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2954 for as_dir in $PATH
2955 do
2956   IFS=$as_save_IFS
2957   test -z "$as_dir" && as_dir=.
2958     $as_echo "PATH: $as_dir"
2959   done
2960 IFS=$as_save_IFS
2961 
2962 } >&5
2963 
2964 cat >&5 <<_ACEOF
2965 
2966 
2967 ## ----------- ##
2968 ## Core tests. ##
2969 ## ----------- ##
2970 
2971 _ACEOF
2972 
2973 
2974 # Keep a trace of the command line.
2975 # Strip out --no-create and --no-recursion so they do not pile up.
2976 # Strip out --silent because we don't want to record it for future runs.
2977 # Also quote any args containing shell meta-characters.
2978 # Make two passes to allow for proper duplicate-argument suppression.
2979 ac_configure_args=
2980 ac_configure_args0=
2981 ac_configure_args1=
2982 ac_must_keep_next=false
2983 for ac_pass in 1 2
2984 do
2985   for ac_arg
2986   do
2987     case $ac_arg in
2988     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2989     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2990     | -silent | --silent | --silen | --sile | --sil)
2991       continue ;;
2992     *\'*)
2993       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2994     esac
2995     case $ac_pass in
2996     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2997     2)
2998       as_fn_append ac_configure_args1 " '$ac_arg'"
2999       if test $ac_must_keep_next = true; then
3000         ac_must_keep_next=false # Got value, back to normal.
3001       else
3002         case $ac_arg in
3003           *=* | --config-cache | -C | -disable-* | --disable-* \
3004           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3005           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3006           | -with-* | --with-* | -without-* | --without-* | --x)
3007             case "$ac_configure_args0 " in
3008               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3009             esac
3010             ;;
3011           -* ) ac_must_keep_next=true ;;
3012         esac
3013       fi
3014       as_fn_append ac_configure_args " '$ac_arg'"
3015       ;;
3016     esac
3017   done
3018 done
3019 { ac_configure_args0=; unset ac_configure_args0;}
3020 { ac_configure_args1=; unset ac_configure_args1;}
3021 
3022 # When interrupted or exit'd, cleanup temporary files, and complete
3023 # config.log.  We remove comments because anyway the quotes in there
3024 # would cause problems or look ugly.
3025 # WARNING: Use '\'' to represent an apostrophe within the trap.
3026 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3027 trap 'exit_status=$?
3028   # Save into config.log some information that might help in debugging.
3029   {
3030     echo
3031 
3032     $as_echo "## ---------------- ##
3033 ## Cache variables. ##
3034 ## ---------------- ##"
3035     echo
3036     # The following way of writing the cache mishandles newlines in values,
3037 (
3038   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3039     eval ac_val=\$$ac_var
3040     case $ac_val in #(
3041     *${as_nl}*)
3042       case $ac_var in #(
3043       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3044 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3045       esac
3046       case $ac_var in #(
3047       _ | IFS | as_nl) ;; #(
3048       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3049       *) { eval $ac_var=; unset $ac_var;} ;;
3050       esac ;;
3051     esac
3052   done
3053   (set) 2>&1 |
3054     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3055     *${as_nl}ac_space=\ *)
3056       sed -n \
3057         "s/'\''/'\''\\\\'\'''\''/g;
3058           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3059       ;; #(
3060     *)
3061       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3062       ;;
3063     esac |
3064     sort
3065 )
3066     echo
3067 
3068     $as_echo "## ----------------- ##
3069 ## Output variables. ##
3070 ## ----------------- ##"
3071     echo
3072     for ac_var in $ac_subst_vars
3073     do
3074       eval ac_val=\$$ac_var
3075       case $ac_val in
3076       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3077       esac
3078       $as_echo "$ac_var='\''$ac_val'\''"
3079     done | sort
3080     echo
3081 
3082     if test -n "$ac_subst_files"; then
3083       $as_echo "## ------------------- ##
3084 ## File substitutions. ##
3085 ## ------------------- ##"
3086       echo
3087       for ac_var in $ac_subst_files
3088       do
3089         eval ac_val=\$$ac_var
3090         case $ac_val in
3091         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3092         esac
3093         $as_echo "$ac_var='\''$ac_val'\''"
3094       done | sort
3095       echo
3096     fi
3097 
3098     if test -s confdefs.h; then
3099       $as_echo "## ----------- ##
3100 ## confdefs.h. ##
3101 ## ----------- ##"
3102       echo
3103       cat confdefs.h
3104       echo
3105     fi
3106     test "$ac_signal" != 0 &&
3107       $as_echo "$as_me: caught signal $ac_signal"
3108     $as_echo "$as_me: exit $exit_status"
3109   } >&5
3110   rm -f core *.core core.conftest.* &&
3111     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3112     exit $exit_status
3113 ' 0
3114 for ac_signal in 1 2 13 15; do
3115   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3116 done
3117 ac_signal=0
3118 
3119 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3120 rm -f -r conftest* confdefs.h
3121 
3122 $as_echo "/* confdefs.h */" > confdefs.h
3123 
3124 # Predefined preprocessor variables.
3125 
3126 cat >>confdefs.h <<_ACEOF
3127 #define PACKAGE_NAME "$PACKAGE_NAME"
3128 _ACEOF
3129 
3130 cat >>confdefs.h <<_ACEOF
3131 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3132 _ACEOF
3133 
3134 cat >>confdefs.h <<_ACEOF
3135 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3136 _ACEOF
3137 
3138 cat >>confdefs.h <<_ACEOF
3139 #define PACKAGE_STRING "$PACKAGE_STRING"
3140 _ACEOF
3141 
3142 cat >>confdefs.h <<_ACEOF
3143 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3144 _ACEOF
3145 
3146 cat >>confdefs.h <<_ACEOF
3147 #define PACKAGE_URL "$PACKAGE_URL"
3148 _ACEOF
3149 
3150 
3151 # Let the site file select an alternate cache file if it wants to.
3152 # Prefer an explicitly selected file to automatically selected ones.
3153 ac_site_file1=NONE
3154 ac_site_file2=NONE
3155 if test -n "$CONFIG_SITE"; then
3156   # We do not want a PATH search for config.site.
3157   case $CONFIG_SITE in #((
3158     -*)  ac_site_file1=./$CONFIG_SITE;;
3159     */*) ac_site_file1=$CONFIG_SITE;;
3160     *)   ac_site_file1=./$CONFIG_SITE;;
3161   esac
3162 elif test "x$prefix" != xNONE; then
3163   ac_site_file1=$prefix/share/config.site
3164   ac_site_file2=$prefix/etc/config.site
3165 else
3166   ac_site_file1=$ac_default_prefix/share/config.site
3167   ac_site_file2=$ac_default_prefix/etc/config.site
3168 fi
3169 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3170 do
3171   test "x$ac_site_file" = xNONE && continue
3172   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3173     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3174 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3175     sed 's/^/| /' "$ac_site_file" >&5
3176     . "$ac_site_file" \
3177       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3179 as_fn_error $? "failed to load site script $ac_site_file
3180 See \`config.log' for more details" "$LINENO" 5; }
3181   fi
3182 done
3183 
3184 if test -r "$cache_file"; then
3185   # Some versions of bash will fail to source /dev/null (special files
3186   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3187   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3188     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3189 $as_echo "$as_me: loading cache $cache_file" >&6;}
3190     case $cache_file in
3191       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3192       *)                      . "./$cache_file";;
3193     esac
3194   fi
3195 else
3196   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3197 $as_echo "$as_me: creating cache $cache_file" >&6;}
3198   >$cache_file
3199 fi
3200 
3201 # Check that the precious variables saved in the cache have kept the same
3202 # value.
3203 ac_cache_corrupted=false
3204 for ac_var in $ac_precious_vars; do
3205   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3206   eval ac_new_set=\$ac_env_${ac_var}_set
3207   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3208   eval ac_new_val=\$ac_env_${ac_var}_value
3209   case $ac_old_set,$ac_new_set in
3210     set,)
3211       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3212 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3213       ac_cache_corrupted=: ;;
3214     ,set)
3215       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3216 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3217       ac_cache_corrupted=: ;;
3218     ,);;
3219     *)
3220       if test "x$ac_old_val" != "x$ac_new_val"; then
3221         # differences in whitespace do not lead to failure.
3222         ac_old_val_w=`echo x $ac_old_val`
3223         ac_new_val_w=`echo x $ac_new_val`
3224         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3225           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3226 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3227           ac_cache_corrupted=:
3228         else
3229           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3230 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3231           eval $ac_var=\$ac_old_val
3232         fi
3233         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3234 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3235         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3236 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3237       fi;;
3238   esac
3239   # Pass precious variables to config.status.
3240   if test "$ac_new_set" = set; then
3241     case $ac_new_val in
3242     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3243     *) ac_arg=$ac_var=$ac_new_val ;;
3244     esac
3245     case " $ac_configure_args " in
3246       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3247       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3248     esac
3249   fi
3250 done
3251 if $ac_cache_corrupted; then
3252   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3253 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3254   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3255 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3256   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3257 fi
3258 ## -------------------- ##
3259 ## Main body of script. ##
3260 ## -------------------- ##
3261 
3262 ac_ext=c
3263 ac_cpp='$CPP $CPPFLAGS'
3264 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3265 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3266 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3267 
3268 
3269 
3270 ac_aux_dir=
3271 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3272   if test -f "$ac_dir/install-sh"; then
3273     ac_aux_dir=$ac_dir
3274     ac_install_sh="$ac_aux_dir/install-sh -c"
3275     break
3276   elif test -f "$ac_dir/install.sh"; then
3277     ac_aux_dir=$ac_dir
3278     ac_install_sh="$ac_aux_dir/install.sh -c"
3279     break
3280   elif test -f "$ac_dir/shtool"; then
3281     ac_aux_dir=$ac_dir
3282     ac_install_sh="$ac_aux_dir/shtool install -c"
3283     break
3284   fi
3285 done
3286 if test -z "$ac_aux_dir"; then
3287   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
3288 fi
3289 
3290 # These three variables are undocumented and unsupported,
3291 # and are intended to be withdrawn in a future Autoconf release.
3292 # They can cause serious problems if a builder's source tree is in a directory
3293 # whose full name contains unusual characters.
3294 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3295 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3296 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3297 
3298 
3299 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3300 
3301 #
3302 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3303 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3304 #
3305 # This code is free software; you can redistribute it and/or modify it
3306 # under the terms of the GNU General Public License version 2 only, as
3307 # published by the Free Software Foundation.  Oracle designates this
3308 # particular file as subject to the "Classpath" exception as provided
3309 # by Oracle in the LICENSE file that accompanied this code.
3310 #
3311 # This code is distributed in the hope that it will be useful, but WITHOUT
3312 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3313 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3314 # version 2 for more details (a copy is included in the LICENSE file that
3315 # accompanied this code).
3316 #
3317 # You should have received a copy of the GNU General Public License version
3318 # 2 along with this work; if not, write to the Free Software Foundation,
3319 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3320 #
3321 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3322 # or visit www.oracle.com if you need additional information or have any
3323 # questions.
3324 #
3325 
3326 #
3327 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3328 #
3329 # This program is free software; you can redistribute it and/or modify
3330 # it under the terms of the GNU General Public License as published by
3331 # the Free Software Foundation; either version 2 of the License, or
3332 # (at your option) any later version.
3333 #
3334 # This program is distributed in the hope that it will be useful, but
3335 # WITHOUT ANY WARRANTY; without even the implied warranty of
3336 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3337 # General Public License for more details.
3338 #
3339 # You should have received a copy of the GNU General Public License
3340 # along with this program; if not, write to the Free Software
3341 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3342 #
3343 # As a special exception to the GNU General Public License, if you
3344 # distribute this file as part of a program that contains a
3345 # configuration script generated by Autoconf, you may include it under
3346 # the same distribution terms that you use for the rest of that program.
3347 
3348 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3349 # ----------------------------------
3350 # PKG_PROG_PKG_CONFIG
3351 
3352 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3353 #
3354 # Check to see whether a particular set of modules exists.  Similar
3355 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3356 #
3357 #
3358 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3359 # this or PKG_CHECK_MODULES is called, or make sure to call
3360 # PKG_CHECK_EXISTS manually
3361 # --------------------------------------------------------------
3362 
3363 
3364 
3365 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3366 # ---------------------------------------------
3367 # _PKG_CONFIG
3368 
3369 # _PKG_SHORT_ERRORS_SUPPORTED
3370 # -----------------------------
3371 # _PKG_SHORT_ERRORS_SUPPORTED
3372 
3373 
3374 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3375 # [ACTION-IF-NOT-FOUND])
3376 #
3377 #
3378 # Note that if there is a possibility the first call to
3379 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3380 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3381 #
3382 #
3383 # --------------------------------------------------------------
3384 # PKG_CHECK_MODULES
3385 
3386 
3387 # Include these first...
3388 #
3389 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3390 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3391 #
3392 # This code is free software; you can redistribute it and/or modify it
3393 # under the terms of the GNU General Public License version 2 only, as
3394 # published by the Free Software Foundation.  Oracle designates this
3395 # particular file as subject to the "Classpath" exception as provided
3396 # by Oracle in the LICENSE file that accompanied this code.
3397 #
3398 # This code is distributed in the hope that it will be useful, but WITHOUT
3399 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3400 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3401 # version 2 for more details (a copy is included in the LICENSE file that
3402 # accompanied this code).
3403 #
3404 # You should have received a copy of the GNU General Public License version
3405 # 2 along with this work; if not, write to the Free Software Foundation,
3406 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3407 #
3408 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3409 # or visit www.oracle.com if you need additional information or have any
3410 # questions.
3411 #
3412 
3413 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3414 # If so, then append $1 to $2 \
3415 # Also set JVM_ARG_OK to true/false depending on outcome.
3416 
3417 
3418 # Appends a string to a path variable, only adding the : when needed.
3419 
3420 
3421 # Prepends a string to a path variable, only adding the : when needed.
3422 
3423 
3424 # This will make sure the given variable points to a full and proper
3425 # path. This means:
3426 # 1) There will be no spaces in the path. On unix platforms,
3427 #    spaces in the path will result in an error. On Windows,
3428 #    the path will be rewritten using short-style to be space-free.
3429 # 2) The path will be absolute, and it will be in unix-style (on
3430 #     cygwin).
3431 # $1: The name of the variable to fix
3432 
3433 
3434 # This will make sure the given variable points to a executable
3435 # with a full and proper path. This means:
3436 # 1) There will be no spaces in the path. On unix platforms,
3437 #    spaces in the path will result in an error. On Windows,
3438 #    the path will be rewritten using short-style to be space-free.
3439 # 2) The path will be absolute, and it will be in unix-style (on
3440 #     cygwin).
3441 # Any arguments given to the executable is preserved.
3442 # If the input variable does not have a directory specification, then
3443 # it need to be in the PATH.
3444 # $1: The name of the variable to fix
3445 
3446 
3447 
3448 
3449 # Register a --with argument but mark it as deprecated
3450 # $1: The name of the with argument to deprecate, not including --with-
3451 
3452 
3453 # Register a --enable argument but mark it as deprecated
3454 # $1: The name of the with argument to deprecate, not including --enable-
3455 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3456 
3457 
3458 
3459 
3460 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3461 # $1: variable to check
3462 
3463 
3464 # Check that there are no unprocessed overridden variables left.
3465 # If so, they are an incorrect argument and we will exit with an error.
3466 
3467 
3468 # Setup a tool for the given variable. If correctly specified by the user,
3469 # use that value, otherwise search for the tool using the supplied code snippet.
3470 # $1: variable to set
3471 # $2: code snippet to call to look for the tool
3472 
3473 
3474 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3475 # $1: variable to set
3476 # $2: executable name (or list of names) to look for
3477 
3478 
3479 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3480 # $1: variable to set
3481 # $2: executable name (or list of names) to look for
3482 
3483 
3484 # Like BASIC_PATH_PROGS but fails if no tool was found.
3485 # $1: variable to set
3486 # $2: executable name (or list of names) to look for
3487 
3488 
3489 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3490 # $1: variable to set
3491 # $2: autoconf macro to call to look for the special tool
3492 
3493 
3494 # Setup the most fundamental tools that relies on not much else to set up,
3495 # but is used by much of the early bootstrap code.
3496 
3497 
3498 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3499 
3500 
3501 
3502 
3503 
3504 
3505 
3506 
3507 
3508 #%%% Simple tools %%%
3509 
3510 # Check if we have found a usable version of make
3511 # $1: the path to a potential make binary (or empty)
3512 # $2: the description on how we found this
3513 
3514 
3515 
3516 
3517 # Goes looking for a usable version of GNU make.
3518 
3519 
3520 
3521 
3522 
3523 
3524 # Check if build directory is on local disk. If not possible to determine,
3525 # we prefer to claim it's local.
3526 # Argument 1: directory to test
3527 # Argument 2: what to do if it is on local disk
3528 # Argument 3: what to do otherwise (remote disk or failure)
3529 
3530 
3531 # Check that source files have basic read permissions set. This might
3532 # not be the case in cygwin in certain conditions.
3533 
3534 
3535 
3536 
3537 # Check for support for specific options in bash
3538 
3539 
3540 #
3541 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3542 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3543 #
3544 # This code is free software; you can redistribute it and/or modify it
3545 # under the terms of the GNU General Public License version 2 only, as
3546 # published by the Free Software Foundation.  Oracle designates this
3547 # particular file as subject to the "Classpath" exception as provided
3548 # by Oracle in the LICENSE file that accompanied this code.
3549 #
3550 # This code is distributed in the hope that it will be useful, but WITHOUT
3551 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3552 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3553 # version 2 for more details (a copy is included in the LICENSE file that
3554 # accompanied this code).
3555 #
3556 # You should have received a copy of the GNU General Public License version
3557 # 2 along with this work; if not, write to the Free Software Foundation,
3558 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3559 #
3560 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3561 # or visit www.oracle.com if you need additional information or have any
3562 # questions.
3563 #
3564 
3565 
3566 
3567 
3568 
3569 # Helper function which possibly converts a path using DOS-style short mode.
3570 # If so, the updated path is stored in $new_path.
3571 # $1: The path to check
3572 
3573 
3574 # Helper function which possibly converts a path using DOS-style short mode.
3575 # If so, the updated path is stored in $new_path.
3576 # $1: The path to check
3577 
3578 
3579 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3580 # and could probably be heavily simplified. However, all changes in this
3581 # area tend to need lot of testing in different scenarios, and in lack of
3582 # proper unit testing, cleaning this up has not been deemed worth the effort
3583 # at the moment.
3584 
3585 
3586 
3587 
3588 
3589 
3590 
3591 
3592 
3593 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3594 
3595 
3596 
3597 
3598 #
3599 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3600 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601 #
3602 # This code is free software; you can redistribute it and/or modify it
3603 # under the terms of the GNU General Public License version 2 only, as
3604 # published by the Free Software Foundation.  Oracle designates this
3605 # particular file as subject to the "Classpath" exception as provided
3606 # by Oracle in the LICENSE file that accompanied this code.
3607 #
3608 # This code is distributed in the hope that it will be useful, but WITHOUT
3609 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611 # version 2 for more details (a copy is included in the LICENSE file that
3612 # accompanied this code).
3613 #
3614 # You should have received a copy of the GNU General Public License version
3615 # 2 along with this work; if not, write to the Free Software Foundation,
3616 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617 #
3618 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619 # or visit www.oracle.com if you need additional information or have any
3620 # questions.
3621 #
3622 
3623 
3624 
3625 
3626 
3627 
3628 
3629 
3630 
3631 
3632 
3633 # ... then the rest
3634 #
3635 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3636 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3637 #
3638 # This code is free software; you can redistribute it and/or modify it
3639 # under the terms of the GNU General Public License version 2 only, as
3640 # published by the Free Software Foundation.  Oracle designates this
3641 # particular file as subject to the "Classpath" exception as provided
3642 # by Oracle in the LICENSE file that accompanied this code.
3643 #
3644 # This code is distributed in the hope that it will be useful, but WITHOUT
3645 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3646 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3647 # version 2 for more details (a copy is included in the LICENSE file that
3648 # accompanied this code).
3649 #
3650 # You should have received a copy of the GNU General Public License version
3651 # 2 along with this work; if not, write to the Free Software Foundation,
3652 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3653 #
3654 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3655 # or visit www.oracle.com if you need additional information or have any
3656 # questions.
3657 #
3658 
3659 ########################################################################
3660 # This file handles detection of the Boot JDK. The Boot JDK detection
3661 # process has been developed as a response to solve a complex real-world
3662 # problem. Initially, it was simple, but it has grown as platform after
3663 # platform, idiosyncracy after idiosyncracy has been supported.
3664 #
3665 # The basic idea is this:
3666 # 1) You need an acceptable *) JDK to use as a Boot JDK
3667 # 2) There are several ways to locate a JDK, that are mostly platform
3668 #    dependent **)
3669 # 3) You can have multiple JDKs installed
3670 # 4) If possible, configure should try to dig out an acceptable JDK
3671 #    automatically, without having to resort to command-line options
3672 #
3673 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3674 #     javac) and not a JRE, etc.
3675 #
3676 # **) On Windows we typically use a well-known path.
3677 #     On MacOSX we typically use the tool java_home.
3678 #     On Linux we typically find javac in the $PATH, and then follow a
3679 #     chain of symlinks that often ends up in a real JDK.
3680 #
3681 # This leads to the code where we check in different ways to locate a
3682 # JDK, and if one is found, check if it is acceptable. If not, we print
3683 # our reasons for rejecting it (useful when debugging non-working
3684 # configure situations) and continue checking the next one.
3685 ########################################################################
3686 
3687 # Execute the check given as argument, and verify the result
3688 # If the Boot JDK was previously found, do nothing
3689 # $1 A command line (typically autoconf macro) to execute
3690 
3691 
3692 # Test: Is bootjdk explicitely set by command line arguments?
3693 
3694 
3695 # Test: Is bootjdk available from builddeps?
3696 
3697 
3698 # Test: Is $JAVA_HOME set?
3699 
3700 
3701 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3702 
3703 
3704 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3705 # $1: Argument to the java_home binary (optional)
3706 
3707 
3708 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3709 
3710 
3711 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3712 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3713 # $1 = Path to directory containing jdk installations.
3714 # $2 = String to append to the found JDK directory to get the proper JDK home
3715 
3716 
3717 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3718 # environmental variable as base for where to look.
3719 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3720 
3721 
3722 # Test: Is there a JDK installed in default, well-known locations?
3723 
3724 
3725 # Check that a command-line tool in the Boot JDK is correct
3726 # $1 = name of variable to assign
3727 # $2 = name of binary
3728 
3729 
3730 ###############################################################################
3731 #
3732 # We need a Boot JDK to bootstrap the build.
3733 #
3734 
3735 
3736 
3737 
3738 
3739 #
3740 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742 #
3743 # This code is free software; you can redistribute it and/or modify it
3744 # under the terms of the GNU General Public License version 2 only, as
3745 # published by the Free Software Foundation.  Oracle designates this
3746 # particular file as subject to the "Classpath" exception as provided
3747 # by Oracle in the LICENSE file that accompanied this code.
3748 #
3749 # This code is distributed in the hope that it will be useful, but WITHOUT
3750 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752 # version 2 for more details (a copy is included in the LICENSE file that
3753 # accompanied this code).
3754 #
3755 # You should have received a copy of the GNU General Public License version
3756 # 2 along with this work; if not, write to the Free Software Foundation,
3757 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758 #
3759 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760 # or visit www.oracle.com if you need additional information or have any
3761 # questions.
3762 #
3763 
3764 
3765 
3766 
3767 
3768 
3769 
3770 
3771 
3772 
3773 
3774 
3775 
3776 
3777 
3778 
3779 
3780 
3781 
3782 
3783 #
3784 # Copyright (c) 2011, 2014, 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 
3810 
3811 
3812 # Documentation on common flags used for solstudio in HIGHEST.
3813 #
3814 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3815 #          done with care, there are some assumptions below that need to
3816 #          be understood about the use of pointers, and IEEE behavior.
3817 #
3818 # -fns: Use non-standard floating point mode (not IEEE 754)
3819 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3820 # -fsingle: Use single precision floating point with 'float'
3821 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3822 #   (Source with excessing pointer casting and data access with mixed
3823 #    pointer types are not recommended)
3824 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3825 #   (If you expect perfect errno behavior, do not use this)
3826 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3827 # -xrestrict: Pointer parameters to functions do not overlap
3828 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3829 #    If you pass in multiple pointers to the same data, do not use this)
3830 # -xlibmil: Inline some library routines
3831 #   (If you expect perfect errno behavior, do not use this)
3832 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3833 #   (If you expect perfect errno behavior, do not use this)
3834 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3835 
3836     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3837     # Bug?
3838     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3839     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3840     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3841     #fi
3842 
3843 
3844 
3845 
3846 
3847 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3848 #                                   [RUN-IF-FALSE])
3849 # ------------------------------------------------------------
3850 # Check that the c and c++ compilers support an argument
3851 
3852 
3853 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3854 #                                    [RUN-IF-FALSE])
3855 # ------------------------------------------------------------
3856 # Check that the linker support an argument
3857 
3858 
3859 
3860 
3861 #
3862 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3863 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3864 #
3865 # This code is free software; you can redistribute it and/or modify it
3866 # under the terms of the GNU General Public License version 2 only, as
3867 # published by the Free Software Foundation.  Oracle designates this
3868 # particular file as subject to the "Classpath" exception as provided
3869 # by Oracle in the LICENSE file that accompanied this code.
3870 #
3871 # This code is distributed in the hope that it will be useful, but WITHOUT
3872 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3873 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3874 # version 2 for more details (a copy is included in the LICENSE file that
3875 # accompanied this code).
3876 #
3877 # You should have received a copy of the GNU General Public License version
3878 # 2 along with this work; if not, write to the Free Software Foundation,
3879 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3880 #
3881 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3882 # or visit www.oracle.com if you need additional information or have any
3883 # questions.
3884 #
3885 
3886 
3887 
3888 
3889 
3890 cygwin_help() {
3891   case $1 in
3892     unzip)
3893       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3894       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3895       ;;
3896     zip)
3897       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3898       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3899       ;;
3900     make)
3901       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3902       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3903       ;;
3904     freetype)
3905       HELP_MSG="
3906 The freetype library can now be build during the configure process.
3907 Download the freetype sources and unpack them into an arbitrary directory:
3908 
3909 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3910 tar -xzf freetype-2.5.3.tar.gz
3911 
3912 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3913 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3914 builds or into '<freetype_src>/lib32' for 32-bit builds.
3915 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3916 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3917       ;;
3918   esac
3919 }
3920 
3921 msys_help() {
3922   PKGHANDLER_COMMAND=""
3923 }
3924 
3925 apt_help() {
3926   case $1 in
3927     devkit)
3928       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3929     openjdk)
3930       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3931     alsa)
3932       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3933     cups)
3934       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3935     freetype)
3936       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3937     pulse)
3938       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3939     x11)
3940       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3941     ccache)
3942       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3943   esac
3944 }
3945 
3946 yum_help() {
3947   case $1 in
3948     devkit)
3949       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3950     openjdk)
3951       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3952     alsa)
3953       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3954     cups)
3955       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3956     freetype)
3957       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3958     pulse)
3959       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3960     x11)
3961       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3962     ccache)
3963       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3964   esac
3965 }
3966 
3967 port_help() {
3968   PKGHANDLER_COMMAND=""
3969 }
3970 
3971 pkgutil_help() {
3972   PKGHANDLER_COMMAND=""
3973 }
3974 
3975 pkgadd_help() {
3976   PKGHANDLER_COMMAND=""
3977 }
3978 
3979 # This function will check if we're called from the "configure" wrapper while
3980 # printing --help. If so, we will print out additional information that can
3981 # only be extracted within the autoconf script, and then exit. This must be
3982 # called at the very beginning in configure.ac.
3983 
3984 
3985 
3986 
3987 
3988 
3989 #
3990 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3991 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3992 #
3993 # This code is free software; you can redistribute it and/or modify it
3994 # under the terms of the GNU General Public License version 2 only, as
3995 # published by the Free Software Foundation.  Oracle designates this
3996 # particular file as subject to the "Classpath" exception as provided
3997 # by Oracle in the LICENSE file that accompanied this code.
3998 #
3999 # This code is distributed in the hope that it will be useful, but WITHOUT
4000 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4001 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4002 # version 2 for more details (a copy is included in the LICENSE file that
4003 # accompanied this code).
4004 #
4005 # You should have received a copy of the GNU General Public License version
4006 # 2 along with this work; if not, write to the Free Software Foundation,
4007 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4008 #
4009 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4010 # or visit www.oracle.com if you need additional information or have any
4011 # questions.
4012 #
4013 
4014 
4015 
4016 
4017 
4018 
4019 
4020 
4021 
4022 
4023 ###############################################################################
4024 #
4025 # Should we build only OpenJDK even if closed sources are present?
4026 #
4027 
4028 
4029 
4030 
4031 ###############################################################################
4032 #
4033 # Setup version numbers
4034 #
4035 
4036 
4037 
4038 
4039 
4040 
4041 #
4042 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4043 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4044 #
4045 # This code is free software; you can redistribute it and/or modify it
4046 # under the terms of the GNU General Public License version 2 only, as
4047 # published by the Free Software Foundation.  Oracle designates this
4048 # particular file as subject to the "Classpath" exception as provided
4049 # by Oracle in the LICENSE file that accompanied this code.
4050 #
4051 # This code is distributed in the hope that it will be useful, but WITHOUT
4052 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4053 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4054 # version 2 for more details (a copy is included in the LICENSE file that
4055 # accompanied this code).
4056 #
4057 # You should have received a copy of the GNU General Public License version
4058 # 2 along with this work; if not, write to the Free Software Foundation,
4059 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4060 #
4061 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4062 # or visit www.oracle.com if you need additional information or have any
4063 # questions.
4064 #
4065 
4066 
4067 
4068 
4069 
4070 
4071 
4072 
4073 
4074 
4075 
4076 
4077 
4078 
4079 
4080 
4081 
4082 
4083 
4084 
4085 
4086 #
4087 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4088 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4089 #
4090 # This code is free software; you can redistribute it and/or modify it
4091 # under the terms of the GNU General Public License version 2 only, as
4092 # published by the Free Software Foundation.  Oracle designates this
4093 # particular file as subject to the "Classpath" exception as provided
4094 # by Oracle in the LICENSE file that accompanied this code.
4095 #
4096 # This code is distributed in the hope that it will be useful, but WITHOUT
4097 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4098 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4099 # version 2 for more details (a copy is included in the LICENSE file that
4100 # accompanied this code).
4101 #
4102 # You should have received a copy of the GNU General Public License version
4103 # 2 along with this work; if not, write to the Free Software Foundation,
4104 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4105 #
4106 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4107 # or visit www.oracle.com if you need additional information or have any
4108 # questions.
4109 #
4110 
4111 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4112 # Converts autoconf style CPU name to OpenJDK style, into
4113 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4114 
4115 
4116 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4117 # Converts autoconf style OS name to OpenJDK style, into
4118 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4119 
4120 
4121 # Expects $host_os $host_cpu $build_os and $build_cpu
4122 # and $with_target_bits to have been setup!
4123 #
4124 # Translate the standard triplet(quadruplet) definition
4125 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4126 # OPENJDK_BUILD_OS, etc.
4127 
4128 
4129 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4130 # accordingly. Must be done after setting up build and target system, but before
4131 # doing anything else with these values.
4132 
4133 
4134 # Setup the legacy variables, for controlling the old makefiles.
4135 #
4136 
4137 
4138 
4139 
4140 #%%% Build and target systems %%%
4141 
4142 
4143 
4144 
4145 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4146 # Add -mX to various FLAGS variables.
4147 
4148 
4149 
4150 
4151 
4152 
4153 #
4154 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4155 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156 #
4157 # This code is free software; you can redistribute it and/or modify it
4158 # under the terms of the GNU General Public License version 2 only, as
4159 # published by the Free Software Foundation.  Oracle designates this
4160 # particular file as subject to the "Classpath" exception as provided
4161 # by Oracle in the LICENSE file that accompanied this code.
4162 #
4163 # This code is distributed in the hope that it will be useful, but WITHOUT
4164 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166 # version 2 for more details (a copy is included in the LICENSE file that
4167 # accompanied this code).
4168 #
4169 # You should have received a copy of the GNU General Public License version
4170 # 2 along with this work; if not, write to the Free Software Foundation,
4171 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172 #
4173 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174 # or visit www.oracle.com if you need additional information or have any
4175 # questions.
4176 #
4177 
4178 
4179 
4180 
4181 
4182 
4183 
4184 
4185 #
4186 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4187 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4188 #
4189 # This code is free software; you can redistribute it and/or modify it
4190 # under the terms of the GNU General Public License version 2 only, as
4191 # published by the Free Software Foundation.  Oracle designates this
4192 # particular file as subject to the "Classpath" exception as provided
4193 # by Oracle in the LICENSE file that accompanied this code.
4194 #
4195 # This code is distributed in the hope that it will be useful, but WITHOUT
4196 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4197 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4198 # version 2 for more details (a copy is included in the LICENSE file that
4199 # accompanied this code).
4200 #
4201 # You should have received a copy of the GNU General Public License version
4202 # 2 along with this work; if not, write to the Free Software Foundation,
4203 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4204 #
4205 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4206 # or visit www.oracle.com if you need additional information or have any
4207 # questions.
4208 #
4209 
4210 ########################################################################
4211 # This file is responsible for detecting, verifying and setting up the
4212 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4213 # proper paths to the binaries, but it will not setup any flags.
4214 #
4215 # The binaries used is determined by the toolchain type, which is the family of
4216 # compilers and related tools that are used.
4217 ########################################################################
4218 
4219 
4220 # All valid toolchains, regardless of platform (used by help.m4)
4221 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4222 
4223 # These toolchains are valid on different platforms
4224 VALID_TOOLCHAINS_linux="gcc clang"
4225 VALID_TOOLCHAINS_solaris="solstudio"
4226 VALID_TOOLCHAINS_macosx="gcc clang"
4227 VALID_TOOLCHAINS_aix="xlc"
4228 VALID_TOOLCHAINS_windows="microsoft"
4229 
4230 # Toolchain descriptions
4231 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4232 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4233 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4234 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4235 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4236 
4237 # Setup a number of variables describing how native output files are
4238 # named on this platform/toolchain.
4239 
4240 
4241 # Determine which toolchain type to use, and make sure it is valid for this
4242 # platform. Setup various information about the selected toolchain.
4243 
4244 
4245 # Before we start detecting the toolchain executables, we might need some
4246 # special setup, e.g. additional paths etc.
4247 
4248 
4249 # Restore path, etc
4250 
4251 
4252 # Check if a compiler is of the toolchain type we expect, and save the version
4253 # information from it. If the compiler does not match the expected type,
4254 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4255 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4256 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4257 #
4258 # $1 = compiler to test (CC or CXX)
4259 # $2 = human readable name of compiler (C or C++)
4260 
4261 
4262 # Try to locate the given C or C++ compiler in the path, or otherwise.
4263 #
4264 # $1 = compiler to test (CC or CXX)
4265 # $2 = human readable name of compiler (C or C++)
4266 # $3 = list of compiler names to search for
4267 
4268 
4269 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4270 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4271 # archiver (AR). Verify that the compilers are correct according to the
4272 # toolchain type.
4273 
4274 
4275 # Setup additional tools that is considered a part of the toolchain, but not the
4276 # core part. Many of these are highly platform-specific and do not exist,
4277 # and/or are not needed on all platforms.
4278 
4279 
4280 # Setup the build tools (i.e, the compiler and linker used to build programs
4281 # that should be run on the build platform, not the target platform, as a build
4282 # helper). Since the non-cross-compile case uses the normal, target compilers
4283 # for this, we can only do this after these have been setup.
4284 
4285 
4286 # Setup legacy variables that are still needed as alternative ways to refer to
4287 # parts of the toolchain.
4288 
4289 
4290 # Do some additional checks on the detected tools.
4291 
4292 
4293 # Setup the JTReg Regression Test Harness.
4294 
4295 
4296 #
4297 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4298 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4299 #
4300 # This code is free software; you can redistribute it and/or modify it
4301 # under the terms of the GNU General Public License version 2 only, as
4302 # published by the Free Software Foundation.  Oracle designates this
4303 # particular file as subject to the "Classpath" exception as provided
4304 # by Oracle in the LICENSE file that accompanied this code.
4305 #
4306 # This code is distributed in the hope that it will be useful, but WITHOUT
4307 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4308 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4309 # version 2 for more details (a copy is included in the LICENSE file that
4310 # accompanied this code).
4311 #
4312 # You should have received a copy of the GNU General Public License version
4313 # 2 along with this work; if not, write to the Free Software Foundation,
4314 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4315 #
4316 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4317 # or visit www.oracle.com if you need additional information or have any
4318 # questions.
4319 #
4320 
4321 ################################################################################
4322 
4323 VALID_VS_VERSIONS="2010 2012 2013"
4324 
4325 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4326 VS_VERSION_INTERNAL_2010=100
4327 VS_MSVCR_2010=msvcr100.dll
4328 # We don't use msvcp on Visual Studio 2010
4329 #VS_MSVCP_2010=msvcp100.dll
4330 VS_ENVVAR_2010="VS100COMNTOOLS"
4331 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4332 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4333 VS_VS_PLATFORM_NAME_2010="v100"
4334 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4335 
4336 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4337 VS_VERSION_INTERNAL_2012=110
4338 VS_MSVCR_2012=msvcr110.dll
4339 VS_MSVCP_2012=msvcp110.dll
4340 VS_ENVVAR_2012="VS110COMNTOOLS"
4341 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4342 VS_SDK_INSTALLDIR_2012=
4343 VS_VS_PLATFORM_NAME_2012="v110"
4344 VS_SDK_PLATFORM_NAME_2012=
4345 
4346 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4347 VS_VERSION_INTERNAL_2013=120
4348 VS_MSVCR_2013=msvcr120.dll
4349 VS_MSVCP_2013=msvcp120.dll
4350 VS_ENVVAR_2013="VS120COMNTOOLS"
4351 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4352 VS_SDK_INSTALLDIR_2013=
4353 VS_VS_PLATFORM_NAME_2013="v120"
4354 VS_SDK_PLATFORM_NAME_2013=
4355 
4356 ################################################################################
4357 
4358 
4359 
4360 ################################################################################
4361 
4362 
4363 
4364 ################################################################################
4365 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4366 # build environment and assigns it to VS_ENV_CMD
4367 
4368 
4369 ################################################################################
4370 
4371 
4372 
4373 ################################################################################
4374 # Check if the VS env variables were setup prior to running configure.
4375 # If not, then find vcvarsall.bat and run it automatically, and integrate
4376 # the set env variables into the spec file.
4377 
4378 
4379 
4380 
4381 
4382 
4383 
4384 
4385 
4386 
4387 
4388 
4389 
4390 # This line needs to be here, verbatim, after all includes and the dummy hook
4391 # definitions. It is replaced with custom functionality when building
4392 # custom sources.
4393 #CUSTOM_AUTOCONF_INCLUDE
4394 
4395 # Do not change or remove the following line, it is needed for consistency checks:
4396 DATE_WHEN_GENERATED=1424202275
4397 
4398 ###############################################################################
4399 #
4400 # Initialization / Boot-strapping
4401 #
4402 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4403 # thus it jumps back and forth, each time gaining something needed later on.
4404 #
4405 ###############################################################################
4406 
4407 # If we are requested to print additional help, do that and then exit.
4408 # This must be the very first call.
4409 
4410   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4411     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4412     $PRINTF "Which are valid to use depends on the build platform.\n"
4413     for toolchain in $VALID_TOOLCHAINS_all; do
4414       # Use indirect variable referencing
4415       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4416       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4417       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4418     done
4419 
4420     # And now exit directly
4421     exit 0
4422   fi
4423 
4424 
4425 # Basic initialization that must happen first of all in the normal process.
4426 
4427   # Save the original command line. This is passed to us by the wrapper configure script.
4428 
4429   # Save the path variable before it gets changed
4430   ORIGINAL_PATH="$PATH"
4431 
4432   DATE_WHEN_CONFIGURED=`LANG=C date`
4433 
4434   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4435 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4436   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4437 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4438 
4439 
4440   # Start with tools that do not need have cross compilation support
4441   # and can be expected to be found in the default PATH. These tools are
4442   # used by configure. Nor are these tools expected to be found in the
4443   # devkit from the builddeps server either, since they are
4444   # needed to download the devkit.
4445 
4446   # First are all the simple required tools.
4447 
4448 
4449 
4450   # Publish this variable in the help.
4451 
4452 
4453   if test "x$BASENAME" = x; then
4454     # The variable is not set by user, try to locate tool using the code snippet
4455     for ac_prog in basename
4456 do
4457   # Extract the first word of "$ac_prog", so it can be a program name with args.
4458 set dummy $ac_prog; ac_word=$2
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4460 $as_echo_n "checking for $ac_word... " >&6; }
4461 if ${ac_cv_path_BASENAME+:} false; then :
4462   $as_echo_n "(cached) " >&6
4463 else
4464   case $BASENAME in
4465   [\\/]* | ?:[\\/]*)
4466   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4467   ;;
4468   *)
4469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4470 for as_dir in $PATH
4471 do
4472   IFS=$as_save_IFS
4473   test -z "$as_dir" && as_dir=.
4474     for ac_exec_ext in '' $ac_executable_extensions; do
4475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4476     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4478     break 2
4479   fi
4480 done
4481   done
4482 IFS=$as_save_IFS
4483 
4484   ;;
4485 esac
4486 fi
4487 BASENAME=$ac_cv_path_BASENAME
4488 if test -n "$BASENAME"; then
4489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4490 $as_echo "$BASENAME" >&6; }
4491 else
4492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4493 $as_echo "no" >&6; }
4494 fi
4495 
4496 
4497   test -n "$BASENAME" && break
4498 done
4499 
4500   else
4501     # The variable is set, but is it from the command line or the environment?
4502 
4503     # Try to remove the string !BASENAME! from our list.
4504     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4505     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4506       # If it failed, the variable was not from the command line. Ignore it,
4507       # but warn the user (except for BASH, which is always set by the calling BASH).
4508       if test "xBASENAME" != xBASH; then
4509         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4510 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4511       fi
4512       # Try to locate tool using the code snippet
4513       for ac_prog in basename
4514 do
4515   # Extract the first word of "$ac_prog", so it can be a program name with args.
4516 set dummy $ac_prog; ac_word=$2
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4518 $as_echo_n "checking for $ac_word... " >&6; }
4519 if ${ac_cv_path_BASENAME+:} false; then :
4520   $as_echo_n "(cached) " >&6
4521 else
4522   case $BASENAME in
4523   [\\/]* | ?:[\\/]*)
4524   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4525   ;;
4526   *)
4527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4528 for as_dir in $PATH
4529 do
4530   IFS=$as_save_IFS
4531   test -z "$as_dir" && as_dir=.
4532     for ac_exec_ext in '' $ac_executable_extensions; do
4533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4534     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4536     break 2
4537   fi
4538 done
4539   done
4540 IFS=$as_save_IFS
4541 
4542   ;;
4543 esac
4544 fi
4545 BASENAME=$ac_cv_path_BASENAME
4546 if test -n "$BASENAME"; then
4547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4548 $as_echo "$BASENAME" >&6; }
4549 else
4550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4551 $as_echo "no" >&6; }
4552 fi
4553 
4554 
4555   test -n "$BASENAME" && break
4556 done
4557 
4558     else
4559       # If it succeeded, then it was overridden by the user. We will use it
4560       # for the tool.
4561 
4562       # First remove it from the list of overridden variables, so we can test
4563       # for unknown variables in the end.
4564       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4565 
4566       # Check if the provided tool contains a complete path.
4567       tool_specified="$BASENAME"
4568       tool_basename="${tool_specified##*/}"
4569       if test "x$tool_basename" = "x$tool_specified"; then
4570         # A command without a complete path is provided, search $PATH.
4571         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4572 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4573         # Extract the first word of "$tool_basename", so it can be a program name with args.
4574 set dummy $tool_basename; ac_word=$2
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4576 $as_echo_n "checking for $ac_word... " >&6; }
4577 if ${ac_cv_path_BASENAME+:} false; then :
4578   $as_echo_n "(cached) " >&6
4579 else
4580   case $BASENAME in
4581   [\\/]* | ?:[\\/]*)
4582   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4583   ;;
4584   *)
4585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586 for as_dir in $PATH
4587 do
4588   IFS=$as_save_IFS
4589   test -z "$as_dir" && as_dir=.
4590     for ac_exec_ext in '' $ac_executable_extensions; do
4591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4592     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4594     break 2
4595   fi
4596 done
4597   done
4598 IFS=$as_save_IFS
4599 
4600   ;;
4601 esac
4602 fi
4603 BASENAME=$ac_cv_path_BASENAME
4604 if test -n "$BASENAME"; then
4605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4606 $as_echo "$BASENAME" >&6; }
4607 else
4608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609 $as_echo "no" >&6; }
4610 fi
4611 
4612 
4613         if test "x$BASENAME" = x; then
4614           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4615         fi
4616       else
4617         # Otherwise we believe it is a complete path. Use it as it is.
4618         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4619 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4620         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4621 $as_echo_n "checking for BASENAME... " >&6; }
4622         if test ! -x "$tool_specified"; then
4623           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4624 $as_echo "not found" >&6; }
4625           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4626         fi
4627         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4628 $as_echo "$tool_specified" >&6; }
4629       fi
4630     fi
4631   fi
4632 
4633 
4634 
4635   if test "x$BASENAME" = x; then
4636     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4637   fi
4638 
4639 
4640 
4641 
4642 
4643   # Publish this variable in the help.
4644 
4645 
4646   if test "x$BASH" = x; then
4647     # The variable is not set by user, try to locate tool using the code snippet
4648     for ac_prog in bash
4649 do
4650   # Extract the first word of "$ac_prog", so it can be a program name with args.
4651 set dummy $ac_prog; ac_word=$2
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653 $as_echo_n "checking for $ac_word... " >&6; }
4654 if ${ac_cv_path_BASH+:} false; then :
4655   $as_echo_n "(cached) " >&6
4656 else
4657   case $BASH in
4658   [\\/]* | ?:[\\/]*)
4659   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4660   ;;
4661   *)
4662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663 for as_dir in $PATH
4664 do
4665   IFS=$as_save_IFS
4666   test -z "$as_dir" && as_dir=.
4667     for ac_exec_ext in '' $ac_executable_extensions; do
4668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4669     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671     break 2
4672   fi
4673 done
4674   done
4675 IFS=$as_save_IFS
4676 
4677   ;;
4678 esac
4679 fi
4680 BASH=$ac_cv_path_BASH
4681 if test -n "$BASH"; then
4682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4683 $as_echo "$BASH" >&6; }
4684 else
4685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4687 fi
4688 
4689 
4690   test -n "$BASH" && break
4691 done
4692 
4693   else
4694     # The variable is set, but is it from the command line or the environment?
4695 
4696     # Try to remove the string !BASH! from our list.
4697     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4698     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4699       # If it failed, the variable was not from the command line. Ignore it,
4700       # but warn the user (except for BASH, which is always set by the calling BASH).
4701       if test "xBASH" != xBASH; then
4702         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4703 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4704       fi
4705       # Try to locate tool using the code snippet
4706       for ac_prog in bash
4707 do
4708   # Extract the first word of "$ac_prog", so it can be a program name with args.
4709 set dummy $ac_prog; ac_word=$2
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4711 $as_echo_n "checking for $ac_word... " >&6; }
4712 if ${ac_cv_path_BASH+:} false; then :
4713   $as_echo_n "(cached) " >&6
4714 else
4715   case $BASH in
4716   [\\/]* | ?:[\\/]*)
4717   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4718   ;;
4719   *)
4720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721 for as_dir in $PATH
4722 do
4723   IFS=$as_save_IFS
4724   test -z "$as_dir" && as_dir=.
4725     for ac_exec_ext in '' $ac_executable_extensions; do
4726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4727     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4729     break 2
4730   fi
4731 done
4732   done
4733 IFS=$as_save_IFS
4734 
4735   ;;
4736 esac
4737 fi
4738 BASH=$ac_cv_path_BASH
4739 if test -n "$BASH"; then
4740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4741 $as_echo "$BASH" >&6; }
4742 else
4743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4744 $as_echo "no" >&6; }
4745 fi
4746 
4747 
4748   test -n "$BASH" && break
4749 done
4750 
4751     else
4752       # If it succeeded, then it was overridden by the user. We will use it
4753       # for the tool.
4754 
4755       # First remove it from the list of overridden variables, so we can test
4756       # for unknown variables in the end.
4757       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4758 
4759       # Check if the provided tool contains a complete path.
4760       tool_specified="$BASH"
4761       tool_basename="${tool_specified##*/}"
4762       if test "x$tool_basename" = "x$tool_specified"; then
4763         # A command without a complete path is provided, search $PATH.
4764         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4765 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4766         # Extract the first word of "$tool_basename", so it can be a program name with args.
4767 set dummy $tool_basename; ac_word=$2
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769 $as_echo_n "checking for $ac_word... " >&6; }
4770 if ${ac_cv_path_BASH+:} false; then :
4771   $as_echo_n "(cached) " >&6
4772 else
4773   case $BASH in
4774   [\\/]* | ?:[\\/]*)
4775   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4776   ;;
4777   *)
4778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779 for as_dir in $PATH
4780 do
4781   IFS=$as_save_IFS
4782   test -z "$as_dir" && as_dir=.
4783     for ac_exec_ext in '' $ac_executable_extensions; do
4784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4785     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4787     break 2
4788   fi
4789 done
4790   done
4791 IFS=$as_save_IFS
4792 
4793   ;;
4794 esac
4795 fi
4796 BASH=$ac_cv_path_BASH
4797 if test -n "$BASH"; then
4798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4799 $as_echo "$BASH" >&6; }
4800 else
4801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802 $as_echo "no" >&6; }
4803 fi
4804 
4805 
4806         if test "x$BASH" = x; then
4807           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4808         fi
4809       else
4810         # Otherwise we believe it is a complete path. Use it as it is.
4811         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4812 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4814 $as_echo_n "checking for BASH... " >&6; }
4815         if test ! -x "$tool_specified"; then
4816           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4817 $as_echo "not found" >&6; }
4818           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4819         fi
4820         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4821 $as_echo "$tool_specified" >&6; }
4822       fi
4823     fi
4824   fi
4825 
4826 
4827 
4828   if test "x$BASH" = x; then
4829     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4830   fi
4831 
4832 
4833 
4834 
4835 
4836   # Publish this variable in the help.
4837 
4838 
4839   if test "x$CAT" = x; then
4840     # The variable is not set by user, try to locate tool using the code snippet
4841     for ac_prog in cat
4842 do
4843   # Extract the first word of "$ac_prog", so it can be a program name with args.
4844 set dummy $ac_prog; ac_word=$2
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846 $as_echo_n "checking for $ac_word... " >&6; }
4847 if ${ac_cv_path_CAT+:} false; then :
4848   $as_echo_n "(cached) " >&6
4849 else
4850   case $CAT in
4851   [\\/]* | ?:[\\/]*)
4852   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4853   ;;
4854   *)
4855   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856 for as_dir in $PATH
4857 do
4858   IFS=$as_save_IFS
4859   test -z "$as_dir" && as_dir=.
4860     for ac_exec_ext in '' $ac_executable_extensions; do
4861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4862     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4864     break 2
4865   fi
4866 done
4867   done
4868 IFS=$as_save_IFS
4869 
4870   ;;
4871 esac
4872 fi
4873 CAT=$ac_cv_path_CAT
4874 if test -n "$CAT"; then
4875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4876 $as_echo "$CAT" >&6; }
4877 else
4878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879 $as_echo "no" >&6; }
4880 fi
4881 
4882 
4883   test -n "$CAT" && break
4884 done
4885 
4886   else
4887     # The variable is set, but is it from the command line or the environment?
4888 
4889     # Try to remove the string !CAT! from our list.
4890     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4891     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4892       # If it failed, the variable was not from the command line. Ignore it,
4893       # but warn the user (except for BASH, which is always set by the calling BASH).
4894       if test "xCAT" != xBASH; then
4895         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4896 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4897       fi
4898       # Try to locate tool using the code snippet
4899       for ac_prog in cat
4900 do
4901   # Extract the first word of "$ac_prog", so it can be a program name with args.
4902 set dummy $ac_prog; ac_word=$2
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4904 $as_echo_n "checking for $ac_word... " >&6; }
4905 if ${ac_cv_path_CAT+:} false; then :
4906   $as_echo_n "(cached) " >&6
4907 else
4908   case $CAT in
4909   [\\/]* | ?:[\\/]*)
4910   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4911   ;;
4912   *)
4913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914 for as_dir in $PATH
4915 do
4916   IFS=$as_save_IFS
4917   test -z "$as_dir" && as_dir=.
4918     for ac_exec_ext in '' $ac_executable_extensions; do
4919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4920     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922     break 2
4923   fi
4924 done
4925   done
4926 IFS=$as_save_IFS
4927 
4928   ;;
4929 esac
4930 fi
4931 CAT=$ac_cv_path_CAT
4932 if test -n "$CAT"; then
4933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4934 $as_echo "$CAT" >&6; }
4935 else
4936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4937 $as_echo "no" >&6; }
4938 fi
4939 
4940 
4941   test -n "$CAT" && break
4942 done
4943 
4944     else
4945       # If it succeeded, then it was overridden by the user. We will use it
4946       # for the tool.
4947 
4948       # First remove it from the list of overridden variables, so we can test
4949       # for unknown variables in the end.
4950       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4951 
4952       # Check if the provided tool contains a complete path.
4953       tool_specified="$CAT"
4954       tool_basename="${tool_specified##*/}"
4955       if test "x$tool_basename" = "x$tool_specified"; then
4956         # A command without a complete path is provided, search $PATH.
4957         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4958 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4959         # Extract the first word of "$tool_basename", so it can be a program name with args.
4960 set dummy $tool_basename; ac_word=$2
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962 $as_echo_n "checking for $ac_word... " >&6; }
4963 if ${ac_cv_path_CAT+:} false; then :
4964   $as_echo_n "(cached) " >&6
4965 else
4966   case $CAT in
4967   [\\/]* | ?:[\\/]*)
4968   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4969   ;;
4970   *)
4971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972 for as_dir in $PATH
4973 do
4974   IFS=$as_save_IFS
4975   test -z "$as_dir" && as_dir=.
4976     for ac_exec_ext in '' $ac_executable_extensions; do
4977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4978     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4980     break 2
4981   fi
4982 done
4983   done
4984 IFS=$as_save_IFS
4985 
4986   ;;
4987 esac
4988 fi
4989 CAT=$ac_cv_path_CAT
4990 if test -n "$CAT"; then
4991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4992 $as_echo "$CAT" >&6; }
4993 else
4994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4995 $as_echo "no" >&6; }
4996 fi
4997 
4998 
4999         if test "x$CAT" = x; then
5000           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5001         fi
5002       else
5003         # Otherwise we believe it is a complete path. Use it as it is.
5004         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5005 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5006         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5007 $as_echo_n "checking for CAT... " >&6; }
5008         if test ! -x "$tool_specified"; then
5009           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5010 $as_echo "not found" >&6; }
5011           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5012         fi
5013         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5014 $as_echo "$tool_specified" >&6; }
5015       fi
5016     fi
5017   fi
5018 
5019 
5020 
5021   if test "x$CAT" = x; then
5022     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5023   fi
5024 
5025 
5026 
5027 
5028 
5029   # Publish this variable in the help.
5030 
5031 
5032   if test "x$CHMOD" = x; then
5033     # The variable is not set by user, try to locate tool using the code snippet
5034     for ac_prog in chmod
5035 do
5036   # Extract the first word of "$ac_prog", so it can be a program name with args.
5037 set dummy $ac_prog; ac_word=$2
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039 $as_echo_n "checking for $ac_word... " >&6; }
5040 if ${ac_cv_path_CHMOD+:} false; then :
5041   $as_echo_n "(cached) " >&6
5042 else
5043   case $CHMOD in
5044   [\\/]* | ?:[\\/]*)
5045   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5046   ;;
5047   *)
5048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049 for as_dir in $PATH
5050 do
5051   IFS=$as_save_IFS
5052   test -z "$as_dir" && as_dir=.
5053     for ac_exec_ext in '' $ac_executable_extensions; do
5054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057     break 2
5058   fi
5059 done
5060   done
5061 IFS=$as_save_IFS
5062 
5063   ;;
5064 esac
5065 fi
5066 CHMOD=$ac_cv_path_CHMOD
5067 if test -n "$CHMOD"; then
5068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5069 $as_echo "$CHMOD" >&6; }
5070 else
5071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072 $as_echo "no" >&6; }
5073 fi
5074 
5075 
5076   test -n "$CHMOD" && break
5077 done
5078 
5079   else
5080     # The variable is set, but is it from the command line or the environment?
5081 
5082     # Try to remove the string !CHMOD! from our list.
5083     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5084     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5085       # If it failed, the variable was not from the command line. Ignore it,
5086       # but warn the user (except for BASH, which is always set by the calling BASH).
5087       if test "xCHMOD" != xBASH; then
5088         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5089 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5090       fi
5091       # Try to locate tool using the code snippet
5092       for ac_prog in chmod
5093 do
5094   # Extract the first word of "$ac_prog", so it can be a program name with args.
5095 set dummy $ac_prog; ac_word=$2
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097 $as_echo_n "checking for $ac_word... " >&6; }
5098 if ${ac_cv_path_CHMOD+:} false; then :
5099   $as_echo_n "(cached) " >&6
5100 else
5101   case $CHMOD in
5102   [\\/]* | ?:[\\/]*)
5103   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5104   ;;
5105   *)
5106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107 for as_dir in $PATH
5108 do
5109   IFS=$as_save_IFS
5110   test -z "$as_dir" && as_dir=.
5111     for ac_exec_ext in '' $ac_executable_extensions; do
5112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115     break 2
5116   fi
5117 done
5118   done
5119 IFS=$as_save_IFS
5120 
5121   ;;
5122 esac
5123 fi
5124 CHMOD=$ac_cv_path_CHMOD
5125 if test -n "$CHMOD"; then
5126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5127 $as_echo "$CHMOD" >&6; }
5128 else
5129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130 $as_echo "no" >&6; }
5131 fi
5132 
5133 
5134   test -n "$CHMOD" && break
5135 done
5136 
5137     else
5138       # If it succeeded, then it was overridden by the user. We will use it
5139       # for the tool.
5140 
5141       # First remove it from the list of overridden variables, so we can test
5142       # for unknown variables in the end.
5143       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5144 
5145       # Check if the provided tool contains a complete path.
5146       tool_specified="$CHMOD"
5147       tool_basename="${tool_specified##*/}"
5148       if test "x$tool_basename" = "x$tool_specified"; then
5149         # A command without a complete path is provided, search $PATH.
5150         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5151 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5152         # Extract the first word of "$tool_basename", so it can be a program name with args.
5153 set dummy $tool_basename; ac_word=$2
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5155 $as_echo_n "checking for $ac_word... " >&6; }
5156 if ${ac_cv_path_CHMOD+:} false; then :
5157   $as_echo_n "(cached) " >&6
5158 else
5159   case $CHMOD in
5160   [\\/]* | ?:[\\/]*)
5161   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5162   ;;
5163   *)
5164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165 for as_dir in $PATH
5166 do
5167   IFS=$as_save_IFS
5168   test -z "$as_dir" && as_dir=.
5169     for ac_exec_ext in '' $ac_executable_extensions; do
5170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5171     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173     break 2
5174   fi
5175 done
5176   done
5177 IFS=$as_save_IFS
5178 
5179   ;;
5180 esac
5181 fi
5182 CHMOD=$ac_cv_path_CHMOD
5183 if test -n "$CHMOD"; then
5184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5185 $as_echo "$CHMOD" >&6; }
5186 else
5187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188 $as_echo "no" >&6; }
5189 fi
5190 
5191 
5192         if test "x$CHMOD" = x; then
5193           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5194         fi
5195       else
5196         # Otherwise we believe it is a complete path. Use it as it is.
5197         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5198 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5200 $as_echo_n "checking for CHMOD... " >&6; }
5201         if test ! -x "$tool_specified"; then
5202           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5203 $as_echo "not found" >&6; }
5204           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5205         fi
5206         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5207 $as_echo "$tool_specified" >&6; }
5208       fi
5209     fi
5210   fi
5211 
5212 
5213 
5214   if test "x$CHMOD" = x; then
5215     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5216   fi
5217 
5218 
5219 
5220 
5221 
5222   # Publish this variable in the help.
5223 
5224 
5225   if test "x$CMP" = x; then
5226     # The variable is not set by user, try to locate tool using the code snippet
5227     for ac_prog in cmp
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5232 $as_echo_n "checking for $ac_word... " >&6; }
5233 if ${ac_cv_path_CMP+:} false; then :
5234   $as_echo_n "(cached) " >&6
5235 else
5236   case $CMP in
5237   [\\/]* | ?:[\\/]*)
5238   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5239   ;;
5240   *)
5241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5242 for as_dir in $PATH
5243 do
5244   IFS=$as_save_IFS
5245   test -z "$as_dir" && as_dir=.
5246     for ac_exec_ext in '' $ac_executable_extensions; do
5247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5248     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5250     break 2
5251   fi
5252 done
5253   done
5254 IFS=$as_save_IFS
5255 
5256   ;;
5257 esac
5258 fi
5259 CMP=$ac_cv_path_CMP
5260 if test -n "$CMP"; then
5261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5262 $as_echo "$CMP" >&6; }
5263 else
5264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5265 $as_echo "no" >&6; }
5266 fi
5267 
5268 
5269   test -n "$CMP" && break
5270 done
5271 
5272   else
5273     # The variable is set, but is it from the command line or the environment?
5274 
5275     # Try to remove the string !CMP! from our list.
5276     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5277     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5278       # If it failed, the variable was not from the command line. Ignore it,
5279       # but warn the user (except for BASH, which is always set by the calling BASH).
5280       if test "xCMP" != xBASH; then
5281         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5282 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5283       fi
5284       # Try to locate tool using the code snippet
5285       for ac_prog in cmp
5286 do
5287   # Extract the first word of "$ac_prog", so it can be a program name with args.
5288 set dummy $ac_prog; ac_word=$2
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5290 $as_echo_n "checking for $ac_word... " >&6; }
5291 if ${ac_cv_path_CMP+:} false; then :
5292   $as_echo_n "(cached) " >&6
5293 else
5294   case $CMP in
5295   [\\/]* | ?:[\\/]*)
5296   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5297   ;;
5298   *)
5299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300 for as_dir in $PATH
5301 do
5302   IFS=$as_save_IFS
5303   test -z "$as_dir" && as_dir=.
5304     for ac_exec_ext in '' $ac_executable_extensions; do
5305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5306     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5308     break 2
5309   fi
5310 done
5311   done
5312 IFS=$as_save_IFS
5313 
5314   ;;
5315 esac
5316 fi
5317 CMP=$ac_cv_path_CMP
5318 if test -n "$CMP"; then
5319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5320 $as_echo "$CMP" >&6; }
5321 else
5322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323 $as_echo "no" >&6; }
5324 fi
5325 
5326 
5327   test -n "$CMP" && break
5328 done
5329 
5330     else
5331       # If it succeeded, then it was overridden by the user. We will use it
5332       # for the tool.
5333 
5334       # First remove it from the list of overridden variables, so we can test
5335       # for unknown variables in the end.
5336       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5337 
5338       # Check if the provided tool contains a complete path.
5339       tool_specified="$CMP"
5340       tool_basename="${tool_specified##*/}"
5341       if test "x$tool_basename" = "x$tool_specified"; then
5342         # A command without a complete path is provided, search $PATH.
5343         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5344 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5345         # Extract the first word of "$tool_basename", so it can be a program name with args.
5346 set dummy $tool_basename; ac_word=$2
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348 $as_echo_n "checking for $ac_word... " >&6; }
5349 if ${ac_cv_path_CMP+:} false; then :
5350   $as_echo_n "(cached) " >&6
5351 else
5352   case $CMP in
5353   [\\/]* | ?:[\\/]*)
5354   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5355   ;;
5356   *)
5357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358 for as_dir in $PATH
5359 do
5360   IFS=$as_save_IFS
5361   test -z "$as_dir" && as_dir=.
5362     for ac_exec_ext in '' $ac_executable_extensions; do
5363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366     break 2
5367   fi
5368 done
5369   done
5370 IFS=$as_save_IFS
5371 
5372   ;;
5373 esac
5374 fi
5375 CMP=$ac_cv_path_CMP
5376 if test -n "$CMP"; then
5377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5378 $as_echo "$CMP" >&6; }
5379 else
5380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381 $as_echo "no" >&6; }
5382 fi
5383 
5384 
5385         if test "x$CMP" = x; then
5386           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5387         fi
5388       else
5389         # Otherwise we believe it is a complete path. Use it as it is.
5390         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5391 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5392         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5393 $as_echo_n "checking for CMP... " >&6; }
5394         if test ! -x "$tool_specified"; then
5395           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5396 $as_echo "not found" >&6; }
5397           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5398         fi
5399         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5400 $as_echo "$tool_specified" >&6; }
5401       fi
5402     fi
5403   fi
5404 
5405 
5406 
5407   if test "x$CMP" = x; then
5408     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5409   fi
5410 
5411 
5412 
5413 
5414 
5415   # Publish this variable in the help.
5416 
5417 
5418   if test "x$COMM" = x; then
5419     # The variable is not set by user, try to locate tool using the code snippet
5420     for ac_prog in comm
5421 do
5422   # Extract the first word of "$ac_prog", so it can be a program name with args.
5423 set dummy $ac_prog; ac_word=$2
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425 $as_echo_n "checking for $ac_word... " >&6; }
5426 if ${ac_cv_path_COMM+:} false; then :
5427   $as_echo_n "(cached) " >&6
5428 else
5429   case $COMM in
5430   [\\/]* | ?:[\\/]*)
5431   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5432   ;;
5433   *)
5434   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435 for as_dir in $PATH
5436 do
5437   IFS=$as_save_IFS
5438   test -z "$as_dir" && as_dir=.
5439     for ac_exec_ext in '' $ac_executable_extensions; do
5440   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5441     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5442     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443     break 2
5444   fi
5445 done
5446   done
5447 IFS=$as_save_IFS
5448 
5449   ;;
5450 esac
5451 fi
5452 COMM=$ac_cv_path_COMM
5453 if test -n "$COMM"; then
5454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5455 $as_echo "$COMM" >&6; }
5456 else
5457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458 $as_echo "no" >&6; }
5459 fi
5460 
5461 
5462   test -n "$COMM" && break
5463 done
5464 
5465   else
5466     # The variable is set, but is it from the command line or the environment?
5467 
5468     # Try to remove the string !COMM! from our list.
5469     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5470     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5471       # If it failed, the variable was not from the command line. Ignore it,
5472       # but warn the user (except for BASH, which is always set by the calling BASH).
5473       if test "xCOMM" != xBASH; then
5474         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5475 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5476       fi
5477       # Try to locate tool using the code snippet
5478       for ac_prog in comm
5479 do
5480   # Extract the first word of "$ac_prog", so it can be a program name with args.
5481 set dummy $ac_prog; ac_word=$2
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5483 $as_echo_n "checking for $ac_word... " >&6; }
5484 if ${ac_cv_path_COMM+:} false; then :
5485   $as_echo_n "(cached) " >&6
5486 else
5487   case $COMM in
5488   [\\/]* | ?:[\\/]*)
5489   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5490   ;;
5491   *)
5492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5493 for as_dir in $PATH
5494 do
5495   IFS=$as_save_IFS
5496   test -z "$as_dir" && as_dir=.
5497     for ac_exec_ext in '' $ac_executable_extensions; do
5498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5499     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5501     break 2
5502   fi
5503 done
5504   done
5505 IFS=$as_save_IFS
5506 
5507   ;;
5508 esac
5509 fi
5510 COMM=$ac_cv_path_COMM
5511 if test -n "$COMM"; then
5512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5513 $as_echo "$COMM" >&6; }
5514 else
5515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5516 $as_echo "no" >&6; }
5517 fi
5518 
5519 
5520   test -n "$COMM" && break
5521 done
5522 
5523     else
5524       # If it succeeded, then it was overridden by the user. We will use it
5525       # for the tool.
5526 
5527       # First remove it from the list of overridden variables, so we can test
5528       # for unknown variables in the end.
5529       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5530 
5531       # Check if the provided tool contains a complete path.
5532       tool_specified="$COMM"
5533       tool_basename="${tool_specified##*/}"
5534       if test "x$tool_basename" = "x$tool_specified"; then
5535         # A command without a complete path is provided, search $PATH.
5536         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5537 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5538         # Extract the first word of "$tool_basename", so it can be a program name with args.
5539 set dummy $tool_basename; ac_word=$2
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541 $as_echo_n "checking for $ac_word... " >&6; }
5542 if ${ac_cv_path_COMM+:} false; then :
5543   $as_echo_n "(cached) " >&6
5544 else
5545   case $COMM in
5546   [\\/]* | ?:[\\/]*)
5547   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5548   ;;
5549   *)
5550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551 for as_dir in $PATH
5552 do
5553   IFS=$as_save_IFS
5554   test -z "$as_dir" && as_dir=.
5555     for ac_exec_ext in '' $ac_executable_extensions; do
5556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5557     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559     break 2
5560   fi
5561 done
5562   done
5563 IFS=$as_save_IFS
5564 
5565   ;;
5566 esac
5567 fi
5568 COMM=$ac_cv_path_COMM
5569 if test -n "$COMM"; then
5570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5571 $as_echo "$COMM" >&6; }
5572 else
5573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574 $as_echo "no" >&6; }
5575 fi
5576 
5577 
5578         if test "x$COMM" = x; then
5579           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5580         fi
5581       else
5582         # Otherwise we believe it is a complete path. Use it as it is.
5583         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5584 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5586 $as_echo_n "checking for COMM... " >&6; }
5587         if test ! -x "$tool_specified"; then
5588           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5589 $as_echo "not found" >&6; }
5590           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5591         fi
5592         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5593 $as_echo "$tool_specified" >&6; }
5594       fi
5595     fi
5596   fi
5597 
5598 
5599 
5600   if test "x$COMM" = x; then
5601     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5602   fi
5603 
5604 
5605 
5606 
5607 
5608   # Publish this variable in the help.
5609 
5610 
5611   if test "x$CP" = x; then
5612     # The variable is not set by user, try to locate tool using the code snippet
5613     for ac_prog in cp
5614 do
5615   # Extract the first word of "$ac_prog", so it can be a program name with args.
5616 set dummy $ac_prog; ac_word=$2
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618 $as_echo_n "checking for $ac_word... " >&6; }
5619 if ${ac_cv_path_CP+:} false; then :
5620   $as_echo_n "(cached) " >&6
5621 else
5622   case $CP in
5623   [\\/]* | ?:[\\/]*)
5624   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5625   ;;
5626   *)
5627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628 for as_dir in $PATH
5629 do
5630   IFS=$as_save_IFS
5631   test -z "$as_dir" && as_dir=.
5632     for ac_exec_ext in '' $ac_executable_extensions; do
5633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636     break 2
5637   fi
5638 done
5639   done
5640 IFS=$as_save_IFS
5641 
5642   ;;
5643 esac
5644 fi
5645 CP=$ac_cv_path_CP
5646 if test -n "$CP"; then
5647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5648 $as_echo "$CP" >&6; }
5649 else
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651 $as_echo "no" >&6; }
5652 fi
5653 
5654 
5655   test -n "$CP" && break
5656 done
5657 
5658   else
5659     # The variable is set, but is it from the command line or the environment?
5660 
5661     # Try to remove the string !CP! from our list.
5662     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5663     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5664       # If it failed, the variable was not from the command line. Ignore it,
5665       # but warn the user (except for BASH, which is always set by the calling BASH).
5666       if test "xCP" != xBASH; then
5667         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5668 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5669       fi
5670       # Try to locate tool using the code snippet
5671       for ac_prog in cp
5672 do
5673   # Extract the first word of "$ac_prog", so it can be a program name with args.
5674 set dummy $ac_prog; ac_word=$2
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676 $as_echo_n "checking for $ac_word... " >&6; }
5677 if ${ac_cv_path_CP+:} false; then :
5678   $as_echo_n "(cached) " >&6
5679 else
5680   case $CP in
5681   [\\/]* | ?:[\\/]*)
5682   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5683   ;;
5684   *)
5685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686 for as_dir in $PATH
5687 do
5688   IFS=$as_save_IFS
5689   test -z "$as_dir" && as_dir=.
5690     for ac_exec_ext in '' $ac_executable_extensions; do
5691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5694     break 2
5695   fi
5696 done
5697   done
5698 IFS=$as_save_IFS
5699 
5700   ;;
5701 esac
5702 fi
5703 CP=$ac_cv_path_CP
5704 if test -n "$CP"; then
5705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5706 $as_echo "$CP" >&6; }
5707 else
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709 $as_echo "no" >&6; }
5710 fi
5711 
5712 
5713   test -n "$CP" && break
5714 done
5715 
5716     else
5717       # If it succeeded, then it was overridden by the user. We will use it
5718       # for the tool.
5719 
5720       # First remove it from the list of overridden variables, so we can test
5721       # for unknown variables in the end.
5722       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5723 
5724       # Check if the provided tool contains a complete path.
5725       tool_specified="$CP"
5726       tool_basename="${tool_specified##*/}"
5727       if test "x$tool_basename" = "x$tool_specified"; then
5728         # A command without a complete path is provided, search $PATH.
5729         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5730 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5731         # Extract the first word of "$tool_basename", so it can be a program name with args.
5732 set dummy $tool_basename; ac_word=$2
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734 $as_echo_n "checking for $ac_word... " >&6; }
5735 if ${ac_cv_path_CP+:} false; then :
5736   $as_echo_n "(cached) " >&6
5737 else
5738   case $CP in
5739   [\\/]* | ?:[\\/]*)
5740   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5741   ;;
5742   *)
5743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744 for as_dir in $PATH
5745 do
5746   IFS=$as_save_IFS
5747   test -z "$as_dir" && as_dir=.
5748     for ac_exec_ext in '' $ac_executable_extensions; do
5749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752     break 2
5753   fi
5754 done
5755   done
5756 IFS=$as_save_IFS
5757 
5758   ;;
5759 esac
5760 fi
5761 CP=$ac_cv_path_CP
5762 if test -n "$CP"; then
5763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5764 $as_echo "$CP" >&6; }
5765 else
5766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767 $as_echo "no" >&6; }
5768 fi
5769 
5770 
5771         if test "x$CP" = x; then
5772           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5773         fi
5774       else
5775         # Otherwise we believe it is a complete path. Use it as it is.
5776         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5777 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5778         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5779 $as_echo_n "checking for CP... " >&6; }
5780         if test ! -x "$tool_specified"; then
5781           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5782 $as_echo "not found" >&6; }
5783           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5784         fi
5785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5786 $as_echo "$tool_specified" >&6; }
5787       fi
5788     fi
5789   fi
5790 
5791 
5792 
5793   if test "x$CP" = x; then
5794     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5795   fi
5796 
5797 
5798 
5799 
5800 
5801   # Publish this variable in the help.
5802 
5803 
5804   if test "x$CUT" = x; then
5805     # The variable is not set by user, try to locate tool using the code snippet
5806     for ac_prog in cut
5807 do
5808   # Extract the first word of "$ac_prog", so it can be a program name with args.
5809 set dummy $ac_prog; ac_word=$2
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5811 $as_echo_n "checking for $ac_word... " >&6; }
5812 if ${ac_cv_path_CUT+:} false; then :
5813   $as_echo_n "(cached) " >&6
5814 else
5815   case $CUT in
5816   [\\/]* | ?:[\\/]*)
5817   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5818   ;;
5819   *)
5820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5821 for as_dir in $PATH
5822 do
5823   IFS=$as_save_IFS
5824   test -z "$as_dir" && as_dir=.
5825     for ac_exec_ext in '' $ac_executable_extensions; do
5826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5827     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5829     break 2
5830   fi
5831 done
5832   done
5833 IFS=$as_save_IFS
5834 
5835   ;;
5836 esac
5837 fi
5838 CUT=$ac_cv_path_CUT
5839 if test -n "$CUT"; then
5840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5841 $as_echo "$CUT" >&6; }
5842 else
5843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5844 $as_echo "no" >&6; }
5845 fi
5846 
5847 
5848   test -n "$CUT" && break
5849 done
5850 
5851   else
5852     # The variable is set, but is it from the command line or the environment?
5853 
5854     # Try to remove the string !CUT! from our list.
5855     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5856     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5857       # If it failed, the variable was not from the command line. Ignore it,
5858       # but warn the user (except for BASH, which is always set by the calling BASH).
5859       if test "xCUT" != xBASH; then
5860         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5861 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5862       fi
5863       # Try to locate tool using the code snippet
5864       for ac_prog in cut
5865 do
5866   # Extract the first word of "$ac_prog", so it can be a program name with args.
5867 set dummy $ac_prog; ac_word=$2
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869 $as_echo_n "checking for $ac_word... " >&6; }
5870 if ${ac_cv_path_CUT+:} false; then :
5871   $as_echo_n "(cached) " >&6
5872 else
5873   case $CUT in
5874   [\\/]* | ?:[\\/]*)
5875   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5876   ;;
5877   *)
5878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5879 for as_dir in $PATH
5880 do
5881   IFS=$as_save_IFS
5882   test -z "$as_dir" && as_dir=.
5883     for ac_exec_ext in '' $ac_executable_extensions; do
5884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5885     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887     break 2
5888   fi
5889 done
5890   done
5891 IFS=$as_save_IFS
5892 
5893   ;;
5894 esac
5895 fi
5896 CUT=$ac_cv_path_CUT
5897 if test -n "$CUT"; then
5898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5899 $as_echo "$CUT" >&6; }
5900 else
5901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902 $as_echo "no" >&6; }
5903 fi
5904 
5905 
5906   test -n "$CUT" && break
5907 done
5908 
5909     else
5910       # If it succeeded, then it was overridden by the user. We will use it
5911       # for the tool.
5912 
5913       # First remove it from the list of overridden variables, so we can test
5914       # for unknown variables in the end.
5915       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5916 
5917       # Check if the provided tool contains a complete path.
5918       tool_specified="$CUT"
5919       tool_basename="${tool_specified##*/}"
5920       if test "x$tool_basename" = "x$tool_specified"; then
5921         # A command without a complete path is provided, search $PATH.
5922         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5923 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5924         # Extract the first word of "$tool_basename", so it can be a program name with args.
5925 set dummy $tool_basename; ac_word=$2
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927 $as_echo_n "checking for $ac_word... " >&6; }
5928 if ${ac_cv_path_CUT+:} false; then :
5929   $as_echo_n "(cached) " >&6
5930 else
5931   case $CUT in
5932   [\\/]* | ?:[\\/]*)
5933   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5934   ;;
5935   *)
5936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937 for as_dir in $PATH
5938 do
5939   IFS=$as_save_IFS
5940   test -z "$as_dir" && as_dir=.
5941     for ac_exec_ext in '' $ac_executable_extensions; do
5942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5943     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945     break 2
5946   fi
5947 done
5948   done
5949 IFS=$as_save_IFS
5950 
5951   ;;
5952 esac
5953 fi
5954 CUT=$ac_cv_path_CUT
5955 if test -n "$CUT"; then
5956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5957 $as_echo "$CUT" >&6; }
5958 else
5959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960 $as_echo "no" >&6; }
5961 fi
5962 
5963 
5964         if test "x$CUT" = x; then
5965           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5966         fi
5967       else
5968         # Otherwise we believe it is a complete path. Use it as it is.
5969         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5970 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5971         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5972 $as_echo_n "checking for CUT... " >&6; }
5973         if test ! -x "$tool_specified"; then
5974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5975 $as_echo "not found" >&6; }
5976           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5977         fi
5978         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5979 $as_echo "$tool_specified" >&6; }
5980       fi
5981     fi
5982   fi
5983 
5984 
5985 
5986   if test "x$CUT" = x; then
5987     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5988   fi
5989 
5990 
5991 
5992 
5993 
5994   # Publish this variable in the help.
5995 
5996 
5997   if test "x$DATE" = x; then
5998     # The variable is not set by user, try to locate tool using the code snippet
5999     for ac_prog in date
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_DATE+:} false; then :
6006   $as_echo_n "(cached) " >&6
6007 else
6008   case $DATE in
6009   [\\/]* | ?:[\\/]*)
6010   ac_cv_path_DATE="$DATE" # 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_DATE="$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 DATE=$ac_cv_path_DATE
6032 if test -n "$DATE"; then
6033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6034 $as_echo "$DATE" >&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 "$DATE" && break
6042 done
6043 
6044   else
6045     # The variable is set, but is it from the command line or the environment?
6046 
6047     # Try to remove the string !DATE! from our list.
6048     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6049     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6050       # If it failed, the variable was not from the command line. Ignore it,
6051       # but warn the user (except for BASH, which is always set by the calling BASH).
6052       if test "xDATE" != xBASH; then
6053         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6054 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6055       fi
6056       # Try to locate tool using the code snippet
6057       for ac_prog in date
6058 do
6059   # Extract the first word of "$ac_prog", so it can be a program name with args.
6060 set dummy $ac_prog; ac_word=$2
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6062 $as_echo_n "checking for $ac_word... " >&6; }
6063 if ${ac_cv_path_DATE+:} false; then :
6064   $as_echo_n "(cached) " >&6
6065 else
6066   case $DATE in
6067   [\\/]* | ?:[\\/]*)
6068   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6069   ;;
6070   *)
6071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072 for as_dir in $PATH
6073 do
6074   IFS=$as_save_IFS
6075   test -z "$as_dir" && as_dir=.
6076     for ac_exec_ext in '' $ac_executable_extensions; do
6077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6078     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6080     break 2
6081   fi
6082 done
6083   done
6084 IFS=$as_save_IFS
6085 
6086   ;;
6087 esac
6088 fi
6089 DATE=$ac_cv_path_DATE
6090 if test -n "$DATE"; then
6091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6092 $as_echo "$DATE" >&6; }
6093 else
6094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095 $as_echo "no" >&6; }
6096 fi
6097 
6098 
6099   test -n "$DATE" && break
6100 done
6101 
6102     else
6103       # If it succeeded, then it was overridden by the user. We will use it
6104       # for the tool.
6105 
6106       # First remove it from the list of overridden variables, so we can test
6107       # for unknown variables in the end.
6108       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6109 
6110       # Check if the provided tool contains a complete path.
6111       tool_specified="$DATE"
6112       tool_basename="${tool_specified##*/}"
6113       if test "x$tool_basename" = "x$tool_specified"; then
6114         # A command without a complete path is provided, search $PATH.
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6116 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6117         # Extract the first word of "$tool_basename", so it can be a program name with args.
6118 set dummy $tool_basename; ac_word=$2
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6120 $as_echo_n "checking for $ac_word... " >&6; }
6121 if ${ac_cv_path_DATE+:} false; then :
6122   $as_echo_n "(cached) " >&6
6123 else
6124   case $DATE in
6125   [\\/]* | ?:[\\/]*)
6126   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6127   ;;
6128   *)
6129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130 for as_dir in $PATH
6131 do
6132   IFS=$as_save_IFS
6133   test -z "$as_dir" && as_dir=.
6134     for ac_exec_ext in '' $ac_executable_extensions; do
6135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6136     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6138     break 2
6139   fi
6140 done
6141   done
6142 IFS=$as_save_IFS
6143 
6144   ;;
6145 esac
6146 fi
6147 DATE=$ac_cv_path_DATE
6148 if test -n "$DATE"; then
6149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6150 $as_echo "$DATE" >&6; }
6151 else
6152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6153 $as_echo "no" >&6; }
6154 fi
6155 
6156 
6157         if test "x$DATE" = x; then
6158           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6159         fi
6160       else
6161         # Otherwise we believe it is a complete path. Use it as it is.
6162         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6163 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6164         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6165 $as_echo_n "checking for DATE... " >&6; }
6166         if test ! -x "$tool_specified"; then
6167           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6168 $as_echo "not found" >&6; }
6169           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6170         fi
6171         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6172 $as_echo "$tool_specified" >&6; }
6173       fi
6174     fi
6175   fi
6176 
6177 
6178 
6179   if test "x$DATE" = x; then
6180     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6181   fi
6182 
6183 
6184 
6185 
6186 
6187   # Publish this variable in the help.
6188 
6189 
6190   if test "x$DIFF" = x; then
6191     # The variable is not set by user, try to locate tool using the code snippet
6192     for ac_prog in gdiff diff
6193 do
6194   # Extract the first word of "$ac_prog", so it can be a program name with args.
6195 set dummy $ac_prog; ac_word=$2
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197 $as_echo_n "checking for $ac_word... " >&6; }
6198 if ${ac_cv_path_DIFF+:} false; then :
6199   $as_echo_n "(cached) " >&6
6200 else
6201   case $DIFF in
6202   [\\/]* | ?:[\\/]*)
6203   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6204   ;;
6205   *)
6206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207 for as_dir in $PATH
6208 do
6209   IFS=$as_save_IFS
6210   test -z "$as_dir" && as_dir=.
6211     for ac_exec_ext in '' $ac_executable_extensions; do
6212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6213     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6215     break 2
6216   fi
6217 done
6218   done
6219 IFS=$as_save_IFS
6220 
6221   ;;
6222 esac
6223 fi
6224 DIFF=$ac_cv_path_DIFF
6225 if test -n "$DIFF"; then
6226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6227 $as_echo "$DIFF" >&6; }
6228 else
6229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230 $as_echo "no" >&6; }
6231 fi
6232 
6233 
6234   test -n "$DIFF" && break
6235 done
6236 
6237   else
6238     # The variable is set, but is it from the command line or the environment?
6239 
6240     # Try to remove the string !DIFF! from our list.
6241     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6242     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6243       # If it failed, the variable was not from the command line. Ignore it,
6244       # but warn the user (except for BASH, which is always set by the calling BASH).
6245       if test "xDIFF" != xBASH; then
6246         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6247 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6248       fi
6249       # Try to locate tool using the code snippet
6250       for ac_prog in gdiff diff
6251 do
6252   # Extract the first word of "$ac_prog", so it can be a program name with args.
6253 set dummy $ac_prog; ac_word=$2
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255 $as_echo_n "checking for $ac_word... " >&6; }
6256 if ${ac_cv_path_DIFF+:} false; then :
6257   $as_echo_n "(cached) " >&6
6258 else
6259   case $DIFF in
6260   [\\/]* | ?:[\\/]*)
6261   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6262   ;;
6263   *)
6264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267   IFS=$as_save_IFS
6268   test -z "$as_dir" && as_dir=.
6269     for ac_exec_ext in '' $ac_executable_extensions; do
6270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273     break 2
6274   fi
6275 done
6276   done
6277 IFS=$as_save_IFS
6278 
6279   ;;
6280 esac
6281 fi
6282 DIFF=$ac_cv_path_DIFF
6283 if test -n "$DIFF"; then
6284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6285 $as_echo "$DIFF" >&6; }
6286 else
6287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288 $as_echo "no" >&6; }
6289 fi
6290 
6291 
6292   test -n "$DIFF" && break
6293 done
6294 
6295     else
6296       # If it succeeded, then it was overridden by the user. We will use it
6297       # for the tool.
6298 
6299       # First remove it from the list of overridden variables, so we can test
6300       # for unknown variables in the end.
6301       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6302 
6303       # Check if the provided tool contains a complete path.
6304       tool_specified="$DIFF"
6305       tool_basename="${tool_specified##*/}"
6306       if test "x$tool_basename" = "x$tool_specified"; then
6307         # A command without a complete path is provided, search $PATH.
6308         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6309 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6310         # Extract the first word of "$tool_basename", so it can be a program name with args.
6311 set dummy $tool_basename; ac_word=$2
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313 $as_echo_n "checking for $ac_word... " >&6; }
6314 if ${ac_cv_path_DIFF+:} false; then :
6315   $as_echo_n "(cached) " >&6
6316 else
6317   case $DIFF in
6318   [\\/]* | ?:[\\/]*)
6319   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6320   ;;
6321   *)
6322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323 for as_dir in $PATH
6324 do
6325   IFS=$as_save_IFS
6326   test -z "$as_dir" && as_dir=.
6327     for ac_exec_ext in '' $ac_executable_extensions; do
6328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331     break 2
6332   fi
6333 done
6334   done
6335 IFS=$as_save_IFS
6336 
6337   ;;
6338 esac
6339 fi
6340 DIFF=$ac_cv_path_DIFF
6341 if test -n "$DIFF"; then
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6343 $as_echo "$DIFF" >&6; }
6344 else
6345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346 $as_echo "no" >&6; }
6347 fi
6348 
6349 
6350         if test "x$DIFF" = x; then
6351           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352         fi
6353       else
6354         # Otherwise we believe it is a complete path. Use it as it is.
6355         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6356 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6357         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6358 $as_echo_n "checking for DIFF... " >&6; }
6359         if test ! -x "$tool_specified"; then
6360           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361 $as_echo "not found" >&6; }
6362           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6363         fi
6364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365 $as_echo "$tool_specified" >&6; }
6366       fi
6367     fi
6368   fi
6369 
6370 
6371 
6372   if test "x$DIFF" = x; then
6373     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6374   fi
6375 
6376 
6377 
6378 
6379 
6380   # Publish this variable in the help.
6381 
6382 
6383   if test "x$DIRNAME" = x; then
6384     # The variable is not set by user, try to locate tool using the code snippet
6385     for ac_prog in dirname
6386 do
6387   # Extract the first word of "$ac_prog", so it can be a program name with args.
6388 set dummy $ac_prog; ac_word=$2
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390 $as_echo_n "checking for $ac_word... " >&6; }
6391 if ${ac_cv_path_DIRNAME+:} false; then :
6392   $as_echo_n "(cached) " >&6
6393 else
6394   case $DIRNAME in
6395   [\\/]* | ?:[\\/]*)
6396   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6397   ;;
6398   *)
6399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400 for as_dir in $PATH
6401 do
6402   IFS=$as_save_IFS
6403   test -z "$as_dir" && as_dir=.
6404     for ac_exec_ext in '' $ac_executable_extensions; do
6405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6406     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408     break 2
6409   fi
6410 done
6411   done
6412 IFS=$as_save_IFS
6413 
6414   ;;
6415 esac
6416 fi
6417 DIRNAME=$ac_cv_path_DIRNAME
6418 if test -n "$DIRNAME"; then
6419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6420 $as_echo "$DIRNAME" >&6; }
6421 else
6422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423 $as_echo "no" >&6; }
6424 fi
6425 
6426 
6427   test -n "$DIRNAME" && break
6428 done
6429 
6430   else
6431     # The variable is set, but is it from the command line or the environment?
6432 
6433     # Try to remove the string !DIRNAME! from our list.
6434     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6435     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6436       # If it failed, the variable was not from the command line. Ignore it,
6437       # but warn the user (except for BASH, which is always set by the calling BASH).
6438       if test "xDIRNAME" != xBASH; then
6439         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6440 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6441       fi
6442       # Try to locate tool using the code snippet
6443       for ac_prog in dirname
6444 do
6445   # Extract the first word of "$ac_prog", so it can be a program name with args.
6446 set dummy $ac_prog; ac_word=$2
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6448 $as_echo_n "checking for $ac_word... " >&6; }
6449 if ${ac_cv_path_DIRNAME+:} false; then :
6450   $as_echo_n "(cached) " >&6
6451 else
6452   case $DIRNAME in
6453   [\\/]* | ?:[\\/]*)
6454   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6455   ;;
6456   *)
6457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458 for as_dir in $PATH
6459 do
6460   IFS=$as_save_IFS
6461   test -z "$as_dir" && as_dir=.
6462     for ac_exec_ext in '' $ac_executable_extensions; do
6463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6464     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6466     break 2
6467   fi
6468 done
6469   done
6470 IFS=$as_save_IFS
6471 
6472   ;;
6473 esac
6474 fi
6475 DIRNAME=$ac_cv_path_DIRNAME
6476 if test -n "$DIRNAME"; then
6477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6478 $as_echo "$DIRNAME" >&6; }
6479 else
6480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6481 $as_echo "no" >&6; }
6482 fi
6483 
6484 
6485   test -n "$DIRNAME" && break
6486 done
6487 
6488     else
6489       # If it succeeded, then it was overridden by the user. We will use it
6490       # for the tool.
6491 
6492       # First remove it from the list of overridden variables, so we can test
6493       # for unknown variables in the end.
6494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6495 
6496       # Check if the provided tool contains a complete path.
6497       tool_specified="$DIRNAME"
6498       tool_basename="${tool_specified##*/}"
6499       if test "x$tool_basename" = "x$tool_specified"; then
6500         # A command without a complete path is provided, search $PATH.
6501         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6502 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6503         # Extract the first word of "$tool_basename", so it can be a program name with args.
6504 set dummy $tool_basename; ac_word=$2
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506 $as_echo_n "checking for $ac_word... " >&6; }
6507 if ${ac_cv_path_DIRNAME+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   case $DIRNAME in
6511   [\\/]* | ?:[\\/]*)
6512   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6513   ;;
6514   *)
6515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516 for as_dir in $PATH
6517 do
6518   IFS=$as_save_IFS
6519   test -z "$as_dir" && as_dir=.
6520     for ac_exec_ext in '' $ac_executable_extensions; do
6521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524     break 2
6525   fi
6526 done
6527   done
6528 IFS=$as_save_IFS
6529 
6530   ;;
6531 esac
6532 fi
6533 DIRNAME=$ac_cv_path_DIRNAME
6534 if test -n "$DIRNAME"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6536 $as_echo "$DIRNAME" >&6; }
6537 else
6538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540 fi
6541 
6542 
6543         if test "x$DIRNAME" = x; then
6544           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6545         fi
6546       else
6547         # Otherwise we believe it is a complete path. Use it as it is.
6548         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6549 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6551 $as_echo_n "checking for DIRNAME... " >&6; }
6552         if test ! -x "$tool_specified"; then
6553           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6554 $as_echo "not found" >&6; }
6555           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6556         fi
6557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6558 $as_echo "$tool_specified" >&6; }
6559       fi
6560     fi
6561   fi
6562 
6563 
6564 
6565   if test "x$DIRNAME" = x; then
6566     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6567   fi
6568 
6569 
6570 
6571 
6572 
6573   # Publish this variable in the help.
6574 
6575 
6576   if test "x$ECHO" = x; then
6577     # The variable is not set by user, try to locate tool using the code snippet
6578     for ac_prog in echo
6579 do
6580   # Extract the first word of "$ac_prog", so it can be a program name with args.
6581 set dummy $ac_prog; ac_word=$2
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583 $as_echo_n "checking for $ac_word... " >&6; }
6584 if ${ac_cv_path_ECHO+:} false; then :
6585   $as_echo_n "(cached) " >&6
6586 else
6587   case $ECHO in
6588   [\\/]* | ?:[\\/]*)
6589   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6590   ;;
6591   *)
6592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6593 for as_dir in $PATH
6594 do
6595   IFS=$as_save_IFS
6596   test -z "$as_dir" && as_dir=.
6597     for ac_exec_ext in '' $ac_executable_extensions; do
6598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6599     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6601     break 2
6602   fi
6603 done
6604   done
6605 IFS=$as_save_IFS
6606 
6607   ;;
6608 esac
6609 fi
6610 ECHO=$ac_cv_path_ECHO
6611 if test -n "$ECHO"; then
6612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6613 $as_echo "$ECHO" >&6; }
6614 else
6615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616 $as_echo "no" >&6; }
6617 fi
6618 
6619 
6620   test -n "$ECHO" && break
6621 done
6622 
6623   else
6624     # The variable is set, but is it from the command line or the environment?
6625 
6626     # Try to remove the string !ECHO! from our list.
6627     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6628     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6629       # If it failed, the variable was not from the command line. Ignore it,
6630       # but warn the user (except for BASH, which is always set by the calling BASH).
6631       if test "xECHO" != xBASH; then
6632         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6633 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6634       fi
6635       # Try to locate tool using the code snippet
6636       for ac_prog in echo
6637 do
6638   # Extract the first word of "$ac_prog", so it can be a program name with args.
6639 set dummy $ac_prog; ac_word=$2
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6641 $as_echo_n "checking for $ac_word... " >&6; }
6642 if ${ac_cv_path_ECHO+:} false; then :
6643   $as_echo_n "(cached) " >&6
6644 else
6645   case $ECHO in
6646   [\\/]* | ?:[\\/]*)
6647   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6648   ;;
6649   *)
6650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651 for as_dir in $PATH
6652 do
6653   IFS=$as_save_IFS
6654   test -z "$as_dir" && as_dir=.
6655     for ac_exec_ext in '' $ac_executable_extensions; do
6656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6657     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6659     break 2
6660   fi
6661 done
6662   done
6663 IFS=$as_save_IFS
6664 
6665   ;;
6666 esac
6667 fi
6668 ECHO=$ac_cv_path_ECHO
6669 if test -n "$ECHO"; then
6670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6671 $as_echo "$ECHO" >&6; }
6672 else
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6674 $as_echo "no" >&6; }
6675 fi
6676 
6677 
6678   test -n "$ECHO" && break
6679 done
6680 
6681     else
6682       # If it succeeded, then it was overridden by the user. We will use it
6683       # for the tool.
6684 
6685       # First remove it from the list of overridden variables, so we can test
6686       # for unknown variables in the end.
6687       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6688 
6689       # Check if the provided tool contains a complete path.
6690       tool_specified="$ECHO"
6691       tool_basename="${tool_specified##*/}"
6692       if test "x$tool_basename" = "x$tool_specified"; then
6693         # A command without a complete path is provided, search $PATH.
6694         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6695 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6696         # Extract the first word of "$tool_basename", so it can be a program name with args.
6697 set dummy $tool_basename; ac_word=$2
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6699 $as_echo_n "checking for $ac_word... " >&6; }
6700 if ${ac_cv_path_ECHO+:} false; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   case $ECHO in
6704   [\\/]* | ?:[\\/]*)
6705   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6706   ;;
6707   *)
6708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6709 for as_dir in $PATH
6710 do
6711   IFS=$as_save_IFS
6712   test -z "$as_dir" && as_dir=.
6713     for ac_exec_ext in '' $ac_executable_extensions; do
6714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6715     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6717     break 2
6718   fi
6719 done
6720   done
6721 IFS=$as_save_IFS
6722 
6723   ;;
6724 esac
6725 fi
6726 ECHO=$ac_cv_path_ECHO
6727 if test -n "$ECHO"; then
6728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6729 $as_echo "$ECHO" >&6; }
6730 else
6731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732 $as_echo "no" >&6; }
6733 fi
6734 
6735 
6736         if test "x$ECHO" = x; then
6737           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6738         fi
6739       else
6740         # Otherwise we believe it is a complete path. Use it as it is.
6741         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6742 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6743         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6744 $as_echo_n "checking for ECHO... " >&6; }
6745         if test ! -x "$tool_specified"; then
6746           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6747 $as_echo "not found" >&6; }
6748           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6749         fi
6750         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6751 $as_echo "$tool_specified" >&6; }
6752       fi
6753     fi
6754   fi
6755 
6756 
6757 
6758   if test "x$ECHO" = x; then
6759     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6760   fi
6761 
6762 
6763 
6764 
6765 
6766   # Publish this variable in the help.
6767 
6768 
6769   if test "x$EXPR" = x; then
6770     # The variable is not set by user, try to locate tool using the code snippet
6771     for ac_prog in expr
6772 do
6773   # Extract the first word of "$ac_prog", so it can be a program name with args.
6774 set dummy $ac_prog; ac_word=$2
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6776 $as_echo_n "checking for $ac_word... " >&6; }
6777 if ${ac_cv_path_EXPR+:} false; then :
6778   $as_echo_n "(cached) " >&6
6779 else
6780   case $EXPR in
6781   [\\/]* | ?:[\\/]*)
6782   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6783   ;;
6784   *)
6785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6786 for as_dir in $PATH
6787 do
6788   IFS=$as_save_IFS
6789   test -z "$as_dir" && as_dir=.
6790     for ac_exec_ext in '' $ac_executable_extensions; do
6791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6792     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6794     break 2
6795   fi
6796 done
6797   done
6798 IFS=$as_save_IFS
6799 
6800   ;;
6801 esac
6802 fi
6803 EXPR=$ac_cv_path_EXPR
6804 if test -n "$EXPR"; then
6805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6806 $as_echo "$EXPR" >&6; }
6807 else
6808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809 $as_echo "no" >&6; }
6810 fi
6811 
6812 
6813   test -n "$EXPR" && break
6814 done
6815 
6816   else
6817     # The variable is set, but is it from the command line or the environment?
6818 
6819     # Try to remove the string !EXPR! from our list.
6820     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6821     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6822       # If it failed, the variable was not from the command line. Ignore it,
6823       # but warn the user (except for BASH, which is always set by the calling BASH).
6824       if test "xEXPR" != xBASH; then
6825         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6826 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6827       fi
6828       # Try to locate tool using the code snippet
6829       for ac_prog in expr
6830 do
6831   # Extract the first word of "$ac_prog", so it can be a program name with args.
6832 set dummy $ac_prog; ac_word=$2
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6834 $as_echo_n "checking for $ac_word... " >&6; }
6835 if ${ac_cv_path_EXPR+:} false; then :
6836   $as_echo_n "(cached) " >&6
6837 else
6838   case $EXPR in
6839   [\\/]* | ?:[\\/]*)
6840   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6841   ;;
6842   *)
6843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6844 for as_dir in $PATH
6845 do
6846   IFS=$as_save_IFS
6847   test -z "$as_dir" && as_dir=.
6848     for ac_exec_ext in '' $ac_executable_extensions; do
6849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6850     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6852     break 2
6853   fi
6854 done
6855   done
6856 IFS=$as_save_IFS
6857 
6858   ;;
6859 esac
6860 fi
6861 EXPR=$ac_cv_path_EXPR
6862 if test -n "$EXPR"; then
6863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6864 $as_echo "$EXPR" >&6; }
6865 else
6866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6867 $as_echo "no" >&6; }
6868 fi
6869 
6870 
6871   test -n "$EXPR" && break
6872 done
6873 
6874     else
6875       # If it succeeded, then it was overridden by the user. We will use it
6876       # for the tool.
6877 
6878       # First remove it from the list of overridden variables, so we can test
6879       # for unknown variables in the end.
6880       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6881 
6882       # Check if the provided tool contains a complete path.
6883       tool_specified="$EXPR"
6884       tool_basename="${tool_specified##*/}"
6885       if test "x$tool_basename" = "x$tool_specified"; then
6886         # A command without a complete path is provided, search $PATH.
6887         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6888 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6889         # Extract the first word of "$tool_basename", so it can be a program name with args.
6890 set dummy $tool_basename; ac_word=$2
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892 $as_echo_n "checking for $ac_word... " >&6; }
6893 if ${ac_cv_path_EXPR+:} false; then :
6894   $as_echo_n "(cached) " >&6
6895 else
6896   case $EXPR in
6897   [\\/]* | ?:[\\/]*)
6898   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6899   ;;
6900   *)
6901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902 for as_dir in $PATH
6903 do
6904   IFS=$as_save_IFS
6905   test -z "$as_dir" && as_dir=.
6906     for ac_exec_ext in '' $ac_executable_extensions; do
6907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910     break 2
6911   fi
6912 done
6913   done
6914 IFS=$as_save_IFS
6915 
6916   ;;
6917 esac
6918 fi
6919 EXPR=$ac_cv_path_EXPR
6920 if test -n "$EXPR"; then
6921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6922 $as_echo "$EXPR" >&6; }
6923 else
6924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925 $as_echo "no" >&6; }
6926 fi
6927 
6928 
6929         if test "x$EXPR" = x; then
6930           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6931         fi
6932       else
6933         # Otherwise we believe it is a complete path. Use it as it is.
6934         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6935 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6936         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6937 $as_echo_n "checking for EXPR... " >&6; }
6938         if test ! -x "$tool_specified"; then
6939           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6940 $as_echo "not found" >&6; }
6941           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6942         fi
6943         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6944 $as_echo "$tool_specified" >&6; }
6945       fi
6946     fi
6947   fi
6948 
6949 
6950 
6951   if test "x$EXPR" = x; then
6952     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6953   fi
6954 
6955 
6956 
6957 
6958 
6959   # Publish this variable in the help.
6960 
6961 
6962   if test "x$FILE" = x; then
6963     # The variable is not set by user, try to locate tool using the code snippet
6964     for ac_prog in file
6965 do
6966   # Extract the first word of "$ac_prog", so it can be a program name with args.
6967 set dummy $ac_prog; ac_word=$2
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6969 $as_echo_n "checking for $ac_word... " >&6; }
6970 if ${ac_cv_path_FILE+:} false; then :
6971   $as_echo_n "(cached) " >&6
6972 else
6973   case $FILE in
6974   [\\/]* | ?:[\\/]*)
6975   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6976   ;;
6977   *)
6978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6979 for as_dir in $PATH
6980 do
6981   IFS=$as_save_IFS
6982   test -z "$as_dir" && as_dir=.
6983     for ac_exec_ext in '' $ac_executable_extensions; do
6984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6985     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6987     break 2
6988   fi
6989 done
6990   done
6991 IFS=$as_save_IFS
6992 
6993   ;;
6994 esac
6995 fi
6996 FILE=$ac_cv_path_FILE
6997 if test -n "$FILE"; then
6998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6999 $as_echo "$FILE" >&6; }
7000 else
7001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7002 $as_echo "no" >&6; }
7003 fi
7004 
7005 
7006   test -n "$FILE" && break
7007 done
7008 
7009   else
7010     # The variable is set, but is it from the command line or the environment?
7011 
7012     # Try to remove the string !FILE! from our list.
7013     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7014     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7015       # If it failed, the variable was not from the command line. Ignore it,
7016       # but warn the user (except for BASH, which is always set by the calling BASH).
7017       if test "xFILE" != xBASH; then
7018         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7019 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7020       fi
7021       # Try to locate tool using the code snippet
7022       for ac_prog in file
7023 do
7024   # Extract the first word of "$ac_prog", so it can be a program name with args.
7025 set dummy $ac_prog; ac_word=$2
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7027 $as_echo_n "checking for $ac_word... " >&6; }
7028 if ${ac_cv_path_FILE+:} false; then :
7029   $as_echo_n "(cached) " >&6
7030 else
7031   case $FILE in
7032   [\\/]* | ?:[\\/]*)
7033   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7034   ;;
7035   *)
7036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 for as_dir in $PATH
7038 do
7039   IFS=$as_save_IFS
7040   test -z "$as_dir" && as_dir=.
7041     for ac_exec_ext in '' $ac_executable_extensions; do
7042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7043     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7045     break 2
7046   fi
7047 done
7048   done
7049 IFS=$as_save_IFS
7050 
7051   ;;
7052 esac
7053 fi
7054 FILE=$ac_cv_path_FILE
7055 if test -n "$FILE"; then
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7057 $as_echo "$FILE" >&6; }
7058 else
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060 $as_echo "no" >&6; }
7061 fi
7062 
7063 
7064   test -n "$FILE" && break
7065 done
7066 
7067     else
7068       # If it succeeded, then it was overridden by the user. We will use it
7069       # for the tool.
7070 
7071       # First remove it from the list of overridden variables, so we can test
7072       # for unknown variables in the end.
7073       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7074 
7075       # Check if the provided tool contains a complete path.
7076       tool_specified="$FILE"
7077       tool_basename="${tool_specified##*/}"
7078       if test "x$tool_basename" = "x$tool_specified"; then
7079         # A command without a complete path is provided, search $PATH.
7080         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7081 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7082         # Extract the first word of "$tool_basename", so it can be a program name with args.
7083 set dummy $tool_basename; ac_word=$2
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7085 $as_echo_n "checking for $ac_word... " >&6; }
7086 if ${ac_cv_path_FILE+:} false; then :
7087   $as_echo_n "(cached) " >&6
7088 else
7089   case $FILE in
7090   [\\/]* | ?:[\\/]*)
7091   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7092   ;;
7093   *)
7094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095 for as_dir in $PATH
7096 do
7097   IFS=$as_save_IFS
7098   test -z "$as_dir" && as_dir=.
7099     for ac_exec_ext in '' $ac_executable_extensions; do
7100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7101     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7103     break 2
7104   fi
7105 done
7106   done
7107 IFS=$as_save_IFS
7108 
7109   ;;
7110 esac
7111 fi
7112 FILE=$ac_cv_path_FILE
7113 if test -n "$FILE"; then
7114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7115 $as_echo "$FILE" >&6; }
7116 else
7117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7118 $as_echo "no" >&6; }
7119 fi
7120 
7121 
7122         if test "x$FILE" = x; then
7123           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7124         fi
7125       else
7126         # Otherwise we believe it is a complete path. Use it as it is.
7127         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7128 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7130 $as_echo_n "checking for FILE... " >&6; }
7131         if test ! -x "$tool_specified"; then
7132           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7133 $as_echo "not found" >&6; }
7134           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7135         fi
7136         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7137 $as_echo "$tool_specified" >&6; }
7138       fi
7139     fi
7140   fi
7141 
7142 
7143 
7144   if test "x$FILE" = x; then
7145     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7146   fi
7147 
7148 
7149 
7150 
7151 
7152   # Publish this variable in the help.
7153 
7154 
7155   if test "x$FIND" = x; then
7156     # The variable is not set by user, try to locate tool using the code snippet
7157     for ac_prog in find
7158 do
7159   # Extract the first word of "$ac_prog", so it can be a program name with args.
7160 set dummy $ac_prog; ac_word=$2
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162 $as_echo_n "checking for $ac_word... " >&6; }
7163 if ${ac_cv_path_FIND+:} false; then :
7164   $as_echo_n "(cached) " >&6
7165 else
7166   case $FIND in
7167   [\\/]* | ?:[\\/]*)
7168   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7169   ;;
7170   *)
7171   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172 for as_dir in $PATH
7173 do
7174   IFS=$as_save_IFS
7175   test -z "$as_dir" && as_dir=.
7176     for ac_exec_ext in '' $ac_executable_extensions; do
7177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180     break 2
7181   fi
7182 done
7183   done
7184 IFS=$as_save_IFS
7185 
7186   ;;
7187 esac
7188 fi
7189 FIND=$ac_cv_path_FIND
7190 if test -n "$FIND"; then
7191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7192 $as_echo "$FIND" >&6; }
7193 else
7194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195 $as_echo "no" >&6; }
7196 fi
7197 
7198 
7199   test -n "$FIND" && break
7200 done
7201 
7202   else
7203     # The variable is set, but is it from the command line or the environment?
7204 
7205     # Try to remove the string !FIND! from our list.
7206     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7207     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7208       # If it failed, the variable was not from the command line. Ignore it,
7209       # but warn the user (except for BASH, which is always set by the calling BASH).
7210       if test "xFIND" != xBASH; then
7211         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7212 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7213       fi
7214       # Try to locate tool using the code snippet
7215       for ac_prog in find
7216 do
7217   # Extract the first word of "$ac_prog", so it can be a program name with args.
7218 set dummy $ac_prog; ac_word=$2
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7220 $as_echo_n "checking for $ac_word... " >&6; }
7221 if ${ac_cv_path_FIND+:} false; then :
7222   $as_echo_n "(cached) " >&6
7223 else
7224   case $FIND in
7225   [\\/]* | ?:[\\/]*)
7226   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7227   ;;
7228   *)
7229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7230 for as_dir in $PATH
7231 do
7232   IFS=$as_save_IFS
7233   test -z "$as_dir" && as_dir=.
7234     for ac_exec_ext in '' $ac_executable_extensions; do
7235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7236     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7238     break 2
7239   fi
7240 done
7241   done
7242 IFS=$as_save_IFS
7243 
7244   ;;
7245 esac
7246 fi
7247 FIND=$ac_cv_path_FIND
7248 if test -n "$FIND"; then
7249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7250 $as_echo "$FIND" >&6; }
7251 else
7252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253 $as_echo "no" >&6; }
7254 fi
7255 
7256 
7257   test -n "$FIND" && break
7258 done
7259 
7260     else
7261       # If it succeeded, then it was overridden by the user. We will use it
7262       # for the tool.
7263 
7264       # First remove it from the list of overridden variables, so we can test
7265       # for unknown variables in the end.
7266       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7267 
7268       # Check if the provided tool contains a complete path.
7269       tool_specified="$FIND"
7270       tool_basename="${tool_specified##*/}"
7271       if test "x$tool_basename" = "x$tool_specified"; then
7272         # A command without a complete path is provided, search $PATH.
7273         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7274 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7275         # Extract the first word of "$tool_basename", so it can be a program name with args.
7276 set dummy $tool_basename; ac_word=$2
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7278 $as_echo_n "checking for $ac_word... " >&6; }
7279 if ${ac_cv_path_FIND+:} false; then :
7280   $as_echo_n "(cached) " >&6
7281 else
7282   case $FIND in
7283   [\\/]* | ?:[\\/]*)
7284   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7285   ;;
7286   *)
7287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7288 for as_dir in $PATH
7289 do
7290   IFS=$as_save_IFS
7291   test -z "$as_dir" && as_dir=.
7292     for ac_exec_ext in '' $ac_executable_extensions; do
7293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7294     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7296     break 2
7297   fi
7298 done
7299   done
7300 IFS=$as_save_IFS
7301 
7302   ;;
7303 esac
7304 fi
7305 FIND=$ac_cv_path_FIND
7306 if test -n "$FIND"; then
7307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7308 $as_echo "$FIND" >&6; }
7309 else
7310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311 $as_echo "no" >&6; }
7312 fi
7313 
7314 
7315         if test "x$FIND" = x; then
7316           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7317         fi
7318       else
7319         # Otherwise we believe it is a complete path. Use it as it is.
7320         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7321 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7322         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7323 $as_echo_n "checking for FIND... " >&6; }
7324         if test ! -x "$tool_specified"; then
7325           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7326 $as_echo "not found" >&6; }
7327           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7328         fi
7329         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7330 $as_echo "$tool_specified" >&6; }
7331       fi
7332     fi
7333   fi
7334 
7335 
7336 
7337   if test "x$FIND" = x; then
7338     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7339   fi
7340 
7341 
7342 
7343 
7344 
7345   # Publish this variable in the help.
7346 
7347 
7348   if test "x$HEAD" = x; then
7349     # The variable is not set by user, try to locate tool using the code snippet
7350     for ac_prog in head
7351 do
7352   # Extract the first word of "$ac_prog", so it can be a program name with args.
7353 set dummy $ac_prog; ac_word=$2
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7355 $as_echo_n "checking for $ac_word... " >&6; }
7356 if ${ac_cv_path_HEAD+:} false; then :
7357   $as_echo_n "(cached) " >&6
7358 else
7359   case $HEAD in
7360   [\\/]* | ?:[\\/]*)
7361   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7362   ;;
7363   *)
7364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7365 for as_dir in $PATH
7366 do
7367   IFS=$as_save_IFS
7368   test -z "$as_dir" && as_dir=.
7369     for ac_exec_ext in '' $ac_executable_extensions; do
7370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7371     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7373     break 2
7374   fi
7375 done
7376   done
7377 IFS=$as_save_IFS
7378 
7379   ;;
7380 esac
7381 fi
7382 HEAD=$ac_cv_path_HEAD
7383 if test -n "$HEAD"; then
7384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7385 $as_echo "$HEAD" >&6; }
7386 else
7387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388 $as_echo "no" >&6; }
7389 fi
7390 
7391 
7392   test -n "$HEAD" && break
7393 done
7394 
7395   else
7396     # The variable is set, but is it from the command line or the environment?
7397 
7398     # Try to remove the string !HEAD! from our list.
7399     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7400     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7401       # If it failed, the variable was not from the command line. Ignore it,
7402       # but warn the user (except for BASH, which is always set by the calling BASH).
7403       if test "xHEAD" != xBASH; then
7404         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7405 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7406       fi
7407       # Try to locate tool using the code snippet
7408       for ac_prog in head
7409 do
7410   # Extract the first word of "$ac_prog", so it can be a program name with args.
7411 set dummy $ac_prog; ac_word=$2
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413 $as_echo_n "checking for $ac_word... " >&6; }
7414 if ${ac_cv_path_HEAD+:} false; then :
7415   $as_echo_n "(cached) " >&6
7416 else
7417   case $HEAD in
7418   [\\/]* | ?:[\\/]*)
7419   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7420   ;;
7421   *)
7422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423 for as_dir in $PATH
7424 do
7425   IFS=$as_save_IFS
7426   test -z "$as_dir" && as_dir=.
7427     for ac_exec_ext in '' $ac_executable_extensions; do
7428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431     break 2
7432   fi
7433 done
7434   done
7435 IFS=$as_save_IFS
7436 
7437   ;;
7438 esac
7439 fi
7440 HEAD=$ac_cv_path_HEAD
7441 if test -n "$HEAD"; then
7442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7443 $as_echo "$HEAD" >&6; }
7444 else
7445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446 $as_echo "no" >&6; }
7447 fi
7448 
7449 
7450   test -n "$HEAD" && break
7451 done
7452 
7453     else
7454       # If it succeeded, then it was overridden by the user. We will use it
7455       # for the tool.
7456 
7457       # First remove it from the list of overridden variables, so we can test
7458       # for unknown variables in the end.
7459       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7460 
7461       # Check if the provided tool contains a complete path.
7462       tool_specified="$HEAD"
7463       tool_basename="${tool_specified##*/}"
7464       if test "x$tool_basename" = "x$tool_specified"; then
7465         # A command without a complete path is provided, search $PATH.
7466         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7467 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7468         # Extract the first word of "$tool_basename", so it can be a program name with args.
7469 set dummy $tool_basename; ac_word=$2
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471 $as_echo_n "checking for $ac_word... " >&6; }
7472 if ${ac_cv_path_HEAD+:} false; then :
7473   $as_echo_n "(cached) " >&6
7474 else
7475   case $HEAD in
7476   [\\/]* | ?:[\\/]*)
7477   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7478   ;;
7479   *)
7480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481 for as_dir in $PATH
7482 do
7483   IFS=$as_save_IFS
7484   test -z "$as_dir" && as_dir=.
7485     for ac_exec_ext in '' $ac_executable_extensions; do
7486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489     break 2
7490   fi
7491 done
7492   done
7493 IFS=$as_save_IFS
7494 
7495   ;;
7496 esac
7497 fi
7498 HEAD=$ac_cv_path_HEAD
7499 if test -n "$HEAD"; then
7500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7501 $as_echo "$HEAD" >&6; }
7502 else
7503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504 $as_echo "no" >&6; }
7505 fi
7506 
7507 
7508         if test "x$HEAD" = x; then
7509           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7510         fi
7511       else
7512         # Otherwise we believe it is a complete path. Use it as it is.
7513         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7514 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7516 $as_echo_n "checking for HEAD... " >&6; }
7517         if test ! -x "$tool_specified"; then
7518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7519 $as_echo "not found" >&6; }
7520           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7521         fi
7522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7523 $as_echo "$tool_specified" >&6; }
7524       fi
7525     fi
7526   fi
7527 
7528 
7529 
7530   if test "x$HEAD" = x; then
7531     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7532   fi
7533 
7534 
7535 
7536 
7537 
7538   # Publish this variable in the help.
7539 
7540 
7541   if test "x$LN" = x; then
7542     # The variable is not set by user, try to locate tool using the code snippet
7543     for ac_prog in ln
7544 do
7545   # Extract the first word of "$ac_prog", so it can be a program name with args.
7546 set dummy $ac_prog; ac_word=$2
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7548 $as_echo_n "checking for $ac_word... " >&6; }
7549 if ${ac_cv_path_LN+:} false; then :
7550   $as_echo_n "(cached) " >&6
7551 else
7552   case $LN in
7553   [\\/]* | ?:[\\/]*)
7554   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7555   ;;
7556   *)
7557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7558 for as_dir in $PATH
7559 do
7560   IFS=$as_save_IFS
7561   test -z "$as_dir" && as_dir=.
7562     for ac_exec_ext in '' $ac_executable_extensions; do
7563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7564     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7566     break 2
7567   fi
7568 done
7569   done
7570 IFS=$as_save_IFS
7571 
7572   ;;
7573 esac
7574 fi
7575 LN=$ac_cv_path_LN
7576 if test -n "$LN"; then
7577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7578 $as_echo "$LN" >&6; }
7579 else
7580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7581 $as_echo "no" >&6; }
7582 fi
7583 
7584 
7585   test -n "$LN" && break
7586 done
7587 
7588   else
7589     # The variable is set, but is it from the command line or the environment?
7590 
7591     # Try to remove the string !LN! from our list.
7592     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7593     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7594       # If it failed, the variable was not from the command line. Ignore it,
7595       # but warn the user (except for BASH, which is always set by the calling BASH).
7596       if test "xLN" != xBASH; then
7597         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7598 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7599       fi
7600       # Try to locate tool using the code snippet
7601       for ac_prog in ln
7602 do
7603   # Extract the first word of "$ac_prog", so it can be a program name with args.
7604 set dummy $ac_prog; ac_word=$2
7605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7606 $as_echo_n "checking for $ac_word... " >&6; }
7607 if ${ac_cv_path_LN+:} false; then :
7608   $as_echo_n "(cached) " >&6
7609 else
7610   case $LN in
7611   [\\/]* | ?:[\\/]*)
7612   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7613   ;;
7614   *)
7615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7616 for as_dir in $PATH
7617 do
7618   IFS=$as_save_IFS
7619   test -z "$as_dir" && as_dir=.
7620     for ac_exec_ext in '' $ac_executable_extensions; do
7621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7622     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7624     break 2
7625   fi
7626 done
7627   done
7628 IFS=$as_save_IFS
7629 
7630   ;;
7631 esac
7632 fi
7633 LN=$ac_cv_path_LN
7634 if test -n "$LN"; then
7635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7636 $as_echo "$LN" >&6; }
7637 else
7638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7639 $as_echo "no" >&6; }
7640 fi
7641 
7642 
7643   test -n "$LN" && break
7644 done
7645 
7646     else
7647       # If it succeeded, then it was overridden by the user. We will use it
7648       # for the tool.
7649 
7650       # First remove it from the list of overridden variables, so we can test
7651       # for unknown variables in the end.
7652       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7653 
7654       # Check if the provided tool contains a complete path.
7655       tool_specified="$LN"
7656       tool_basename="${tool_specified##*/}"
7657       if test "x$tool_basename" = "x$tool_specified"; then
7658         # A command without a complete path is provided, search $PATH.
7659         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7660 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7661         # Extract the first word of "$tool_basename", so it can be a program name with args.
7662 set dummy $tool_basename; ac_word=$2
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7664 $as_echo_n "checking for $ac_word... " >&6; }
7665 if ${ac_cv_path_LN+:} false; then :
7666   $as_echo_n "(cached) " >&6
7667 else
7668   case $LN in
7669   [\\/]* | ?:[\\/]*)
7670   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7671   ;;
7672   *)
7673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7674 for as_dir in $PATH
7675 do
7676   IFS=$as_save_IFS
7677   test -z "$as_dir" && as_dir=.
7678     for ac_exec_ext in '' $ac_executable_extensions; do
7679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7680     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7682     break 2
7683   fi
7684 done
7685   done
7686 IFS=$as_save_IFS
7687 
7688   ;;
7689 esac
7690 fi
7691 LN=$ac_cv_path_LN
7692 if test -n "$LN"; then
7693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7694 $as_echo "$LN" >&6; }
7695 else
7696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7698 fi
7699 
7700 
7701         if test "x$LN" = x; then
7702           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7703         fi
7704       else
7705         # Otherwise we believe it is a complete path. Use it as it is.
7706         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7707 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7709 $as_echo_n "checking for LN... " >&6; }
7710         if test ! -x "$tool_specified"; then
7711           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7712 $as_echo "not found" >&6; }
7713           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7714         fi
7715         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7716 $as_echo "$tool_specified" >&6; }
7717       fi
7718     fi
7719   fi
7720 
7721 
7722 
7723   if test "x$LN" = x; then
7724     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7725   fi
7726 
7727 
7728 
7729 
7730 
7731   # Publish this variable in the help.
7732 
7733 
7734   if test "x$LS" = x; then
7735     # The variable is not set by user, try to locate tool using the code snippet
7736     for ac_prog in ls
7737 do
7738   # Extract the first word of "$ac_prog", so it can be a program name with args.
7739 set dummy $ac_prog; ac_word=$2
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741 $as_echo_n "checking for $ac_word... " >&6; }
7742 if ${ac_cv_path_LS+:} false; then :
7743   $as_echo_n "(cached) " >&6
7744 else
7745   case $LS in
7746   [\\/]* | ?:[\\/]*)
7747   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7748   ;;
7749   *)
7750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751 for as_dir in $PATH
7752 do
7753   IFS=$as_save_IFS
7754   test -z "$as_dir" && as_dir=.
7755     for ac_exec_ext in '' $ac_executable_extensions; do
7756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759     break 2
7760   fi
7761 done
7762   done
7763 IFS=$as_save_IFS
7764 
7765   ;;
7766 esac
7767 fi
7768 LS=$ac_cv_path_LS
7769 if test -n "$LS"; then
7770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7771 $as_echo "$LS" >&6; }
7772 else
7773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774 $as_echo "no" >&6; }
7775 fi
7776 
7777 
7778   test -n "$LS" && break
7779 done
7780 
7781   else
7782     # The variable is set, but is it from the command line or the environment?
7783 
7784     # Try to remove the string !LS! from our list.
7785     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7786     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7787       # If it failed, the variable was not from the command line. Ignore it,
7788       # but warn the user (except for BASH, which is always set by the calling BASH).
7789       if test "xLS" != xBASH; then
7790         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7791 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7792       fi
7793       # Try to locate tool using the code snippet
7794       for ac_prog in ls
7795 do
7796   # Extract the first word of "$ac_prog", so it can be a program name with args.
7797 set dummy $ac_prog; ac_word=$2
7798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7799 $as_echo_n "checking for $ac_word... " >&6; }
7800 if ${ac_cv_path_LS+:} false; then :
7801   $as_echo_n "(cached) " >&6
7802 else
7803   case $LS in
7804   [\\/]* | ?:[\\/]*)
7805   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7806   ;;
7807   *)
7808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7809 for as_dir in $PATH
7810 do
7811   IFS=$as_save_IFS
7812   test -z "$as_dir" && as_dir=.
7813     for ac_exec_ext in '' $ac_executable_extensions; do
7814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7815     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7817     break 2
7818   fi
7819 done
7820   done
7821 IFS=$as_save_IFS
7822 
7823   ;;
7824 esac
7825 fi
7826 LS=$ac_cv_path_LS
7827 if test -n "$LS"; then
7828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7829 $as_echo "$LS" >&6; }
7830 else
7831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7833 fi
7834 
7835 
7836   test -n "$LS" && break
7837 done
7838 
7839     else
7840       # If it succeeded, then it was overridden by the user. We will use it
7841       # for the tool.
7842 
7843       # First remove it from the list of overridden variables, so we can test
7844       # for unknown variables in the end.
7845       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7846 
7847       # Check if the provided tool contains a complete path.
7848       tool_specified="$LS"
7849       tool_basename="${tool_specified##*/}"
7850       if test "x$tool_basename" = "x$tool_specified"; then
7851         # A command without a complete path is provided, search $PATH.
7852         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7853 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7854         # Extract the first word of "$tool_basename", so it can be a program name with args.
7855 set dummy $tool_basename; ac_word=$2
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7857 $as_echo_n "checking for $ac_word... " >&6; }
7858 if ${ac_cv_path_LS+:} false; then :
7859   $as_echo_n "(cached) " >&6
7860 else
7861   case $LS in
7862   [\\/]* | ?:[\\/]*)
7863   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7864   ;;
7865   *)
7866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7867 for as_dir in $PATH
7868 do
7869   IFS=$as_save_IFS
7870   test -z "$as_dir" && as_dir=.
7871     for ac_exec_ext in '' $ac_executable_extensions; do
7872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7873     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7875     break 2
7876   fi
7877 done
7878   done
7879 IFS=$as_save_IFS
7880 
7881   ;;
7882 esac
7883 fi
7884 LS=$ac_cv_path_LS
7885 if test -n "$LS"; then
7886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7887 $as_echo "$LS" >&6; }
7888 else
7889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890 $as_echo "no" >&6; }
7891 fi
7892 
7893 
7894         if test "x$LS" = x; then
7895           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7896         fi
7897       else
7898         # Otherwise we believe it is a complete path. Use it as it is.
7899         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7900 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7901         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7902 $as_echo_n "checking for LS... " >&6; }
7903         if test ! -x "$tool_specified"; then
7904           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7905 $as_echo "not found" >&6; }
7906           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7907         fi
7908         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7909 $as_echo "$tool_specified" >&6; }
7910       fi
7911     fi
7912   fi
7913 
7914 
7915 
7916   if test "x$LS" = x; then
7917     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7918   fi
7919 
7920 
7921 
7922 
7923 
7924   # Publish this variable in the help.
7925 
7926 
7927   if test "x$MKDIR" = x; then
7928     # The variable is not set by user, try to locate tool using the code snippet
7929     for ac_prog in mkdir
7930 do
7931   # Extract the first word of "$ac_prog", so it can be a program name with args.
7932 set dummy $ac_prog; ac_word=$2
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7934 $as_echo_n "checking for $ac_word... " >&6; }
7935 if ${ac_cv_path_MKDIR+:} false; then :
7936   $as_echo_n "(cached) " >&6
7937 else
7938   case $MKDIR in
7939   [\\/]* | ?:[\\/]*)
7940   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7941   ;;
7942   *)
7943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7944 for as_dir in $PATH
7945 do
7946   IFS=$as_save_IFS
7947   test -z "$as_dir" && as_dir=.
7948     for ac_exec_ext in '' $ac_executable_extensions; do
7949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7950     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7952     break 2
7953   fi
7954 done
7955   done
7956 IFS=$as_save_IFS
7957 
7958   ;;
7959 esac
7960 fi
7961 MKDIR=$ac_cv_path_MKDIR
7962 if test -n "$MKDIR"; then
7963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7964 $as_echo "$MKDIR" >&6; }
7965 else
7966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7967 $as_echo "no" >&6; }
7968 fi
7969 
7970 
7971   test -n "$MKDIR" && break
7972 done
7973 
7974   else
7975     # The variable is set, but is it from the command line or the environment?
7976 
7977     # Try to remove the string !MKDIR! from our list.
7978     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7979     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7980       # If it failed, the variable was not from the command line. Ignore it,
7981       # but warn the user (except for BASH, which is always set by the calling BASH).
7982       if test "xMKDIR" != xBASH; then
7983         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7984 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7985       fi
7986       # Try to locate tool using the code snippet
7987       for ac_prog in mkdir
7988 do
7989   # Extract the first word of "$ac_prog", so it can be a program name with args.
7990 set dummy $ac_prog; ac_word=$2
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7992 $as_echo_n "checking for $ac_word... " >&6; }
7993 if ${ac_cv_path_MKDIR+:} false; then :
7994   $as_echo_n "(cached) " >&6
7995 else
7996   case $MKDIR in
7997   [\\/]* | ?:[\\/]*)
7998   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7999   ;;
8000   *)
8001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8002 for as_dir in $PATH
8003 do
8004   IFS=$as_save_IFS
8005   test -z "$as_dir" && as_dir=.
8006     for ac_exec_ext in '' $ac_executable_extensions; do
8007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8008     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8010     break 2
8011   fi
8012 done
8013   done
8014 IFS=$as_save_IFS
8015 
8016   ;;
8017 esac
8018 fi
8019 MKDIR=$ac_cv_path_MKDIR
8020 if test -n "$MKDIR"; then
8021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8022 $as_echo "$MKDIR" >&6; }
8023 else
8024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8025 $as_echo "no" >&6; }
8026 fi
8027 
8028 
8029   test -n "$MKDIR" && break
8030 done
8031 
8032     else
8033       # If it succeeded, then it was overridden by the user. We will use it
8034       # for the tool.
8035 
8036       # First remove it from the list of overridden variables, so we can test
8037       # for unknown variables in the end.
8038       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8039 
8040       # Check if the provided tool contains a complete path.
8041       tool_specified="$MKDIR"
8042       tool_basename="${tool_specified##*/}"
8043       if test "x$tool_basename" = "x$tool_specified"; then
8044         # A command without a complete path is provided, search $PATH.
8045         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8046 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8047         # Extract the first word of "$tool_basename", so it can be a program name with args.
8048 set dummy $tool_basename; ac_word=$2
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8050 $as_echo_n "checking for $ac_word... " >&6; }
8051 if ${ac_cv_path_MKDIR+:} false; then :
8052   $as_echo_n "(cached) " >&6
8053 else
8054   case $MKDIR in
8055   [\\/]* | ?:[\\/]*)
8056   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8057   ;;
8058   *)
8059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8060 for as_dir in $PATH
8061 do
8062   IFS=$as_save_IFS
8063   test -z "$as_dir" && as_dir=.
8064     for ac_exec_ext in '' $ac_executable_extensions; do
8065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8066     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8068     break 2
8069   fi
8070 done
8071   done
8072 IFS=$as_save_IFS
8073 
8074   ;;
8075 esac
8076 fi
8077 MKDIR=$ac_cv_path_MKDIR
8078 if test -n "$MKDIR"; then
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8080 $as_echo "$MKDIR" >&6; }
8081 else
8082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8083 $as_echo "no" >&6; }
8084 fi
8085 
8086 
8087         if test "x$MKDIR" = x; then
8088           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8089         fi
8090       else
8091         # Otherwise we believe it is a complete path. Use it as it is.
8092         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8093 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8094         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8095 $as_echo_n "checking for MKDIR... " >&6; }
8096         if test ! -x "$tool_specified"; then
8097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8098 $as_echo "not found" >&6; }
8099           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8100         fi
8101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8102 $as_echo "$tool_specified" >&6; }
8103       fi
8104     fi
8105   fi
8106 
8107 
8108 
8109   if test "x$MKDIR" = x; then
8110     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8111   fi
8112 
8113 
8114 
8115 
8116 
8117   # Publish this variable in the help.
8118 
8119 
8120   if test "x$MKTEMP" = x; then
8121     # The variable is not set by user, try to locate tool using the code snippet
8122     for ac_prog in mktemp
8123 do
8124   # Extract the first word of "$ac_prog", so it can be a program name with args.
8125 set dummy $ac_prog; ac_word=$2
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127 $as_echo_n "checking for $ac_word... " >&6; }
8128 if ${ac_cv_path_MKTEMP+:} false; then :
8129   $as_echo_n "(cached) " >&6
8130 else
8131   case $MKTEMP in
8132   [\\/]* | ?:[\\/]*)
8133   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8134   ;;
8135   *)
8136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137 for as_dir in $PATH
8138 do
8139   IFS=$as_save_IFS
8140   test -z "$as_dir" && as_dir=.
8141     for ac_exec_ext in '' $ac_executable_extensions; do
8142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8143     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8145     break 2
8146   fi
8147 done
8148   done
8149 IFS=$as_save_IFS
8150 
8151   ;;
8152 esac
8153 fi
8154 MKTEMP=$ac_cv_path_MKTEMP
8155 if test -n "$MKTEMP"; then
8156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8157 $as_echo "$MKTEMP" >&6; }
8158 else
8159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160 $as_echo "no" >&6; }
8161 fi
8162 
8163 
8164   test -n "$MKTEMP" && break
8165 done
8166 
8167   else
8168     # The variable is set, but is it from the command line or the environment?
8169 
8170     # Try to remove the string !MKTEMP! from our list.
8171     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8172     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8173       # If it failed, the variable was not from the command line. Ignore it,
8174       # but warn the user (except for BASH, which is always set by the calling BASH).
8175       if test "xMKTEMP" != xBASH; then
8176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8177 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8178       fi
8179       # Try to locate tool using the code snippet
8180       for ac_prog in mktemp
8181 do
8182   # Extract the first word of "$ac_prog", so it can be a program name with args.
8183 set dummy $ac_prog; ac_word=$2
8184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8185 $as_echo_n "checking for $ac_word... " >&6; }
8186 if ${ac_cv_path_MKTEMP+:} false; then :
8187   $as_echo_n "(cached) " >&6
8188 else
8189   case $MKTEMP in
8190   [\\/]* | ?:[\\/]*)
8191   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8192   ;;
8193   *)
8194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8195 for as_dir in $PATH
8196 do
8197   IFS=$as_save_IFS
8198   test -z "$as_dir" && as_dir=.
8199     for ac_exec_ext in '' $ac_executable_extensions; do
8200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8201     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8203     break 2
8204   fi
8205 done
8206   done
8207 IFS=$as_save_IFS
8208 
8209   ;;
8210 esac
8211 fi
8212 MKTEMP=$ac_cv_path_MKTEMP
8213 if test -n "$MKTEMP"; then
8214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8215 $as_echo "$MKTEMP" >&6; }
8216 else
8217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218 $as_echo "no" >&6; }
8219 fi
8220 
8221 
8222   test -n "$MKTEMP" && break
8223 done
8224 
8225     else
8226       # If it succeeded, then it was overridden by the user. We will use it
8227       # for the tool.
8228 
8229       # First remove it from the list of overridden variables, so we can test
8230       # for unknown variables in the end.
8231       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8232 
8233       # Check if the provided tool contains a complete path.
8234       tool_specified="$MKTEMP"
8235       tool_basename="${tool_specified##*/}"
8236       if test "x$tool_basename" = "x$tool_specified"; then
8237         # A command without a complete path is provided, search $PATH.
8238         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8239 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8240         # Extract the first word of "$tool_basename", so it can be a program name with args.
8241 set dummy $tool_basename; ac_word=$2
8242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8243 $as_echo_n "checking for $ac_word... " >&6; }
8244 if ${ac_cv_path_MKTEMP+:} false; then :
8245   $as_echo_n "(cached) " >&6
8246 else
8247   case $MKTEMP in
8248   [\\/]* | ?:[\\/]*)
8249   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8250   ;;
8251   *)
8252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253 for as_dir in $PATH
8254 do
8255   IFS=$as_save_IFS
8256   test -z "$as_dir" && as_dir=.
8257     for ac_exec_ext in '' $ac_executable_extensions; do
8258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8259     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8261     break 2
8262   fi
8263 done
8264   done
8265 IFS=$as_save_IFS
8266 
8267   ;;
8268 esac
8269 fi
8270 MKTEMP=$ac_cv_path_MKTEMP
8271 if test -n "$MKTEMP"; then
8272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8273 $as_echo "$MKTEMP" >&6; }
8274 else
8275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8276 $as_echo "no" >&6; }
8277 fi
8278 
8279 
8280         if test "x$MKTEMP" = x; then
8281           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8282         fi
8283       else
8284         # Otherwise we believe it is a complete path. Use it as it is.
8285         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8286 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8287         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8288 $as_echo_n "checking for MKTEMP... " >&6; }
8289         if test ! -x "$tool_specified"; then
8290           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8291 $as_echo "not found" >&6; }
8292           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8293         fi
8294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8295 $as_echo "$tool_specified" >&6; }
8296       fi
8297     fi
8298   fi
8299 
8300 
8301 
8302   if test "x$MKTEMP" = x; then
8303     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8304   fi
8305 
8306 
8307 
8308 
8309 
8310   # Publish this variable in the help.
8311 
8312 
8313   if test "x$MV" = x; then
8314     # The variable is not set by user, try to locate tool using the code snippet
8315     for ac_prog in mv
8316 do
8317   # Extract the first word of "$ac_prog", so it can be a program name with args.
8318 set dummy $ac_prog; ac_word=$2
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320 $as_echo_n "checking for $ac_word... " >&6; }
8321 if ${ac_cv_path_MV+:} false; then :
8322   $as_echo_n "(cached) " >&6
8323 else
8324   case $MV in
8325   [\\/]* | ?:[\\/]*)
8326   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8327   ;;
8328   *)
8329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330 for as_dir in $PATH
8331 do
8332   IFS=$as_save_IFS
8333   test -z "$as_dir" && as_dir=.
8334     for ac_exec_ext in '' $ac_executable_extensions; do
8335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8336     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8338     break 2
8339   fi
8340 done
8341   done
8342 IFS=$as_save_IFS
8343 
8344   ;;
8345 esac
8346 fi
8347 MV=$ac_cv_path_MV
8348 if test -n "$MV"; then
8349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8350 $as_echo "$MV" >&6; }
8351 else
8352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8353 $as_echo "no" >&6; }
8354 fi
8355 
8356 
8357   test -n "$MV" && break
8358 done
8359 
8360   else
8361     # The variable is set, but is it from the command line or the environment?
8362 
8363     # Try to remove the string !MV! from our list.
8364     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8365     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8366       # If it failed, the variable was not from the command line. Ignore it,
8367       # but warn the user (except for BASH, which is always set by the calling BASH).
8368       if test "xMV" != xBASH; then
8369         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8370 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8371       fi
8372       # Try to locate tool using the code snippet
8373       for ac_prog in mv
8374 do
8375   # Extract the first word of "$ac_prog", so it can be a program name with args.
8376 set dummy $ac_prog; ac_word=$2
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378 $as_echo_n "checking for $ac_word... " >&6; }
8379 if ${ac_cv_path_MV+:} false; then :
8380   $as_echo_n "(cached) " >&6
8381 else
8382   case $MV in
8383   [\\/]* | ?:[\\/]*)
8384   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8385   ;;
8386   *)
8387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388 for as_dir in $PATH
8389 do
8390   IFS=$as_save_IFS
8391   test -z "$as_dir" && as_dir=.
8392     for ac_exec_ext in '' $ac_executable_extensions; do
8393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396     break 2
8397   fi
8398 done
8399   done
8400 IFS=$as_save_IFS
8401 
8402   ;;
8403 esac
8404 fi
8405 MV=$ac_cv_path_MV
8406 if test -n "$MV"; then
8407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8408 $as_echo "$MV" >&6; }
8409 else
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411 $as_echo "no" >&6; }
8412 fi
8413 
8414 
8415   test -n "$MV" && break
8416 done
8417 
8418     else
8419       # If it succeeded, then it was overridden by the user. We will use it
8420       # for the tool.
8421 
8422       # First remove it from the list of overridden variables, so we can test
8423       # for unknown variables in the end.
8424       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8425 
8426       # Check if the provided tool contains a complete path.
8427       tool_specified="$MV"
8428       tool_basename="${tool_specified##*/}"
8429       if test "x$tool_basename" = "x$tool_specified"; then
8430         # A command without a complete path is provided, search $PATH.
8431         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8432 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8433         # Extract the first word of "$tool_basename", so it can be a program name with args.
8434 set dummy $tool_basename; ac_word=$2
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8436 $as_echo_n "checking for $ac_word... " >&6; }
8437 if ${ac_cv_path_MV+:} false; then :
8438   $as_echo_n "(cached) " >&6
8439 else
8440   case $MV in
8441   [\\/]* | ?:[\\/]*)
8442   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8443   ;;
8444   *)
8445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446 for as_dir in $PATH
8447 do
8448   IFS=$as_save_IFS
8449   test -z "$as_dir" && as_dir=.
8450     for ac_exec_ext in '' $ac_executable_extensions; do
8451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454     break 2
8455   fi
8456 done
8457   done
8458 IFS=$as_save_IFS
8459 
8460   ;;
8461 esac
8462 fi
8463 MV=$ac_cv_path_MV
8464 if test -n "$MV"; then
8465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8466 $as_echo "$MV" >&6; }
8467 else
8468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469 $as_echo "no" >&6; }
8470 fi
8471 
8472 
8473         if test "x$MV" = x; then
8474           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8475         fi
8476       else
8477         # Otherwise we believe it is a complete path. Use it as it is.
8478         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8479 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8481 $as_echo_n "checking for MV... " >&6; }
8482         if test ! -x "$tool_specified"; then
8483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8484 $as_echo "not found" >&6; }
8485           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8486         fi
8487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8488 $as_echo "$tool_specified" >&6; }
8489       fi
8490     fi
8491   fi
8492 
8493 
8494 
8495   if test "x$MV" = x; then
8496     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8497   fi
8498 
8499 
8500 
8501 
8502 
8503   # Publish this variable in the help.
8504 
8505 
8506   if test "x$NAWK" = x; then
8507     # The variable is not set by user, try to locate tool using the code snippet
8508     for ac_prog in nawk gawk awk
8509 do
8510   # Extract the first word of "$ac_prog", so it can be a program name with args.
8511 set dummy $ac_prog; ac_word=$2
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513 $as_echo_n "checking for $ac_word... " >&6; }
8514 if ${ac_cv_path_NAWK+:} false; then :
8515   $as_echo_n "(cached) " >&6
8516 else
8517   case $NAWK in
8518   [\\/]* | ?:[\\/]*)
8519   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8520   ;;
8521   *)
8522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523 for as_dir in $PATH
8524 do
8525   IFS=$as_save_IFS
8526   test -z "$as_dir" && as_dir=.
8527     for ac_exec_ext in '' $ac_executable_extensions; do
8528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8529     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531     break 2
8532   fi
8533 done
8534   done
8535 IFS=$as_save_IFS
8536 
8537   ;;
8538 esac
8539 fi
8540 NAWK=$ac_cv_path_NAWK
8541 if test -n "$NAWK"; then
8542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8543 $as_echo "$NAWK" >&6; }
8544 else
8545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546 $as_echo "no" >&6; }
8547 fi
8548 
8549 
8550   test -n "$NAWK" && break
8551 done
8552 
8553   else
8554     # The variable is set, but is it from the command line or the environment?
8555 
8556     # Try to remove the string !NAWK! from our list.
8557     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8558     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8559       # If it failed, the variable was not from the command line. Ignore it,
8560       # but warn the user (except for BASH, which is always set by the calling BASH).
8561       if test "xNAWK" != xBASH; then
8562         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8563 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8564       fi
8565       # Try to locate tool using the code snippet
8566       for ac_prog in nawk gawk awk
8567 do
8568   # Extract the first word of "$ac_prog", so it can be a program name with args.
8569 set dummy $ac_prog; ac_word=$2
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8571 $as_echo_n "checking for $ac_word... " >&6; }
8572 if ${ac_cv_path_NAWK+:} false; then :
8573   $as_echo_n "(cached) " >&6
8574 else
8575   case $NAWK in
8576   [\\/]* | ?:[\\/]*)
8577   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8578   ;;
8579   *)
8580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8581 for as_dir in $PATH
8582 do
8583   IFS=$as_save_IFS
8584   test -z "$as_dir" && as_dir=.
8585     for ac_exec_ext in '' $ac_executable_extensions; do
8586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8587     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8589     break 2
8590   fi
8591 done
8592   done
8593 IFS=$as_save_IFS
8594 
8595   ;;
8596 esac
8597 fi
8598 NAWK=$ac_cv_path_NAWK
8599 if test -n "$NAWK"; then
8600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8601 $as_echo "$NAWK" >&6; }
8602 else
8603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8604 $as_echo "no" >&6; }
8605 fi
8606 
8607 
8608   test -n "$NAWK" && break
8609 done
8610 
8611     else
8612       # If it succeeded, then it was overridden by the user. We will use it
8613       # for the tool.
8614 
8615       # First remove it from the list of overridden variables, so we can test
8616       # for unknown variables in the end.
8617       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8618 
8619       # Check if the provided tool contains a complete path.
8620       tool_specified="$NAWK"
8621       tool_basename="${tool_specified##*/}"
8622       if test "x$tool_basename" = "x$tool_specified"; then
8623         # A command without a complete path is provided, search $PATH.
8624         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8625 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8626         # Extract the first word of "$tool_basename", so it can be a program name with args.
8627 set dummy $tool_basename; ac_word=$2
8628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8629 $as_echo_n "checking for $ac_word... " >&6; }
8630 if ${ac_cv_path_NAWK+:} false; then :
8631   $as_echo_n "(cached) " >&6
8632 else
8633   case $NAWK in
8634   [\\/]* | ?:[\\/]*)
8635   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8636   ;;
8637   *)
8638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8639 for as_dir in $PATH
8640 do
8641   IFS=$as_save_IFS
8642   test -z "$as_dir" && as_dir=.
8643     for ac_exec_ext in '' $ac_executable_extensions; do
8644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8645     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8647     break 2
8648   fi
8649 done
8650   done
8651 IFS=$as_save_IFS
8652 
8653   ;;
8654 esac
8655 fi
8656 NAWK=$ac_cv_path_NAWK
8657 if test -n "$NAWK"; then
8658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8659 $as_echo "$NAWK" >&6; }
8660 else
8661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662 $as_echo "no" >&6; }
8663 fi
8664 
8665 
8666         if test "x$NAWK" = x; then
8667           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8668         fi
8669       else
8670         # Otherwise we believe it is a complete path. Use it as it is.
8671         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8672 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8673         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8674 $as_echo_n "checking for NAWK... " >&6; }
8675         if test ! -x "$tool_specified"; then
8676           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8677 $as_echo "not found" >&6; }
8678           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8679         fi
8680         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8681 $as_echo "$tool_specified" >&6; }
8682       fi
8683     fi
8684   fi
8685 
8686 
8687 
8688   if test "x$NAWK" = x; then
8689     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8690   fi
8691 
8692 
8693 
8694 
8695 
8696   # Publish this variable in the help.
8697 
8698 
8699   if test "x$PRINTF" = x; then
8700     # The variable is not set by user, try to locate tool using the code snippet
8701     for ac_prog in printf
8702 do
8703   # Extract the first word of "$ac_prog", so it can be a program name with args.
8704 set dummy $ac_prog; ac_word=$2
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8706 $as_echo_n "checking for $ac_word... " >&6; }
8707 if ${ac_cv_path_PRINTF+:} false; then :
8708   $as_echo_n "(cached) " >&6
8709 else
8710   case $PRINTF in
8711   [\\/]* | ?:[\\/]*)
8712   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8713   ;;
8714   *)
8715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8716 for as_dir in $PATH
8717 do
8718   IFS=$as_save_IFS
8719   test -z "$as_dir" && as_dir=.
8720     for ac_exec_ext in '' $ac_executable_extensions; do
8721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8722     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8724     break 2
8725   fi
8726 done
8727   done
8728 IFS=$as_save_IFS
8729 
8730   ;;
8731 esac
8732 fi
8733 PRINTF=$ac_cv_path_PRINTF
8734 if test -n "$PRINTF"; then
8735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8736 $as_echo "$PRINTF" >&6; }
8737 else
8738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8739 $as_echo "no" >&6; }
8740 fi
8741 
8742 
8743   test -n "$PRINTF" && break
8744 done
8745 
8746   else
8747     # The variable is set, but is it from the command line or the environment?
8748 
8749     # Try to remove the string !PRINTF! from our list.
8750     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8751     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8752       # If it failed, the variable was not from the command line. Ignore it,
8753       # but warn the user (except for BASH, which is always set by the calling BASH).
8754       if test "xPRINTF" != xBASH; then
8755         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8756 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8757       fi
8758       # Try to locate tool using the code snippet
8759       for ac_prog in printf
8760 do
8761   # Extract the first word of "$ac_prog", so it can be a program name with args.
8762 set dummy $ac_prog; ac_word=$2
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8764 $as_echo_n "checking for $ac_word... " >&6; }
8765 if ${ac_cv_path_PRINTF+:} false; then :
8766   $as_echo_n "(cached) " >&6
8767 else
8768   case $PRINTF in
8769   [\\/]* | ?:[\\/]*)
8770   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8771   ;;
8772   *)
8773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8774 for as_dir in $PATH
8775 do
8776   IFS=$as_save_IFS
8777   test -z "$as_dir" && as_dir=.
8778     for ac_exec_ext in '' $ac_executable_extensions; do
8779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8780     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8782     break 2
8783   fi
8784 done
8785   done
8786 IFS=$as_save_IFS
8787 
8788   ;;
8789 esac
8790 fi
8791 PRINTF=$ac_cv_path_PRINTF
8792 if test -n "$PRINTF"; then
8793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8794 $as_echo "$PRINTF" >&6; }
8795 else
8796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8797 $as_echo "no" >&6; }
8798 fi
8799 
8800 
8801   test -n "$PRINTF" && break
8802 done
8803 
8804     else
8805       # If it succeeded, then it was overridden by the user. We will use it
8806       # for the tool.
8807 
8808       # First remove it from the list of overridden variables, so we can test
8809       # for unknown variables in the end.
8810       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8811 
8812       # Check if the provided tool contains a complete path.
8813       tool_specified="$PRINTF"
8814       tool_basename="${tool_specified##*/}"
8815       if test "x$tool_basename" = "x$tool_specified"; then
8816         # A command without a complete path is provided, search $PATH.
8817         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8818 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8819         # Extract the first word of "$tool_basename", so it can be a program name with args.
8820 set dummy $tool_basename; ac_word=$2
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822 $as_echo_n "checking for $ac_word... " >&6; }
8823 if ${ac_cv_path_PRINTF+:} false; then :
8824   $as_echo_n "(cached) " >&6
8825 else
8826   case $PRINTF in
8827   [\\/]* | ?:[\\/]*)
8828   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8829   ;;
8830   *)
8831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832 for as_dir in $PATH
8833 do
8834   IFS=$as_save_IFS
8835   test -z "$as_dir" && as_dir=.
8836     for ac_exec_ext in '' $ac_executable_extensions; do
8837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8838     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8840     break 2
8841   fi
8842 done
8843   done
8844 IFS=$as_save_IFS
8845 
8846   ;;
8847 esac
8848 fi
8849 PRINTF=$ac_cv_path_PRINTF
8850 if test -n "$PRINTF"; then
8851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8852 $as_echo "$PRINTF" >&6; }
8853 else
8854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855 $as_echo "no" >&6; }
8856 fi
8857 
8858 
8859         if test "x$PRINTF" = x; then
8860           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8861         fi
8862       else
8863         # Otherwise we believe it is a complete path. Use it as it is.
8864         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8865 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8866         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8867 $as_echo_n "checking for PRINTF... " >&6; }
8868         if test ! -x "$tool_specified"; then
8869           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8870 $as_echo "not found" >&6; }
8871           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8872         fi
8873         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8874 $as_echo "$tool_specified" >&6; }
8875       fi
8876     fi
8877   fi
8878 
8879 
8880 
8881   if test "x$PRINTF" = x; then
8882     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8883   fi
8884 
8885 
8886 
8887 
8888 
8889   # Publish this variable in the help.
8890 
8891 
8892   if test "x$RM" = x; then
8893     # The variable is not set by user, try to locate tool using the code snippet
8894     for ac_prog in rm
8895 do
8896   # Extract the first word of "$ac_prog", so it can be a program name with args.
8897 set dummy $ac_prog; ac_word=$2
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899 $as_echo_n "checking for $ac_word... " >&6; }
8900 if ${ac_cv_path_RM+:} false; then :
8901   $as_echo_n "(cached) " >&6
8902 else
8903   case $RM in
8904   [\\/]* | ?:[\\/]*)
8905   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8906   ;;
8907   *)
8908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909 for as_dir in $PATH
8910 do
8911   IFS=$as_save_IFS
8912   test -z "$as_dir" && as_dir=.
8913     for ac_exec_ext in '' $ac_executable_extensions; do
8914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917     break 2
8918   fi
8919 done
8920   done
8921 IFS=$as_save_IFS
8922 
8923   ;;
8924 esac
8925 fi
8926 RM=$ac_cv_path_RM
8927 if test -n "$RM"; then
8928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8929 $as_echo "$RM" >&6; }
8930 else
8931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932 $as_echo "no" >&6; }
8933 fi
8934 
8935 
8936   test -n "$RM" && break
8937 done
8938 
8939   else
8940     # The variable is set, but is it from the command line or the environment?
8941 
8942     # Try to remove the string !RM! from our list.
8943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8945       # If it failed, the variable was not from the command line. Ignore it,
8946       # but warn the user (except for BASH, which is always set by the calling BASH).
8947       if test "xRM" != xBASH; then
8948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8949 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8950       fi
8951       # Try to locate tool using the code snippet
8952       for ac_prog in rm
8953 do
8954   # Extract the first word of "$ac_prog", so it can be a program name with args.
8955 set dummy $ac_prog; ac_word=$2
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8957 $as_echo_n "checking for $ac_word... " >&6; }
8958 if ${ac_cv_path_RM+:} false; then :
8959   $as_echo_n "(cached) " >&6
8960 else
8961   case $RM in
8962   [\\/]* | ?:[\\/]*)
8963   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8964   ;;
8965   *)
8966   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8967 for as_dir in $PATH
8968 do
8969   IFS=$as_save_IFS
8970   test -z "$as_dir" && as_dir=.
8971     for ac_exec_ext in '' $ac_executable_extensions; do
8972   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8973     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8974     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8975     break 2
8976   fi
8977 done
8978   done
8979 IFS=$as_save_IFS
8980 
8981   ;;
8982 esac
8983 fi
8984 RM=$ac_cv_path_RM
8985 if test -n "$RM"; then
8986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8987 $as_echo "$RM" >&6; }
8988 else
8989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990 $as_echo "no" >&6; }
8991 fi
8992 
8993 
8994   test -n "$RM" && break
8995 done
8996 
8997     else
8998       # If it succeeded, then it was overridden by the user. We will use it
8999       # for the tool.
9000 
9001       # First remove it from the list of overridden variables, so we can test
9002       # for unknown variables in the end.
9003       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9004 
9005       # Check if the provided tool contains a complete path.
9006       tool_specified="$RM"
9007       tool_basename="${tool_specified##*/}"
9008       if test "x$tool_basename" = "x$tool_specified"; then
9009         # A command without a complete path is provided, search $PATH.
9010         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9011 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9012         # Extract the first word of "$tool_basename", so it can be a program name with args.
9013 set dummy $tool_basename; ac_word=$2
9014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9015 $as_echo_n "checking for $ac_word... " >&6; }
9016 if ${ac_cv_path_RM+:} false; then :
9017   $as_echo_n "(cached) " >&6
9018 else
9019   case $RM in
9020   [\\/]* | ?:[\\/]*)
9021   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9022   ;;
9023   *)
9024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9025 for as_dir in $PATH
9026 do
9027   IFS=$as_save_IFS
9028   test -z "$as_dir" && as_dir=.
9029     for ac_exec_ext in '' $ac_executable_extensions; do
9030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9033     break 2
9034   fi
9035 done
9036   done
9037 IFS=$as_save_IFS
9038 
9039   ;;
9040 esac
9041 fi
9042 RM=$ac_cv_path_RM
9043 if test -n "$RM"; then
9044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9045 $as_echo "$RM" >&6; }
9046 else
9047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048 $as_echo "no" >&6; }
9049 fi
9050 
9051 
9052         if test "x$RM" = x; then
9053           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9054         fi
9055       else
9056         # Otherwise we believe it is a complete path. Use it as it is.
9057         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9058 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9060 $as_echo_n "checking for RM... " >&6; }
9061         if test ! -x "$tool_specified"; then
9062           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9063 $as_echo "not found" >&6; }
9064           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9065         fi
9066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9067 $as_echo "$tool_specified" >&6; }
9068       fi
9069     fi
9070   fi
9071 
9072 
9073 
9074   if test "x$RM" = x; then
9075     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9076   fi
9077 
9078 
9079 
9080 
9081 
9082   # Publish this variable in the help.
9083 
9084 
9085   if test "x$SH" = x; then
9086     # The variable is not set by user, try to locate tool using the code snippet
9087     for ac_prog in sh
9088 do
9089   # Extract the first word of "$ac_prog", so it can be a program name with args.
9090 set dummy $ac_prog; ac_word=$2
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092 $as_echo_n "checking for $ac_word... " >&6; }
9093 if ${ac_cv_path_SH+:} false; then :
9094   $as_echo_n "(cached) " >&6
9095 else
9096   case $SH in
9097   [\\/]* | ?:[\\/]*)
9098   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9099   ;;
9100   *)
9101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102 for as_dir in $PATH
9103 do
9104   IFS=$as_save_IFS
9105   test -z "$as_dir" && as_dir=.
9106     for ac_exec_ext in '' $ac_executable_extensions; do
9107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9110     break 2
9111   fi
9112 done
9113   done
9114 IFS=$as_save_IFS
9115 
9116   ;;
9117 esac
9118 fi
9119 SH=$ac_cv_path_SH
9120 if test -n "$SH"; then
9121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9122 $as_echo "$SH" >&6; }
9123 else
9124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125 $as_echo "no" >&6; }
9126 fi
9127 
9128 
9129   test -n "$SH" && break
9130 done
9131 
9132   else
9133     # The variable is set, but is it from the command line or the environment?
9134 
9135     # Try to remove the string !SH! from our list.
9136     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9137     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9138       # If it failed, the variable was not from the command line. Ignore it,
9139       # but warn the user (except for BASH, which is always set by the calling BASH).
9140       if test "xSH" != xBASH; then
9141         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9142 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9143       fi
9144       # Try to locate tool using the code snippet
9145       for ac_prog in sh
9146 do
9147   # Extract the first word of "$ac_prog", so it can be a program name with args.
9148 set dummy $ac_prog; ac_word=$2
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9150 $as_echo_n "checking for $ac_word... " >&6; }
9151 if ${ac_cv_path_SH+:} false; then :
9152   $as_echo_n "(cached) " >&6
9153 else
9154   case $SH in
9155   [\\/]* | ?:[\\/]*)
9156   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9157   ;;
9158   *)
9159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9160 for as_dir in $PATH
9161 do
9162   IFS=$as_save_IFS
9163   test -z "$as_dir" && as_dir=.
9164     for ac_exec_ext in '' $ac_executable_extensions; do
9165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9166     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9168     break 2
9169   fi
9170 done
9171   done
9172 IFS=$as_save_IFS
9173 
9174   ;;
9175 esac
9176 fi
9177 SH=$ac_cv_path_SH
9178 if test -n "$SH"; then
9179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9180 $as_echo "$SH" >&6; }
9181 else
9182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183 $as_echo "no" >&6; }
9184 fi
9185 
9186 
9187   test -n "$SH" && break
9188 done
9189 
9190     else
9191       # If it succeeded, then it was overridden by the user. We will use it
9192       # for the tool.
9193 
9194       # First remove it from the list of overridden variables, so we can test
9195       # for unknown variables in the end.
9196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9197 
9198       # Check if the provided tool contains a complete path.
9199       tool_specified="$SH"
9200       tool_basename="${tool_specified##*/}"
9201       if test "x$tool_basename" = "x$tool_specified"; then
9202         # A command without a complete path is provided, search $PATH.
9203         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9204 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9205         # Extract the first word of "$tool_basename", so it can be a program name with args.
9206 set dummy $tool_basename; ac_word=$2
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9208 $as_echo_n "checking for $ac_word... " >&6; }
9209 if ${ac_cv_path_SH+:} false; then :
9210   $as_echo_n "(cached) " >&6
9211 else
9212   case $SH in
9213   [\\/]* | ?:[\\/]*)
9214   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9215   ;;
9216   *)
9217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9218 for as_dir in $PATH
9219 do
9220   IFS=$as_save_IFS
9221   test -z "$as_dir" && as_dir=.
9222     for ac_exec_ext in '' $ac_executable_extensions; do
9223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9224     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9226     break 2
9227   fi
9228 done
9229   done
9230 IFS=$as_save_IFS
9231 
9232   ;;
9233 esac
9234 fi
9235 SH=$ac_cv_path_SH
9236 if test -n "$SH"; then
9237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9238 $as_echo "$SH" >&6; }
9239 else
9240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241 $as_echo "no" >&6; }
9242 fi
9243 
9244 
9245         if test "x$SH" = x; then
9246           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9247         fi
9248       else
9249         # Otherwise we believe it is a complete path. Use it as it is.
9250         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9251 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9253 $as_echo_n "checking for SH... " >&6; }
9254         if test ! -x "$tool_specified"; then
9255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9256 $as_echo "not found" >&6; }
9257           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9258         fi
9259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9260 $as_echo "$tool_specified" >&6; }
9261       fi
9262     fi
9263   fi
9264 
9265 
9266 
9267   if test "x$SH" = x; then
9268     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9269   fi
9270 
9271 
9272 
9273 
9274 
9275   # Publish this variable in the help.
9276 
9277 
9278   if test "x$SORT" = x; then
9279     # The variable is not set by user, try to locate tool using the code snippet
9280     for ac_prog in sort
9281 do
9282   # Extract the first word of "$ac_prog", so it can be a program name with args.
9283 set dummy $ac_prog; ac_word=$2
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9285 $as_echo_n "checking for $ac_word... " >&6; }
9286 if ${ac_cv_path_SORT+:} false; then :
9287   $as_echo_n "(cached) " >&6
9288 else
9289   case $SORT in
9290   [\\/]* | ?:[\\/]*)
9291   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9292   ;;
9293   *)
9294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9295 for as_dir in $PATH
9296 do
9297   IFS=$as_save_IFS
9298   test -z "$as_dir" && as_dir=.
9299     for ac_exec_ext in '' $ac_executable_extensions; do
9300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9301     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9303     break 2
9304   fi
9305 done
9306   done
9307 IFS=$as_save_IFS
9308 
9309   ;;
9310 esac
9311 fi
9312 SORT=$ac_cv_path_SORT
9313 if test -n "$SORT"; then
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9315 $as_echo "$SORT" >&6; }
9316 else
9317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9318 $as_echo "no" >&6; }
9319 fi
9320 
9321 
9322   test -n "$SORT" && break
9323 done
9324 
9325   else
9326     # The variable is set, but is it from the command line or the environment?
9327 
9328     # Try to remove the string !SORT! from our list.
9329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9331       # If it failed, the variable was not from the command line. Ignore it,
9332       # but warn the user (except for BASH, which is always set by the calling BASH).
9333       if test "xSORT" != xBASH; then
9334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9335 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9336       fi
9337       # Try to locate tool using the code snippet
9338       for ac_prog in sort
9339 do
9340   # Extract the first word of "$ac_prog", so it can be a program name with args.
9341 set dummy $ac_prog; ac_word=$2
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9343 $as_echo_n "checking for $ac_word... " >&6; }
9344 if ${ac_cv_path_SORT+:} false; then :
9345   $as_echo_n "(cached) " >&6
9346 else
9347   case $SORT in
9348   [\\/]* | ?:[\\/]*)
9349   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9350   ;;
9351   *)
9352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9353 for as_dir in $PATH
9354 do
9355   IFS=$as_save_IFS
9356   test -z "$as_dir" && as_dir=.
9357     for ac_exec_ext in '' $ac_executable_extensions; do
9358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9359     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9361     break 2
9362   fi
9363 done
9364   done
9365 IFS=$as_save_IFS
9366 
9367   ;;
9368 esac
9369 fi
9370 SORT=$ac_cv_path_SORT
9371 if test -n "$SORT"; then
9372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9373 $as_echo "$SORT" >&6; }
9374 else
9375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376 $as_echo "no" >&6; }
9377 fi
9378 
9379 
9380   test -n "$SORT" && break
9381 done
9382 
9383     else
9384       # If it succeeded, then it was overridden by the user. We will use it
9385       # for the tool.
9386 
9387       # First remove it from the list of overridden variables, so we can test
9388       # for unknown variables in the end.
9389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9390 
9391       # Check if the provided tool contains a complete path.
9392       tool_specified="$SORT"
9393       tool_basename="${tool_specified##*/}"
9394       if test "x$tool_basename" = "x$tool_specified"; then
9395         # A command without a complete path is provided, search $PATH.
9396         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9397 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9398         # Extract the first word of "$tool_basename", so it can be a program name with args.
9399 set dummy $tool_basename; ac_word=$2
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9401 $as_echo_n "checking for $ac_word... " >&6; }
9402 if ${ac_cv_path_SORT+:} false; then :
9403   $as_echo_n "(cached) " >&6
9404 else
9405   case $SORT in
9406   [\\/]* | ?:[\\/]*)
9407   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9408   ;;
9409   *)
9410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9411 for as_dir in $PATH
9412 do
9413   IFS=$as_save_IFS
9414   test -z "$as_dir" && as_dir=.
9415     for ac_exec_ext in '' $ac_executable_extensions; do
9416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9417     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9419     break 2
9420   fi
9421 done
9422   done
9423 IFS=$as_save_IFS
9424 
9425   ;;
9426 esac
9427 fi
9428 SORT=$ac_cv_path_SORT
9429 if test -n "$SORT"; then
9430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9431 $as_echo "$SORT" >&6; }
9432 else
9433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434 $as_echo "no" >&6; }
9435 fi
9436 
9437 
9438         if test "x$SORT" = x; then
9439           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9440         fi
9441       else
9442         # Otherwise we believe it is a complete path. Use it as it is.
9443         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9444 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9446 $as_echo_n "checking for SORT... " >&6; }
9447         if test ! -x "$tool_specified"; then
9448           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9449 $as_echo "not found" >&6; }
9450           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9451         fi
9452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9453 $as_echo "$tool_specified" >&6; }
9454       fi
9455     fi
9456   fi
9457 
9458 
9459 
9460   if test "x$SORT" = x; then
9461     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9462   fi
9463 
9464 
9465 
9466 
9467 
9468   # Publish this variable in the help.
9469 
9470 
9471   if test "x$TAIL" = x; then
9472     # The variable is not set by user, try to locate tool using the code snippet
9473     for ac_prog in tail
9474 do
9475   # Extract the first word of "$ac_prog", so it can be a program name with args.
9476 set dummy $ac_prog; ac_word=$2
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9478 $as_echo_n "checking for $ac_word... " >&6; }
9479 if ${ac_cv_path_TAIL+:} false; then :
9480   $as_echo_n "(cached) " >&6
9481 else
9482   case $TAIL in
9483   [\\/]* | ?:[\\/]*)
9484   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9485   ;;
9486   *)
9487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9488 for as_dir in $PATH
9489 do
9490   IFS=$as_save_IFS
9491   test -z "$as_dir" && as_dir=.
9492     for ac_exec_ext in '' $ac_executable_extensions; do
9493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9494     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9496     break 2
9497   fi
9498 done
9499   done
9500 IFS=$as_save_IFS
9501 
9502   ;;
9503 esac
9504 fi
9505 TAIL=$ac_cv_path_TAIL
9506 if test -n "$TAIL"; then
9507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9508 $as_echo "$TAIL" >&6; }
9509 else
9510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511 $as_echo "no" >&6; }
9512 fi
9513 
9514 
9515   test -n "$TAIL" && break
9516 done
9517 
9518   else
9519     # The variable is set, but is it from the command line or the environment?
9520 
9521     # Try to remove the string !TAIL! from our list.
9522     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9523     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9524       # If it failed, the variable was not from the command line. Ignore it,
9525       # but warn the user (except for BASH, which is always set by the calling BASH).
9526       if test "xTAIL" != xBASH; then
9527         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9528 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9529       fi
9530       # Try to locate tool using the code snippet
9531       for ac_prog in tail
9532 do
9533   # Extract the first word of "$ac_prog", so it can be a program name with args.
9534 set dummy $ac_prog; ac_word=$2
9535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9536 $as_echo_n "checking for $ac_word... " >&6; }
9537 if ${ac_cv_path_TAIL+:} false; then :
9538   $as_echo_n "(cached) " >&6
9539 else
9540   case $TAIL in
9541   [\\/]* | ?:[\\/]*)
9542   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9543   ;;
9544   *)
9545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9546 for as_dir in $PATH
9547 do
9548   IFS=$as_save_IFS
9549   test -z "$as_dir" && as_dir=.
9550     for ac_exec_ext in '' $ac_executable_extensions; do
9551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9552     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9554     break 2
9555   fi
9556 done
9557   done
9558 IFS=$as_save_IFS
9559 
9560   ;;
9561 esac
9562 fi
9563 TAIL=$ac_cv_path_TAIL
9564 if test -n "$TAIL"; then
9565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9566 $as_echo "$TAIL" >&6; }
9567 else
9568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9569 $as_echo "no" >&6; }
9570 fi
9571 
9572 
9573   test -n "$TAIL" && break
9574 done
9575 
9576     else
9577       # If it succeeded, then it was overridden by the user. We will use it
9578       # for the tool.
9579 
9580       # First remove it from the list of overridden variables, so we can test
9581       # for unknown variables in the end.
9582       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9583 
9584       # Check if the provided tool contains a complete path.
9585       tool_specified="$TAIL"
9586       tool_basename="${tool_specified##*/}"
9587       if test "x$tool_basename" = "x$tool_specified"; then
9588         # A command without a complete path is provided, search $PATH.
9589         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9590 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9591         # Extract the first word of "$tool_basename", so it can be a program name with args.
9592 set dummy $tool_basename; ac_word=$2
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594 $as_echo_n "checking for $ac_word... " >&6; }
9595 if ${ac_cv_path_TAIL+:} false; then :
9596   $as_echo_n "(cached) " >&6
9597 else
9598   case $TAIL in
9599   [\\/]* | ?:[\\/]*)
9600   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9601   ;;
9602   *)
9603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9604 for as_dir in $PATH
9605 do
9606   IFS=$as_save_IFS
9607   test -z "$as_dir" && as_dir=.
9608     for ac_exec_ext in '' $ac_executable_extensions; do
9609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9610     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9612     break 2
9613   fi
9614 done
9615   done
9616 IFS=$as_save_IFS
9617 
9618   ;;
9619 esac
9620 fi
9621 TAIL=$ac_cv_path_TAIL
9622 if test -n "$TAIL"; then
9623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9624 $as_echo "$TAIL" >&6; }
9625 else
9626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9627 $as_echo "no" >&6; }
9628 fi
9629 
9630 
9631         if test "x$TAIL" = x; then
9632           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9633         fi
9634       else
9635         # Otherwise we believe it is a complete path. Use it as it is.
9636         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9637 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9639 $as_echo_n "checking for TAIL... " >&6; }
9640         if test ! -x "$tool_specified"; then
9641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9642 $as_echo "not found" >&6; }
9643           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9644         fi
9645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9646 $as_echo "$tool_specified" >&6; }
9647       fi
9648     fi
9649   fi
9650 
9651 
9652 
9653   if test "x$TAIL" = x; then
9654     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9655   fi
9656 
9657 
9658 
9659 
9660 
9661   # Publish this variable in the help.
9662 
9663 
9664   if test "x$TAR" = x; then
9665     # The variable is not set by user, try to locate tool using the code snippet
9666     for ac_prog in tar
9667 do
9668   # Extract the first word of "$ac_prog", so it can be a program name with args.
9669 set dummy $ac_prog; ac_word=$2
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9671 $as_echo_n "checking for $ac_word... " >&6; }
9672 if ${ac_cv_path_TAR+:} false; then :
9673   $as_echo_n "(cached) " >&6
9674 else
9675   case $TAR in
9676   [\\/]* | ?:[\\/]*)
9677   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9678   ;;
9679   *)
9680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9681 for as_dir in $PATH
9682 do
9683   IFS=$as_save_IFS
9684   test -z "$as_dir" && as_dir=.
9685     for ac_exec_ext in '' $ac_executable_extensions; do
9686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9687     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9689     break 2
9690   fi
9691 done
9692   done
9693 IFS=$as_save_IFS
9694 
9695   ;;
9696 esac
9697 fi
9698 TAR=$ac_cv_path_TAR
9699 if test -n "$TAR"; then
9700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9701 $as_echo "$TAR" >&6; }
9702 else
9703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9704 $as_echo "no" >&6; }
9705 fi
9706 
9707 
9708   test -n "$TAR" && break
9709 done
9710 
9711   else
9712     # The variable is set, but is it from the command line or the environment?
9713 
9714     # Try to remove the string !TAR! from our list.
9715     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9716     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9717       # If it failed, the variable was not from the command line. Ignore it,
9718       # but warn the user (except for BASH, which is always set by the calling BASH).
9719       if test "xTAR" != xBASH; then
9720         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9721 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9722       fi
9723       # Try to locate tool using the code snippet
9724       for ac_prog in tar
9725 do
9726   # Extract the first word of "$ac_prog", so it can be a program name with args.
9727 set dummy $ac_prog; ac_word=$2
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729 $as_echo_n "checking for $ac_word... " >&6; }
9730 if ${ac_cv_path_TAR+:} false; then :
9731   $as_echo_n "(cached) " >&6
9732 else
9733   case $TAR in
9734   [\\/]* | ?:[\\/]*)
9735   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9736   ;;
9737   *)
9738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739 for as_dir in $PATH
9740 do
9741   IFS=$as_save_IFS
9742   test -z "$as_dir" && as_dir=.
9743     for ac_exec_ext in '' $ac_executable_extensions; do
9744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747     break 2
9748   fi
9749 done
9750   done
9751 IFS=$as_save_IFS
9752 
9753   ;;
9754 esac
9755 fi
9756 TAR=$ac_cv_path_TAR
9757 if test -n "$TAR"; then
9758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9759 $as_echo "$TAR" >&6; }
9760 else
9761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762 $as_echo "no" >&6; }
9763 fi
9764 
9765 
9766   test -n "$TAR" && break
9767 done
9768 
9769     else
9770       # If it succeeded, then it was overridden by the user. We will use it
9771       # for the tool.
9772 
9773       # First remove it from the list of overridden variables, so we can test
9774       # for unknown variables in the end.
9775       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9776 
9777       # Check if the provided tool contains a complete path.
9778       tool_specified="$TAR"
9779       tool_basename="${tool_specified##*/}"
9780       if test "x$tool_basename" = "x$tool_specified"; then
9781         # A command without a complete path is provided, search $PATH.
9782         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9783 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9784         # Extract the first word of "$tool_basename", so it can be a program name with args.
9785 set dummy $tool_basename; ac_word=$2
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9787 $as_echo_n "checking for $ac_word... " >&6; }
9788 if ${ac_cv_path_TAR+:} false; then :
9789   $as_echo_n "(cached) " >&6
9790 else
9791   case $TAR in
9792   [\\/]* | ?:[\\/]*)
9793   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9794   ;;
9795   *)
9796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9797 for as_dir in $PATH
9798 do
9799   IFS=$as_save_IFS
9800   test -z "$as_dir" && as_dir=.
9801     for ac_exec_ext in '' $ac_executable_extensions; do
9802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9803     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9805     break 2
9806   fi
9807 done
9808   done
9809 IFS=$as_save_IFS
9810 
9811   ;;
9812 esac
9813 fi
9814 TAR=$ac_cv_path_TAR
9815 if test -n "$TAR"; then
9816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9817 $as_echo "$TAR" >&6; }
9818 else
9819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820 $as_echo "no" >&6; }
9821 fi
9822 
9823 
9824         if test "x$TAR" = x; then
9825           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9826         fi
9827       else
9828         # Otherwise we believe it is a complete path. Use it as it is.
9829         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9830 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9831         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9832 $as_echo_n "checking for TAR... " >&6; }
9833         if test ! -x "$tool_specified"; then
9834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9835 $as_echo "not found" >&6; }
9836           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9837         fi
9838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9839 $as_echo "$tool_specified" >&6; }
9840       fi
9841     fi
9842   fi
9843 
9844 
9845 
9846   if test "x$TAR" = x; then
9847     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9848   fi
9849 
9850 
9851 
9852 
9853 
9854   # Publish this variable in the help.
9855 
9856 
9857   if test "x$TEE" = x; then
9858     # The variable is not set by user, try to locate tool using the code snippet
9859     for ac_prog in tee
9860 do
9861   # Extract the first word of "$ac_prog", so it can be a program name with args.
9862 set dummy $ac_prog; ac_word=$2
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864 $as_echo_n "checking for $ac_word... " >&6; }
9865 if ${ac_cv_path_TEE+:} false; then :
9866   $as_echo_n "(cached) " >&6
9867 else
9868   case $TEE in
9869   [\\/]* | ?:[\\/]*)
9870   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9871   ;;
9872   *)
9873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874 for as_dir in $PATH
9875 do
9876   IFS=$as_save_IFS
9877   test -z "$as_dir" && as_dir=.
9878     for ac_exec_ext in '' $ac_executable_extensions; do
9879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882     break 2
9883   fi
9884 done
9885   done
9886 IFS=$as_save_IFS
9887 
9888   ;;
9889 esac
9890 fi
9891 TEE=$ac_cv_path_TEE
9892 if test -n "$TEE"; then
9893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9894 $as_echo "$TEE" >&6; }
9895 else
9896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897 $as_echo "no" >&6; }
9898 fi
9899 
9900 
9901   test -n "$TEE" && break
9902 done
9903 
9904   else
9905     # The variable is set, but is it from the command line or the environment?
9906 
9907     # Try to remove the string !TEE! from our list.
9908     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9909     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9910       # If it failed, the variable was not from the command line. Ignore it,
9911       # but warn the user (except for BASH, which is always set by the calling BASH).
9912       if test "xTEE" != xBASH; then
9913         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9914 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9915       fi
9916       # Try to locate tool using the code snippet
9917       for ac_prog in tee
9918 do
9919   # Extract the first word of "$ac_prog", so it can be a program name with args.
9920 set dummy $ac_prog; ac_word=$2
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9922 $as_echo_n "checking for $ac_word... " >&6; }
9923 if ${ac_cv_path_TEE+:} false; then :
9924   $as_echo_n "(cached) " >&6
9925 else
9926   case $TEE in
9927   [\\/]* | ?:[\\/]*)
9928   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9929   ;;
9930   *)
9931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9932 for as_dir in $PATH
9933 do
9934   IFS=$as_save_IFS
9935   test -z "$as_dir" && as_dir=.
9936     for ac_exec_ext in '' $ac_executable_extensions; do
9937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9938     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9940     break 2
9941   fi
9942 done
9943   done
9944 IFS=$as_save_IFS
9945 
9946   ;;
9947 esac
9948 fi
9949 TEE=$ac_cv_path_TEE
9950 if test -n "$TEE"; then
9951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9952 $as_echo "$TEE" >&6; }
9953 else
9954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955 $as_echo "no" >&6; }
9956 fi
9957 
9958 
9959   test -n "$TEE" && break
9960 done
9961 
9962     else
9963       # If it succeeded, then it was overridden by the user. We will use it
9964       # for the tool.
9965 
9966       # First remove it from the list of overridden variables, so we can test
9967       # for unknown variables in the end.
9968       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9969 
9970       # Check if the provided tool contains a complete path.
9971       tool_specified="$TEE"
9972       tool_basename="${tool_specified##*/}"
9973       if test "x$tool_basename" = "x$tool_specified"; then
9974         # A command without a complete path is provided, search $PATH.
9975         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9976 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9977         # Extract the first word of "$tool_basename", so it can be a program name with args.
9978 set dummy $tool_basename; ac_word=$2
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980 $as_echo_n "checking for $ac_word... " >&6; }
9981 if ${ac_cv_path_TEE+:} false; then :
9982   $as_echo_n "(cached) " >&6
9983 else
9984   case $TEE in
9985   [\\/]* | ?:[\\/]*)
9986   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9987   ;;
9988   *)
9989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9990 for as_dir in $PATH
9991 do
9992   IFS=$as_save_IFS
9993   test -z "$as_dir" && as_dir=.
9994     for ac_exec_ext in '' $ac_executable_extensions; do
9995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9996     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9998     break 2
9999   fi
10000 done
10001   done
10002 IFS=$as_save_IFS
10003 
10004   ;;
10005 esac
10006 fi
10007 TEE=$ac_cv_path_TEE
10008 if test -n "$TEE"; then
10009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10010 $as_echo "$TEE" >&6; }
10011 else
10012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013 $as_echo "no" >&6; }
10014 fi
10015 
10016 
10017         if test "x$TEE" = x; then
10018           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10019         fi
10020       else
10021         # Otherwise we believe it is a complete path. Use it as it is.
10022         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10023 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10024         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10025 $as_echo_n "checking for TEE... " >&6; }
10026         if test ! -x "$tool_specified"; then
10027           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10028 $as_echo "not found" >&6; }
10029           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10030         fi
10031         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10032 $as_echo "$tool_specified" >&6; }
10033       fi
10034     fi
10035   fi
10036 
10037 
10038 
10039   if test "x$TEE" = x; then
10040     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10041   fi
10042 
10043 
10044 
10045 
10046 
10047   # Publish this variable in the help.
10048 
10049 
10050   if test "x$TOUCH" = x; then
10051     # The variable is not set by user, try to locate tool using the code snippet
10052     for ac_prog in touch
10053 do
10054   # Extract the first word of "$ac_prog", so it can be a program name with args.
10055 set dummy $ac_prog; ac_word=$2
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10057 $as_echo_n "checking for $ac_word... " >&6; }
10058 if ${ac_cv_path_TOUCH+:} false; then :
10059   $as_echo_n "(cached) " >&6
10060 else
10061   case $TOUCH in
10062   [\\/]* | ?:[\\/]*)
10063   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10064   ;;
10065   *)
10066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10067 for as_dir in $PATH
10068 do
10069   IFS=$as_save_IFS
10070   test -z "$as_dir" && as_dir=.
10071     for ac_exec_ext in '' $ac_executable_extensions; do
10072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10073     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10075     break 2
10076   fi
10077 done
10078   done
10079 IFS=$as_save_IFS
10080 
10081   ;;
10082 esac
10083 fi
10084 TOUCH=$ac_cv_path_TOUCH
10085 if test -n "$TOUCH"; then
10086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10087 $as_echo "$TOUCH" >&6; }
10088 else
10089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10090 $as_echo "no" >&6; }
10091 fi
10092 
10093 
10094   test -n "$TOUCH" && break
10095 done
10096 
10097   else
10098     # The variable is set, but is it from the command line or the environment?
10099 
10100     # Try to remove the string !TOUCH! from our list.
10101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10103       # If it failed, the variable was not from the command line. Ignore it,
10104       # but warn the user (except for BASH, which is always set by the calling BASH).
10105       if test "xTOUCH" != xBASH; then
10106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10107 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10108       fi
10109       # Try to locate tool using the code snippet
10110       for ac_prog in touch
10111 do
10112   # Extract the first word of "$ac_prog", so it can be a program name with args.
10113 set dummy $ac_prog; ac_word=$2
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10115 $as_echo_n "checking for $ac_word... " >&6; }
10116 if ${ac_cv_path_TOUCH+:} false; then :
10117   $as_echo_n "(cached) " >&6
10118 else
10119   case $TOUCH in
10120   [\\/]* | ?:[\\/]*)
10121   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10122   ;;
10123   *)
10124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10125 for as_dir in $PATH
10126 do
10127   IFS=$as_save_IFS
10128   test -z "$as_dir" && as_dir=.
10129     for ac_exec_ext in '' $ac_executable_extensions; do
10130   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10131     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10132     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10133     break 2
10134   fi
10135 done
10136   done
10137 IFS=$as_save_IFS
10138 
10139   ;;
10140 esac
10141 fi
10142 TOUCH=$ac_cv_path_TOUCH
10143 if test -n "$TOUCH"; then
10144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10145 $as_echo "$TOUCH" >&6; }
10146 else
10147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10148 $as_echo "no" >&6; }
10149 fi
10150 
10151 
10152   test -n "$TOUCH" && break
10153 done
10154 
10155     else
10156       # If it succeeded, then it was overridden by the user. We will use it
10157       # for the tool.
10158 
10159       # First remove it from the list of overridden variables, so we can test
10160       # for unknown variables in the end.
10161       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10162 
10163       # Check if the provided tool contains a complete path.
10164       tool_specified="$TOUCH"
10165       tool_basename="${tool_specified##*/}"
10166       if test "x$tool_basename" = "x$tool_specified"; then
10167         # A command without a complete path is provided, search $PATH.
10168         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10169 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10170         # Extract the first word of "$tool_basename", so it can be a program name with args.
10171 set dummy $tool_basename; ac_word=$2
10172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173 $as_echo_n "checking for $ac_word... " >&6; }
10174 if ${ac_cv_path_TOUCH+:} false; then :
10175   $as_echo_n "(cached) " >&6
10176 else
10177   case $TOUCH in
10178   [\\/]* | ?:[\\/]*)
10179   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10180   ;;
10181   *)
10182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183 for as_dir in $PATH
10184 do
10185   IFS=$as_save_IFS
10186   test -z "$as_dir" && as_dir=.
10187     for ac_exec_ext in '' $ac_executable_extensions; do
10188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10189     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191     break 2
10192   fi
10193 done
10194   done
10195 IFS=$as_save_IFS
10196 
10197   ;;
10198 esac
10199 fi
10200 TOUCH=$ac_cv_path_TOUCH
10201 if test -n "$TOUCH"; then
10202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10203 $as_echo "$TOUCH" >&6; }
10204 else
10205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206 $as_echo "no" >&6; }
10207 fi
10208 
10209 
10210         if test "x$TOUCH" = x; then
10211           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10212         fi
10213       else
10214         # Otherwise we believe it is a complete path. Use it as it is.
10215         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10216 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10218 $as_echo_n "checking for TOUCH... " >&6; }
10219         if test ! -x "$tool_specified"; then
10220           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10221 $as_echo "not found" >&6; }
10222           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10223         fi
10224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10225 $as_echo "$tool_specified" >&6; }
10226       fi
10227     fi
10228   fi
10229 
10230 
10231 
10232   if test "x$TOUCH" = x; then
10233     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10234   fi
10235 
10236 
10237 
10238 
10239 
10240   # Publish this variable in the help.
10241 
10242 
10243   if test "x$TR" = x; then
10244     # The variable is not set by user, try to locate tool using the code snippet
10245     for ac_prog in tr
10246 do
10247   # Extract the first word of "$ac_prog", so it can be a program name with args.
10248 set dummy $ac_prog; ac_word=$2
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250 $as_echo_n "checking for $ac_word... " >&6; }
10251 if ${ac_cv_path_TR+:} false; then :
10252   $as_echo_n "(cached) " >&6
10253 else
10254   case $TR in
10255   [\\/]* | ?:[\\/]*)
10256   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10257   ;;
10258   *)
10259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260 for as_dir in $PATH
10261 do
10262   IFS=$as_save_IFS
10263   test -z "$as_dir" && as_dir=.
10264     for ac_exec_ext in '' $ac_executable_extensions; do
10265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268     break 2
10269   fi
10270 done
10271   done
10272 IFS=$as_save_IFS
10273 
10274   ;;
10275 esac
10276 fi
10277 TR=$ac_cv_path_TR
10278 if test -n "$TR"; then
10279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10280 $as_echo "$TR" >&6; }
10281 else
10282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283 $as_echo "no" >&6; }
10284 fi
10285 
10286 
10287   test -n "$TR" && break
10288 done
10289 
10290   else
10291     # The variable is set, but is it from the command line or the environment?
10292 
10293     # Try to remove the string !TR! from our list.
10294     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10295     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10296       # If it failed, the variable was not from the command line. Ignore it,
10297       # but warn the user (except for BASH, which is always set by the calling BASH).
10298       if test "xTR" != xBASH; then
10299         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10300 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10301       fi
10302       # Try to locate tool using the code snippet
10303       for ac_prog in tr
10304 do
10305   # Extract the first word of "$ac_prog", so it can be a program name with args.
10306 set dummy $ac_prog; ac_word=$2
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10308 $as_echo_n "checking for $ac_word... " >&6; }
10309 if ${ac_cv_path_TR+:} false; then :
10310   $as_echo_n "(cached) " >&6
10311 else
10312   case $TR in
10313   [\\/]* | ?:[\\/]*)
10314   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10315   ;;
10316   *)
10317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318 for as_dir in $PATH
10319 do
10320   IFS=$as_save_IFS
10321   test -z "$as_dir" && as_dir=.
10322     for ac_exec_ext in '' $ac_executable_extensions; do
10323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326     break 2
10327   fi
10328 done
10329   done
10330 IFS=$as_save_IFS
10331 
10332   ;;
10333 esac
10334 fi
10335 TR=$ac_cv_path_TR
10336 if test -n "$TR"; then
10337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10338 $as_echo "$TR" >&6; }
10339 else
10340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341 $as_echo "no" >&6; }
10342 fi
10343 
10344 
10345   test -n "$TR" && break
10346 done
10347 
10348     else
10349       # If it succeeded, then it was overridden by the user. We will use it
10350       # for the tool.
10351 
10352       # First remove it from the list of overridden variables, so we can test
10353       # for unknown variables in the end.
10354       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10355 
10356       # Check if the provided tool contains a complete path.
10357       tool_specified="$TR"
10358       tool_basename="${tool_specified##*/}"
10359       if test "x$tool_basename" = "x$tool_specified"; then
10360         # A command without a complete path is provided, search $PATH.
10361         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10362 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10363         # Extract the first word of "$tool_basename", so it can be a program name with args.
10364 set dummy $tool_basename; ac_word=$2
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366 $as_echo_n "checking for $ac_word... " >&6; }
10367 if ${ac_cv_path_TR+:} false; then :
10368   $as_echo_n "(cached) " >&6
10369 else
10370   case $TR in
10371   [\\/]* | ?:[\\/]*)
10372   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10373   ;;
10374   *)
10375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376 for as_dir in $PATH
10377 do
10378   IFS=$as_save_IFS
10379   test -z "$as_dir" && as_dir=.
10380     for ac_exec_ext in '' $ac_executable_extensions; do
10381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10382     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384     break 2
10385   fi
10386 done
10387   done
10388 IFS=$as_save_IFS
10389 
10390   ;;
10391 esac
10392 fi
10393 TR=$ac_cv_path_TR
10394 if test -n "$TR"; then
10395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10396 $as_echo "$TR" >&6; }
10397 else
10398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399 $as_echo "no" >&6; }
10400 fi
10401 
10402 
10403         if test "x$TR" = x; then
10404           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10405         fi
10406       else
10407         # Otherwise we believe it is a complete path. Use it as it is.
10408         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10409 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10410         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10411 $as_echo_n "checking for TR... " >&6; }
10412         if test ! -x "$tool_specified"; then
10413           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10414 $as_echo "not found" >&6; }
10415           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10416         fi
10417         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10418 $as_echo "$tool_specified" >&6; }
10419       fi
10420     fi
10421   fi
10422 
10423 
10424 
10425   if test "x$TR" = x; then
10426     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10427   fi
10428 
10429 
10430 
10431 
10432 
10433   # Publish this variable in the help.
10434 
10435 
10436   if test "x$UNAME" = x; then
10437     # The variable is not set by user, try to locate tool using the code snippet
10438     for ac_prog in uname
10439 do
10440   # Extract the first word of "$ac_prog", so it can be a program name with args.
10441 set dummy $ac_prog; ac_word=$2
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443 $as_echo_n "checking for $ac_word... " >&6; }
10444 if ${ac_cv_path_UNAME+:} false; then :
10445   $as_echo_n "(cached) " >&6
10446 else
10447   case $UNAME in
10448   [\\/]* | ?:[\\/]*)
10449   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10450   ;;
10451   *)
10452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453 for as_dir in $PATH
10454 do
10455   IFS=$as_save_IFS
10456   test -z "$as_dir" && as_dir=.
10457     for ac_exec_ext in '' $ac_executable_extensions; do
10458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10459     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461     break 2
10462   fi
10463 done
10464   done
10465 IFS=$as_save_IFS
10466 
10467   ;;
10468 esac
10469 fi
10470 UNAME=$ac_cv_path_UNAME
10471 if test -n "$UNAME"; then
10472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10473 $as_echo "$UNAME" >&6; }
10474 else
10475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476 $as_echo "no" >&6; }
10477 fi
10478 
10479 
10480   test -n "$UNAME" && break
10481 done
10482 
10483   else
10484     # The variable is set, but is it from the command line or the environment?
10485 
10486     # Try to remove the string !UNAME! from our list.
10487     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10488     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10489       # If it failed, the variable was not from the command line. Ignore it,
10490       # but warn the user (except for BASH, which is always set by the calling BASH).
10491       if test "xUNAME" != xBASH; then
10492         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10493 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10494       fi
10495       # Try to locate tool using the code snippet
10496       for ac_prog in uname
10497 do
10498   # Extract the first word of "$ac_prog", so it can be a program name with args.
10499 set dummy $ac_prog; ac_word=$2
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10501 $as_echo_n "checking for $ac_word... " >&6; }
10502 if ${ac_cv_path_UNAME+:} false; then :
10503   $as_echo_n "(cached) " >&6
10504 else
10505   case $UNAME in
10506   [\\/]* | ?:[\\/]*)
10507   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10508   ;;
10509   *)
10510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10511 for as_dir in $PATH
10512 do
10513   IFS=$as_save_IFS
10514   test -z "$as_dir" && as_dir=.
10515     for ac_exec_ext in '' $ac_executable_extensions; do
10516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10517     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10519     break 2
10520   fi
10521 done
10522   done
10523 IFS=$as_save_IFS
10524 
10525   ;;
10526 esac
10527 fi
10528 UNAME=$ac_cv_path_UNAME
10529 if test -n "$UNAME"; then
10530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10531 $as_echo "$UNAME" >&6; }
10532 else
10533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10534 $as_echo "no" >&6; }
10535 fi
10536 
10537 
10538   test -n "$UNAME" && break
10539 done
10540 
10541     else
10542       # If it succeeded, then it was overridden by the user. We will use it
10543       # for the tool.
10544 
10545       # First remove it from the list of overridden variables, so we can test
10546       # for unknown variables in the end.
10547       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10548 
10549       # Check if the provided tool contains a complete path.
10550       tool_specified="$UNAME"
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 UNAME=$tool_basename" >&5
10555 $as_echo "$as_me: Will search for user supplied tool UNAME=$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_UNAME+:} false; then :
10561   $as_echo_n "(cached) " >&6
10562 else
10563   case $UNAME in
10564   [\\/]* | ?:[\\/]*)
10565   ac_cv_path_UNAME="$UNAME" # 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_UNAME="$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 UNAME=$ac_cv_path_UNAME
10587 if test -n "$UNAME"; then
10588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10589 $as_echo "$UNAME" >&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$UNAME" = 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 UNAME=$tool_specified" >&5
10602 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10604 $as_echo_n "checking for UNAME... " >&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 UNAME=$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 
10617 
10618   if test "x$UNAME" = x; then
10619     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10620   fi
10621 
10622 
10623 
10624 
10625 
10626   # Publish this variable in the help.
10627 
10628 
10629   if test "x$UNIQ" = x; then
10630     # The variable is not set by user, try to locate tool using the code snippet
10631     for ac_prog in uniq
10632 do
10633   # Extract the first word of "$ac_prog", so it can be a program name with args.
10634 set dummy $ac_prog; ac_word=$2
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10636 $as_echo_n "checking for $ac_word... " >&6; }
10637 if ${ac_cv_path_UNIQ+:} false; then :
10638   $as_echo_n "(cached) " >&6
10639 else
10640   case $UNIQ in
10641   [\\/]* | ?:[\\/]*)
10642   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10643   ;;
10644   *)
10645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10646 for as_dir in $PATH
10647 do
10648   IFS=$as_save_IFS
10649   test -z "$as_dir" && as_dir=.
10650     for ac_exec_ext in '' $ac_executable_extensions; do
10651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10652     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10654     break 2
10655   fi
10656 done
10657   done
10658 IFS=$as_save_IFS
10659 
10660   ;;
10661 esac
10662 fi
10663 UNIQ=$ac_cv_path_UNIQ
10664 if test -n "$UNIQ"; then
10665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10666 $as_echo "$UNIQ" >&6; }
10667 else
10668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669 $as_echo "no" >&6; }
10670 fi
10671 
10672 
10673   test -n "$UNIQ" && break
10674 done
10675 
10676   else
10677     # The variable is set, but is it from the command line or the environment?
10678 
10679     # Try to remove the string !UNIQ! from our list.
10680     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10681     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10682       # If it failed, the variable was not from the command line. Ignore it,
10683       # but warn the user (except for BASH, which is always set by the calling BASH).
10684       if test "xUNIQ" != xBASH; then
10685         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10686 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10687       fi
10688       # Try to locate tool using the code snippet
10689       for ac_prog in uniq
10690 do
10691   # Extract the first word of "$ac_prog", so it can be a program name with args.
10692 set dummy $ac_prog; ac_word=$2
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10694 $as_echo_n "checking for $ac_word... " >&6; }
10695 if ${ac_cv_path_UNIQ+:} false; then :
10696   $as_echo_n "(cached) " >&6
10697 else
10698   case $UNIQ in
10699   [\\/]* | ?:[\\/]*)
10700   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10701   ;;
10702   *)
10703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10704 for as_dir in $PATH
10705 do
10706   IFS=$as_save_IFS
10707   test -z "$as_dir" && as_dir=.
10708     for ac_exec_ext in '' $ac_executable_extensions; do
10709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10710     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10712     break 2
10713   fi
10714 done
10715   done
10716 IFS=$as_save_IFS
10717 
10718   ;;
10719 esac
10720 fi
10721 UNIQ=$ac_cv_path_UNIQ
10722 if test -n "$UNIQ"; then
10723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10724 $as_echo "$UNIQ" >&6; }
10725 else
10726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10727 $as_echo "no" >&6; }
10728 fi
10729 
10730 
10731   test -n "$UNIQ" && break
10732 done
10733 
10734     else
10735       # If it succeeded, then it was overridden by the user. We will use it
10736       # for the tool.
10737 
10738       # First remove it from the list of overridden variables, so we can test
10739       # for unknown variables in the end.
10740       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10741 
10742       # Check if the provided tool contains a complete path.
10743       tool_specified="$UNIQ"
10744       tool_basename="${tool_specified##*/}"
10745       if test "x$tool_basename" = "x$tool_specified"; then
10746         # A command without a complete path is provided, search $PATH.
10747         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10748 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10749         # Extract the first word of "$tool_basename", so it can be a program name with args.
10750 set dummy $tool_basename; ac_word=$2
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752 $as_echo_n "checking for $ac_word... " >&6; }
10753 if ${ac_cv_path_UNIQ+:} false; then :
10754   $as_echo_n "(cached) " >&6
10755 else
10756   case $UNIQ in
10757   [\\/]* | ?:[\\/]*)
10758   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10759   ;;
10760   *)
10761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762 for as_dir in $PATH
10763 do
10764   IFS=$as_save_IFS
10765   test -z "$as_dir" && as_dir=.
10766     for ac_exec_ext in '' $ac_executable_extensions; do
10767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770     break 2
10771   fi
10772 done
10773   done
10774 IFS=$as_save_IFS
10775 
10776   ;;
10777 esac
10778 fi
10779 UNIQ=$ac_cv_path_UNIQ
10780 if test -n "$UNIQ"; then
10781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10782 $as_echo "$UNIQ" >&6; }
10783 else
10784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785 $as_echo "no" >&6; }
10786 fi
10787 
10788 
10789         if test "x$UNIQ" = x; then
10790           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10791         fi
10792       else
10793         # Otherwise we believe it is a complete path. Use it as it is.
10794         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10795 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10796         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10797 $as_echo_n "checking for UNIQ... " >&6; }
10798         if test ! -x "$tool_specified"; then
10799           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10800 $as_echo "not found" >&6; }
10801           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10802         fi
10803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10804 $as_echo "$tool_specified" >&6; }
10805       fi
10806     fi
10807   fi
10808 
10809 
10810 
10811   if test "x$UNIQ" = x; then
10812     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10813   fi
10814 
10815 
10816 
10817 
10818 
10819   # Publish this variable in the help.
10820 
10821 
10822   if test "x$WC" = x; then
10823     # The variable is not set by user, try to locate tool using the code snippet
10824     for ac_prog in wc
10825 do
10826   # Extract the first word of "$ac_prog", so it can be a program name with args.
10827 set dummy $ac_prog; ac_word=$2
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10829 $as_echo_n "checking for $ac_word... " >&6; }
10830 if ${ac_cv_path_WC+:} false; then :
10831   $as_echo_n "(cached) " >&6
10832 else
10833   case $WC in
10834   [\\/]* | ?:[\\/]*)
10835   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10836   ;;
10837   *)
10838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10839 for as_dir in $PATH
10840 do
10841   IFS=$as_save_IFS
10842   test -z "$as_dir" && as_dir=.
10843     for ac_exec_ext in '' $ac_executable_extensions; do
10844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10845     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10847     break 2
10848   fi
10849 done
10850   done
10851 IFS=$as_save_IFS
10852 
10853   ;;
10854 esac
10855 fi
10856 WC=$ac_cv_path_WC
10857 if test -n "$WC"; then
10858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10859 $as_echo "$WC" >&6; }
10860 else
10861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10862 $as_echo "no" >&6; }
10863 fi
10864 
10865 
10866   test -n "$WC" && break
10867 done
10868 
10869   else
10870     # The variable is set, but is it from the command line or the environment?
10871 
10872     # Try to remove the string !WC! from our list.
10873     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10874     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10875       # If it failed, the variable was not from the command line. Ignore it,
10876       # but warn the user (except for BASH, which is always set by the calling BASH).
10877       if test "xWC" != xBASH; then
10878         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10879 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10880       fi
10881       # Try to locate tool using the code snippet
10882       for ac_prog in wc
10883 do
10884   # Extract the first word of "$ac_prog", so it can be a program name with args.
10885 set dummy $ac_prog; ac_word=$2
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887 $as_echo_n "checking for $ac_word... " >&6; }
10888 if ${ac_cv_path_WC+:} false; then :
10889   $as_echo_n "(cached) " >&6
10890 else
10891   case $WC in
10892   [\\/]* | ?:[\\/]*)
10893   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10894   ;;
10895   *)
10896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10897 for as_dir in $PATH
10898 do
10899   IFS=$as_save_IFS
10900   test -z "$as_dir" && as_dir=.
10901     for ac_exec_ext in '' $ac_executable_extensions; do
10902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10903     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10905     break 2
10906   fi
10907 done
10908   done
10909 IFS=$as_save_IFS
10910 
10911   ;;
10912 esac
10913 fi
10914 WC=$ac_cv_path_WC
10915 if test -n "$WC"; then
10916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10917 $as_echo "$WC" >&6; }
10918 else
10919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920 $as_echo "no" >&6; }
10921 fi
10922 
10923 
10924   test -n "$WC" && break
10925 done
10926 
10927     else
10928       # If it succeeded, then it was overridden by the user. We will use it
10929       # for the tool.
10930 
10931       # First remove it from the list of overridden variables, so we can test
10932       # for unknown variables in the end.
10933       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10934 
10935       # Check if the provided tool contains a complete path.
10936       tool_specified="$WC"
10937       tool_basename="${tool_specified##*/}"
10938       if test "x$tool_basename" = "x$tool_specified"; then
10939         # A command without a complete path is provided, search $PATH.
10940         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10941 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10942         # Extract the first word of "$tool_basename", so it can be a program name with args.
10943 set dummy $tool_basename; ac_word=$2
10944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945 $as_echo_n "checking for $ac_word... " >&6; }
10946 if ${ac_cv_path_WC+:} false; then :
10947   $as_echo_n "(cached) " >&6
10948 else
10949   case $WC in
10950   [\\/]* | ?:[\\/]*)
10951   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10952   ;;
10953   *)
10954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955 for as_dir in $PATH
10956 do
10957   IFS=$as_save_IFS
10958   test -z "$as_dir" && as_dir=.
10959     for ac_exec_ext in '' $ac_executable_extensions; do
10960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10961     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10963     break 2
10964   fi
10965 done
10966   done
10967 IFS=$as_save_IFS
10968 
10969   ;;
10970 esac
10971 fi
10972 WC=$ac_cv_path_WC
10973 if test -n "$WC"; then
10974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10975 $as_echo "$WC" >&6; }
10976 else
10977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978 $as_echo "no" >&6; }
10979 fi
10980 
10981 
10982         if test "x$WC" = x; then
10983           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10984         fi
10985       else
10986         # Otherwise we believe it is a complete path. Use it as it is.
10987         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10988 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10990 $as_echo_n "checking for WC... " >&6; }
10991         if test ! -x "$tool_specified"; then
10992           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10993 $as_echo "not found" >&6; }
10994           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10995         fi
10996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10997 $as_echo "$tool_specified" >&6; }
10998       fi
10999     fi
11000   fi
11001 
11002 
11003 
11004   if test "x$WC" = x; then
11005     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11006   fi
11007 
11008 
11009 
11010 
11011 
11012   # Publish this variable in the help.
11013 
11014 
11015   if test "x$WHICH" = x; then
11016     # The variable is not set by user, try to locate tool using the code snippet
11017     for ac_prog in which
11018 do
11019   # Extract the first word of "$ac_prog", so it can be a program name with args.
11020 set dummy $ac_prog; ac_word=$2
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11022 $as_echo_n "checking for $ac_word... " >&6; }
11023 if ${ac_cv_path_WHICH+:} false; then :
11024   $as_echo_n "(cached) " >&6
11025 else
11026   case $WHICH in
11027   [\\/]* | ?:[\\/]*)
11028   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11029   ;;
11030   *)
11031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11032 for as_dir in $PATH
11033 do
11034   IFS=$as_save_IFS
11035   test -z "$as_dir" && as_dir=.
11036     for ac_exec_ext in '' $ac_executable_extensions; do
11037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11038     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11040     break 2
11041   fi
11042 done
11043   done
11044 IFS=$as_save_IFS
11045 
11046   ;;
11047 esac
11048 fi
11049 WHICH=$ac_cv_path_WHICH
11050 if test -n "$WHICH"; then
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11052 $as_echo "$WHICH" >&6; }
11053 else
11054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055 $as_echo "no" >&6; }
11056 fi
11057 
11058 
11059   test -n "$WHICH" && break
11060 done
11061 
11062   else
11063     # The variable is set, but is it from the command line or the environment?
11064 
11065     # Try to remove the string !WHICH! from our list.
11066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11068       # If it failed, the variable was not from the command line. Ignore it,
11069       # but warn the user (except for BASH, which is always set by the calling BASH).
11070       if test "xWHICH" != xBASH; then
11071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11072 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11073       fi
11074       # Try to locate tool using the code snippet
11075       for ac_prog in which
11076 do
11077   # Extract the first word of "$ac_prog", so it can be a program name with args.
11078 set dummy $ac_prog; ac_word=$2
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11080 $as_echo_n "checking for $ac_word... " >&6; }
11081 if ${ac_cv_path_WHICH+:} false; then :
11082   $as_echo_n "(cached) " >&6
11083 else
11084   case $WHICH in
11085   [\\/]* | ?:[\\/]*)
11086   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11087   ;;
11088   *)
11089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11090 for as_dir in $PATH
11091 do
11092   IFS=$as_save_IFS
11093   test -z "$as_dir" && as_dir=.
11094     for ac_exec_ext in '' $ac_executable_extensions; do
11095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11096     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11098     break 2
11099   fi
11100 done
11101   done
11102 IFS=$as_save_IFS
11103 
11104   ;;
11105 esac
11106 fi
11107 WHICH=$ac_cv_path_WHICH
11108 if test -n "$WHICH"; then
11109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11110 $as_echo "$WHICH" >&6; }
11111 else
11112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11113 $as_echo "no" >&6; }
11114 fi
11115 
11116 
11117   test -n "$WHICH" && break
11118 done
11119 
11120     else
11121       # If it succeeded, then it was overridden by the user. We will use it
11122       # for the tool.
11123 
11124       # First remove it from the list of overridden variables, so we can test
11125       # for unknown variables in the end.
11126       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11127 
11128       # Check if the provided tool contains a complete path.
11129       tool_specified="$WHICH"
11130       tool_basename="${tool_specified##*/}"
11131       if test "x$tool_basename" = "x$tool_specified"; then
11132         # A command without a complete path is provided, search $PATH.
11133         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11134 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11135         # Extract the first word of "$tool_basename", so it can be a program name with args.
11136 set dummy $tool_basename; ac_word=$2
11137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11138 $as_echo_n "checking for $ac_word... " >&6; }
11139 if ${ac_cv_path_WHICH+:} false; then :
11140   $as_echo_n "(cached) " >&6
11141 else
11142   case $WHICH in
11143   [\\/]* | ?:[\\/]*)
11144   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11145   ;;
11146   *)
11147   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11148 for as_dir in $PATH
11149 do
11150   IFS=$as_save_IFS
11151   test -z "$as_dir" && as_dir=.
11152     for ac_exec_ext in '' $ac_executable_extensions; do
11153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11154     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11156     break 2
11157   fi
11158 done
11159   done
11160 IFS=$as_save_IFS
11161 
11162   ;;
11163 esac
11164 fi
11165 WHICH=$ac_cv_path_WHICH
11166 if test -n "$WHICH"; then
11167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11168 $as_echo "$WHICH" >&6; }
11169 else
11170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171 $as_echo "no" >&6; }
11172 fi
11173 
11174 
11175         if test "x$WHICH" = x; then
11176           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11177         fi
11178       else
11179         # Otherwise we believe it is a complete path. Use it as it is.
11180         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11181 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11182         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11183 $as_echo_n "checking for WHICH... " >&6; }
11184         if test ! -x "$tool_specified"; then
11185           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11186 $as_echo "not found" >&6; }
11187           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11188         fi
11189         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11190 $as_echo "$tool_specified" >&6; }
11191       fi
11192     fi
11193   fi
11194 
11195 
11196 
11197   if test "x$WHICH" = x; then
11198     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11199   fi
11200 
11201 
11202 
11203 
11204 
11205   # Publish this variable in the help.
11206 
11207 
11208   if test "x$XARGS" = x; then
11209     # The variable is not set by user, try to locate tool using the code snippet
11210     for ac_prog in xargs
11211 do
11212   # Extract the first word of "$ac_prog", so it can be a program name with args.
11213 set dummy $ac_prog; ac_word=$2
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11215 $as_echo_n "checking for $ac_word... " >&6; }
11216 if ${ac_cv_path_XARGS+:} false; then :
11217   $as_echo_n "(cached) " >&6
11218 else
11219   case $XARGS in
11220   [\\/]* | ?:[\\/]*)
11221   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11222   ;;
11223   *)
11224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11225 for as_dir in $PATH
11226 do
11227   IFS=$as_save_IFS
11228   test -z "$as_dir" && as_dir=.
11229     for ac_exec_ext in '' $ac_executable_extensions; do
11230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11231     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11233     break 2
11234   fi
11235 done
11236   done
11237 IFS=$as_save_IFS
11238 
11239   ;;
11240 esac
11241 fi
11242 XARGS=$ac_cv_path_XARGS
11243 if test -n "$XARGS"; then
11244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11245 $as_echo "$XARGS" >&6; }
11246 else
11247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248 $as_echo "no" >&6; }
11249 fi
11250 
11251 
11252   test -n "$XARGS" && break
11253 done
11254 
11255   else
11256     # The variable is set, but is it from the command line or the environment?
11257 
11258     # Try to remove the string !XARGS! from our list.
11259     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11260     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11261       # If it failed, the variable was not from the command line. Ignore it,
11262       # but warn the user (except for BASH, which is always set by the calling BASH).
11263       if test "xXARGS" != xBASH; then
11264         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11265 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11266       fi
11267       # Try to locate tool using the code snippet
11268       for ac_prog in xargs
11269 do
11270   # Extract the first word of "$ac_prog", so it can be a program name with args.
11271 set dummy $ac_prog; ac_word=$2
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11273 $as_echo_n "checking for $ac_word... " >&6; }
11274 if ${ac_cv_path_XARGS+:} false; then :
11275   $as_echo_n "(cached) " >&6
11276 else
11277   case $XARGS in
11278   [\\/]* | ?:[\\/]*)
11279   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11280   ;;
11281   *)
11282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11283 for as_dir in $PATH
11284 do
11285   IFS=$as_save_IFS
11286   test -z "$as_dir" && as_dir=.
11287     for ac_exec_ext in '' $ac_executable_extensions; do
11288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11289     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11291     break 2
11292   fi
11293 done
11294   done
11295 IFS=$as_save_IFS
11296 
11297   ;;
11298 esac
11299 fi
11300 XARGS=$ac_cv_path_XARGS
11301 if test -n "$XARGS"; then
11302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11303 $as_echo "$XARGS" >&6; }
11304 else
11305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11306 $as_echo "no" >&6; }
11307 fi
11308 
11309 
11310   test -n "$XARGS" && break
11311 done
11312 
11313     else
11314       # If it succeeded, then it was overridden by the user. We will use it
11315       # for the tool.
11316 
11317       # First remove it from the list of overridden variables, so we can test
11318       # for unknown variables in the end.
11319       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11320 
11321       # Check if the provided tool contains a complete path.
11322       tool_specified="$XARGS"
11323       tool_basename="${tool_specified##*/}"
11324       if test "x$tool_basename" = "x$tool_specified"; then
11325         # A command without a complete path is provided, search $PATH.
11326         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11327 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11328         # Extract the first word of "$tool_basename", so it can be a program name with args.
11329 set dummy $tool_basename; ac_word=$2
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11331 $as_echo_n "checking for $ac_word... " >&6; }
11332 if ${ac_cv_path_XARGS+:} false; then :
11333   $as_echo_n "(cached) " >&6
11334 else
11335   case $XARGS in
11336   [\\/]* | ?:[\\/]*)
11337   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11338   ;;
11339   *)
11340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341 for as_dir in $PATH
11342 do
11343   IFS=$as_save_IFS
11344   test -z "$as_dir" && as_dir=.
11345     for ac_exec_ext in '' $ac_executable_extensions; do
11346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11347     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11349     break 2
11350   fi
11351 done
11352   done
11353 IFS=$as_save_IFS
11354 
11355   ;;
11356 esac
11357 fi
11358 XARGS=$ac_cv_path_XARGS
11359 if test -n "$XARGS"; then
11360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11361 $as_echo "$XARGS" >&6; }
11362 else
11363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364 $as_echo "no" >&6; }
11365 fi
11366 
11367 
11368         if test "x$XARGS" = x; then
11369           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11370         fi
11371       else
11372         # Otherwise we believe it is a complete path. Use it as it is.
11373         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11374 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11375         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11376 $as_echo_n "checking for XARGS... " >&6; }
11377         if test ! -x "$tool_specified"; then
11378           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11379 $as_echo "not found" >&6; }
11380           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11381         fi
11382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11383 $as_echo "$tool_specified" >&6; }
11384       fi
11385     fi
11386   fi
11387 
11388 
11389 
11390   if test "x$XARGS" = x; then
11391     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11392   fi
11393 
11394 
11395 
11396   # Then required tools that require some special treatment.
11397 
11398 
11399   # Publish this variable in the help.
11400 
11401 
11402   if test "x$AWK" = x; then
11403     # The variable is not set by user, try to locate tool using the code snippet
11404     for ac_prog in gawk mawk nawk awk
11405 do
11406   # Extract the first word of "$ac_prog", so it can be a program name with args.
11407 set dummy $ac_prog; ac_word=$2
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409 $as_echo_n "checking for $ac_word... " >&6; }
11410 if ${ac_cv_prog_AWK+:} false; then :
11411   $as_echo_n "(cached) " >&6
11412 else
11413   if test -n "$AWK"; then
11414   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11415 else
11416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417 for as_dir in $PATH
11418 do
11419   IFS=$as_save_IFS
11420   test -z "$as_dir" && as_dir=.
11421     for ac_exec_ext in '' $ac_executable_extensions; do
11422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423     ac_cv_prog_AWK="$ac_prog"
11424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425     break 2
11426   fi
11427 done
11428   done
11429 IFS=$as_save_IFS
11430 
11431 fi
11432 fi
11433 AWK=$ac_cv_prog_AWK
11434 if test -n "$AWK"; then
11435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11436 $as_echo "$AWK" >&6; }
11437 else
11438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439 $as_echo "no" >&6; }
11440 fi
11441 
11442 
11443   test -n "$AWK" && break
11444 done
11445 
11446   else
11447     # The variable is set, but is it from the command line or the environment?
11448 
11449     # Try to remove the string !AWK! from our list.
11450     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11451     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11452       # If it failed, the variable was not from the command line. Ignore it,
11453       # but warn the user (except for BASH, which is always set by the calling BASH).
11454       if test "xAWK" != xBASH; then
11455         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11456 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11457       fi
11458       # Try to locate tool using the code snippet
11459       for ac_prog in gawk mawk nawk awk
11460 do
11461   # Extract the first word of "$ac_prog", so it can be a program name with args.
11462 set dummy $ac_prog; ac_word=$2
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11464 $as_echo_n "checking for $ac_word... " >&6; }
11465 if ${ac_cv_prog_AWK+:} false; then :
11466   $as_echo_n "(cached) " >&6
11467 else
11468   if test -n "$AWK"; then
11469   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11470 else
11471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11472 for as_dir in $PATH
11473 do
11474   IFS=$as_save_IFS
11475   test -z "$as_dir" && as_dir=.
11476     for ac_exec_ext in '' $ac_executable_extensions; do
11477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11478     ac_cv_prog_AWK="$ac_prog"
11479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11480     break 2
11481   fi
11482 done
11483   done
11484 IFS=$as_save_IFS
11485 
11486 fi
11487 fi
11488 AWK=$ac_cv_prog_AWK
11489 if test -n "$AWK"; then
11490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11491 $as_echo "$AWK" >&6; }
11492 else
11493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494 $as_echo "no" >&6; }
11495 fi
11496 
11497 
11498   test -n "$AWK" && break
11499 done
11500 
11501     else
11502       # If it succeeded, then it was overridden by the user. We will use it
11503       # for the tool.
11504 
11505       # First remove it from the list of overridden variables, so we can test
11506       # for unknown variables in the end.
11507       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11508 
11509       # Check if the provided tool contains a complete path.
11510       tool_specified="$AWK"
11511       tool_basename="${tool_specified##*/}"
11512       if test "x$tool_basename" = "x$tool_specified"; then
11513         # A command without a complete path is provided, search $PATH.
11514         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11515 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11516         # Extract the first word of "$tool_basename", so it can be a program name with args.
11517 set dummy $tool_basename; ac_word=$2
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11519 $as_echo_n "checking for $ac_word... " >&6; }
11520 if ${ac_cv_path_AWK+:} false; then :
11521   $as_echo_n "(cached) " >&6
11522 else
11523   case $AWK in
11524   [\\/]* | ?:[\\/]*)
11525   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11526   ;;
11527   *)
11528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11529 for as_dir in $PATH
11530 do
11531   IFS=$as_save_IFS
11532   test -z "$as_dir" && as_dir=.
11533     for ac_exec_ext in '' $ac_executable_extensions; do
11534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11535     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11537     break 2
11538   fi
11539 done
11540   done
11541 IFS=$as_save_IFS
11542 
11543   ;;
11544 esac
11545 fi
11546 AWK=$ac_cv_path_AWK
11547 if test -n "$AWK"; then
11548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11549 $as_echo "$AWK" >&6; }
11550 else
11551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11552 $as_echo "no" >&6; }
11553 fi
11554 
11555 
11556         if test "x$AWK" = x; then
11557           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11558         fi
11559       else
11560         # Otherwise we believe it is a complete path. Use it as it is.
11561         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11562 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11563         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11564 $as_echo_n "checking for AWK... " >&6; }
11565         if test ! -x "$tool_specified"; then
11566           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11567 $as_echo "not found" >&6; }
11568           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11569         fi
11570         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11571 $as_echo "$tool_specified" >&6; }
11572       fi
11573     fi
11574   fi
11575 
11576 
11577   if test "x$AWK" = x; then
11578     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11579   fi
11580 
11581 
11582 
11583 
11584   # Publish this variable in the help.
11585 
11586 
11587   if test "x$GREP" = x; then
11588     # The variable is not set by user, try to locate tool using the code snippet
11589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11590 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11591 if ${ac_cv_path_GREP+:} false; then :
11592   $as_echo_n "(cached) " >&6
11593 else
11594   if test -z "$GREP"; then
11595   ac_path_GREP_found=false
11596   # Loop through the user's path and test for each of PROGNAME-LIST
11597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11598 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11599 do
11600   IFS=$as_save_IFS
11601   test -z "$as_dir" && as_dir=.
11602     for ac_prog in grep ggrep; do
11603     for ac_exec_ext in '' $ac_executable_extensions; do
11604       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11605       as_fn_executable_p "$ac_path_GREP" || continue
11606 # Check for GNU ac_path_GREP and select it if it is found.
11607   # Check for GNU $ac_path_GREP
11608 case `"$ac_path_GREP" --version 2>&1` in
11609 *GNU*)
11610   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11611 *)
11612   ac_count=0
11613   $as_echo_n 0123456789 >"conftest.in"
11614   while :
11615   do
11616     cat "conftest.in" "conftest.in" >"conftest.tmp"
11617     mv "conftest.tmp" "conftest.in"
11618     cp "conftest.in" "conftest.nl"
11619     $as_echo 'GREP' >> "conftest.nl"
11620     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11621     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11622     as_fn_arith $ac_count + 1 && ac_count=$as_val
11623     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11624       # Best one so far, save it but keep looking for a better one
11625       ac_cv_path_GREP="$ac_path_GREP"
11626       ac_path_GREP_max=$ac_count
11627     fi
11628     # 10*(2^10) chars as input seems more than enough
11629     test $ac_count -gt 10 && break
11630   done
11631   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11632 esac
11633 
11634       $ac_path_GREP_found && break 3
11635     done
11636   done
11637   done
11638 IFS=$as_save_IFS
11639   if test -z "$ac_cv_path_GREP"; then
11640     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11641   fi
11642 else
11643   ac_cv_path_GREP=$GREP
11644 fi
11645 
11646 fi
11647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11648 $as_echo "$ac_cv_path_GREP" >&6; }
11649  GREP="$ac_cv_path_GREP"
11650 
11651 
11652   else
11653     # The variable is set, but is it from the command line or the environment?
11654 
11655     # Try to remove the string !GREP! from our list.
11656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11658       # If it failed, the variable was not from the command line. Ignore it,
11659       # but warn the user (except for BASH, which is always set by the calling BASH).
11660       if test "xGREP" != xBASH; then
11661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11662 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11663       fi
11664       # Try to locate tool using the code snippet
11665       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11666 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11667 if ${ac_cv_path_GREP+:} false; then :
11668   $as_echo_n "(cached) " >&6
11669 else
11670   if test -z "$GREP"; then
11671   ac_path_GREP_found=false
11672   # Loop through the user's path and test for each of PROGNAME-LIST
11673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11674 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11675 do
11676   IFS=$as_save_IFS
11677   test -z "$as_dir" && as_dir=.
11678     for ac_prog in grep ggrep; do
11679     for ac_exec_ext in '' $ac_executable_extensions; do
11680       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11681       as_fn_executable_p "$ac_path_GREP" || continue
11682 # Check for GNU ac_path_GREP and select it if it is found.
11683   # Check for GNU $ac_path_GREP
11684 case `"$ac_path_GREP" --version 2>&1` in
11685 *GNU*)
11686   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11687 *)
11688   ac_count=0
11689   $as_echo_n 0123456789 >"conftest.in"
11690   while :
11691   do
11692     cat "conftest.in" "conftest.in" >"conftest.tmp"
11693     mv "conftest.tmp" "conftest.in"
11694     cp "conftest.in" "conftest.nl"
11695     $as_echo 'GREP' >> "conftest.nl"
11696     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11697     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11698     as_fn_arith $ac_count + 1 && ac_count=$as_val
11699     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11700       # Best one so far, save it but keep looking for a better one
11701       ac_cv_path_GREP="$ac_path_GREP"
11702       ac_path_GREP_max=$ac_count
11703     fi
11704     # 10*(2^10) chars as input seems more than enough
11705     test $ac_count -gt 10 && break
11706   done
11707   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11708 esac
11709 
11710       $ac_path_GREP_found && break 3
11711     done
11712   done
11713   done
11714 IFS=$as_save_IFS
11715   if test -z "$ac_cv_path_GREP"; then
11716     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11717   fi
11718 else
11719   ac_cv_path_GREP=$GREP
11720 fi
11721 
11722 fi
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11724 $as_echo "$ac_cv_path_GREP" >&6; }
11725  GREP="$ac_cv_path_GREP"
11726 
11727 
11728     else
11729       # If it succeeded, then it was overridden by the user. We will use it
11730       # for the tool.
11731 
11732       # First remove it from the list of overridden variables, so we can test
11733       # for unknown variables in the end.
11734       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11735 
11736       # Check if the provided tool contains a complete path.
11737       tool_specified="$GREP"
11738       tool_basename="${tool_specified##*/}"
11739       if test "x$tool_basename" = "x$tool_specified"; then
11740         # A command without a complete path is provided, search $PATH.
11741         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11742 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11743         # Extract the first word of "$tool_basename", so it can be a program name with args.
11744 set dummy $tool_basename; ac_word=$2
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11746 $as_echo_n "checking for $ac_word... " >&6; }
11747 if ${ac_cv_path_GREP+:} false; then :
11748   $as_echo_n "(cached) " >&6
11749 else
11750   case $GREP in
11751   [\\/]* | ?:[\\/]*)
11752   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11753   ;;
11754   *)
11755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11756 for as_dir in $PATH
11757 do
11758   IFS=$as_save_IFS
11759   test -z "$as_dir" && as_dir=.
11760     for ac_exec_ext in '' $ac_executable_extensions; do
11761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11762     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11764     break 2
11765   fi
11766 done
11767   done
11768 IFS=$as_save_IFS
11769 
11770   ;;
11771 esac
11772 fi
11773 GREP=$ac_cv_path_GREP
11774 if test -n "$GREP"; then
11775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11776 $as_echo "$GREP" >&6; }
11777 else
11778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11779 $as_echo "no" >&6; }
11780 fi
11781 
11782 
11783         if test "x$GREP" = x; then
11784           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11785         fi
11786       else
11787         # Otherwise we believe it is a complete path. Use it as it is.
11788         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11789 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11791 $as_echo_n "checking for GREP... " >&6; }
11792         if test ! -x "$tool_specified"; then
11793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11794 $as_echo "not found" >&6; }
11795           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11796         fi
11797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11798 $as_echo "$tool_specified" >&6; }
11799       fi
11800     fi
11801   fi
11802 
11803 
11804   if test "x$GREP" = x; then
11805     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11806   fi
11807 
11808 
11809 
11810 
11811   # Publish this variable in the help.
11812 
11813 
11814   if test "x$EGREP" = x; then
11815     # The variable is not set by user, try to locate tool using the code snippet
11816     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11817 $as_echo_n "checking for egrep... " >&6; }
11818 if ${ac_cv_path_EGREP+:} false; then :
11819   $as_echo_n "(cached) " >&6
11820 else
11821   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11822    then ac_cv_path_EGREP="$GREP -E"
11823    else
11824      if test -z "$EGREP"; then
11825   ac_path_EGREP_found=false
11826   # Loop through the user's path and test for each of PROGNAME-LIST
11827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11828 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11829 do
11830   IFS=$as_save_IFS
11831   test -z "$as_dir" && as_dir=.
11832     for ac_prog in egrep; do
11833     for ac_exec_ext in '' $ac_executable_extensions; do
11834       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11835       as_fn_executable_p "$ac_path_EGREP" || continue
11836 # Check for GNU ac_path_EGREP and select it if it is found.
11837   # Check for GNU $ac_path_EGREP
11838 case `"$ac_path_EGREP" --version 2>&1` in
11839 *GNU*)
11840   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11841 *)
11842   ac_count=0
11843   $as_echo_n 0123456789 >"conftest.in"
11844   while :
11845   do
11846     cat "conftest.in" "conftest.in" >"conftest.tmp"
11847     mv "conftest.tmp" "conftest.in"
11848     cp "conftest.in" "conftest.nl"
11849     $as_echo 'EGREP' >> "conftest.nl"
11850     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11851     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11852     as_fn_arith $ac_count + 1 && ac_count=$as_val
11853     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11854       # Best one so far, save it but keep looking for a better one
11855       ac_cv_path_EGREP="$ac_path_EGREP"
11856       ac_path_EGREP_max=$ac_count
11857     fi
11858     # 10*(2^10) chars as input seems more than enough
11859     test $ac_count -gt 10 && break
11860   done
11861   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11862 esac
11863 
11864       $ac_path_EGREP_found && break 3
11865     done
11866   done
11867   done
11868 IFS=$as_save_IFS
11869   if test -z "$ac_cv_path_EGREP"; then
11870     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11871   fi
11872 else
11873   ac_cv_path_EGREP=$EGREP
11874 fi
11875 
11876    fi
11877 fi
11878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11879 $as_echo "$ac_cv_path_EGREP" >&6; }
11880  EGREP="$ac_cv_path_EGREP"
11881 
11882 
11883   else
11884     # The variable is set, but is it from the command line or the environment?
11885 
11886     # Try to remove the string !EGREP! from our list.
11887     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11888     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11889       # If it failed, the variable was not from the command line. Ignore it,
11890       # but warn the user (except for BASH, which is always set by the calling BASH).
11891       if test "xEGREP" != xBASH; then
11892         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11893 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11894       fi
11895       # Try to locate tool using the code snippet
11896       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11897 $as_echo_n "checking for egrep... " >&6; }
11898 if ${ac_cv_path_EGREP+:} false; then :
11899   $as_echo_n "(cached) " >&6
11900 else
11901   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11902    then ac_cv_path_EGREP="$GREP -E"
11903    else
11904      if test -z "$EGREP"; then
11905   ac_path_EGREP_found=false
11906   # Loop through the user's path and test for each of PROGNAME-LIST
11907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11908 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11909 do
11910   IFS=$as_save_IFS
11911   test -z "$as_dir" && as_dir=.
11912     for ac_prog in egrep; do
11913     for ac_exec_ext in '' $ac_executable_extensions; do
11914       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11915       as_fn_executable_p "$ac_path_EGREP" || continue
11916 # Check for GNU ac_path_EGREP and select it if it is found.
11917   # Check for GNU $ac_path_EGREP
11918 case `"$ac_path_EGREP" --version 2>&1` in
11919 *GNU*)
11920   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11921 *)
11922   ac_count=0
11923   $as_echo_n 0123456789 >"conftest.in"
11924   while :
11925   do
11926     cat "conftest.in" "conftest.in" >"conftest.tmp"
11927     mv "conftest.tmp" "conftest.in"
11928     cp "conftest.in" "conftest.nl"
11929     $as_echo 'EGREP' >> "conftest.nl"
11930     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11931     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11932     as_fn_arith $ac_count + 1 && ac_count=$as_val
11933     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11934       # Best one so far, save it but keep looking for a better one
11935       ac_cv_path_EGREP="$ac_path_EGREP"
11936       ac_path_EGREP_max=$ac_count
11937     fi
11938     # 10*(2^10) chars as input seems more than enough
11939     test $ac_count -gt 10 && break
11940   done
11941   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11942 esac
11943 
11944       $ac_path_EGREP_found && break 3
11945     done
11946   done
11947   done
11948 IFS=$as_save_IFS
11949   if test -z "$ac_cv_path_EGREP"; then
11950     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11951   fi
11952 else
11953   ac_cv_path_EGREP=$EGREP
11954 fi
11955 
11956    fi
11957 fi
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11959 $as_echo "$ac_cv_path_EGREP" >&6; }
11960  EGREP="$ac_cv_path_EGREP"
11961 
11962 
11963     else
11964       # If it succeeded, then it was overridden by the user. We will use it
11965       # for the tool.
11966 
11967       # First remove it from the list of overridden variables, so we can test
11968       # for unknown variables in the end.
11969       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11970 
11971       # Check if the provided tool contains a complete path.
11972       tool_specified="$EGREP"
11973       tool_basename="${tool_specified##*/}"
11974       if test "x$tool_basename" = "x$tool_specified"; then
11975         # A command without a complete path is provided, search $PATH.
11976         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11977 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11978         # Extract the first word of "$tool_basename", so it can be a program name with args.
11979 set dummy $tool_basename; ac_word=$2
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981 $as_echo_n "checking for $ac_word... " >&6; }
11982 if ${ac_cv_path_EGREP+:} false; then :
11983   $as_echo_n "(cached) " >&6
11984 else
11985   case $EGREP in
11986   [\\/]* | ?:[\\/]*)
11987   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11988   ;;
11989   *)
11990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991 for as_dir in $PATH
11992 do
11993   IFS=$as_save_IFS
11994   test -z "$as_dir" && as_dir=.
11995     for ac_exec_ext in '' $ac_executable_extensions; do
11996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11997     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999     break 2
12000   fi
12001 done
12002   done
12003 IFS=$as_save_IFS
12004 
12005   ;;
12006 esac
12007 fi
12008 EGREP=$ac_cv_path_EGREP
12009 if test -n "$EGREP"; then
12010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12011 $as_echo "$EGREP" >&6; }
12012 else
12013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014 $as_echo "no" >&6; }
12015 fi
12016 
12017 
12018         if test "x$EGREP" = x; then
12019           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12020         fi
12021       else
12022         # Otherwise we believe it is a complete path. Use it as it is.
12023         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12024 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12025         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12026 $as_echo_n "checking for EGREP... " >&6; }
12027         if test ! -x "$tool_specified"; then
12028           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12029 $as_echo "not found" >&6; }
12030           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12031         fi
12032         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12033 $as_echo "$tool_specified" >&6; }
12034       fi
12035     fi
12036   fi
12037 
12038 
12039   if test "x$EGREP" = x; then
12040     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12041   fi
12042 
12043 
12044 
12045 
12046   # Publish this variable in the help.
12047 
12048 
12049   if test "x$FGREP" = x; then
12050     # The variable is not set by user, try to locate tool using the code snippet
12051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12052 $as_echo_n "checking for fgrep... " >&6; }
12053 if ${ac_cv_path_FGREP+:} false; then :
12054   $as_echo_n "(cached) " >&6
12055 else
12056   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12057    then ac_cv_path_FGREP="$GREP -F"
12058    else
12059      if test -z "$FGREP"; then
12060   ac_path_FGREP_found=false
12061   # Loop through the user's path and test for each of PROGNAME-LIST
12062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12063 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12064 do
12065   IFS=$as_save_IFS
12066   test -z "$as_dir" && as_dir=.
12067     for ac_prog in fgrep; do
12068     for ac_exec_ext in '' $ac_executable_extensions; do
12069       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12070       as_fn_executable_p "$ac_path_FGREP" || continue
12071 # Check for GNU ac_path_FGREP and select it if it is found.
12072   # Check for GNU $ac_path_FGREP
12073 case `"$ac_path_FGREP" --version 2>&1` in
12074 *GNU*)
12075   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12076 *)
12077   ac_count=0
12078   $as_echo_n 0123456789 >"conftest.in"
12079   while :
12080   do
12081     cat "conftest.in" "conftest.in" >"conftest.tmp"
12082     mv "conftest.tmp" "conftest.in"
12083     cp "conftest.in" "conftest.nl"
12084     $as_echo 'FGREP' >> "conftest.nl"
12085     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12086     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12087     as_fn_arith $ac_count + 1 && ac_count=$as_val
12088     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12089       # Best one so far, save it but keep looking for a better one
12090       ac_cv_path_FGREP="$ac_path_FGREP"
12091       ac_path_FGREP_max=$ac_count
12092     fi
12093     # 10*(2^10) chars as input seems more than enough
12094     test $ac_count -gt 10 && break
12095   done
12096   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12097 esac
12098 
12099       $ac_path_FGREP_found && break 3
12100     done
12101   done
12102   done
12103 IFS=$as_save_IFS
12104   if test -z "$ac_cv_path_FGREP"; then
12105     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12106   fi
12107 else
12108   ac_cv_path_FGREP=$FGREP
12109 fi
12110 
12111    fi
12112 fi
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12114 $as_echo "$ac_cv_path_FGREP" >&6; }
12115  FGREP="$ac_cv_path_FGREP"
12116 
12117 
12118   else
12119     # The variable is set, but is it from the command line or the environment?
12120 
12121     # Try to remove the string !FGREP! from our list.
12122     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12123     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12124       # If it failed, the variable was not from the command line. Ignore it,
12125       # but warn the user (except for BASH, which is always set by the calling BASH).
12126       if test "xFGREP" != xBASH; then
12127         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12128 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12129       fi
12130       # Try to locate tool using the code snippet
12131       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12132 $as_echo_n "checking for fgrep... " >&6; }
12133 if ${ac_cv_path_FGREP+:} false; then :
12134   $as_echo_n "(cached) " >&6
12135 else
12136   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12137    then ac_cv_path_FGREP="$GREP -F"
12138    else
12139      if test -z "$FGREP"; then
12140   ac_path_FGREP_found=false
12141   # Loop through the user's path and test for each of PROGNAME-LIST
12142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12143 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12144 do
12145   IFS=$as_save_IFS
12146   test -z "$as_dir" && as_dir=.
12147     for ac_prog in fgrep; do
12148     for ac_exec_ext in '' $ac_executable_extensions; do
12149       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12150       as_fn_executable_p "$ac_path_FGREP" || continue
12151 # Check for GNU ac_path_FGREP and select it if it is found.
12152   # Check for GNU $ac_path_FGREP
12153 case `"$ac_path_FGREP" --version 2>&1` in
12154 *GNU*)
12155   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12156 *)
12157   ac_count=0
12158   $as_echo_n 0123456789 >"conftest.in"
12159   while :
12160   do
12161     cat "conftest.in" "conftest.in" >"conftest.tmp"
12162     mv "conftest.tmp" "conftest.in"
12163     cp "conftest.in" "conftest.nl"
12164     $as_echo 'FGREP' >> "conftest.nl"
12165     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12166     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12167     as_fn_arith $ac_count + 1 && ac_count=$as_val
12168     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12169       # Best one so far, save it but keep looking for a better one
12170       ac_cv_path_FGREP="$ac_path_FGREP"
12171       ac_path_FGREP_max=$ac_count
12172     fi
12173     # 10*(2^10) chars as input seems more than enough
12174     test $ac_count -gt 10 && break
12175   done
12176   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12177 esac
12178 
12179       $ac_path_FGREP_found && break 3
12180     done
12181   done
12182   done
12183 IFS=$as_save_IFS
12184   if test -z "$ac_cv_path_FGREP"; then
12185     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12186   fi
12187 else
12188   ac_cv_path_FGREP=$FGREP
12189 fi
12190 
12191    fi
12192 fi
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12194 $as_echo "$ac_cv_path_FGREP" >&6; }
12195  FGREP="$ac_cv_path_FGREP"
12196 
12197 
12198     else
12199       # If it succeeded, then it was overridden by the user. We will use it
12200       # for the tool.
12201 
12202       # First remove it from the list of overridden variables, so we can test
12203       # for unknown variables in the end.
12204       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12205 
12206       # Check if the provided tool contains a complete path.
12207       tool_specified="$FGREP"
12208       tool_basename="${tool_specified##*/}"
12209       if test "x$tool_basename" = "x$tool_specified"; then
12210         # A command without a complete path is provided, search $PATH.
12211         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12212 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12213         # Extract the first word of "$tool_basename", so it can be a program name with args.
12214 set dummy $tool_basename; ac_word=$2
12215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12216 $as_echo_n "checking for $ac_word... " >&6; }
12217 if ${ac_cv_path_FGREP+:} false; then :
12218   $as_echo_n "(cached) " >&6
12219 else
12220   case $FGREP in
12221   [\\/]* | ?:[\\/]*)
12222   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12223   ;;
12224   *)
12225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12226 for as_dir in $PATH
12227 do
12228   IFS=$as_save_IFS
12229   test -z "$as_dir" && as_dir=.
12230     for ac_exec_ext in '' $ac_executable_extensions; do
12231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12232     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12234     break 2
12235   fi
12236 done
12237   done
12238 IFS=$as_save_IFS
12239 
12240   ;;
12241 esac
12242 fi
12243 FGREP=$ac_cv_path_FGREP
12244 if test -n "$FGREP"; then
12245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12246 $as_echo "$FGREP" >&6; }
12247 else
12248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12249 $as_echo "no" >&6; }
12250 fi
12251 
12252 
12253         if test "x$FGREP" = x; then
12254           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12255         fi
12256       else
12257         # Otherwise we believe it is a complete path. Use it as it is.
12258         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12259 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12260         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12261 $as_echo_n "checking for FGREP... " >&6; }
12262         if test ! -x "$tool_specified"; then
12263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12264 $as_echo "not found" >&6; }
12265           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12266         fi
12267         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12268 $as_echo "$tool_specified" >&6; }
12269       fi
12270     fi
12271   fi
12272 
12273 
12274   if test "x$FGREP" = x; then
12275     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12276   fi
12277 
12278 
12279 
12280 
12281   # Publish this variable in the help.
12282 
12283 
12284   if test "x$SED" = x; then
12285     # The variable is not set by user, try to locate tool using the code snippet
12286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12287 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12288 if ${ac_cv_path_SED+:} false; then :
12289   $as_echo_n "(cached) " >&6
12290 else
12291             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12292      for ac_i in 1 2 3 4 5 6 7; do
12293        ac_script="$ac_script$as_nl$ac_script"
12294      done
12295      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12296      { ac_script=; unset ac_script;}
12297      if test -z "$SED"; then
12298   ac_path_SED_found=false
12299   # Loop through the user's path and test for each of PROGNAME-LIST
12300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12301 for as_dir in $PATH
12302 do
12303   IFS=$as_save_IFS
12304   test -z "$as_dir" && as_dir=.
12305     for ac_prog in sed gsed; do
12306     for ac_exec_ext in '' $ac_executable_extensions; do
12307       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12308       as_fn_executable_p "$ac_path_SED" || continue
12309 # Check for GNU ac_path_SED and select it if it is found.
12310   # Check for GNU $ac_path_SED
12311 case `"$ac_path_SED" --version 2>&1` in
12312 *GNU*)
12313   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12314 *)
12315   ac_count=0
12316   $as_echo_n 0123456789 >"conftest.in"
12317   while :
12318   do
12319     cat "conftest.in" "conftest.in" >"conftest.tmp"
12320     mv "conftest.tmp" "conftest.in"
12321     cp "conftest.in" "conftest.nl"
12322     $as_echo '' >> "conftest.nl"
12323     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12324     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12325     as_fn_arith $ac_count + 1 && ac_count=$as_val
12326     if test $ac_count -gt ${ac_path_SED_max-0}; then
12327       # Best one so far, save it but keep looking for a better one
12328       ac_cv_path_SED="$ac_path_SED"
12329       ac_path_SED_max=$ac_count
12330     fi
12331     # 10*(2^10) chars as input seems more than enough
12332     test $ac_count -gt 10 && break
12333   done
12334   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12335 esac
12336 
12337       $ac_path_SED_found && break 3
12338     done
12339   done
12340   done
12341 IFS=$as_save_IFS
12342   if test -z "$ac_cv_path_SED"; then
12343     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12344   fi
12345 else
12346   ac_cv_path_SED=$SED
12347 fi
12348 
12349 fi
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12351 $as_echo "$ac_cv_path_SED" >&6; }
12352  SED="$ac_cv_path_SED"
12353   rm -f conftest.sed
12354 
12355   else
12356     # The variable is set, but is it from the command line or the environment?
12357 
12358     # Try to remove the string !SED! from our list.
12359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12361       # If it failed, the variable was not from the command line. Ignore it,
12362       # but warn the user (except for BASH, which is always set by the calling BASH).
12363       if test "xSED" != xBASH; then
12364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12365 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12366       fi
12367       # Try to locate tool using the code snippet
12368       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12369 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12370 if ${ac_cv_path_SED+:} false; then :
12371   $as_echo_n "(cached) " >&6
12372 else
12373             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12374      for ac_i in 1 2 3 4 5 6 7; do
12375        ac_script="$ac_script$as_nl$ac_script"
12376      done
12377      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12378      { ac_script=; unset ac_script;}
12379      if test -z "$SED"; then
12380   ac_path_SED_found=false
12381   # Loop through the user's path and test for each of PROGNAME-LIST
12382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383 for as_dir in $PATH
12384 do
12385   IFS=$as_save_IFS
12386   test -z "$as_dir" && as_dir=.
12387     for ac_prog in sed gsed; do
12388     for ac_exec_ext in '' $ac_executable_extensions; do
12389       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12390       as_fn_executable_p "$ac_path_SED" || continue
12391 # Check for GNU ac_path_SED and select it if it is found.
12392   # Check for GNU $ac_path_SED
12393 case `"$ac_path_SED" --version 2>&1` in
12394 *GNU*)
12395   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12396 *)
12397   ac_count=0
12398   $as_echo_n 0123456789 >"conftest.in"
12399   while :
12400   do
12401     cat "conftest.in" "conftest.in" >"conftest.tmp"
12402     mv "conftest.tmp" "conftest.in"
12403     cp "conftest.in" "conftest.nl"
12404     $as_echo '' >> "conftest.nl"
12405     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12406     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12407     as_fn_arith $ac_count + 1 && ac_count=$as_val
12408     if test $ac_count -gt ${ac_path_SED_max-0}; then
12409       # Best one so far, save it but keep looking for a better one
12410       ac_cv_path_SED="$ac_path_SED"
12411       ac_path_SED_max=$ac_count
12412     fi
12413     # 10*(2^10) chars as input seems more than enough
12414     test $ac_count -gt 10 && break
12415   done
12416   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12417 esac
12418 
12419       $ac_path_SED_found && break 3
12420     done
12421   done
12422   done
12423 IFS=$as_save_IFS
12424   if test -z "$ac_cv_path_SED"; then
12425     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12426   fi
12427 else
12428   ac_cv_path_SED=$SED
12429 fi
12430 
12431 fi
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12433 $as_echo "$ac_cv_path_SED" >&6; }
12434  SED="$ac_cv_path_SED"
12435   rm -f conftest.sed
12436 
12437     else
12438       # If it succeeded, then it was overridden by the user. We will use it
12439       # for the tool.
12440 
12441       # First remove it from the list of overridden variables, so we can test
12442       # for unknown variables in the end.
12443       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12444 
12445       # Check if the provided tool contains a complete path.
12446       tool_specified="$SED"
12447       tool_basename="${tool_specified##*/}"
12448       if test "x$tool_basename" = "x$tool_specified"; then
12449         # A command without a complete path is provided, search $PATH.
12450         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12451 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12452         # Extract the first word of "$tool_basename", so it can be a program name with args.
12453 set dummy $tool_basename; ac_word=$2
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12455 $as_echo_n "checking for $ac_word... " >&6; }
12456 if ${ac_cv_path_SED+:} false; then :
12457   $as_echo_n "(cached) " >&6
12458 else
12459   case $SED in
12460   [\\/]* | ?:[\\/]*)
12461   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12462   ;;
12463   *)
12464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12465 for as_dir in $PATH
12466 do
12467   IFS=$as_save_IFS
12468   test -z "$as_dir" && as_dir=.
12469     for ac_exec_ext in '' $ac_executable_extensions; do
12470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12471     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12473     break 2
12474   fi
12475 done
12476   done
12477 IFS=$as_save_IFS
12478 
12479   ;;
12480 esac
12481 fi
12482 SED=$ac_cv_path_SED
12483 if test -n "$SED"; then
12484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12485 $as_echo "$SED" >&6; }
12486 else
12487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488 $as_echo "no" >&6; }
12489 fi
12490 
12491 
12492         if test "x$SED" = x; then
12493           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12494         fi
12495       else
12496         # Otherwise we believe it is a complete path. Use it as it is.
12497         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12498 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12499         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12500 $as_echo_n "checking for SED... " >&6; }
12501         if test ! -x "$tool_specified"; then
12502           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12503 $as_echo "not found" >&6; }
12504           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12505         fi
12506         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12507 $as_echo "$tool_specified" >&6; }
12508       fi
12509     fi
12510   fi
12511 
12512 
12513   if test "x$SED" = x; then
12514     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12515   fi
12516 
12517 
12518 
12519   # Always force rm.
12520   RM="$RM -f"
12521 
12522   # pwd behaves differently on various platforms and some don't support the -L flag.
12523   # Always use the bash builtin pwd to get uniform behavior.
12524   THEPWDCMD=pwd
12525 
12526   # These are not required on all platforms
12527 
12528 
12529   # Publish this variable in the help.
12530 
12531 
12532   if test "x$CYGPATH" = x; then
12533     # The variable is not set by user, try to locate tool using the code snippet
12534     for ac_prog in cygpath
12535 do
12536   # Extract the first word of "$ac_prog", so it can be a program name with args.
12537 set dummy $ac_prog; ac_word=$2
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12539 $as_echo_n "checking for $ac_word... " >&6; }
12540 if ${ac_cv_path_CYGPATH+:} false; then :
12541   $as_echo_n "(cached) " >&6
12542 else
12543   case $CYGPATH in
12544   [\\/]* | ?:[\\/]*)
12545   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12546   ;;
12547   *)
12548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12549 for as_dir in $PATH
12550 do
12551   IFS=$as_save_IFS
12552   test -z "$as_dir" && as_dir=.
12553     for ac_exec_ext in '' $ac_executable_extensions; do
12554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12555     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12557     break 2
12558   fi
12559 done
12560   done
12561 IFS=$as_save_IFS
12562 
12563   ;;
12564 esac
12565 fi
12566 CYGPATH=$ac_cv_path_CYGPATH
12567 if test -n "$CYGPATH"; then
12568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12569 $as_echo "$CYGPATH" >&6; }
12570 else
12571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12572 $as_echo "no" >&6; }
12573 fi
12574 
12575 
12576   test -n "$CYGPATH" && break
12577 done
12578 
12579   else
12580     # The variable is set, but is it from the command line or the environment?
12581 
12582     # Try to remove the string !CYGPATH! from our list.
12583     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12584     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12585       # If it failed, the variable was not from the command line. Ignore it,
12586       # but warn the user (except for BASH, which is always set by the calling BASH).
12587       if test "xCYGPATH" != xBASH; then
12588         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12589 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12590       fi
12591       # Try to locate tool using the code snippet
12592       for ac_prog in cygpath
12593 do
12594   # Extract the first word of "$ac_prog", so it can be a program name with args.
12595 set dummy $ac_prog; ac_word=$2
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12597 $as_echo_n "checking for $ac_word... " >&6; }
12598 if ${ac_cv_path_CYGPATH+:} false; then :
12599   $as_echo_n "(cached) " >&6
12600 else
12601   case $CYGPATH in
12602   [\\/]* | ?:[\\/]*)
12603   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12604   ;;
12605   *)
12606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12607 for as_dir in $PATH
12608 do
12609   IFS=$as_save_IFS
12610   test -z "$as_dir" && as_dir=.
12611     for ac_exec_ext in '' $ac_executable_extensions; do
12612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12613     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12615     break 2
12616   fi
12617 done
12618   done
12619 IFS=$as_save_IFS
12620 
12621   ;;
12622 esac
12623 fi
12624 CYGPATH=$ac_cv_path_CYGPATH
12625 if test -n "$CYGPATH"; then
12626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12627 $as_echo "$CYGPATH" >&6; }
12628 else
12629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630 $as_echo "no" >&6; }
12631 fi
12632 
12633 
12634   test -n "$CYGPATH" && break
12635 done
12636 
12637     else
12638       # If it succeeded, then it was overridden by the user. We will use it
12639       # for the tool.
12640 
12641       # First remove it from the list of overridden variables, so we can test
12642       # for unknown variables in the end.
12643       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12644 
12645       # Check if the provided tool contains a complete path.
12646       tool_specified="$CYGPATH"
12647       tool_basename="${tool_specified##*/}"
12648       if test "x$tool_basename" = "x$tool_specified"; then
12649         # A command without a complete path is provided, search $PATH.
12650         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12651 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12652         # Extract the first word of "$tool_basename", so it can be a program name with args.
12653 set dummy $tool_basename; ac_word=$2
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12655 $as_echo_n "checking for $ac_word... " >&6; }
12656 if ${ac_cv_path_CYGPATH+:} false; then :
12657   $as_echo_n "(cached) " >&6
12658 else
12659   case $CYGPATH in
12660   [\\/]* | ?:[\\/]*)
12661   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12662   ;;
12663   *)
12664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665 for as_dir in $PATH
12666 do
12667   IFS=$as_save_IFS
12668   test -z "$as_dir" && as_dir=.
12669     for ac_exec_ext in '' $ac_executable_extensions; do
12670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12671     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12673     break 2
12674   fi
12675 done
12676   done
12677 IFS=$as_save_IFS
12678 
12679   ;;
12680 esac
12681 fi
12682 CYGPATH=$ac_cv_path_CYGPATH
12683 if test -n "$CYGPATH"; then
12684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12685 $as_echo "$CYGPATH" >&6; }
12686 else
12687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688 $as_echo "no" >&6; }
12689 fi
12690 
12691 
12692         if test "x$CYGPATH" = x; then
12693           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12694         fi
12695       else
12696         # Otherwise we believe it is a complete path. Use it as it is.
12697         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12698 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12700 $as_echo_n "checking for CYGPATH... " >&6; }
12701         if test ! -x "$tool_specified"; then
12702           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12703 $as_echo "not found" >&6; }
12704           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12705         fi
12706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12707 $as_echo "$tool_specified" >&6; }
12708       fi
12709     fi
12710   fi
12711 
12712 
12713 
12714 
12715   # Publish this variable in the help.
12716 
12717 
12718   if test "x$READLINK" = x; then
12719     # The variable is not set by user, try to locate tool using the code snippet
12720     for ac_prog in greadlink readlink
12721 do
12722   # Extract the first word of "$ac_prog", so it can be a program name with args.
12723 set dummy $ac_prog; ac_word=$2
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12725 $as_echo_n "checking for $ac_word... " >&6; }
12726 if ${ac_cv_path_READLINK+:} false; then :
12727   $as_echo_n "(cached) " >&6
12728 else
12729   case $READLINK in
12730   [\\/]* | ?:[\\/]*)
12731   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12732   ;;
12733   *)
12734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12735 for as_dir in $PATH
12736 do
12737   IFS=$as_save_IFS
12738   test -z "$as_dir" && as_dir=.
12739     for ac_exec_ext in '' $ac_executable_extensions; do
12740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12741     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12743     break 2
12744   fi
12745 done
12746   done
12747 IFS=$as_save_IFS
12748 
12749   ;;
12750 esac
12751 fi
12752 READLINK=$ac_cv_path_READLINK
12753 if test -n "$READLINK"; then
12754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12755 $as_echo "$READLINK" >&6; }
12756 else
12757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758 $as_echo "no" >&6; }
12759 fi
12760 
12761 
12762   test -n "$READLINK" && break
12763 done
12764 
12765   else
12766     # The variable is set, but is it from the command line or the environment?
12767 
12768     # Try to remove the string !READLINK! from our list.
12769     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12770     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12771       # If it failed, the variable was not from the command line. Ignore it,
12772       # but warn the user (except for BASH, which is always set by the calling BASH).
12773       if test "xREADLINK" != xBASH; then
12774         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12775 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12776       fi
12777       # Try to locate tool using the code snippet
12778       for ac_prog in greadlink readlink
12779 do
12780   # Extract the first word of "$ac_prog", so it can be a program name with args.
12781 set dummy $ac_prog; ac_word=$2
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783 $as_echo_n "checking for $ac_word... " >&6; }
12784 if ${ac_cv_path_READLINK+:} false; then :
12785   $as_echo_n "(cached) " >&6
12786 else
12787   case $READLINK in
12788   [\\/]* | ?:[\\/]*)
12789   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12790   ;;
12791   *)
12792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793 for as_dir in $PATH
12794 do
12795   IFS=$as_save_IFS
12796   test -z "$as_dir" && as_dir=.
12797     for ac_exec_ext in '' $ac_executable_extensions; do
12798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801     break 2
12802   fi
12803 done
12804   done
12805 IFS=$as_save_IFS
12806 
12807   ;;
12808 esac
12809 fi
12810 READLINK=$ac_cv_path_READLINK
12811 if test -n "$READLINK"; then
12812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12813 $as_echo "$READLINK" >&6; }
12814 else
12815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816 $as_echo "no" >&6; }
12817 fi
12818 
12819 
12820   test -n "$READLINK" && break
12821 done
12822 
12823     else
12824       # If it succeeded, then it was overridden by the user. We will use it
12825       # for the tool.
12826 
12827       # First remove it from the list of overridden variables, so we can test
12828       # for unknown variables in the end.
12829       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12830 
12831       # Check if the provided tool contains a complete path.
12832       tool_specified="$READLINK"
12833       tool_basename="${tool_specified##*/}"
12834       if test "x$tool_basename" = "x$tool_specified"; then
12835         # A command without a complete path is provided, search $PATH.
12836         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12837 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12838         # Extract the first word of "$tool_basename", so it can be a program name with args.
12839 set dummy $tool_basename; ac_word=$2
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841 $as_echo_n "checking for $ac_word... " >&6; }
12842 if ${ac_cv_path_READLINK+:} false; then :
12843   $as_echo_n "(cached) " >&6
12844 else
12845   case $READLINK in
12846   [\\/]* | ?:[\\/]*)
12847   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12848   ;;
12849   *)
12850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851 for as_dir in $PATH
12852 do
12853   IFS=$as_save_IFS
12854   test -z "$as_dir" && as_dir=.
12855     for ac_exec_ext in '' $ac_executable_extensions; do
12856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859     break 2
12860   fi
12861 done
12862   done
12863 IFS=$as_save_IFS
12864 
12865   ;;
12866 esac
12867 fi
12868 READLINK=$ac_cv_path_READLINK
12869 if test -n "$READLINK"; then
12870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12871 $as_echo "$READLINK" >&6; }
12872 else
12873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874 $as_echo "no" >&6; }
12875 fi
12876 
12877 
12878         if test "x$READLINK" = x; then
12879           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880         fi
12881       else
12882         # Otherwise we believe it is a complete path. Use it as it is.
12883         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12884 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12886 $as_echo_n "checking for READLINK... " >&6; }
12887         if test ! -x "$tool_specified"; then
12888           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889 $as_echo "not found" >&6; }
12890           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12891         fi
12892         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893 $as_echo "$tool_specified" >&6; }
12894       fi
12895     fi
12896   fi
12897 
12898 
12899 
12900 
12901   # Publish this variable in the help.
12902 
12903 
12904   if test "x$DF" = x; then
12905     # The variable is not set by user, try to locate tool using the code snippet
12906     for ac_prog in df
12907 do
12908   # Extract the first word of "$ac_prog", so it can be a program name with args.
12909 set dummy $ac_prog; ac_word=$2
12910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12911 $as_echo_n "checking for $ac_word... " >&6; }
12912 if ${ac_cv_path_DF+:} false; then :
12913   $as_echo_n "(cached) " >&6
12914 else
12915   case $DF in
12916   [\\/]* | ?:[\\/]*)
12917   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12918   ;;
12919   *)
12920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12921 for as_dir in $PATH
12922 do
12923   IFS=$as_save_IFS
12924   test -z "$as_dir" && as_dir=.
12925     for ac_exec_ext in '' $ac_executable_extensions; do
12926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12927     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12929     break 2
12930   fi
12931 done
12932   done
12933 IFS=$as_save_IFS
12934 
12935   ;;
12936 esac
12937 fi
12938 DF=$ac_cv_path_DF
12939 if test -n "$DF"; then
12940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12941 $as_echo "$DF" >&6; }
12942 else
12943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12944 $as_echo "no" >&6; }
12945 fi
12946 
12947 
12948   test -n "$DF" && break
12949 done
12950 
12951   else
12952     # The variable is set, but is it from the command line or the environment?
12953 
12954     # Try to remove the string !DF! from our list.
12955     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12956     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12957       # If it failed, the variable was not from the command line. Ignore it,
12958       # but warn the user (except for BASH, which is always set by the calling BASH).
12959       if test "xDF" != xBASH; then
12960         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12961 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12962       fi
12963       # Try to locate tool using the code snippet
12964       for ac_prog in df
12965 do
12966   # Extract the first word of "$ac_prog", so it can be a program name with args.
12967 set dummy $ac_prog; ac_word=$2
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12969 $as_echo_n "checking for $ac_word... " >&6; }
12970 if ${ac_cv_path_DF+:} false; then :
12971   $as_echo_n "(cached) " >&6
12972 else
12973   case $DF in
12974   [\\/]* | ?:[\\/]*)
12975   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12976   ;;
12977   *)
12978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12979 for as_dir in $PATH
12980 do
12981   IFS=$as_save_IFS
12982   test -z "$as_dir" && as_dir=.
12983     for ac_exec_ext in '' $ac_executable_extensions; do
12984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12985     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12987     break 2
12988   fi
12989 done
12990   done
12991 IFS=$as_save_IFS
12992 
12993   ;;
12994 esac
12995 fi
12996 DF=$ac_cv_path_DF
12997 if test -n "$DF"; then
12998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12999 $as_echo "$DF" >&6; }
13000 else
13001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13002 $as_echo "no" >&6; }
13003 fi
13004 
13005 
13006   test -n "$DF" && break
13007 done
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 the provided tool contains a complete path.
13018       tool_specified="$DF"
13019       tool_basename="${tool_specified##*/}"
13020       if test "x$tool_basename" = "x$tool_specified"; then
13021         # A command without a complete path is provided, search $PATH.
13022         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13023 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13024         # Extract the first word of "$tool_basename", so it can be a program name with args.
13025 set dummy $tool_basename; ac_word=$2
13026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13027 $as_echo_n "checking for $ac_word... " >&6; }
13028 if ${ac_cv_path_DF+:} false; then :
13029   $as_echo_n "(cached) " >&6
13030 else
13031   case $DF in
13032   [\\/]* | ?:[\\/]*)
13033   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13034   ;;
13035   *)
13036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13037 for as_dir in $PATH
13038 do
13039   IFS=$as_save_IFS
13040   test -z "$as_dir" && as_dir=.
13041     for ac_exec_ext in '' $ac_executable_extensions; do
13042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13043     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13045     break 2
13046   fi
13047 done
13048   done
13049 IFS=$as_save_IFS
13050 
13051   ;;
13052 esac
13053 fi
13054 DF=$ac_cv_path_DF
13055 if test -n "$DF"; then
13056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13057 $as_echo "$DF" >&6; }
13058 else
13059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13060 $as_echo "no" >&6; }
13061 fi
13062 
13063 
13064         if test "x$DF" = x; then
13065           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13066         fi
13067       else
13068         # Otherwise we believe it is a complete path. Use it as it is.
13069         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13070 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13071         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13072 $as_echo_n "checking for DF... " >&6; }
13073         if test ! -x "$tool_specified"; then
13074           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13075 $as_echo "not found" >&6; }
13076           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13077         fi
13078         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13079 $as_echo "$tool_specified" >&6; }
13080       fi
13081     fi
13082   fi
13083 
13084 
13085 
13086 
13087   # Publish this variable in the help.
13088 
13089 
13090   if test "x$SETFILE" = x; then
13091     # The variable is not set by user, try to locate tool using the code snippet
13092     for ac_prog in SetFile
13093 do
13094   # Extract the first word of "$ac_prog", so it can be a program name with args.
13095 set dummy $ac_prog; ac_word=$2
13096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13097 $as_echo_n "checking for $ac_word... " >&6; }
13098 if ${ac_cv_path_SETFILE+:} false; then :
13099   $as_echo_n "(cached) " >&6
13100 else
13101   case $SETFILE in
13102   [\\/]* | ?:[\\/]*)
13103   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13104   ;;
13105   *)
13106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13107 for as_dir in $PATH
13108 do
13109   IFS=$as_save_IFS
13110   test -z "$as_dir" && as_dir=.
13111     for ac_exec_ext in '' $ac_executable_extensions; do
13112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13113     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13115     break 2
13116   fi
13117 done
13118   done
13119 IFS=$as_save_IFS
13120 
13121   ;;
13122 esac
13123 fi
13124 SETFILE=$ac_cv_path_SETFILE
13125 if test -n "$SETFILE"; then
13126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13127 $as_echo "$SETFILE" >&6; }
13128 else
13129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13130 $as_echo "no" >&6; }
13131 fi
13132 
13133 
13134   test -n "$SETFILE" && break
13135 done
13136 
13137   else
13138     # The variable is set, but is it from the command line or the environment?
13139 
13140     # Try to remove the string !SETFILE! from our list.
13141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13143       # If it failed, the variable was not from the command line. Ignore it,
13144       # but warn the user (except for BASH, which is always set by the calling BASH).
13145       if test "xSETFILE" != xBASH; then
13146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13147 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13148       fi
13149       # Try to locate tool using the code snippet
13150       for ac_prog in SetFile
13151 do
13152   # Extract the first word of "$ac_prog", so it can be a program name with args.
13153 set dummy $ac_prog; ac_word=$2
13154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13155 $as_echo_n "checking for $ac_word... " >&6; }
13156 if ${ac_cv_path_SETFILE+:} false; then :
13157   $as_echo_n "(cached) " >&6
13158 else
13159   case $SETFILE in
13160   [\\/]* | ?:[\\/]*)
13161   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13162   ;;
13163   *)
13164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13165 for as_dir in $PATH
13166 do
13167   IFS=$as_save_IFS
13168   test -z "$as_dir" && as_dir=.
13169     for ac_exec_ext in '' $ac_executable_extensions; do
13170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13171     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13173     break 2
13174   fi
13175 done
13176   done
13177 IFS=$as_save_IFS
13178 
13179   ;;
13180 esac
13181 fi
13182 SETFILE=$ac_cv_path_SETFILE
13183 if test -n "$SETFILE"; then
13184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13185 $as_echo "$SETFILE" >&6; }
13186 else
13187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13188 $as_echo "no" >&6; }
13189 fi
13190 
13191 
13192   test -n "$SETFILE" && break
13193 done
13194 
13195     else
13196       # If it succeeded, then it was overridden by the user. We will use it
13197       # for the tool.
13198 
13199       # First remove it from the list of overridden variables, so we can test
13200       # for unknown variables in the end.
13201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13202 
13203       # Check if the provided tool contains a complete path.
13204       tool_specified="$SETFILE"
13205       tool_basename="${tool_specified##*/}"
13206       if test "x$tool_basename" = "x$tool_specified"; then
13207         # A command without a complete path is provided, search $PATH.
13208         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13209 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13210         # Extract the first word of "$tool_basename", so it can be a program name with args.
13211 set dummy $tool_basename; ac_word=$2
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13213 $as_echo_n "checking for $ac_word... " >&6; }
13214 if ${ac_cv_path_SETFILE+:} false; then :
13215   $as_echo_n "(cached) " >&6
13216 else
13217   case $SETFILE in
13218   [\\/]* | ?:[\\/]*)
13219   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13220   ;;
13221   *)
13222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13223 for as_dir in $PATH
13224 do
13225   IFS=$as_save_IFS
13226   test -z "$as_dir" && as_dir=.
13227     for ac_exec_ext in '' $ac_executable_extensions; do
13228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13229     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13231     break 2
13232   fi
13233 done
13234   done
13235 IFS=$as_save_IFS
13236 
13237   ;;
13238 esac
13239 fi
13240 SETFILE=$ac_cv_path_SETFILE
13241 if test -n "$SETFILE"; then
13242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13243 $as_echo "$SETFILE" >&6; }
13244 else
13245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13246 $as_echo "no" >&6; }
13247 fi
13248 
13249 
13250         if test "x$SETFILE" = x; then
13251           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13252         fi
13253       else
13254         # Otherwise we believe it is a complete path. Use it as it is.
13255         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13256 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13258 $as_echo_n "checking for SETFILE... " >&6; }
13259         if test ! -x "$tool_specified"; then
13260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13261 $as_echo "not found" >&6; }
13262           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13263         fi
13264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13265 $as_echo "$tool_specified" >&6; }
13266       fi
13267     fi
13268   fi
13269 
13270 
13271 
13272 
13273   # Publish this variable in the help.
13274 
13275 
13276   if test "x$CPIO" = x; then
13277     # The variable is not set by user, try to locate tool using the code snippet
13278     for ac_prog in cpio bsdcpio
13279 do
13280   # Extract the first word of "$ac_prog", so it can be a program name with args.
13281 set dummy $ac_prog; ac_word=$2
13282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13283 $as_echo_n "checking for $ac_word... " >&6; }
13284 if ${ac_cv_path_CPIO+:} false; then :
13285   $as_echo_n "(cached) " >&6
13286 else
13287   case $CPIO in
13288   [\\/]* | ?:[\\/]*)
13289   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13290   ;;
13291   *)
13292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13293 for as_dir in $PATH
13294 do
13295   IFS=$as_save_IFS
13296   test -z "$as_dir" && as_dir=.
13297     for ac_exec_ext in '' $ac_executable_extensions; do
13298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13299     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13301     break 2
13302   fi
13303 done
13304   done
13305 IFS=$as_save_IFS
13306 
13307   ;;
13308 esac
13309 fi
13310 CPIO=$ac_cv_path_CPIO
13311 if test -n "$CPIO"; then
13312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13313 $as_echo "$CPIO" >&6; }
13314 else
13315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316 $as_echo "no" >&6; }
13317 fi
13318 
13319 
13320   test -n "$CPIO" && break
13321 done
13322 
13323   else
13324     # The variable is set, but is it from the command line or the environment?
13325 
13326     # Try to remove the string !CPIO! from our list.
13327     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13328     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13329       # If it failed, the variable was not from the command line. Ignore it,
13330       # but warn the user (except for BASH, which is always set by the calling BASH).
13331       if test "xCPIO" != xBASH; then
13332         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13333 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13334       fi
13335       # Try to locate tool using the code snippet
13336       for ac_prog in cpio bsdcpio
13337 do
13338   # Extract the first word of "$ac_prog", so it can be a program name with args.
13339 set dummy $ac_prog; ac_word=$2
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13341 $as_echo_n "checking for $ac_word... " >&6; }
13342 if ${ac_cv_path_CPIO+:} false; then :
13343   $as_echo_n "(cached) " >&6
13344 else
13345   case $CPIO in
13346   [\\/]* | ?:[\\/]*)
13347   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13348   ;;
13349   *)
13350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13351 for as_dir in $PATH
13352 do
13353   IFS=$as_save_IFS
13354   test -z "$as_dir" && as_dir=.
13355     for ac_exec_ext in '' $ac_executable_extensions; do
13356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13357     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13359     break 2
13360   fi
13361 done
13362   done
13363 IFS=$as_save_IFS
13364 
13365   ;;
13366 esac
13367 fi
13368 CPIO=$ac_cv_path_CPIO
13369 if test -n "$CPIO"; then
13370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13371 $as_echo "$CPIO" >&6; }
13372 else
13373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13374 $as_echo "no" >&6; }
13375 fi
13376 
13377 
13378   test -n "$CPIO" && break
13379 done
13380 
13381     else
13382       # If it succeeded, then it was overridden by the user. We will use it
13383       # for the tool.
13384 
13385       # First remove it from the list of overridden variables, so we can test
13386       # for unknown variables in the end.
13387       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13388 
13389       # Check if the provided tool contains a complete path.
13390       tool_specified="$CPIO"
13391       tool_basename="${tool_specified##*/}"
13392       if test "x$tool_basename" = "x$tool_specified"; then
13393         # A command without a complete path is provided, search $PATH.
13394         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13395 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13396         # Extract the first word of "$tool_basename", so it can be a program name with args.
13397 set dummy $tool_basename; ac_word=$2
13398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13399 $as_echo_n "checking for $ac_word... " >&6; }
13400 if ${ac_cv_path_CPIO+:} false; then :
13401   $as_echo_n "(cached) " >&6
13402 else
13403   case $CPIO in
13404   [\\/]* | ?:[\\/]*)
13405   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13406   ;;
13407   *)
13408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13409 for as_dir in $PATH
13410 do
13411   IFS=$as_save_IFS
13412   test -z "$as_dir" && as_dir=.
13413     for ac_exec_ext in '' $ac_executable_extensions; do
13414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13415     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13417     break 2
13418   fi
13419 done
13420   done
13421 IFS=$as_save_IFS
13422 
13423   ;;
13424 esac
13425 fi
13426 CPIO=$ac_cv_path_CPIO
13427 if test -n "$CPIO"; then
13428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13429 $as_echo "$CPIO" >&6; }
13430 else
13431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13432 $as_echo "no" >&6; }
13433 fi
13434 
13435 
13436         if test "x$CPIO" = x; then
13437           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13438         fi
13439       else
13440         # Otherwise we believe it is a complete path. Use it as it is.
13441         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13442 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13443         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13444 $as_echo_n "checking for CPIO... " >&6; }
13445         if test ! -x "$tool_specified"; then
13446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13447 $as_echo "not found" >&6; }
13448           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13449         fi
13450         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13451 $as_echo "$tool_specified" >&6; }
13452       fi
13453     fi
13454   fi
13455 
13456 
13457 
13458 
13459 # Now we can determine OpenJDK build and target platforms. This is required to
13460 # have early on.
13461 # Make sure we can run config.sub.
13462 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13463   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13464 
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13466 $as_echo_n "checking build system type... " >&6; }
13467 if ${ac_cv_build+:} false; then :
13468   $as_echo_n "(cached) " >&6
13469 else
13470   ac_build_alias=$build_alias
13471 test "x$ac_build_alias" = x &&
13472   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13473 test "x$ac_build_alias" = x &&
13474   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13475 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13476   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13477 
13478 fi
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13480 $as_echo "$ac_cv_build" >&6; }
13481 case $ac_cv_build in
13482 *-*-*) ;;
13483 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13484 esac
13485 build=$ac_cv_build
13486 ac_save_IFS=$IFS; IFS='-'
13487 set x $ac_cv_build
13488 shift
13489 build_cpu=$1
13490 build_vendor=$2
13491 shift; shift
13492 # Remember, the first character of IFS is used to create $*,
13493 # except with old shells:
13494 build_os=$*
13495 IFS=$ac_save_IFS
13496 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13497 
13498 
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13500 $as_echo_n "checking host system type... " >&6; }
13501 if ${ac_cv_host+:} false; then :
13502   $as_echo_n "(cached) " >&6
13503 else
13504   if test "x$host_alias" = x; then
13505   ac_cv_host=$ac_cv_build
13506 else
13507   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13508     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13509 fi
13510 
13511 fi
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13513 $as_echo "$ac_cv_host" >&6; }
13514 case $ac_cv_host in
13515 *-*-*) ;;
13516 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13517 esac
13518 host=$ac_cv_host
13519 ac_save_IFS=$IFS; IFS='-'
13520 set x $ac_cv_host
13521 shift
13522 host_cpu=$1
13523 host_vendor=$2
13524 shift; shift
13525 # Remember, the first character of IFS is used to create $*,
13526 # except with old shells:
13527 host_os=$*
13528 IFS=$ac_save_IFS
13529 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13530 
13531 
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13533 $as_echo_n "checking target system type... " >&6; }
13534 if ${ac_cv_target+:} false; then :
13535   $as_echo_n "(cached) " >&6
13536 else
13537   if test "x$target_alias" = x; then
13538   ac_cv_target=$ac_cv_host
13539 else
13540   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13541     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13542 fi
13543 
13544 fi
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13546 $as_echo "$ac_cv_target" >&6; }
13547 case $ac_cv_target in
13548 *-*-*) ;;
13549 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13550 esac
13551 target=$ac_cv_target
13552 ac_save_IFS=$IFS; IFS='-'
13553 set x $ac_cv_target
13554 shift
13555 target_cpu=$1
13556 target_vendor=$2
13557 shift; shift
13558 # Remember, the first character of IFS is used to create $*,
13559 # except with old shells:
13560 target_os=$*
13561 IFS=$ac_save_IFS
13562 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13563 
13564 
13565 # The aliases save the names the user supplied, while $host etc.
13566 # will get canonicalized.
13567 test -n "$target_alias" &&
13568   test "$program_prefix$program_suffix$program_transform_name" = \
13569     NONENONEs,x,x, &&
13570   program_prefix=${target_alias}-
13571 
13572   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13573   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13574   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13575   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13576   # to use the configure naming style.
13577 
13578 
13579 
13580 
13581 
13582   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13583   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13584   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13585   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13586   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13587   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13588 
13589 
13590 
13591   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13592 
13593   case "$build_os" in
13594     *linux*)
13595       VAR_OS=linux
13596       VAR_OS_TYPE=unix
13597       ;;
13598     *solaris*)
13599       VAR_OS=solaris
13600       VAR_OS_TYPE=unix
13601       ;;
13602     *darwin*)
13603       VAR_OS=macosx
13604       VAR_OS_TYPE=unix
13605       ;;
13606     *bsd*)
13607       VAR_OS=bsd
13608       VAR_OS_TYPE=unix
13609       ;;
13610     *cygwin*)
13611       VAR_OS=windows
13612       VAR_OS_ENV=windows.cygwin
13613       ;;
13614     *mingw*)
13615       VAR_OS=windows
13616       VAR_OS_ENV=windows.msys
13617       ;;
13618     *aix*)
13619       VAR_OS=aix
13620       VAR_OS_TYPE=unix
13621       ;;
13622     *)
13623       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13624       ;;
13625   esac
13626 
13627 
13628   # First argument is the cpu name from the trip/quad
13629   case "$build_cpu" in
13630     x86_64)
13631       VAR_CPU=x86_64
13632       VAR_CPU_ARCH=x86
13633       VAR_CPU_BITS=64
13634       VAR_CPU_ENDIAN=little
13635       ;;
13636     i?86)
13637       VAR_CPU=x86
13638       VAR_CPU_ARCH=x86
13639       VAR_CPU_BITS=32
13640       VAR_CPU_ENDIAN=little
13641       ;;
13642     arm*)
13643       VAR_CPU=arm
13644       VAR_CPU_ARCH=arm
13645       VAR_CPU_BITS=32
13646       VAR_CPU_ENDIAN=little
13647       ;;
13648     powerpc)
13649       VAR_CPU=ppc
13650       VAR_CPU_ARCH=ppc
13651       VAR_CPU_BITS=32
13652       VAR_CPU_ENDIAN=big
13653       ;;
13654     powerpc64)
13655       VAR_CPU=ppc64
13656       VAR_CPU_ARCH=ppc
13657       VAR_CPU_BITS=64
13658       VAR_CPU_ENDIAN=big
13659       ;;
13660     powerpc64le)
13661       VAR_CPU=ppc64
13662       VAR_CPU_ARCH=ppc
13663       VAR_CPU_BITS=64
13664       VAR_CPU_ENDIAN=little
13665       ;;
13666     s390)
13667       VAR_CPU=s390
13668       VAR_CPU_ARCH=s390
13669       VAR_CPU_BITS=32
13670       VAR_CPU_ENDIAN=big
13671       ;;
13672     s390x)
13673       VAR_CPU=s390x
13674       VAR_CPU_ARCH=s390
13675       VAR_CPU_BITS=64
13676       VAR_CPU_ENDIAN=big
13677       ;;
13678     sparc)
13679       VAR_CPU=sparc
13680       VAR_CPU_ARCH=sparc
13681       VAR_CPU_BITS=32
13682       VAR_CPU_ENDIAN=big
13683       ;;
13684     sparcv9|sparc64)
13685       VAR_CPU=sparcv9
13686       VAR_CPU_ARCH=sparc
13687       VAR_CPU_BITS=64
13688       VAR_CPU_ENDIAN=big
13689       ;;
13690     *)
13691       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13692       ;;
13693   esac
13694 
13695   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13696   OPENJDK_BUILD_OS="$VAR_OS"
13697   if test "x$VAR_OS_TYPE" != x; then
13698     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13699   else
13700     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13701   fi
13702   if test "x$VAR_OS_ENV" != x; then
13703     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13704   else
13705     OPENJDK_BUILD_OS_ENV="$VAR_OS"
13706   fi
13707   OPENJDK_BUILD_CPU="$VAR_CPU"
13708   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13709   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13710   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13711 
13712 
13713 
13714 
13715 
13716 
13717 
13718 
13719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13720 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13722 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13723 
13724   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13725 
13726   case "$host_os" in
13727     *linux*)
13728       VAR_OS=linux
13729       VAR_OS_TYPE=unix
13730       ;;
13731     *solaris*)
13732       VAR_OS=solaris
13733       VAR_OS_TYPE=unix
13734       ;;
13735     *darwin*)
13736       VAR_OS=macosx
13737       VAR_OS_TYPE=unix
13738       ;;
13739     *bsd*)
13740       VAR_OS=bsd
13741       VAR_OS_TYPE=unix
13742       ;;
13743     *cygwin*)
13744       VAR_OS=windows
13745       VAR_OS_ENV=windows.cygwin
13746       ;;
13747     *mingw*)
13748       VAR_OS=windows
13749       VAR_OS_ENV=windows.msys
13750       ;;
13751     *aix*)
13752       VAR_OS=aix
13753       VAR_OS_TYPE=unix
13754       ;;
13755     *)
13756       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13757       ;;
13758   esac
13759 
13760 
13761   # First argument is the cpu name from the trip/quad
13762   case "$host_cpu" in
13763     x86_64)
13764       VAR_CPU=x86_64
13765       VAR_CPU_ARCH=x86
13766       VAR_CPU_BITS=64
13767       VAR_CPU_ENDIAN=little
13768       ;;
13769     i?86)
13770       VAR_CPU=x86
13771       VAR_CPU_ARCH=x86
13772       VAR_CPU_BITS=32
13773       VAR_CPU_ENDIAN=little
13774       ;;
13775     arm*)
13776       VAR_CPU=arm
13777       VAR_CPU_ARCH=arm
13778       VAR_CPU_BITS=32
13779       VAR_CPU_ENDIAN=little
13780       ;;
13781     powerpc)
13782       VAR_CPU=ppc
13783       VAR_CPU_ARCH=ppc
13784       VAR_CPU_BITS=32
13785       VAR_CPU_ENDIAN=big
13786       ;;
13787     powerpc64)
13788       VAR_CPU=ppc64
13789       VAR_CPU_ARCH=ppc
13790       VAR_CPU_BITS=64
13791       VAR_CPU_ENDIAN=big
13792       ;;
13793     powerpc64le)
13794       VAR_CPU=ppc64
13795       VAR_CPU_ARCH=ppc
13796       VAR_CPU_BITS=64
13797       VAR_CPU_ENDIAN=little
13798       ;;
13799     s390)
13800       VAR_CPU=s390
13801       VAR_CPU_ARCH=s390
13802       VAR_CPU_BITS=32
13803       VAR_CPU_ENDIAN=big
13804       ;;
13805     s390x)
13806       VAR_CPU=s390x
13807       VAR_CPU_ARCH=s390
13808       VAR_CPU_BITS=64
13809       VAR_CPU_ENDIAN=big
13810       ;;
13811     sparc)
13812       VAR_CPU=sparc
13813       VAR_CPU_ARCH=sparc
13814       VAR_CPU_BITS=32
13815       VAR_CPU_ENDIAN=big
13816       ;;
13817     sparcv9|sparc64)
13818       VAR_CPU=sparcv9
13819       VAR_CPU_ARCH=sparc
13820       VAR_CPU_BITS=64
13821       VAR_CPU_ENDIAN=big
13822       ;;
13823     *)
13824       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13825       ;;
13826   esac
13827 
13828   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13829   OPENJDK_TARGET_OS="$VAR_OS"
13830   if test "x$VAR_OS_TYPE" != x; then
13831     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13832   else
13833     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13834   fi
13835   if test "x$VAR_OS_ENV" != x; then
13836     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13837   else
13838     OPENJDK_TARGET_OS_ENV="$VAR_OS"
13839   fi
13840   OPENJDK_TARGET_CPU="$VAR_CPU"
13841   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13842   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13843   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13844 
13845 
13846 
13847 
13848 
13849 
13850 
13851 
13852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13853 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13855 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13856 
13857 
13858 
13859 # Check whether --with-target-bits was given.
13860 if test "${with_target_bits+set}" = set; then :
13861   withval=$with_target_bits;
13862 fi
13863 
13864 
13865   # We have three types of compiles:
13866   # native  == normal compilation, target system == build system
13867   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13868   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13869   #
13870   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13871     # We're doing a proper cross-compilation
13872     COMPILE_TYPE="cross"
13873   else
13874     COMPILE_TYPE="native"
13875   fi
13876 
13877   if test "x$with_target_bits" != x; then
13878     if test "x$COMPILE_TYPE" = "xcross"; then
13879       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13880     fi
13881 
13882     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13883       # A reduced build is requested
13884       COMPILE_TYPE="reduced"
13885       OPENJDK_TARGET_CPU_BITS=32
13886       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13887         OPENJDK_TARGET_CPU=x86
13888       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13889         OPENJDK_TARGET_CPU=sparc
13890       else
13891         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13892       fi
13893     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13894       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
13895     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13896       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13897 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13898     else
13899       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13900     fi
13901   fi
13902 
13903 
13904   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13905 $as_echo_n "checking compilation type... " >&6; }
13906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13907 $as_echo "$COMPILE_TYPE" >&6; }
13908 
13909 
13910   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13911     REQUIRED_OS_NAME=SunOS
13912     REQUIRED_OS_VERSION=5.10
13913   fi
13914   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13915     REQUIRED_OS_NAME=Linux
13916     REQUIRED_OS_VERSION=2.6
13917   fi
13918   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13919     REQUIRED_OS_NAME=Windows
13920     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13921       REQUIRED_OS_VERSION=5.2
13922     else
13923       REQUIRED_OS_VERSION=5.1
13924     fi
13925   fi
13926   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13927     REQUIRED_OS_NAME=Darwin
13928     REQUIRED_OS_VERSION=11.2
13929   fi
13930 
13931 
13932 
13933 
13934 
13935   # Also store the legacy naming of the cpu.
13936   # Ie i586 and amd64 instead of x86 and x86_64
13937   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13938   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13939     OPENJDK_TARGET_CPU_LEGACY="i586"
13940   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13941     # On all platforms except MacOSX replace x86_64 with amd64.
13942     OPENJDK_TARGET_CPU_LEGACY="amd64"
13943   fi
13944 
13945 
13946   # And the second legacy naming of the cpu.
13947   # Ie i386 and amd64 instead of x86 and x86_64.
13948   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13949   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13950     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13951   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13952     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13953   fi
13954 
13955 
13956   # This is the name of the cpu (but using i386 and amd64 instead of
13957   # x86 and x86_64, respectively), preceeded by a /, to be used when
13958   # locating libraries. On macosx, it's empty, though.
13959   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13960   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13961     OPENJDK_TARGET_CPU_LIBDIR=""
13962   fi
13963 
13964 
13965   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13966   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13967   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13968   OPENJDK_TARGET_CPU_ISADIR=""
13969   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13970     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13971       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13972     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13973       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13974     fi
13975   fi
13976 
13977 
13978   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13979   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13980   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13981     # On linux only, we replace x86 with i386.
13982     OPENJDK_TARGET_CPU_OSARCH="i386"
13983   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13984     # On all platforms except macosx, we replace x86_64 with amd64.
13985     OPENJDK_TARGET_CPU_OSARCH="amd64"
13986   fi
13987 
13988 
13989   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13990   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13991     OPENJDK_TARGET_CPU_JLI="i386"
13992   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13993     # On all platforms except macosx, we replace x86_64 with amd64.
13994     OPENJDK_TARGET_CPU_JLI="amd64"
13995   fi
13996   # Now setup the -D flags for building libjli.
13997   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13998   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13999     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14000       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14001     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14002       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14003     fi
14004   fi
14005 
14006 
14007   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14008       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14009   else
14010       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14011   fi
14012 
14013 
14014   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14015     A_LP64="LP64:="
14016     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14017     # unpack200.exe
14018     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14019       ADD_LP64="-D_LP64=1"
14020     fi
14021   fi
14022   LP64=$A_LP64
14023 
14024 
14025   if test "x$COMPILE_TYPE" = "xcross"; then
14026     # FIXME: ... or should this include reduced builds..?
14027     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14028   else
14029     DEFINE_CROSS_COMPILE_ARCH=""
14030   fi
14031 
14032 
14033   # ZERO_ARCHDEF is used to enable architecture-specific code
14034   case "${OPENJDK_TARGET_CPU}" in
14035     ppc)     ZERO_ARCHDEF=PPC32 ;;
14036     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14037     s390*)   ZERO_ARCHDEF=S390  ;;
14038     sparc*)  ZERO_ARCHDEF=SPARC ;;
14039     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14040     x86)     ZERO_ARCHDEF=IA32  ;;
14041     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14042   esac
14043 
14044 
14045 
14046 
14047 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14048 
14049   # Save the current directory this script was started from
14050   CURDIR="$PWD"
14051 
14052   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14053     PATH_SEP=";"
14054 
14055   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14056   if test $SRC_ROOT_LENGTH -gt 100; then
14057     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14058   fi
14059 
14060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14061     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14062 $as_echo_n "checking cygwin release... " >&6; }
14063     CYGWIN_VERSION=`$UNAME -r`
14064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14065 $as_echo "$CYGWIN_VERSION" >&6; }
14066     WINDOWS_ENV_VENDOR='cygwin'
14067     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14068 
14069     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14070     if test "x$CYGWIN_VERSION_OK" = x; then
14071       { $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
14072 $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;}
14073       as_fn_error $? "Cannot continue" "$LINENO" 5
14074     fi
14075     if test "x$CYGPATH" = x; then
14076       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14077     fi
14078     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14079 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14080     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14081     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14082     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14083     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14084     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14085 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14086     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14087     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14088     if test "x$test_cygdrive_prefix" = x; then
14089       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14090     fi
14091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14092     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14093 $as_echo_n "checking msys release... " >&6; }
14094     MSYS_VERSION=`$UNAME -r`
14095     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14096 $as_echo "$MSYS_VERSION" >&6; }
14097 
14098     WINDOWS_ENV_VENDOR='msys'
14099     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14100 
14101     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14102 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14103     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14104     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14105 
14106   windows_path="$MSYS_ROOT_PATH"
14107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14108     unix_path=`$CYGPATH -u "$windows_path"`
14109     MSYS_ROOT_PATH="$unix_path"
14110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14112     MSYS_ROOT_PATH="$unix_path"
14113   fi
14114 
14115     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14116 $as_echo "$MSYS_ROOT_PATH" >&6; }
14117     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14118   else
14119     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14120   fi
14121 
14122   # Test if windows or unix (cygwin/msys) find is first in path.
14123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14124 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14125   FIND_BINARY_OUTPUT=`find --version 2>&1`
14126   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14128 $as_echo "unix style" >&6; }
14129   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14130     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14131 $as_echo "Windows" >&6; }
14132     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14133 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14134     { $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
14135 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14136     as_fn_error $? "Cannot continue" "$LINENO" 5
14137   else
14138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14139 $as_echo "unknown" >&6; }
14140     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14141 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14142   fi
14143 
14144   else
14145     PATH_SEP=":"
14146   fi
14147 
14148 
14149   # We get the top-level directory from the supporting wrappers.
14150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14151 $as_echo_n "checking for top-level directory... " >&6; }
14152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14153 $as_echo "$TOPDIR" >&6; }
14154 
14155 
14156   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14157 
14158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14159 
14160   # Input might be given as Windows format, start by converting to
14161   # unix format.
14162   path="$CURDIR"
14163   new_path=`$CYGPATH -u "$path"`
14164 
14165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14168   # "foo.exe" is OK but "foo" is an error.
14169   #
14170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14171   # It is also a way to make sure we got the proper file name for the real test later on.
14172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14173   if test "x$test_shortpath" = x; then
14174     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14175 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14176     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14177   fi
14178 
14179   # Call helper function which possibly converts this using DOS-style short mode.
14180   # If so, the updated path is stored in $new_path.
14181 
14182   input_path="$new_path"
14183   # Check if we need to convert this using DOS-style short mode. If the path
14184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14185   # take no chances and rewrite it.
14186   # Note: m4 eats our [], so we need to use [ and ] instead.
14187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14188   if test "x$has_forbidden_chars" != x; then
14189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14193       # Going to short mode and back again did indeed matter. Since short mode is
14194       # case insensitive, let's make it lowercase to improve readability.
14195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14196       # Now convert it back to Unix-stile (cygpath)
14197       input_path=`$CYGPATH -u "$shortmode_path"`
14198       new_path="$input_path"
14199     fi
14200   fi
14201 
14202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14203   if test "x$test_cygdrive_prefix" = x; then
14204     # As a simple fix, exclude /usr/bin since it's not a real path.
14205     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14207       # a path prefixed by /cygdrive for fixpath to work.
14208       new_path="$CYGWIN_ROOT_PATH$input_path"
14209     fi
14210   fi
14211 
14212 
14213   if test "x$path" != "x$new_path"; then
14214     CURDIR="$new_path"
14215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14216 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14217   fi
14218 
14219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14220 
14221   path="$CURDIR"
14222   has_colon=`$ECHO $path | $GREP ^.:`
14223   new_path="$path"
14224   if test "x$has_colon" = x; then
14225     # Not in mixed or Windows style, start by that.
14226     new_path=`cmd //c echo $path`
14227   fi
14228 
14229 
14230   input_path="$new_path"
14231   # Check if we need to convert this using DOS-style short mode. If the path
14232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14233   # take no chances and rewrite it.
14234   # Note: m4 eats our [], so we need to use [ and ] instead.
14235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14236   if test "x$has_forbidden_chars" != x; then
14237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14239   fi
14240 
14241 
14242   windows_path="$new_path"
14243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14244     unix_path=`$CYGPATH -u "$windows_path"`
14245     new_path="$unix_path"
14246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14248     new_path="$unix_path"
14249   fi
14250 
14251   if test "x$path" != "x$new_path"; then
14252     CURDIR="$new_path"
14253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14254 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14255   fi
14256 
14257   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14258   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14259 
14260   else
14261     # We're on a unix platform. Hooray! :)
14262     path="$CURDIR"
14263     has_space=`$ECHO "$path" | $GREP " "`
14264     if test "x$has_space" != x; then
14265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14266 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14267       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14268     fi
14269 
14270     # Use eval to expand a potential ~
14271     eval path="$path"
14272     if test ! -f "$path" && test ! -d "$path"; then
14273       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14274     fi
14275 
14276     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14277   fi
14278 
14279 
14280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14281 
14282   # Input might be given as Windows format, start by converting to
14283   # unix format.
14284   path="$TOPDIR"
14285   new_path=`$CYGPATH -u "$path"`
14286 
14287   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14288   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14289   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14290   # "foo.exe" is OK but "foo" is an error.
14291   #
14292   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14293   # It is also a way to make sure we got the proper file name for the real test later on.
14294   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14295   if test "x$test_shortpath" = x; then
14296     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14297 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14298     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14299   fi
14300 
14301   # Call helper function which possibly converts this using DOS-style short mode.
14302   # If so, the updated path is stored in $new_path.
14303 
14304   input_path="$new_path"
14305   # Check if we need to convert this using DOS-style short mode. If the path
14306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307   # take no chances and rewrite it.
14308   # Note: m4 eats our [], so we need to use [ and ] instead.
14309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14310   if test "x$has_forbidden_chars" != x; then
14311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14315       # Going to short mode and back again did indeed matter. Since short mode is
14316       # case insensitive, let's make it lowercase to improve readability.
14317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14318       # Now convert it back to Unix-stile (cygpath)
14319       input_path=`$CYGPATH -u "$shortmode_path"`
14320       new_path="$input_path"
14321     fi
14322   fi
14323 
14324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14325   if test "x$test_cygdrive_prefix" = x; then
14326     # As a simple fix, exclude /usr/bin since it's not a real path.
14327     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14329       # a path prefixed by /cygdrive for fixpath to work.
14330       new_path="$CYGWIN_ROOT_PATH$input_path"
14331     fi
14332   fi
14333 
14334 
14335   if test "x$path" != "x$new_path"; then
14336     TOPDIR="$new_path"
14337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14338 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14339   fi
14340 
14341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342 
14343   path="$TOPDIR"
14344   has_colon=`$ECHO $path | $GREP ^.:`
14345   new_path="$path"
14346   if test "x$has_colon" = x; then
14347     # Not in mixed or Windows style, start by that.
14348     new_path=`cmd //c echo $path`
14349   fi
14350 
14351 
14352   input_path="$new_path"
14353   # Check if we need to convert this using DOS-style short mode. If the path
14354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14355   # take no chances and rewrite it.
14356   # Note: m4 eats our [], so we need to use [ and ] instead.
14357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14358   if test "x$has_forbidden_chars" != x; then
14359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14360     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361   fi
14362 
14363 
14364   windows_path="$new_path"
14365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14366     unix_path=`$CYGPATH -u "$windows_path"`
14367     new_path="$unix_path"
14368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14370     new_path="$unix_path"
14371   fi
14372 
14373   if test "x$path" != "x$new_path"; then
14374     TOPDIR="$new_path"
14375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14376 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14377   fi
14378 
14379   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14380   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14381 
14382   else
14383     # We're on a unix platform. Hooray! :)
14384     path="$TOPDIR"
14385     has_space=`$ECHO "$path" | $GREP " "`
14386     if test "x$has_space" != x; then
14387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14388 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14389       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14390     fi
14391 
14392     # Use eval to expand a potential ~
14393     eval path="$path"
14394     if test ! -f "$path" && test ! -d "$path"; then
14395       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14396     fi
14397 
14398     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14399   fi
14400 
14401   # SRC_ROOT is a traditional alias for TOPDIR.
14402   SRC_ROOT=$TOPDIR
14403 
14404   # Locate the directory of this script.
14405   AUTOCONF_DIR=$TOPDIR/common/autoconf
14406 
14407 
14408   # Setup default logging of stdout and stderr to build.log in the output root.
14409   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14410   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14411   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14412 
14413 
14414 
14415 
14416 
14417 # Check if it's a pure open build or if custom sources are to be used.
14418 
14419   # Check whether --enable-openjdk-only was given.
14420 if test "${enable_openjdk_only+set}" = set; then :
14421   enableval=$enable_openjdk_only;
14422 else
14423   enable_openjdk_only="no"
14424 fi
14425 
14426 
14427   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14428 $as_echo_n "checking for presence of closed sources... " >&6; }
14429   if test -d "$SRC_ROOT/jdk/src/closed"; then
14430     CLOSED_SOURCE_PRESENT=yes
14431   else
14432     CLOSED_SOURCE_PRESENT=no
14433   fi
14434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14435 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14436 
14437   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14438 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14439   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14441 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14442 
14443   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14444     OPENJDK=true
14445     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14446       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14447 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14448     fi
14449   else
14450     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14451       OPENJDK=true
14452     else
14453       OPENJDK=false
14454     fi
14455   fi
14456 
14457   if test "x$OPENJDK" = "xtrue"; then
14458     SET_OPENJDK="OPENJDK=true"
14459   fi
14460 
14461 
14462 
14463   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14464   # the IncludeCustomExtension macro.
14465 
14466 
14467 # Check whether --with-custom-make-dir was given.
14468 if test "${with_custom_make_dir+set}" = set; then :
14469   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
14470 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14471 fi
14472 
14473 
14474 
14475 
14476 # These are needed to be able to create a configuration name (and thus the output directory)
14477 
14478   ###############################################################################
14479   #
14480   # Check which variant of the JDK that we want to build.
14481   # Currently we have:
14482   #    normal:   standard edition
14483   # but the custom make system may add other variants
14484   #
14485   # Effectively the JDK variant gives a name to a specific set of
14486   # modules to compile into the JDK. In the future, these modules
14487   # might even be Jigsaw modules.
14488   #
14489   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14490 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14491 
14492 # Check whether --with-jdk-variant was given.
14493 if test "${with_jdk_variant+set}" = set; then :
14494   withval=$with_jdk_variant;
14495 fi
14496 
14497 
14498   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14499     JDK_VARIANT="normal"
14500   else
14501     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14502   fi
14503 
14504 
14505 
14506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14507 $as_echo "$JDK_VARIANT" >&6; }
14508 
14509 
14510 ###############################################################################
14511 #
14512 # Check which interpreter of the JVM we want to build.
14513 # Currently we have:
14514 #    template: Template interpreter (the default)
14515 #    cpp     : C++ interpreter
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14517 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14518 
14519 # Check whether --with-jvm-interpreter was given.
14520 if test "${with_jvm_interpreter+set}" = set; then :
14521   withval=$with_jvm_interpreter;
14522 fi
14523 
14524 
14525 if test "x$with_jvm_interpreter" = x; then
14526      with_jvm_interpreter="template"
14527 fi
14528 
14529 JVM_INTERPRETER="$with_jvm_interpreter"
14530 
14531 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14532    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14533 fi
14534 
14535 
14536 
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14538 $as_echo "$with_jvm_interpreter" >&6; }
14539 
14540 
14541 
14542   ###############################################################################
14543   #
14544   # Check which variants of the JVM that we want to build.
14545   # Currently we have:
14546   #    server: normal interpreter and a tiered C1/C2 compiler
14547   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14548   #    minimal1: reduced form of client with optional VM services and features stripped out
14549   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14550   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14551   #    zero: no machine code interpreter, no compiler
14552   #    zeroshark: zero interpreter and shark/llvm compiler backend
14553 #    core: interpreter only, no compiler (only works on some platforms)
14554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14555 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14556 
14557 # Check whether --with-jvm-variants was given.
14558 if test "${with_jvm_variants+set}" = set; then :
14559   withval=$with_jvm_variants;
14560 fi
14561 
14562 
14563   if test "x$with_jvm_variants" = x; then
14564     with_jvm_variants="server"
14565   fi
14566 
14567   JVM_VARIANTS=",$with_jvm_variants,"
14568   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14569 
14570   if test "x$TEST_VARIANTS" != "x,"; then
14571      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14572   fi
14573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14574 $as_echo "$with_jvm_variants" >&6; }
14575 
14576   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14577   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14578   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14579   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14580   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14581   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14582   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14583 
14584   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14585     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14586       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14587     fi
14588   fi
14589   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14590     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14591       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14592     fi
14593   fi
14594   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14595     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14596       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14597     fi
14598   fi
14599 
14600   # Replace the commas with AND for use in the build directory name.
14601   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14602   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14603   if test "x$COUNT_VARIANTS" != "x,1"; then
14604     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14605   else
14606     BUILDING_MULTIPLE_JVM_VARIANTS=no
14607   fi
14608 
14609 
14610 
14611 
14612 
14613 
14614 
14615 
14616 
14617 
14618   INCLUDE_SA=true
14619   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14620     INCLUDE_SA=false
14621   fi
14622   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14623     INCLUDE_SA=false
14624   fi
14625   if test "x$OPENJDK_TARGET_OS" = xaix ; then
14626     INCLUDE_SA=false
14627   fi
14628 
14629 
14630   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14631     MACOSX_UNIVERSAL="true"
14632   fi
14633 
14634 
14635 
14636 
14637   ###############################################################################
14638   #
14639   # Set the debug level
14640   #    release: no debug information, all optimizations, no asserts.
14641   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14642   #    fastdebug: debug information (-g), all optimizations, all asserts
14643   #    slowdebug: debug information (-g), no optimizations, all asserts
14644   #
14645   DEBUG_LEVEL="release"
14646   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14647 $as_echo_n "checking which debug level to use... " >&6; }
14648   # Check whether --enable-debug was given.
14649 if test "${enable_debug+set}" = set; then :
14650   enableval=$enable_debug;
14651         ENABLE_DEBUG="${enableval}"
14652         DEBUG_LEVEL="fastdebug"
14653 
14654 else
14655   ENABLE_DEBUG="no"
14656 fi
14657 
14658 
14659 
14660 # Check whether --with-debug-level was given.
14661 if test "${with_debug_level+set}" = set; then :
14662   withval=$with_debug_level;
14663         DEBUG_LEVEL="${withval}"
14664         if test "x$ENABLE_DEBUG" = xyes; then
14665           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14666         fi
14667 
14668 fi
14669 
14670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14671 $as_echo "$DEBUG_LEVEL" >&6; }
14672 
14673   if test "x$DEBUG_LEVEL" != xrelease && \
14674       test "x$DEBUG_LEVEL" != xoptimized && \
14675       test "x$DEBUG_LEVEL" != xfastdebug && \
14676       test "x$DEBUG_LEVEL" != xslowdebug; then
14677     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14678   fi
14679 
14680 
14681   ###############################################################################
14682   #
14683   # Setup legacy vars/targets and new vars to deal with different debug levels.
14684   #
14685 
14686   case $DEBUG_LEVEL in
14687     release )
14688       VARIANT="OPT"
14689       FASTDEBUG="false"
14690       DEBUG_CLASSFILES="false"
14691       BUILD_VARIANT_RELEASE=""
14692       HOTSPOT_DEBUG_LEVEL="product"
14693       HOTSPOT_EXPORT="product"
14694       ;;
14695     fastdebug )
14696       VARIANT="DBG"
14697       FASTDEBUG="true"
14698       DEBUG_CLASSFILES="true"
14699       BUILD_VARIANT_RELEASE="-fastdebug"
14700       HOTSPOT_DEBUG_LEVEL="fastdebug"
14701       HOTSPOT_EXPORT="fastdebug"
14702       ;;
14703     slowdebug )
14704       VARIANT="DBG"
14705       FASTDEBUG="false"
14706       DEBUG_CLASSFILES="true"
14707       BUILD_VARIANT_RELEASE="-debug"
14708       HOTSPOT_DEBUG_LEVEL="debug"
14709       HOTSPOT_EXPORT="debug"
14710       ;;
14711     optimized )
14712       VARIANT="OPT"
14713       FASTDEBUG="false"
14714       DEBUG_CLASSFILES="false"
14715       BUILD_VARIANT_RELEASE="-optimized"
14716       HOTSPOT_DEBUG_LEVEL="optimized"
14717       HOTSPOT_EXPORT="optimized"
14718       ;;
14719   esac
14720 
14721   # The debug level 'optimized' is a little special because it is currently only
14722   # applicable to the HotSpot build where it means to build a completely
14723   # optimized version of the VM without any debugging code (like for the
14724   # 'release' debug level which is called 'product' in the HotSpot build) but
14725   # with the exception that it can contain additional code which is otherwise
14726   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14727   # test new and/or experimental features which are not intended for customer
14728   # shipment. Because these new features need to be tested and benchmarked in
14729   # real world scenarios, we want to build the containing JDK at the 'release'
14730   # debug level.
14731   if test "x$DEBUG_LEVEL" = xoptimized; then
14732     DEBUG_LEVEL="release"
14733   fi
14734 
14735   #####
14736   # Generate the legacy makefile targets for hotspot.
14737   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14738   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14739   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14740   # But until then ...
14741   HOTSPOT_TARGET=""
14742 
14743   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14744     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14745   fi
14746 
14747   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14748     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14749   fi
14750 
14751   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14752     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14753   fi
14754 
14755   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14756     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14757   fi
14758 
14759   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14760     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14761   fi
14762 
14763   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14764     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14765   fi
14766 
14767   if test "x$JVM_VARIANT_CORE" = xtrue; then
14768     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14769   fi
14770 
14771   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14772 
14773   # On Macosx universal binaries are produced, but they only contain
14774   # 64 bit intel. This invalidates control of which jvms are built
14775   # from configure, but only server is valid anyway. Fix this
14776   # when hotspot makefiles are rewritten.
14777   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14778     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14779   fi
14780 
14781   #####
14782 
14783 
14784 
14785 
14786 
14787 
14788 
14789 
14790 # With basic setup done, call the custom early hook.
14791 
14792 
14793 # Check if we have devkits, extra paths or sysroot set.
14794 
14795 
14796 # Check whether --with-devkit was given.
14797 if test "${with_devkit+set}" = set; then :
14798   withval=$with_devkit;
14799 
14800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14801 
14802   # Input might be given as Windows format, start by converting to
14803   # unix format.
14804   path="$with_devkit"
14805   new_path=`$CYGPATH -u "$path"`
14806 
14807   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14808   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14809   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14810   # "foo.exe" is OK but "foo" is an error.
14811   #
14812   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14813   # It is also a way to make sure we got the proper file name for the real test later on.
14814   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14815   if test "x$test_shortpath" = x; then
14816     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14817 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14818     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14819   fi
14820 
14821   # Call helper function which possibly converts this using DOS-style short mode.
14822   # If so, the updated path is stored in $new_path.
14823 
14824   input_path="$new_path"
14825   # Check if we need to convert this using DOS-style short mode. If the path
14826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14827   # take no chances and rewrite it.
14828   # Note: m4 eats our [], so we need to use [ and ] instead.
14829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14830   if test "x$has_forbidden_chars" != x; then
14831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14835       # Going to short mode and back again did indeed matter. Since short mode is
14836       # case insensitive, let's make it lowercase to improve readability.
14837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14838       # Now convert it back to Unix-stile (cygpath)
14839       input_path=`$CYGPATH -u "$shortmode_path"`
14840       new_path="$input_path"
14841     fi
14842   fi
14843 
14844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14845   if test "x$test_cygdrive_prefix" = x; then
14846     # As a simple fix, exclude /usr/bin since it's not a real path.
14847     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14849       # a path prefixed by /cygdrive for fixpath to work.
14850       new_path="$CYGWIN_ROOT_PATH$input_path"
14851     fi
14852   fi
14853 
14854 
14855   if test "x$path" != "x$new_path"; then
14856     with_devkit="$new_path"
14857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14858 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14859   fi
14860 
14861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14862 
14863   path="$with_devkit"
14864   has_colon=`$ECHO $path | $GREP ^.:`
14865   new_path="$path"
14866   if test "x$has_colon" = x; then
14867     # Not in mixed or Windows style, start by that.
14868     new_path=`cmd //c echo $path`
14869   fi
14870 
14871 
14872   input_path="$new_path"
14873   # Check if we need to convert this using DOS-style short mode. If the path
14874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14875   # take no chances and rewrite it.
14876   # Note: m4 eats our [], so we need to use [ and ] instead.
14877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14878   if test "x$has_forbidden_chars" != x; then
14879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14880     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14881   fi
14882 
14883 
14884   windows_path="$new_path"
14885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14886     unix_path=`$CYGPATH -u "$windows_path"`
14887     new_path="$unix_path"
14888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14890     new_path="$unix_path"
14891   fi
14892 
14893   if test "x$path" != "x$new_path"; then
14894     with_devkit="$new_path"
14895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14896 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14897   fi
14898 
14899   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14900   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14901 
14902   else
14903     # We're on a unix platform. Hooray! :)
14904     path="$with_devkit"
14905     has_space=`$ECHO "$path" | $GREP " "`
14906     if test "x$has_space" != x; then
14907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14908 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14909       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14910     fi
14911 
14912     # Use eval to expand a potential ~
14913     eval path="$path"
14914     if test ! -f "$path" && test ! -d "$path"; then
14915       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14916     fi
14917 
14918     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14919   fi
14920 
14921         DEVKIT_ROOT="$with_devkit"
14922         # Check for a meta data info file in the root of the devkit
14923         if test -f "$DEVKIT_ROOT/devkit.info"; then
14924           # This potentially sets the following:
14925           # DEVKIT_NAME: A descriptive name of the devkit
14926           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14927           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14928           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14929           . $DEVKIT_ROOT/devkit.info
14930         fi
14931 
14932         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14933 $as_echo_n "checking for devkit... " >&6; }
14934         if test "x$DEVKIT_NAME" != x; then
14935           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14936 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14937         else
14938           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14939 $as_echo "$DEVKIT_ROOT" >&6; }
14940         fi
14941 
14942         if test "x$DEVKIT_EXTRA_PATH" != x; then
14943 
14944   if test "x$DEVKIT_EXTRA_PATH" != x; then
14945     if test "x$EXTRA_PATH" = x; then
14946       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14947     else
14948       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14949     fi
14950   fi
14951 
14952         fi
14953 
14954         # Fallback default of just /bin if DEVKIT_PATH is not defined
14955         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14956           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14957         fi
14958 
14959   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14960     if test "x$TOOLCHAIN_PATH" = x; then
14961       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14962     else
14963       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14964     fi
14965   fi
14966 
14967 
14968         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14969         # places for backwards compatiblity.
14970         if test "x$DEVKIT_SYSROOT" != x; then
14971           SYSROOT="$DEVKIT_SYSROOT"
14972         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14973           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14974         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14975           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14976         fi
14977 
14978 
14979 fi
14980 
14981 
14982   # You can force the sysroot if the sysroot encoded into the compiler tools
14983   # is not correct.
14984 
14985 # Check whether --with-sys-root was given.
14986 if test "${with_sys_root+set}" = set; then :
14987   withval=$with_sys_root; SYSROOT=$with_sys_root
14988 
14989 fi
14990 
14991 
14992 
14993 # Check whether --with-sysroot was given.
14994 if test "${with_sysroot+set}" = set; then :
14995   withval=$with_sysroot; SYSROOT=$with_sysroot
14996 
14997 fi
14998 
14999 
15000 
15001 # Check whether --with-tools-dir was given.
15002 if test "${with_tools_dir+set}" = set; then :
15003   withval=$with_tools_dir;
15004   if test "x$with_tools_dir" != x; then
15005     if test "x$TOOLCHAIN_PATH" = x; then
15006       TOOLCHAIN_PATH="$with_tools_dir"
15007     else
15008       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15009     fi
15010   fi
15011 
15012 
15013 fi
15014 
15015 
15016 
15017 # Check whether --with-toolchain-path was given.
15018 if test "${with_toolchain_path+set}" = set; then :
15019   withval=$with_toolchain_path;
15020   if test "x$with_toolchain_path" != x; then
15021     if test "x$TOOLCHAIN_PATH" = x; then
15022       TOOLCHAIN_PATH="$with_toolchain_path"
15023     else
15024       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15025     fi
15026   fi
15027 
15028 
15029 fi
15030 
15031 
15032 
15033 # Check whether --with-extra-path was given.
15034 if test "${with_extra_path+set}" = set; then :
15035   withval=$with_extra_path;
15036   if test "x$with_extra_path" != x; then
15037     if test "x$EXTRA_PATH" = x; then
15038       EXTRA_PATH="$with_extra_path"
15039     else
15040       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15041     fi
15042   fi
15043 
15044 
15045 fi
15046 
15047 
15048   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15049     # detect if Xcode is installed by running xcodebuild -version
15050     # if no Xcode installed, xcodebuild exits with 1
15051     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15052     if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15053       # We need to use xcodebuild in the toolchain dir provided by the user, this will
15054       # fall back on the stub binary in /usr/bin/xcodebuild
15055       # Extract the first word of "xcodebuild", so it can be a program name with args.
15056 set dummy xcodebuild; ac_word=$2
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15058 $as_echo_n "checking for $ac_word... " >&6; }
15059 if ${ac_cv_path_XCODEBUILD+:} false; then :
15060   $as_echo_n "(cached) " >&6
15061 else
15062   case $XCODEBUILD in
15063   [\\/]* | ?:[\\/]*)
15064   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15065   ;;
15066   *)
15067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15068 for as_dir in $TOOLCHAIN_PATH
15069 do
15070   IFS=$as_save_IFS
15071   test -z "$as_dir" && as_dir=.
15072     for ac_exec_ext in '' $ac_executable_extensions; do
15073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15074     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15076     break 2
15077   fi
15078 done
15079   done
15080 IFS=$as_save_IFS
15081 
15082   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15083   ;;
15084 esac
15085 fi
15086 XCODEBUILD=$ac_cv_path_XCODEBUILD
15087 if test -n "$XCODEBUILD"; then
15088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15089 $as_echo "$XCODEBUILD" >&6; }
15090 else
15091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15092 $as_echo "no" >&6; }
15093 fi
15094 
15095 
15096     else
15097       # this should result in SYSROOT being empty, unless --with-sysroot is provided
15098       # when only the command line tools are installed there are no SDKs, so headers
15099       # are copied into the system frameworks
15100       XCODEBUILD=
15101 
15102     fi
15103 
15104     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15105 $as_echo_n "checking for sdk name... " >&6; }
15106 
15107 # Check whether --with-sdk-name was given.
15108 if test "${with_sdk_name+set}" = set; then :
15109   withval=$with_sdk_name; SDKNAME=$with_sdk_name
15110 
15111 fi
15112 
15113     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15114 $as_echo "$SDKNAME" >&6; }
15115 
15116     # if toolchain path is specified then don't rely on system headers, they may not compile
15117     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15118     test -z "$TOOLCHAIN_PATH" && \
15119       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15120 
15121     if test -z "$SYSROOT"; then
15122       if test -n "$XCODEBUILD"; then
15123         # if we don't have system headers, use default SDK name (last resort)
15124         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15125           SDKNAME=${SDKNAME:-macosx}
15126         fi
15127 
15128         if test -n "$SDKNAME"; then
15129           # Call xcodebuild to determine SYSROOT
15130           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15131         fi
15132       else
15133         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15134           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
15135         fi
15136       fi
15137     else
15138       # warn user if --with-sdk-name was also set
15139       if test -n "$with_sdk_name"; then
15140         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15141 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15142       fi
15143     fi
15144 
15145     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15146       # If no system framework headers, then SYSROOT must be set, or we won't build
15147       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
15148     fi
15149 
15150     # Perform a basic sanity test
15151     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15152       if test -z "$SYSROOT"; then
15153         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
15154       else
15155         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15156       fi
15157     fi
15158 
15159     # set SDKROOT too, Xcode tools will pick it up
15160     SDKROOT=$SYSROOT
15161 
15162   fi
15163 
15164   # Prepend the extra path to the global path
15165 
15166   if test "x$EXTRA_PATH" != x; then
15167     if test "x$PATH" = x; then
15168       PATH="$EXTRA_PATH"
15169     else
15170       PATH="$EXTRA_PATH:$PATH"
15171     fi
15172   fi
15173 
15174 
15175   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15176     # Add extra search paths on solaris for utilities like ar and as etc...
15177     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15178   fi
15179 
15180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15181 $as_echo_n "checking for sysroot... " >&6; }
15182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15183 $as_echo "$SYSROOT" >&6; }
15184   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15185 $as_echo_n "checking for toolchain path... " >&6; }
15186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15187 $as_echo "$TOOLCHAIN_PATH" >&6; }
15188   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15189 $as_echo_n "checking for extra path... " >&6; }
15190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15191 $as_echo "$EXTRA_PATH" >&6; }
15192 
15193 
15194 # To properly create a configuration name, we need to have the OpenJDK target
15195 # and options (variants and debug level) parsed.
15196 
15197 
15198 
15199 # Check whether --with-conf-name was given.
15200 if test "${with_conf_name+set}" = set; then :
15201   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15202 fi
15203 
15204 
15205   # Test from where we are running configure, in or outside of src root.
15206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15207 $as_echo_n "checking where to store configuration... " >&6; }
15208   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15209       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15210       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15211     # We are running configure from the src root.
15212     # Create a default ./build/target-variant-debuglevel output root.
15213     if test "x${CONF_NAME}" = x; then
15214       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15215 $as_echo "in default location" >&6; }
15216       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15217     else
15218       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15219 $as_echo "in build directory with custom name" >&6; }
15220     fi
15221     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15222     $MKDIR -p "$OUTPUT_ROOT"
15223     if test ! -d "$OUTPUT_ROOT"; then
15224       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15225     fi
15226   else
15227     # We are running configure from outside of the src dir.
15228     # Then use the current directory as output dir!
15229     # If configuration is situated in normal build directory, just use the build
15230     # directory name as configuration name, otherwise use the complete path.
15231     if test "x${CONF_NAME}" = x; then
15232       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15233     fi
15234     OUTPUT_ROOT="$CURDIR"
15235     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15236 $as_echo "in current directory" >&6; }
15237 
15238     # WARNING: This might be a bad thing to do. You need to be sure you want to
15239     # have a configuration in this directory. Do some sanity checks!
15240 
15241     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15242       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15243       # other files
15244       files_present=`$LS $OUTPUT_ROOT`
15245       # Configure has already touched config.log and confdefs.h in the current dir when this check
15246       # is performed.
15247       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15248       | $TR -d '\n'`
15249       if test "x$filtered_files" != x; then
15250         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15251 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15252         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15253 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15254         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15255 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15256         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15257 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15258         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15259 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15260         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15261 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15262         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15263 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15264         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15265       fi
15266     fi
15267   fi
15268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15269 $as_echo_n "checking what configuration name to use... " >&6; }
15270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15271 $as_echo "$CONF_NAME" >&6; }
15272 
15273 
15274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15275 
15276   # Input might be given as Windows format, start by converting to
15277   # unix format.
15278   path="$OUTPUT_ROOT"
15279   new_path=`$CYGPATH -u "$path"`
15280 
15281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15284   # "foo.exe" is OK but "foo" is an error.
15285   #
15286   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15287   # It is also a way to make sure we got the proper file name for the real test later on.
15288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15289   if test "x$test_shortpath" = x; then
15290     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15291 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15292     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15293   fi
15294 
15295   # Call helper function which possibly converts this using DOS-style short mode.
15296   # If so, the updated path is stored in $new_path.
15297 
15298   input_path="$new_path"
15299   # Check if we need to convert this using DOS-style short mode. If the path
15300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15301   # take no chances and rewrite it.
15302   # Note: m4 eats our [], so we need to use [ and ] instead.
15303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15304   if test "x$has_forbidden_chars" != x; then
15305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15309       # Going to short mode and back again did indeed matter. Since short mode is
15310       # case insensitive, let's make it lowercase to improve readability.
15311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15312       # Now convert it back to Unix-stile (cygpath)
15313       input_path=`$CYGPATH -u "$shortmode_path"`
15314       new_path="$input_path"
15315     fi
15316   fi
15317 
15318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15319   if test "x$test_cygdrive_prefix" = x; then
15320     # As a simple fix, exclude /usr/bin since it's not a real path.
15321     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15323       # a path prefixed by /cygdrive for fixpath to work.
15324       new_path="$CYGWIN_ROOT_PATH$input_path"
15325     fi
15326   fi
15327 
15328 
15329   if test "x$path" != "x$new_path"; then
15330     OUTPUT_ROOT="$new_path"
15331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15332 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15333   fi
15334 
15335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15336 
15337   path="$OUTPUT_ROOT"
15338   has_colon=`$ECHO $path | $GREP ^.:`
15339   new_path="$path"
15340   if test "x$has_colon" = x; then
15341     # Not in mixed or Windows style, start by that.
15342     new_path=`cmd //c echo $path`
15343   fi
15344 
15345 
15346   input_path="$new_path"
15347   # Check if we need to convert this using DOS-style short mode. If the path
15348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15349   # take no chances and rewrite it.
15350   # Note: m4 eats our [], so we need to use [ and ] instead.
15351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15352   if test "x$has_forbidden_chars" != x; then
15353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15355   fi
15356 
15357 
15358   windows_path="$new_path"
15359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15360     unix_path=`$CYGPATH -u "$windows_path"`
15361     new_path="$unix_path"
15362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15364     new_path="$unix_path"
15365   fi
15366 
15367   if test "x$path" != "x$new_path"; then
15368     OUTPUT_ROOT="$new_path"
15369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15370 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15371   fi
15372 
15373   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15374   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15375 
15376   else
15377     # We're on a unix platform. Hooray! :)
15378     path="$OUTPUT_ROOT"
15379     has_space=`$ECHO "$path" | $GREP " "`
15380     if test "x$has_space" != x; then
15381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15382 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15383       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15384     fi
15385 
15386     # Use eval to expand a potential ~
15387     eval path="$path"
15388     if test ! -f "$path" && test ! -d "$path"; then
15389       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15390     fi
15391 
15392     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15393   fi
15394 
15395 
15396   SPEC=$OUTPUT_ROOT/spec.gmk
15397 
15398   CONF_NAME=$CONF_NAME
15399 
15400   OUTPUT_ROOT=$OUTPUT_ROOT
15401 
15402 
15403   # The spec.gmk file contains all variables for the make system.
15404   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15405 
15406   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15407   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15408 
15409   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15410   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15411 
15412   # The compare.sh is used to compare the build output to other builds.
15413   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15414 
15415   # The generated Makefile knows where the spec.gmk is and where the source is.
15416   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15417   # which will look for generated configurations
15418   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15419 
15420 
15421 
15422 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15423 
15424   for ac_prog in apt-get yum port pkgutil pkgadd
15425 do
15426   # Extract the first word of "$ac_prog", so it can be a program name with args.
15427 set dummy $ac_prog; ac_word=$2
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15429 $as_echo_n "checking for $ac_word... " >&6; }
15430 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15431   $as_echo_n "(cached) " >&6
15432 else
15433   if test -n "$PKGHANDLER"; then
15434   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15435 else
15436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15437 for as_dir in $PATH
15438 do
15439   IFS=$as_save_IFS
15440   test -z "$as_dir" && as_dir=.
15441     for ac_exec_ext in '' $ac_executable_extensions; do
15442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15443     ac_cv_prog_PKGHANDLER="$ac_prog"
15444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15445     break 2
15446   fi
15447 done
15448   done
15449 IFS=$as_save_IFS
15450 
15451 fi
15452 fi
15453 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15454 if test -n "$PKGHANDLER"; then
15455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15456 $as_echo "$PKGHANDLER" >&6; }
15457 else
15458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15459 $as_echo "no" >&6; }
15460 fi
15461 
15462 
15463   test -n "$PKGHANDLER" && break
15464 done
15465 
15466 
15467 
15468 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15469 
15470 
15471   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15472   if test "x$MAKE" != x; then
15473     # User has supplied a make, test it.
15474     if test ! -f "$MAKE"; then
15475       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15476     fi
15477 
15478   MAKE_CANDIDATE=""$MAKE""
15479   DESCRIPTION="user supplied MAKE=$MAKE"
15480   if test "x$MAKE_CANDIDATE" != x; then
15481     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15482 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15483     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15484     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15485     if test "x$IS_GNU_MAKE" = x; then
15486       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15487 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15488     else
15489       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15490       if test "x$IS_MODERN_MAKE" = x; then
15491         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15492 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15493       else
15494         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15495           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15496             MAKE_EXPECTED_ENV='cygwin'
15497           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15498             MAKE_EXPECTED_ENV='msys'
15499           else
15500             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15501           fi
15502           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15503           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15504         else
15505           # Not relevant for non-Windows
15506           IS_MAKE_CORRECT_ENV=true
15507         fi
15508         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15509           { $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
15510 $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;}
15511         else
15512           FOUND_MAKE=$MAKE_CANDIDATE
15513 
15514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15515 
15516   # First separate the path from the arguments. This will split at the first
15517   # space.
15518   complete="$FOUND_MAKE"
15519   path="${complete%% *}"
15520   tmp="$complete EOL"
15521   arguments="${tmp#* }"
15522 
15523   # Input might be given as Windows format, start by converting to
15524   # unix format.
15525   new_path=`$CYGPATH -u "$path"`
15526 
15527   # Now try to locate executable using which
15528   new_path=`$WHICH "$new_path" 2> /dev/null`
15529   # bat and cmd files are not always considered executable in cygwin causing which
15530   # to not find them
15531   if test "x$new_path" = x \
15532       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15533       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15534     new_path=`$CYGPATH -u "$path"`
15535   fi
15536   if test "x$new_path" = x; then
15537     # Oops. Which didn't find the executable.
15538     # The splitting of arguments from the executable at a space might have been incorrect,
15539     # since paths with space are more likely in Windows. Give it another try with the whole
15540     # argument.
15541     path="$complete"
15542     arguments="EOL"
15543     new_path=`$CYGPATH -u "$path"`
15544     new_path=`$WHICH "$new_path" 2> /dev/null`
15545     # bat and cmd files are not always considered executable in cygwin causing which
15546     # to not find them
15547     if test "x$new_path" = x \
15548         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15549         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15550       new_path=`$CYGPATH -u "$path"`
15551     fi
15552     if test "x$new_path" = x; then
15553       # It's still not found. Now this is an unrecoverable error.
15554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15555 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15556       has_space=`$ECHO "$complete" | $GREP " "`
15557       if test "x$has_space" != x; then
15558         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15559 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15560       fi
15561       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15562     fi
15563   fi
15564 
15565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15568   # "foo.exe" is OK but "foo" is an error.
15569   #
15570   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15571   # It is also a way to make sure we got the proper file name for the real test later on.
15572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15573   if test "x$test_shortpath" = x; then
15574     # Short path failed, file does not exist as specified.
15575     # Try adding .exe or .cmd
15576     if test -f "${new_path}.exe"; then
15577       input_to_shortpath="${new_path}.exe"
15578     elif test -f "${new_path}.cmd"; then
15579       input_to_shortpath="${new_path}.cmd"
15580     else
15581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15582 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15583       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15584 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15585       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15586     fi
15587   else
15588     input_to_shortpath="$new_path"
15589   fi
15590 
15591   # Call helper function which possibly converts this using DOS-style short mode.
15592   # If so, the updated path is stored in $new_path.
15593   new_path="$input_to_shortpath"
15594 
15595   input_path="$input_to_shortpath"
15596   # Check if we need to convert this using DOS-style short mode. If the path
15597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15598   # take no chances and rewrite it.
15599   # Note: m4 eats our [], so we need to use [ and ] instead.
15600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15601   if test "x$has_forbidden_chars" != x; then
15602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15603     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15604     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15605     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15606       # Going to short mode and back again did indeed matter. Since short mode is
15607       # case insensitive, let's make it lowercase to improve readability.
15608       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15609       # Now convert it back to Unix-stile (cygpath)
15610       input_path=`$CYGPATH -u "$shortmode_path"`
15611       new_path="$input_path"
15612     fi
15613   fi
15614 
15615   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15616   if test "x$test_cygdrive_prefix" = x; then
15617     # As a simple fix, exclude /usr/bin since it's not a real path.
15618     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15619       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15620       # a path prefixed by /cygdrive for fixpath to work.
15621       new_path="$CYGWIN_ROOT_PATH$input_path"
15622     fi
15623   fi
15624 
15625   # remove trailing .exe if any
15626   new_path="${new_path/%.exe/}"
15627 
15628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15629 
15630   # First separate the path from the arguments. This will split at the first
15631   # space.
15632   complete="$FOUND_MAKE"
15633   path="${complete%% *}"
15634   tmp="$complete EOL"
15635   arguments="${tmp#* }"
15636 
15637   # Input might be given as Windows format, start by converting to
15638   # unix format.
15639   new_path="$path"
15640 
15641   windows_path="$new_path"
15642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15643     unix_path=`$CYGPATH -u "$windows_path"`
15644     new_path="$unix_path"
15645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15647     new_path="$unix_path"
15648   fi
15649 
15650 
15651   # Now try to locate executable using which
15652   new_path=`$WHICH "$new_path" 2> /dev/null`
15653 
15654   if test "x$new_path" = x; then
15655     # Oops. Which didn't find the executable.
15656     # The splitting of arguments from the executable at a space might have been incorrect,
15657     # since paths with space are more likely in Windows. Give it another try with the whole
15658     # argument.
15659     path="$complete"
15660     arguments="EOL"
15661     new_path="$path"
15662 
15663   windows_path="$new_path"
15664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15665     unix_path=`$CYGPATH -u "$windows_path"`
15666     new_path="$unix_path"
15667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15669     new_path="$unix_path"
15670   fi
15671 
15672 
15673     new_path=`$WHICH "$new_path" 2> /dev/null`
15674     # bat and cmd files are not always considered executable in MSYS causing which
15675     # to not find them
15676     if test "x$new_path" = x \
15677         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15678         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15679       new_path="$path"
15680 
15681   windows_path="$new_path"
15682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15683     unix_path=`$CYGPATH -u "$windows_path"`
15684     new_path="$unix_path"
15685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15687     new_path="$unix_path"
15688   fi
15689 
15690     fi
15691 
15692     if test "x$new_path" = x; then
15693       # It's still not found. Now this is an unrecoverable error.
15694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15695 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15696       has_space=`$ECHO "$complete" | $GREP " "`
15697       if test "x$has_space" != x; then
15698         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15699 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15700       fi
15701       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15702     fi
15703   fi
15704 
15705   # Now new_path has a complete unix path to the binary
15706   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15707     # Keep paths in /bin as-is, but remove trailing .exe if any
15708     new_path="${new_path/%.exe/}"
15709     # Do not save /bin paths to all_fixpath_prefixes!
15710   else
15711     # Not in mixed or Windows style, start by that.
15712     new_path=`cmd //c echo $new_path`
15713 
15714   input_path="$new_path"
15715   # Check if we need to convert this using DOS-style short mode. If the path
15716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15717   # take no chances and rewrite it.
15718   # Note: m4 eats our [], so we need to use [ and ] instead.
15719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15720   if test "x$has_forbidden_chars" != x; then
15721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15723   fi
15724 
15725     # Output is in $new_path
15726 
15727   windows_path="$new_path"
15728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15729     unix_path=`$CYGPATH -u "$windows_path"`
15730     new_path="$unix_path"
15731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15733     new_path="$unix_path"
15734   fi
15735 
15736     # remove trailing .exe if any
15737     new_path="${new_path/%.exe/}"
15738 
15739     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15740     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15741   fi
15742 
15743   else
15744     # We're on a unix platform. Hooray! :)
15745     # First separate the path from the arguments. This will split at the first
15746     # space.
15747     complete="$FOUND_MAKE"
15748     path="${complete%% *}"
15749     tmp="$complete EOL"
15750     arguments="${tmp#* }"
15751 
15752     # Cannot rely on the command "which" here since it doesn't always work.
15753     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15754     if test -z "$is_absolute_path"; then
15755       # Path to executable is not absolute. Find it.
15756       IFS_save="$IFS"
15757       IFS=:
15758       for p in $PATH; do
15759         if test -f "$p/$path" && test -x "$p/$path"; then
15760           new_path="$p/$path"
15761           break
15762         fi
15763       done
15764       IFS="$IFS_save"
15765     else
15766       # This is an absolute path, we can use it without further modifications.
15767       new_path="$path"
15768     fi
15769 
15770     if test "x$new_path" = x; then
15771       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15772 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15773       has_space=`$ECHO "$complete" | $GREP " "`
15774       if test "x$has_space" != x; then
15775         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15777       fi
15778       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15779     fi
15780   fi
15781 
15782   # Now join together the path and the arguments once again
15783   if test "x$arguments" != xEOL; then
15784     new_complete="$new_path ${arguments% *}"
15785   else
15786     new_complete="$new_path"
15787   fi
15788 
15789   if test "x$complete" != "x$new_complete"; then
15790     FOUND_MAKE="$new_complete"
15791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15792 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15793   fi
15794 
15795         fi
15796       fi
15797     fi
15798   fi
15799 
15800     if test "x$FOUND_MAKE" = x; then
15801       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15802     fi
15803   else
15804     # Try our hardest to locate a correct version of GNU make
15805     for ac_prog in gmake
15806 do
15807   # Extract the first word of "$ac_prog", so it can be a program name with args.
15808 set dummy $ac_prog; ac_word=$2
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15810 $as_echo_n "checking for $ac_word... " >&6; }
15811 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15812   $as_echo_n "(cached) " >&6
15813 else
15814   case $CHECK_GMAKE in
15815   [\\/]* | ?:[\\/]*)
15816   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15817   ;;
15818   *)
15819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15820 for as_dir in $PATH
15821 do
15822   IFS=$as_save_IFS
15823   test -z "$as_dir" && as_dir=.
15824     for ac_exec_ext in '' $ac_executable_extensions; do
15825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15826     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15828     break 2
15829   fi
15830 done
15831   done
15832 IFS=$as_save_IFS
15833 
15834   ;;
15835 esac
15836 fi
15837 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15838 if test -n "$CHECK_GMAKE"; then
15839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15840 $as_echo "$CHECK_GMAKE" >&6; }
15841 else
15842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15843 $as_echo "no" >&6; }
15844 fi
15845 
15846 
15847   test -n "$CHECK_GMAKE" && break
15848 done
15849 
15850 
15851   MAKE_CANDIDATE=""$CHECK_GMAKE""
15852   DESCRIPTION="gmake in PATH"
15853   if test "x$MAKE_CANDIDATE" != x; then
15854     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15855 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15856     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15857     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15858     if test "x$IS_GNU_MAKE" = x; then
15859       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15860 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15861     else
15862       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15863       if test "x$IS_MODERN_MAKE" = x; then
15864         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15865 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15866       else
15867         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15868           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15869             MAKE_EXPECTED_ENV='cygwin'
15870           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15871             MAKE_EXPECTED_ENV='msys'
15872           else
15873             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15874           fi
15875           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15876           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15877         else
15878           # Not relevant for non-Windows
15879           IS_MAKE_CORRECT_ENV=true
15880         fi
15881         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15882           { $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
15883 $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;}
15884         else
15885           FOUND_MAKE=$MAKE_CANDIDATE
15886 
15887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15888 
15889   # First separate the path from the arguments. This will split at the first
15890   # space.
15891   complete="$FOUND_MAKE"
15892   path="${complete%% *}"
15893   tmp="$complete EOL"
15894   arguments="${tmp#* }"
15895 
15896   # Input might be given as Windows format, start by converting to
15897   # unix format.
15898   new_path=`$CYGPATH -u "$path"`
15899 
15900   # Now try to locate executable using which
15901   new_path=`$WHICH "$new_path" 2> /dev/null`
15902   # bat and cmd files are not always considered executable in cygwin causing which
15903   # to not find them
15904   if test "x$new_path" = x \
15905       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15906       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15907     new_path=`$CYGPATH -u "$path"`
15908   fi
15909   if test "x$new_path" = x; then
15910     # Oops. Which didn't find the executable.
15911     # The splitting of arguments from the executable at a space might have been incorrect,
15912     # since paths with space are more likely in Windows. Give it another try with the whole
15913     # argument.
15914     path="$complete"
15915     arguments="EOL"
15916     new_path=`$CYGPATH -u "$path"`
15917     new_path=`$WHICH "$new_path" 2> /dev/null`
15918     # bat and cmd files are not always considered executable in cygwin causing which
15919     # to not find them
15920     if test "x$new_path" = x \
15921         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15922         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15923       new_path=`$CYGPATH -u "$path"`
15924     fi
15925     if test "x$new_path" = x; then
15926       # It's still not found. Now this is an unrecoverable error.
15927       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15928 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15929       has_space=`$ECHO "$complete" | $GREP " "`
15930       if test "x$has_space" != x; then
15931         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15932 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15933       fi
15934       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15935     fi
15936   fi
15937 
15938   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15939   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15940   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15941   # "foo.exe" is OK but "foo" is an error.
15942   #
15943   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15944   # It is also a way to make sure we got the proper file name for the real test later on.
15945   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15946   if test "x$test_shortpath" = x; then
15947     # Short path failed, file does not exist as specified.
15948     # Try adding .exe or .cmd
15949     if test -f "${new_path}.exe"; then
15950       input_to_shortpath="${new_path}.exe"
15951     elif test -f "${new_path}.cmd"; then
15952       input_to_shortpath="${new_path}.cmd"
15953     else
15954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15955 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15956       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15957 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15958       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15959     fi
15960   else
15961     input_to_shortpath="$new_path"
15962   fi
15963 
15964   # Call helper function which possibly converts this using DOS-style short mode.
15965   # If so, the updated path is stored in $new_path.
15966   new_path="$input_to_shortpath"
15967 
15968   input_path="$input_to_shortpath"
15969   # Check if we need to convert this using DOS-style short mode. If the path
15970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15971   # take no chances and rewrite it.
15972   # Note: m4 eats our [], so we need to use [ and ] instead.
15973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15974   if test "x$has_forbidden_chars" != x; then
15975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15976     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15977     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15978     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15979       # Going to short mode and back again did indeed matter. Since short mode is
15980       # case insensitive, let's make it lowercase to improve readability.
15981       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15982       # Now convert it back to Unix-stile (cygpath)
15983       input_path=`$CYGPATH -u "$shortmode_path"`
15984       new_path="$input_path"
15985     fi
15986   fi
15987 
15988   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15989   if test "x$test_cygdrive_prefix" = x; then
15990     # As a simple fix, exclude /usr/bin since it's not a real path.
15991     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15992       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15993       # a path prefixed by /cygdrive for fixpath to work.
15994       new_path="$CYGWIN_ROOT_PATH$input_path"
15995     fi
15996   fi
15997 
15998   # remove trailing .exe if any
15999   new_path="${new_path/%.exe/}"
16000 
16001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16002 
16003   # First separate the path from the arguments. This will split at the first
16004   # space.
16005   complete="$FOUND_MAKE"
16006   path="${complete%% *}"
16007   tmp="$complete EOL"
16008   arguments="${tmp#* }"
16009 
16010   # Input might be given as Windows format, start by converting to
16011   # unix format.
16012   new_path="$path"
16013 
16014   windows_path="$new_path"
16015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16016     unix_path=`$CYGPATH -u "$windows_path"`
16017     new_path="$unix_path"
16018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16020     new_path="$unix_path"
16021   fi
16022 
16023 
16024   # Now try to locate executable using which
16025   new_path=`$WHICH "$new_path" 2> /dev/null`
16026 
16027   if test "x$new_path" = x; then
16028     # Oops. Which didn't find the executable.
16029     # The splitting of arguments from the executable at a space might have been incorrect,
16030     # since paths with space are more likely in Windows. Give it another try with the whole
16031     # argument.
16032     path="$complete"
16033     arguments="EOL"
16034     new_path="$path"
16035 
16036   windows_path="$new_path"
16037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16038     unix_path=`$CYGPATH -u "$windows_path"`
16039     new_path="$unix_path"
16040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16042     new_path="$unix_path"
16043   fi
16044 
16045 
16046     new_path=`$WHICH "$new_path" 2> /dev/null`
16047     # bat and cmd files are not always considered executable in MSYS causing which
16048     # to not find them
16049     if test "x$new_path" = x \
16050         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16051         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16052       new_path="$path"
16053 
16054   windows_path="$new_path"
16055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16056     unix_path=`$CYGPATH -u "$windows_path"`
16057     new_path="$unix_path"
16058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16060     new_path="$unix_path"
16061   fi
16062 
16063     fi
16064 
16065     if test "x$new_path" = x; then
16066       # It's still not found. Now this is an unrecoverable error.
16067       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16068 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16069       has_space=`$ECHO "$complete" | $GREP " "`
16070       if test "x$has_space" != x; then
16071         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16072 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16073       fi
16074       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16075     fi
16076   fi
16077 
16078   # Now new_path has a complete unix path to the binary
16079   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16080     # Keep paths in /bin as-is, but remove trailing .exe if any
16081     new_path="${new_path/%.exe/}"
16082     # Do not save /bin paths to all_fixpath_prefixes!
16083   else
16084     # Not in mixed or Windows style, start by that.
16085     new_path=`cmd //c echo $new_path`
16086 
16087   input_path="$new_path"
16088   # Check if we need to convert this using DOS-style short mode. If the path
16089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16090   # take no chances and rewrite it.
16091   # Note: m4 eats our [], so we need to use [ and ] instead.
16092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16093   if test "x$has_forbidden_chars" != x; then
16094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16095     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16096   fi
16097 
16098     # Output is in $new_path
16099 
16100   windows_path="$new_path"
16101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16102     unix_path=`$CYGPATH -u "$windows_path"`
16103     new_path="$unix_path"
16104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16106     new_path="$unix_path"
16107   fi
16108 
16109     # remove trailing .exe if any
16110     new_path="${new_path/%.exe/}"
16111 
16112     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16113     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16114   fi
16115 
16116   else
16117     # We're on a unix platform. Hooray! :)
16118     # First separate the path from the arguments. This will split at the first
16119     # space.
16120     complete="$FOUND_MAKE"
16121     path="${complete%% *}"
16122     tmp="$complete EOL"
16123     arguments="${tmp#* }"
16124 
16125     # Cannot rely on the command "which" here since it doesn't always work.
16126     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16127     if test -z "$is_absolute_path"; then
16128       # Path to executable is not absolute. Find it.
16129       IFS_save="$IFS"
16130       IFS=:
16131       for p in $PATH; do
16132         if test -f "$p/$path" && test -x "$p/$path"; then
16133           new_path="$p/$path"
16134           break
16135         fi
16136       done
16137       IFS="$IFS_save"
16138     else
16139       # This is an absolute path, we can use it without further modifications.
16140       new_path="$path"
16141     fi
16142 
16143     if test "x$new_path" = x; then
16144       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16145 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16146       has_space=`$ECHO "$complete" | $GREP " "`
16147       if test "x$has_space" != x; then
16148         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16149 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16150       fi
16151       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16152     fi
16153   fi
16154 
16155   # Now join together the path and the arguments once again
16156   if test "x$arguments" != xEOL; then
16157     new_complete="$new_path ${arguments% *}"
16158   else
16159     new_complete="$new_path"
16160   fi
16161 
16162   if test "x$complete" != "x$new_complete"; then
16163     FOUND_MAKE="$new_complete"
16164     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16165 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16166   fi
16167 
16168         fi
16169       fi
16170     fi
16171   fi
16172 
16173 
16174     if test "x$FOUND_MAKE" = x; then
16175       for ac_prog in make
16176 do
16177   # Extract the first word of "$ac_prog", so it can be a program name with args.
16178 set dummy $ac_prog; ac_word=$2
16179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16180 $as_echo_n "checking for $ac_word... " >&6; }
16181 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16182   $as_echo_n "(cached) " >&6
16183 else
16184   case $CHECK_MAKE in
16185   [\\/]* | ?:[\\/]*)
16186   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16187   ;;
16188   *)
16189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16190 for as_dir in $PATH
16191 do
16192   IFS=$as_save_IFS
16193   test -z "$as_dir" && as_dir=.
16194     for ac_exec_ext in '' $ac_executable_extensions; do
16195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16196     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16198     break 2
16199   fi
16200 done
16201   done
16202 IFS=$as_save_IFS
16203 
16204   ;;
16205 esac
16206 fi
16207 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16208 if test -n "$CHECK_MAKE"; then
16209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16210 $as_echo "$CHECK_MAKE" >&6; }
16211 else
16212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16213 $as_echo "no" >&6; }
16214 fi
16215 
16216 
16217   test -n "$CHECK_MAKE" && break
16218 done
16219 
16220 
16221   MAKE_CANDIDATE=""$CHECK_MAKE""
16222   DESCRIPTION="make in PATH"
16223   if test "x$MAKE_CANDIDATE" != x; then
16224     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16225 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16226     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16227     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16228     if test "x$IS_GNU_MAKE" = x; then
16229       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16230 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16231     else
16232       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16233       if test "x$IS_MODERN_MAKE" = x; then
16234         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16235 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16236       else
16237         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16238           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16239             MAKE_EXPECTED_ENV='cygwin'
16240           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16241             MAKE_EXPECTED_ENV='msys'
16242           else
16243             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16244           fi
16245           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16246           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16247         else
16248           # Not relevant for non-Windows
16249           IS_MAKE_CORRECT_ENV=true
16250         fi
16251         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16252           { $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
16253 $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;}
16254         else
16255           FOUND_MAKE=$MAKE_CANDIDATE
16256 
16257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16258 
16259   # First separate the path from the arguments. This will split at the first
16260   # space.
16261   complete="$FOUND_MAKE"
16262   path="${complete%% *}"
16263   tmp="$complete EOL"
16264   arguments="${tmp#* }"
16265 
16266   # Input might be given as Windows format, start by converting to
16267   # unix format.
16268   new_path=`$CYGPATH -u "$path"`
16269 
16270   # Now try to locate executable using which
16271   new_path=`$WHICH "$new_path" 2> /dev/null`
16272   # bat and cmd files are not always considered executable in cygwin causing which
16273   # to not find them
16274   if test "x$new_path" = x \
16275       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16276       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16277     new_path=`$CYGPATH -u "$path"`
16278   fi
16279   if test "x$new_path" = x; then
16280     # Oops. Which didn't find the executable.
16281     # The splitting of arguments from the executable at a space might have been incorrect,
16282     # since paths with space are more likely in Windows. Give it another try with the whole
16283     # argument.
16284     path="$complete"
16285     arguments="EOL"
16286     new_path=`$CYGPATH -u "$path"`
16287     new_path=`$WHICH "$new_path" 2> /dev/null`
16288     # bat and cmd files are not always considered executable in cygwin causing which
16289     # to not find them
16290     if test "x$new_path" = x \
16291         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16292         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16293       new_path=`$CYGPATH -u "$path"`
16294     fi
16295     if test "x$new_path" = x; then
16296       # It's still not found. Now this is an unrecoverable error.
16297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16298 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16299       has_space=`$ECHO "$complete" | $GREP " "`
16300       if test "x$has_space" != x; then
16301         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16302 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16303       fi
16304       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16305     fi
16306   fi
16307 
16308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16311   # "foo.exe" is OK but "foo" is an error.
16312   #
16313   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16314   # It is also a way to make sure we got the proper file name for the real test later on.
16315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16316   if test "x$test_shortpath" = x; then
16317     # Short path failed, file does not exist as specified.
16318     # Try adding .exe or .cmd
16319     if test -f "${new_path}.exe"; then
16320       input_to_shortpath="${new_path}.exe"
16321     elif test -f "${new_path}.cmd"; then
16322       input_to_shortpath="${new_path}.cmd"
16323     else
16324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16325 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16326       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16327 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16328       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16329     fi
16330   else
16331     input_to_shortpath="$new_path"
16332   fi
16333 
16334   # Call helper function which possibly converts this using DOS-style short mode.
16335   # If so, the updated path is stored in $new_path.
16336   new_path="$input_to_shortpath"
16337 
16338   input_path="$input_to_shortpath"
16339   # Check if we need to convert this using DOS-style short mode. If the path
16340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16341   # take no chances and rewrite it.
16342   # Note: m4 eats our [], so we need to use [ and ] instead.
16343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16344   if test "x$has_forbidden_chars" != x; then
16345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16346     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16347     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16348     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16349       # Going to short mode and back again did indeed matter. Since short mode is
16350       # case insensitive, let's make it lowercase to improve readability.
16351       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16352       # Now convert it back to Unix-stile (cygpath)
16353       input_path=`$CYGPATH -u "$shortmode_path"`
16354       new_path="$input_path"
16355     fi
16356   fi
16357 
16358   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16359   if test "x$test_cygdrive_prefix" = x; then
16360     # As a simple fix, exclude /usr/bin since it's not a real path.
16361     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16362       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16363       # a path prefixed by /cygdrive for fixpath to work.
16364       new_path="$CYGWIN_ROOT_PATH$input_path"
16365     fi
16366   fi
16367 
16368   # remove trailing .exe if any
16369   new_path="${new_path/%.exe/}"
16370 
16371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372 
16373   # First separate the path from the arguments. This will split at the first
16374   # space.
16375   complete="$FOUND_MAKE"
16376   path="${complete%% *}"
16377   tmp="$complete EOL"
16378   arguments="${tmp#* }"
16379 
16380   # Input might be given as Windows format, start by converting to
16381   # unix format.
16382   new_path="$path"
16383 
16384   windows_path="$new_path"
16385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16386     unix_path=`$CYGPATH -u "$windows_path"`
16387     new_path="$unix_path"
16388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16390     new_path="$unix_path"
16391   fi
16392 
16393 
16394   # Now try to locate executable using which
16395   new_path=`$WHICH "$new_path" 2> /dev/null`
16396 
16397   if test "x$new_path" = x; then
16398     # Oops. Which didn't find the executable.
16399     # The splitting of arguments from the executable at a space might have been incorrect,
16400     # since paths with space are more likely in Windows. Give it another try with the whole
16401     # argument.
16402     path="$complete"
16403     arguments="EOL"
16404     new_path="$path"
16405 
16406   windows_path="$new_path"
16407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16408     unix_path=`$CYGPATH -u "$windows_path"`
16409     new_path="$unix_path"
16410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16412     new_path="$unix_path"
16413   fi
16414 
16415 
16416     new_path=`$WHICH "$new_path" 2> /dev/null`
16417     # bat and cmd files are not always considered executable in MSYS causing which
16418     # to not find them
16419     if test "x$new_path" = x \
16420         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16421         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16422       new_path="$path"
16423 
16424   windows_path="$new_path"
16425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16426     unix_path=`$CYGPATH -u "$windows_path"`
16427     new_path="$unix_path"
16428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16430     new_path="$unix_path"
16431   fi
16432 
16433     fi
16434 
16435     if test "x$new_path" = x; then
16436       # It's still not found. Now this is an unrecoverable error.
16437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16438 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16439       has_space=`$ECHO "$complete" | $GREP " "`
16440       if test "x$has_space" != x; then
16441         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16442 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16443       fi
16444       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16445     fi
16446   fi
16447 
16448   # Now new_path has a complete unix path to the binary
16449   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16450     # Keep paths in /bin as-is, but remove trailing .exe if any
16451     new_path="${new_path/%.exe/}"
16452     # Do not save /bin paths to all_fixpath_prefixes!
16453   else
16454     # Not in mixed or Windows style, start by that.
16455     new_path=`cmd //c echo $new_path`
16456 
16457   input_path="$new_path"
16458   # Check if we need to convert this using DOS-style short mode. If the path
16459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16460   # take no chances and rewrite it.
16461   # Note: m4 eats our [], so we need to use [ and ] instead.
16462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16463   if test "x$has_forbidden_chars" != x; then
16464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16466   fi
16467 
16468     # Output is in $new_path
16469 
16470   windows_path="$new_path"
16471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16472     unix_path=`$CYGPATH -u "$windows_path"`
16473     new_path="$unix_path"
16474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16476     new_path="$unix_path"
16477   fi
16478 
16479     # remove trailing .exe if any
16480     new_path="${new_path/%.exe/}"
16481 
16482     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16483     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16484   fi
16485 
16486   else
16487     # We're on a unix platform. Hooray! :)
16488     # First separate the path from the arguments. This will split at the first
16489     # space.
16490     complete="$FOUND_MAKE"
16491     path="${complete%% *}"
16492     tmp="$complete EOL"
16493     arguments="${tmp#* }"
16494 
16495     # Cannot rely on the command "which" here since it doesn't always work.
16496     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16497     if test -z "$is_absolute_path"; then
16498       # Path to executable is not absolute. Find it.
16499       IFS_save="$IFS"
16500       IFS=:
16501       for p in $PATH; do
16502         if test -f "$p/$path" && test -x "$p/$path"; then
16503           new_path="$p/$path"
16504           break
16505         fi
16506       done
16507       IFS="$IFS_save"
16508     else
16509       # This is an absolute path, we can use it without further modifications.
16510       new_path="$path"
16511     fi
16512 
16513     if test "x$new_path" = x; then
16514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16515 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16516       has_space=`$ECHO "$complete" | $GREP " "`
16517       if test "x$has_space" != x; then
16518         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16519 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16520       fi
16521       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16522     fi
16523   fi
16524 
16525   # Now join together the path and the arguments once again
16526   if test "x$arguments" != xEOL; then
16527     new_complete="$new_path ${arguments% *}"
16528   else
16529     new_complete="$new_path"
16530   fi
16531 
16532   if test "x$complete" != "x$new_complete"; then
16533     FOUND_MAKE="$new_complete"
16534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16535 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16536   fi
16537 
16538         fi
16539       fi
16540     fi
16541   fi
16542 
16543     fi
16544 
16545     if test "x$FOUND_MAKE" = x; then
16546       if test "x$TOOLCHAIN_PATH" != x; then
16547         # We have a toolchain path, check that as well before giving up.
16548         OLD_PATH=$PATH
16549         PATH=$TOOLCHAIN_PATH:$PATH
16550         for ac_prog in gmake
16551 do
16552   # Extract the first word of "$ac_prog", so it can be a program name with args.
16553 set dummy $ac_prog; ac_word=$2
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16555 $as_echo_n "checking for $ac_word... " >&6; }
16556 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16557   $as_echo_n "(cached) " >&6
16558 else
16559   case $CHECK_TOOLSDIR_GMAKE in
16560   [\\/]* | ?:[\\/]*)
16561   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16562   ;;
16563   *)
16564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16565 for as_dir in $PATH
16566 do
16567   IFS=$as_save_IFS
16568   test -z "$as_dir" && as_dir=.
16569     for ac_exec_ext in '' $ac_executable_extensions; do
16570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16571     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16573     break 2
16574   fi
16575 done
16576   done
16577 IFS=$as_save_IFS
16578 
16579   ;;
16580 esac
16581 fi
16582 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16583 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16585 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16586 else
16587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16588 $as_echo "no" >&6; }
16589 fi
16590 
16591 
16592   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16593 done
16594 
16595 
16596   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16597   DESCRIPTION="gmake in tools-dir"
16598   if test "x$MAKE_CANDIDATE" != x; then
16599     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16600 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16601     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16602     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16603     if test "x$IS_GNU_MAKE" = x; then
16604       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16605 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16606     else
16607       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16608       if test "x$IS_MODERN_MAKE" = x; then
16609         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16610 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16611       else
16612         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16613           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16614             MAKE_EXPECTED_ENV='cygwin'
16615           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16616             MAKE_EXPECTED_ENV='msys'
16617           else
16618             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16619           fi
16620           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16621           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16622         else
16623           # Not relevant for non-Windows
16624           IS_MAKE_CORRECT_ENV=true
16625         fi
16626         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16627           { $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
16628 $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;}
16629         else
16630           FOUND_MAKE=$MAKE_CANDIDATE
16631 
16632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16633 
16634   # First separate the path from the arguments. This will split at the first
16635   # space.
16636   complete="$FOUND_MAKE"
16637   path="${complete%% *}"
16638   tmp="$complete EOL"
16639   arguments="${tmp#* }"
16640 
16641   # Input might be given as Windows format, start by converting to
16642   # unix format.
16643   new_path=`$CYGPATH -u "$path"`
16644 
16645   # Now try to locate executable using which
16646   new_path=`$WHICH "$new_path" 2> /dev/null`
16647   # bat and cmd files are not always considered executable in cygwin causing which
16648   # to not find them
16649   if test "x$new_path" = x \
16650       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16651       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16652     new_path=`$CYGPATH -u "$path"`
16653   fi
16654   if test "x$new_path" = x; then
16655     # Oops. Which didn't find the executable.
16656     # The splitting of arguments from the executable at a space might have been incorrect,
16657     # since paths with space are more likely in Windows. Give it another try with the whole
16658     # argument.
16659     path="$complete"
16660     arguments="EOL"
16661     new_path=`$CYGPATH -u "$path"`
16662     new_path=`$WHICH "$new_path" 2> /dev/null`
16663     # bat and cmd files are not always considered executable in cygwin causing which
16664     # to not find them
16665     if test "x$new_path" = x \
16666         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16667         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16668       new_path=`$CYGPATH -u "$path"`
16669     fi
16670     if test "x$new_path" = x; then
16671       # It's still not found. Now this is an unrecoverable error.
16672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16674       has_space=`$ECHO "$complete" | $GREP " "`
16675       if test "x$has_space" != x; then
16676         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16677 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16678       fi
16679       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16680     fi
16681   fi
16682 
16683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16686   # "foo.exe" is OK but "foo" is an error.
16687   #
16688   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16689   # It is also a way to make sure we got the proper file name for the real test later on.
16690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16691   if test "x$test_shortpath" = x; then
16692     # Short path failed, file does not exist as specified.
16693     # Try adding .exe or .cmd
16694     if test -f "${new_path}.exe"; then
16695       input_to_shortpath="${new_path}.exe"
16696     elif test -f "${new_path}.cmd"; then
16697       input_to_shortpath="${new_path}.cmd"
16698     else
16699       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16700 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16701       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16702 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16703       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16704     fi
16705   else
16706     input_to_shortpath="$new_path"
16707   fi
16708 
16709   # Call helper function which possibly converts this using DOS-style short mode.
16710   # If so, the updated path is stored in $new_path.
16711   new_path="$input_to_shortpath"
16712 
16713   input_path="$input_to_shortpath"
16714   # Check if we need to convert this using DOS-style short mode. If the path
16715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16716   # take no chances and rewrite it.
16717   # Note: m4 eats our [], so we need to use [ and ] instead.
16718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16719   if test "x$has_forbidden_chars" != x; then
16720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16721     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16722     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16723     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16724       # Going to short mode and back again did indeed matter. Since short mode is
16725       # case insensitive, let's make it lowercase to improve readability.
16726       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16727       # Now convert it back to Unix-stile (cygpath)
16728       input_path=`$CYGPATH -u "$shortmode_path"`
16729       new_path="$input_path"
16730     fi
16731   fi
16732 
16733   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16734   if test "x$test_cygdrive_prefix" = x; then
16735     # As a simple fix, exclude /usr/bin since it's not a real path.
16736     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16737       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16738       # a path prefixed by /cygdrive for fixpath to work.
16739       new_path="$CYGWIN_ROOT_PATH$input_path"
16740     fi
16741   fi
16742 
16743   # remove trailing .exe if any
16744   new_path="${new_path/%.exe/}"
16745 
16746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16747 
16748   # First separate the path from the arguments. This will split at the first
16749   # space.
16750   complete="$FOUND_MAKE"
16751   path="${complete%% *}"
16752   tmp="$complete EOL"
16753   arguments="${tmp#* }"
16754 
16755   # Input might be given as Windows format, start by converting to
16756   # unix format.
16757   new_path="$path"
16758 
16759   windows_path="$new_path"
16760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16761     unix_path=`$CYGPATH -u "$windows_path"`
16762     new_path="$unix_path"
16763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16765     new_path="$unix_path"
16766   fi
16767 
16768 
16769   # Now try to locate executable using which
16770   new_path=`$WHICH "$new_path" 2> /dev/null`
16771 
16772   if test "x$new_path" = x; then
16773     # Oops. Which didn't find the executable.
16774     # The splitting of arguments from the executable at a space might have been incorrect,
16775     # since paths with space are more likely in Windows. Give it another try with the whole
16776     # argument.
16777     path="$complete"
16778     arguments="EOL"
16779     new_path="$path"
16780 
16781   windows_path="$new_path"
16782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783     unix_path=`$CYGPATH -u "$windows_path"`
16784     new_path="$unix_path"
16785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16787     new_path="$unix_path"
16788   fi
16789 
16790 
16791     new_path=`$WHICH "$new_path" 2> /dev/null`
16792     # bat and cmd files are not always considered executable in MSYS causing which
16793     # to not find them
16794     if test "x$new_path" = x \
16795         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16796         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16797       new_path="$path"
16798 
16799   windows_path="$new_path"
16800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16801     unix_path=`$CYGPATH -u "$windows_path"`
16802     new_path="$unix_path"
16803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16805     new_path="$unix_path"
16806   fi
16807 
16808     fi
16809 
16810     if test "x$new_path" = x; then
16811       # It's still not found. Now this is an unrecoverable error.
16812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16813 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16814       has_space=`$ECHO "$complete" | $GREP " "`
16815       if test "x$has_space" != x; then
16816         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16817 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16818       fi
16819       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16820     fi
16821   fi
16822 
16823   # Now new_path has a complete unix path to the binary
16824   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16825     # Keep paths in /bin as-is, but remove trailing .exe if any
16826     new_path="${new_path/%.exe/}"
16827     # Do not save /bin paths to all_fixpath_prefixes!
16828   else
16829     # Not in mixed or Windows style, start by that.
16830     new_path=`cmd //c echo $new_path`
16831 
16832   input_path="$new_path"
16833   # Check if we need to convert this using DOS-style short mode. If the path
16834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16835   # take no chances and rewrite it.
16836   # Note: m4 eats our [], so we need to use [ and ] instead.
16837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16838   if test "x$has_forbidden_chars" != x; then
16839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16840     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16841   fi
16842 
16843     # Output is in $new_path
16844 
16845   windows_path="$new_path"
16846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16847     unix_path=`$CYGPATH -u "$windows_path"`
16848     new_path="$unix_path"
16849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16851     new_path="$unix_path"
16852   fi
16853 
16854     # remove trailing .exe if any
16855     new_path="${new_path/%.exe/}"
16856 
16857     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16858     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16859   fi
16860 
16861   else
16862     # We're on a unix platform. Hooray! :)
16863     # First separate the path from the arguments. This will split at the first
16864     # space.
16865     complete="$FOUND_MAKE"
16866     path="${complete%% *}"
16867     tmp="$complete EOL"
16868     arguments="${tmp#* }"
16869 
16870     # Cannot rely on the command "which" here since it doesn't always work.
16871     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16872     if test -z "$is_absolute_path"; then
16873       # Path to executable is not absolute. Find it.
16874       IFS_save="$IFS"
16875       IFS=:
16876       for p in $PATH; do
16877         if test -f "$p/$path" && test -x "$p/$path"; then
16878           new_path="$p/$path"
16879           break
16880         fi
16881       done
16882       IFS="$IFS_save"
16883     else
16884       # This is an absolute path, we can use it without further modifications.
16885       new_path="$path"
16886     fi
16887 
16888     if test "x$new_path" = x; then
16889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16890 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16891       has_space=`$ECHO "$complete" | $GREP " "`
16892       if test "x$has_space" != x; then
16893         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16894 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16895       fi
16896       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16897     fi
16898   fi
16899 
16900   # Now join together the path and the arguments once again
16901   if test "x$arguments" != xEOL; then
16902     new_complete="$new_path ${arguments% *}"
16903   else
16904     new_complete="$new_path"
16905   fi
16906 
16907   if test "x$complete" != "x$new_complete"; then
16908     FOUND_MAKE="$new_complete"
16909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16910 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16911   fi
16912 
16913         fi
16914       fi
16915     fi
16916   fi
16917 
16918         if test "x$FOUND_MAKE" = x; then
16919           for ac_prog in make
16920 do
16921   # Extract the first word of "$ac_prog", so it can be a program name with args.
16922 set dummy $ac_prog; ac_word=$2
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16924 $as_echo_n "checking for $ac_word... " >&6; }
16925 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16926   $as_echo_n "(cached) " >&6
16927 else
16928   case $CHECK_TOOLSDIR_MAKE in
16929   [\\/]* | ?:[\\/]*)
16930   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16931   ;;
16932   *)
16933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16934 for as_dir in $PATH
16935 do
16936   IFS=$as_save_IFS
16937   test -z "$as_dir" && as_dir=.
16938     for ac_exec_ext in '' $ac_executable_extensions; do
16939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16940     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16942     break 2
16943   fi
16944 done
16945   done
16946 IFS=$as_save_IFS
16947 
16948   ;;
16949 esac
16950 fi
16951 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16952 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16954 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16955 else
16956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16957 $as_echo "no" >&6; }
16958 fi
16959 
16960 
16961   test -n "$CHECK_TOOLSDIR_MAKE" && break
16962 done
16963 
16964 
16965   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16966   DESCRIPTION="make in tools-dir"
16967   if test "x$MAKE_CANDIDATE" != x; then
16968     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16969 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16970     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16971     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16972     if test "x$IS_GNU_MAKE" = x; then
16973       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16974 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16975     else
16976       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16977       if test "x$IS_MODERN_MAKE" = x; then
16978         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16979 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16980       else
16981         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16982           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16983             MAKE_EXPECTED_ENV='cygwin'
16984           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16985             MAKE_EXPECTED_ENV='msys'
16986           else
16987             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16988           fi
16989           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16990           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16991         else
16992           # Not relevant for non-Windows
16993           IS_MAKE_CORRECT_ENV=true
16994         fi
16995         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16996           { $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
16997 $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;}
16998         else
16999           FOUND_MAKE=$MAKE_CANDIDATE
17000 
17001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17002 
17003   # First separate the path from the arguments. This will split at the first
17004   # space.
17005   complete="$FOUND_MAKE"
17006   path="${complete%% *}"
17007   tmp="$complete EOL"
17008   arguments="${tmp#* }"
17009 
17010   # Input might be given as Windows format, start by converting to
17011   # unix format.
17012   new_path=`$CYGPATH -u "$path"`
17013 
17014   # Now try to locate executable using which
17015   new_path=`$WHICH "$new_path" 2> /dev/null`
17016   # bat and cmd files are not always considered executable in cygwin causing which
17017   # to not find them
17018   if test "x$new_path" = x \
17019       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17020       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17021     new_path=`$CYGPATH -u "$path"`
17022   fi
17023   if test "x$new_path" = x; then
17024     # Oops. Which didn't find the executable.
17025     # The splitting of arguments from the executable at a space might have been incorrect,
17026     # since paths with space are more likely in Windows. Give it another try with the whole
17027     # argument.
17028     path="$complete"
17029     arguments="EOL"
17030     new_path=`$CYGPATH -u "$path"`
17031     new_path=`$WHICH "$new_path" 2> /dev/null`
17032     # bat and cmd files are not always considered executable in cygwin causing which
17033     # to not find them
17034     if test "x$new_path" = x \
17035         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17036         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17037       new_path=`$CYGPATH -u "$path"`
17038     fi
17039     if test "x$new_path" = x; then
17040       # It's still not found. Now this is an unrecoverable error.
17041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17042 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17043       has_space=`$ECHO "$complete" | $GREP " "`
17044       if test "x$has_space" != x; then
17045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17047       fi
17048       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17049     fi
17050   fi
17051 
17052   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17053   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17054   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17055   # "foo.exe" is OK but "foo" is an error.
17056   #
17057   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17058   # It is also a way to make sure we got the proper file name for the real test later on.
17059   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17060   if test "x$test_shortpath" = x; then
17061     # Short path failed, file does not exist as specified.
17062     # Try adding .exe or .cmd
17063     if test -f "${new_path}.exe"; then
17064       input_to_shortpath="${new_path}.exe"
17065     elif test -f "${new_path}.cmd"; then
17066       input_to_shortpath="${new_path}.cmd"
17067     else
17068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17069 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17070       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17071 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17072       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17073     fi
17074   else
17075     input_to_shortpath="$new_path"
17076   fi
17077 
17078   # Call helper function which possibly converts this using DOS-style short mode.
17079   # If so, the updated path is stored in $new_path.
17080   new_path="$input_to_shortpath"
17081 
17082   input_path="$input_to_shortpath"
17083   # Check if we need to convert this using DOS-style short mode. If the path
17084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17085   # take no chances and rewrite it.
17086   # Note: m4 eats our [], so we need to use [ and ] instead.
17087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17088   if test "x$has_forbidden_chars" != x; then
17089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17093       # Going to short mode and back again did indeed matter. Since short mode is
17094       # case insensitive, let's make it lowercase to improve readability.
17095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17096       # Now convert it back to Unix-stile (cygpath)
17097       input_path=`$CYGPATH -u "$shortmode_path"`
17098       new_path="$input_path"
17099     fi
17100   fi
17101 
17102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17103   if test "x$test_cygdrive_prefix" = x; then
17104     # As a simple fix, exclude /usr/bin since it's not a real path.
17105     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17107       # a path prefixed by /cygdrive for fixpath to work.
17108       new_path="$CYGWIN_ROOT_PATH$input_path"
17109     fi
17110   fi
17111 
17112   # remove trailing .exe if any
17113   new_path="${new_path/%.exe/}"
17114 
17115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17116 
17117   # First separate the path from the arguments. This will split at the first
17118   # space.
17119   complete="$FOUND_MAKE"
17120   path="${complete%% *}"
17121   tmp="$complete EOL"
17122   arguments="${tmp#* }"
17123 
17124   # Input might be given as Windows format, start by converting to
17125   # unix format.
17126   new_path="$path"
17127 
17128   windows_path="$new_path"
17129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17130     unix_path=`$CYGPATH -u "$windows_path"`
17131     new_path="$unix_path"
17132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17134     new_path="$unix_path"
17135   fi
17136 
17137 
17138   # Now try to locate executable using which
17139   new_path=`$WHICH "$new_path" 2> /dev/null`
17140 
17141   if test "x$new_path" = x; then
17142     # Oops. Which didn't find the executable.
17143     # The splitting of arguments from the executable at a space might have been incorrect,
17144     # since paths with space are more likely in Windows. Give it another try with the whole
17145     # argument.
17146     path="$complete"
17147     arguments="EOL"
17148     new_path="$path"
17149 
17150   windows_path="$new_path"
17151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17152     unix_path=`$CYGPATH -u "$windows_path"`
17153     new_path="$unix_path"
17154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17156     new_path="$unix_path"
17157   fi
17158 
17159 
17160     new_path=`$WHICH "$new_path" 2> /dev/null`
17161     # bat and cmd files are not always considered executable in MSYS causing which
17162     # to not find them
17163     if test "x$new_path" = x \
17164         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17165         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17166       new_path="$path"
17167 
17168   windows_path="$new_path"
17169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17170     unix_path=`$CYGPATH -u "$windows_path"`
17171     new_path="$unix_path"
17172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17174     new_path="$unix_path"
17175   fi
17176 
17177     fi
17178 
17179     if test "x$new_path" = x; then
17180       # It's still not found. Now this is an unrecoverable error.
17181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17182 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17183       has_space=`$ECHO "$complete" | $GREP " "`
17184       if test "x$has_space" != x; then
17185         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17187       fi
17188       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17189     fi
17190   fi
17191 
17192   # Now new_path has a complete unix path to the binary
17193   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17194     # Keep paths in /bin as-is, but remove trailing .exe if any
17195     new_path="${new_path/%.exe/}"
17196     # Do not save /bin paths to all_fixpath_prefixes!
17197   else
17198     # Not in mixed or Windows style, start by that.
17199     new_path=`cmd //c echo $new_path`
17200 
17201   input_path="$new_path"
17202   # Check if we need to convert this using DOS-style short mode. If the path
17203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17204   # take no chances and rewrite it.
17205   # Note: m4 eats our [], so we need to use [ and ] instead.
17206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17207   if test "x$has_forbidden_chars" != x; then
17208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17209     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17210   fi
17211 
17212     # Output is in $new_path
17213 
17214   windows_path="$new_path"
17215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17216     unix_path=`$CYGPATH -u "$windows_path"`
17217     new_path="$unix_path"
17218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17220     new_path="$unix_path"
17221   fi
17222 
17223     # remove trailing .exe if any
17224     new_path="${new_path/%.exe/}"
17225 
17226     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17227     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17228   fi
17229 
17230   else
17231     # We're on a unix platform. Hooray! :)
17232     # First separate the path from the arguments. This will split at the first
17233     # space.
17234     complete="$FOUND_MAKE"
17235     path="${complete%% *}"
17236     tmp="$complete EOL"
17237     arguments="${tmp#* }"
17238 
17239     # Cannot rely on the command "which" here since it doesn't always work.
17240     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17241     if test -z "$is_absolute_path"; then
17242       # Path to executable is not absolute. Find it.
17243       IFS_save="$IFS"
17244       IFS=:
17245       for p in $PATH; do
17246         if test -f "$p/$path" && test -x "$p/$path"; then
17247           new_path="$p/$path"
17248           break
17249         fi
17250       done
17251       IFS="$IFS_save"
17252     else
17253       # This is an absolute path, we can use it without further modifications.
17254       new_path="$path"
17255     fi
17256 
17257     if test "x$new_path" = x; then
17258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17259 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17260       has_space=`$ECHO "$complete" | $GREP " "`
17261       if test "x$has_space" != x; then
17262         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17263 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17264       fi
17265       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17266     fi
17267   fi
17268 
17269   # Now join together the path and the arguments once again
17270   if test "x$arguments" != xEOL; then
17271     new_complete="$new_path ${arguments% *}"
17272   else
17273     new_complete="$new_path"
17274   fi
17275 
17276   if test "x$complete" != "x$new_complete"; then
17277     FOUND_MAKE="$new_complete"
17278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17279 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17280   fi
17281 
17282         fi
17283       fi
17284     fi
17285   fi
17286 
17287         fi
17288         PATH=$OLD_PATH
17289       fi
17290     fi
17291 
17292     if test "x$FOUND_MAKE" = x; then
17293       as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17294     fi
17295   fi
17296 
17297   MAKE=$FOUND_MAKE
17298 
17299   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17300 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17301 
17302 
17303   # Check if make supports the output sync option and if so, setup using it.
17304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17305 $as_echo_n "checking if make --output-sync is supported... " >&6; }
17306   if $MAKE --version -O > /dev/null 2>&1; then
17307     OUTPUT_SYNC_SUPPORTED=true
17308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17309 $as_echo "yes" >&6; }
17310     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17311 $as_echo_n "checking for output-sync value... " >&6; }
17312 
17313 # Check whether --with-output-sync was given.
17314 if test "${with_output_sync+set}" = set; then :
17315   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17316 fi
17317 
17318     if test "x$OUTPUT_SYNC" = "x"; then
17319       OUTPUT_SYNC=none
17320     fi
17321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17322 $as_echo "$OUTPUT_SYNC" >&6; }
17323     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17324       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17325     fi
17326   else
17327     OUTPUT_SYNC_SUPPORTED=false
17328     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17329 $as_echo "no" >&6; }
17330   fi
17331 
17332 
17333 
17334 
17335 
17336 
17337   # Test if find supports -delete
17338   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17339 $as_echo_n "checking if find supports -delete... " >&6; }
17340   FIND_DELETE="-delete"
17341 
17342   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17343 
17344   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17345 
17346   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17347   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17348     # No, it does not.
17349     rm $DELETEDIR/TestIfFindSupportsDelete
17350     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17351       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17352       FIND_DELETE="-print | xargs rm"
17353     else
17354       FIND_DELETE="-exec rm \{\} \+"
17355     fi
17356     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17357 $as_echo "no" >&6; }
17358   else
17359     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17360 $as_echo "yes" >&6; }
17361   fi
17362   rmdir $DELETEDIR
17363 
17364 
17365 
17366   # These tools might not be installed by default,
17367   # need hint on how to install them.
17368 
17369 
17370 
17371   # Publish this variable in the help.
17372 
17373 
17374   if test "x$UNZIP" = x; then
17375     # The variable is not set by user, try to locate tool using the code snippet
17376     for ac_prog in unzip
17377 do
17378   # Extract the first word of "$ac_prog", so it can be a program name with args.
17379 set dummy $ac_prog; ac_word=$2
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17381 $as_echo_n "checking for $ac_word... " >&6; }
17382 if ${ac_cv_path_UNZIP+:} false; then :
17383   $as_echo_n "(cached) " >&6
17384 else
17385   case $UNZIP in
17386   [\\/]* | ?:[\\/]*)
17387   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17388   ;;
17389   *)
17390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17391 for as_dir in $PATH
17392 do
17393   IFS=$as_save_IFS
17394   test -z "$as_dir" && as_dir=.
17395     for ac_exec_ext in '' $ac_executable_extensions; do
17396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17397     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17399     break 2
17400   fi
17401 done
17402   done
17403 IFS=$as_save_IFS
17404 
17405   ;;
17406 esac
17407 fi
17408 UNZIP=$ac_cv_path_UNZIP
17409 if test -n "$UNZIP"; then
17410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17411 $as_echo "$UNZIP" >&6; }
17412 else
17413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17414 $as_echo "no" >&6; }
17415 fi
17416 
17417 
17418   test -n "$UNZIP" && break
17419 done
17420 
17421   else
17422     # The variable is set, but is it from the command line or the environment?
17423 
17424     # Try to remove the string !UNZIP! from our list.
17425     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17426     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17427       # If it failed, the variable was not from the command line. Ignore it,
17428       # but warn the user (except for BASH, which is always set by the calling BASH).
17429       if test "xUNZIP" != xBASH; then
17430         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17431 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17432       fi
17433       # Try to locate tool using the code snippet
17434       for ac_prog in unzip
17435 do
17436   # Extract the first word of "$ac_prog", so it can be a program name with args.
17437 set dummy $ac_prog; ac_word=$2
17438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17439 $as_echo_n "checking for $ac_word... " >&6; }
17440 if ${ac_cv_path_UNZIP+:} false; then :
17441   $as_echo_n "(cached) " >&6
17442 else
17443   case $UNZIP in
17444   [\\/]* | ?:[\\/]*)
17445   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17446   ;;
17447   *)
17448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17449 for as_dir in $PATH
17450 do
17451   IFS=$as_save_IFS
17452   test -z "$as_dir" && as_dir=.
17453     for ac_exec_ext in '' $ac_executable_extensions; do
17454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17455     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17457     break 2
17458   fi
17459 done
17460   done
17461 IFS=$as_save_IFS
17462 
17463   ;;
17464 esac
17465 fi
17466 UNZIP=$ac_cv_path_UNZIP
17467 if test -n "$UNZIP"; then
17468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17469 $as_echo "$UNZIP" >&6; }
17470 else
17471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17472 $as_echo "no" >&6; }
17473 fi
17474 
17475 
17476   test -n "$UNZIP" && break
17477 done
17478 
17479     else
17480       # If it succeeded, then it was overridden by the user. We will use it
17481       # for the tool.
17482 
17483       # First remove it from the list of overridden variables, so we can test
17484       # for unknown variables in the end.
17485       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17486 
17487       # Check if the provided tool contains a complete path.
17488       tool_specified="$UNZIP"
17489       tool_basename="${tool_specified##*/}"
17490       if test "x$tool_basename" = "x$tool_specified"; then
17491         # A command without a complete path is provided, search $PATH.
17492         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17493 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17494         # Extract the first word of "$tool_basename", so it can be a program name with args.
17495 set dummy $tool_basename; ac_word=$2
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17497 $as_echo_n "checking for $ac_word... " >&6; }
17498 if ${ac_cv_path_UNZIP+:} false; then :
17499   $as_echo_n "(cached) " >&6
17500 else
17501   case $UNZIP in
17502   [\\/]* | ?:[\\/]*)
17503   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17504   ;;
17505   *)
17506   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17507 for as_dir in $PATH
17508 do
17509   IFS=$as_save_IFS
17510   test -z "$as_dir" && as_dir=.
17511     for ac_exec_ext in '' $ac_executable_extensions; do
17512   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17513     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17514     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17515     break 2
17516   fi
17517 done
17518   done
17519 IFS=$as_save_IFS
17520 
17521   ;;
17522 esac
17523 fi
17524 UNZIP=$ac_cv_path_UNZIP
17525 if test -n "$UNZIP"; then
17526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17527 $as_echo "$UNZIP" >&6; }
17528 else
17529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17530 $as_echo "no" >&6; }
17531 fi
17532 
17533 
17534         if test "x$UNZIP" = x; then
17535           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17536         fi
17537       else
17538         # Otherwise we believe it is a complete path. Use it as it is.
17539         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17540 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17542 $as_echo_n "checking for UNZIP... " >&6; }
17543         if test ! -x "$tool_specified"; then
17544           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17545 $as_echo "not found" >&6; }
17546           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17547         fi
17548         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17549 $as_echo "$tool_specified" >&6; }
17550       fi
17551     fi
17552   fi
17553 
17554 
17555 
17556   if test "x$UNZIP" = x; then
17557     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17558   fi
17559 
17560 
17561 
17562 
17563 
17564   # Publish this variable in the help.
17565 
17566 
17567   if test "x$ZIP" = x; then
17568     # The variable is not set by user, try to locate tool using the code snippet
17569     for ac_prog in zip
17570 do
17571   # Extract the first word of "$ac_prog", so it can be a program name with args.
17572 set dummy $ac_prog; ac_word=$2
17573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17574 $as_echo_n "checking for $ac_word... " >&6; }
17575 if ${ac_cv_path_ZIP+:} false; then :
17576   $as_echo_n "(cached) " >&6
17577 else
17578   case $ZIP in
17579   [\\/]* | ?:[\\/]*)
17580   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17581   ;;
17582   *)
17583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17584 for as_dir in $PATH
17585 do
17586   IFS=$as_save_IFS
17587   test -z "$as_dir" && as_dir=.
17588     for ac_exec_ext in '' $ac_executable_extensions; do
17589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17590     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17592     break 2
17593   fi
17594 done
17595   done
17596 IFS=$as_save_IFS
17597 
17598   ;;
17599 esac
17600 fi
17601 ZIP=$ac_cv_path_ZIP
17602 if test -n "$ZIP"; then
17603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17604 $as_echo "$ZIP" >&6; }
17605 else
17606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607 $as_echo "no" >&6; }
17608 fi
17609 
17610 
17611   test -n "$ZIP" && break
17612 done
17613 
17614   else
17615     # The variable is set, but is it from the command line or the environment?
17616 
17617     # Try to remove the string !ZIP! from our list.
17618     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17619     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17620       # If it failed, the variable was not from the command line. Ignore it,
17621       # but warn the user (except for BASH, which is always set by the calling BASH).
17622       if test "xZIP" != xBASH; then
17623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17624 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17625       fi
17626       # Try to locate tool using the code snippet
17627       for ac_prog in zip
17628 do
17629   # Extract the first word of "$ac_prog", so it can be a program name with args.
17630 set dummy $ac_prog; ac_word=$2
17631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17632 $as_echo_n "checking for $ac_word... " >&6; }
17633 if ${ac_cv_path_ZIP+:} false; then :
17634   $as_echo_n "(cached) " >&6
17635 else
17636   case $ZIP in
17637   [\\/]* | ?:[\\/]*)
17638   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17639   ;;
17640   *)
17641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17642 for as_dir in $PATH
17643 do
17644   IFS=$as_save_IFS
17645   test -z "$as_dir" && as_dir=.
17646     for ac_exec_ext in '' $ac_executable_extensions; do
17647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17648     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17650     break 2
17651   fi
17652 done
17653   done
17654 IFS=$as_save_IFS
17655 
17656   ;;
17657 esac
17658 fi
17659 ZIP=$ac_cv_path_ZIP
17660 if test -n "$ZIP"; then
17661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17662 $as_echo "$ZIP" >&6; }
17663 else
17664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17665 $as_echo "no" >&6; }
17666 fi
17667 
17668 
17669   test -n "$ZIP" && break
17670 done
17671 
17672     else
17673       # If it succeeded, then it was overridden by the user. We will use it
17674       # for the tool.
17675 
17676       # First remove it from the list of overridden variables, so we can test
17677       # for unknown variables in the end.
17678       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17679 
17680       # Check if the provided tool contains a complete path.
17681       tool_specified="$ZIP"
17682       tool_basename="${tool_specified##*/}"
17683       if test "x$tool_basename" = "x$tool_specified"; then
17684         # A command without a complete path is provided, search $PATH.
17685         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17686 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17687         # Extract the first word of "$tool_basename", so it can be a program name with args.
17688 set dummy $tool_basename; ac_word=$2
17689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17690 $as_echo_n "checking for $ac_word... " >&6; }
17691 if ${ac_cv_path_ZIP+:} false; then :
17692   $as_echo_n "(cached) " >&6
17693 else
17694   case $ZIP in
17695   [\\/]* | ?:[\\/]*)
17696   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17697   ;;
17698   *)
17699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17700 for as_dir in $PATH
17701 do
17702   IFS=$as_save_IFS
17703   test -z "$as_dir" && as_dir=.
17704     for ac_exec_ext in '' $ac_executable_extensions; do
17705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17706     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17708     break 2
17709   fi
17710 done
17711   done
17712 IFS=$as_save_IFS
17713 
17714   ;;
17715 esac
17716 fi
17717 ZIP=$ac_cv_path_ZIP
17718 if test -n "$ZIP"; then
17719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17720 $as_echo "$ZIP" >&6; }
17721 else
17722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17723 $as_echo "no" >&6; }
17724 fi
17725 
17726 
17727         if test "x$ZIP" = x; then
17728           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17729         fi
17730       else
17731         # Otherwise we believe it is a complete path. Use it as it is.
17732         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17733 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17735 $as_echo_n "checking for ZIP... " >&6; }
17736         if test ! -x "$tool_specified"; then
17737           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17738 $as_echo "not found" >&6; }
17739           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17740         fi
17741         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17742 $as_echo "$tool_specified" >&6; }
17743       fi
17744     fi
17745   fi
17746 
17747 
17748 
17749   if test "x$ZIP" = x; then
17750     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17751   fi
17752 
17753 
17754 
17755   # Non-required basic tools
17756 
17757 
17758 
17759   # Publish this variable in the help.
17760 
17761 
17762   if test "x$LDD" = x; then
17763     # The variable is not set by user, try to locate tool using the code snippet
17764     for ac_prog in ldd
17765 do
17766   # Extract the first word of "$ac_prog", so it can be a program name with args.
17767 set dummy $ac_prog; ac_word=$2
17768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17769 $as_echo_n "checking for $ac_word... " >&6; }
17770 if ${ac_cv_path_LDD+:} false; then :
17771   $as_echo_n "(cached) " >&6
17772 else
17773   case $LDD in
17774   [\\/]* | ?:[\\/]*)
17775   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17776   ;;
17777   *)
17778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17779 for as_dir in $PATH
17780 do
17781   IFS=$as_save_IFS
17782   test -z "$as_dir" && as_dir=.
17783     for ac_exec_ext in '' $ac_executable_extensions; do
17784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17785     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17787     break 2
17788   fi
17789 done
17790   done
17791 IFS=$as_save_IFS
17792 
17793   ;;
17794 esac
17795 fi
17796 LDD=$ac_cv_path_LDD
17797 if test -n "$LDD"; then
17798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17799 $as_echo "$LDD" >&6; }
17800 else
17801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17802 $as_echo "no" >&6; }
17803 fi
17804 
17805 
17806   test -n "$LDD" && break
17807 done
17808 
17809   else
17810     # The variable is set, but is it from the command line or the environment?
17811 
17812     # Try to remove the string !LDD! from our list.
17813     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17814     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17815       # If it failed, the variable was not from the command line. Ignore it,
17816       # but warn the user (except for BASH, which is always set by the calling BASH).
17817       if test "xLDD" != xBASH; then
17818         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17819 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17820       fi
17821       # Try to locate tool using the code snippet
17822       for ac_prog in ldd
17823 do
17824   # Extract the first word of "$ac_prog", so it can be a program name with args.
17825 set dummy $ac_prog; ac_word=$2
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17827 $as_echo_n "checking for $ac_word... " >&6; }
17828 if ${ac_cv_path_LDD+:} false; then :
17829   $as_echo_n "(cached) " >&6
17830 else
17831   case $LDD in
17832   [\\/]* | ?:[\\/]*)
17833   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17834   ;;
17835   *)
17836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17837 for as_dir in $PATH
17838 do
17839   IFS=$as_save_IFS
17840   test -z "$as_dir" && as_dir=.
17841     for ac_exec_ext in '' $ac_executable_extensions; do
17842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17843     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17845     break 2
17846   fi
17847 done
17848   done
17849 IFS=$as_save_IFS
17850 
17851   ;;
17852 esac
17853 fi
17854 LDD=$ac_cv_path_LDD
17855 if test -n "$LDD"; then
17856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17857 $as_echo "$LDD" >&6; }
17858 else
17859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17860 $as_echo "no" >&6; }
17861 fi
17862 
17863 
17864   test -n "$LDD" && break
17865 done
17866 
17867     else
17868       # If it succeeded, then it was overridden by the user. We will use it
17869       # for the tool.
17870 
17871       # First remove it from the list of overridden variables, so we can test
17872       # for unknown variables in the end.
17873       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17874 
17875       # Check if the provided tool contains a complete path.
17876       tool_specified="$LDD"
17877       tool_basename="${tool_specified##*/}"
17878       if test "x$tool_basename" = "x$tool_specified"; then
17879         # A command without a complete path is provided, search $PATH.
17880         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17881 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17882         # Extract the first word of "$tool_basename", so it can be a program name with args.
17883 set dummy $tool_basename; ac_word=$2
17884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17885 $as_echo_n "checking for $ac_word... " >&6; }
17886 if ${ac_cv_path_LDD+:} false; then :
17887   $as_echo_n "(cached) " >&6
17888 else
17889   case $LDD in
17890   [\\/]* | ?:[\\/]*)
17891   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17892   ;;
17893   *)
17894   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17895 for as_dir in $PATH
17896 do
17897   IFS=$as_save_IFS
17898   test -z "$as_dir" && as_dir=.
17899     for ac_exec_ext in '' $ac_executable_extensions; do
17900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17901     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17903     break 2
17904   fi
17905 done
17906   done
17907 IFS=$as_save_IFS
17908 
17909   ;;
17910 esac
17911 fi
17912 LDD=$ac_cv_path_LDD
17913 if test -n "$LDD"; then
17914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17915 $as_echo "$LDD" >&6; }
17916 else
17917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17918 $as_echo "no" >&6; }
17919 fi
17920 
17921 
17922         if test "x$LDD" = x; then
17923           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17924         fi
17925       else
17926         # Otherwise we believe it is a complete path. Use it as it is.
17927         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17928 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17930 $as_echo_n "checking for LDD... " >&6; }
17931         if test ! -x "$tool_specified"; then
17932           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17933 $as_echo "not found" >&6; }
17934           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17935         fi
17936         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17937 $as_echo "$tool_specified" >&6; }
17938       fi
17939     fi
17940   fi
17941 
17942 
17943   if test "x$LDD" = "x"; then
17944     # List shared lib dependencies is used for
17945     # debug output and checking for forbidden dependencies.
17946     # We can build without it.
17947     LDD="true"
17948   fi
17949 
17950 
17951   # Publish this variable in the help.
17952 
17953 
17954   if test "x$OTOOL" = x; then
17955     # The variable is not set by user, try to locate tool using the code snippet
17956     for ac_prog in otool
17957 do
17958   # Extract the first word of "$ac_prog", so it can be a program name with args.
17959 set dummy $ac_prog; ac_word=$2
17960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17961 $as_echo_n "checking for $ac_word... " >&6; }
17962 if ${ac_cv_path_OTOOL+:} false; then :
17963   $as_echo_n "(cached) " >&6
17964 else
17965   case $OTOOL in
17966   [\\/]* | ?:[\\/]*)
17967   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17968   ;;
17969   *)
17970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17971 for as_dir in $PATH
17972 do
17973   IFS=$as_save_IFS
17974   test -z "$as_dir" && as_dir=.
17975     for ac_exec_ext in '' $ac_executable_extensions; do
17976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17977     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17979     break 2
17980   fi
17981 done
17982   done
17983 IFS=$as_save_IFS
17984 
17985   ;;
17986 esac
17987 fi
17988 OTOOL=$ac_cv_path_OTOOL
17989 if test -n "$OTOOL"; then
17990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17991 $as_echo "$OTOOL" >&6; }
17992 else
17993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17994 $as_echo "no" >&6; }
17995 fi
17996 
17997 
17998   test -n "$OTOOL" && break
17999 done
18000 
18001   else
18002     # The variable is set, but is it from the command line or the environment?
18003 
18004     # Try to remove the string !OTOOL! from our list.
18005     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18006     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18007       # If it failed, the variable was not from the command line. Ignore it,
18008       # but warn the user (except for BASH, which is always set by the calling BASH).
18009       if test "xOTOOL" != xBASH; then
18010         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18011 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18012       fi
18013       # Try to locate tool using the code snippet
18014       for ac_prog in otool
18015 do
18016   # Extract the first word of "$ac_prog", so it can be a program name with args.
18017 set dummy $ac_prog; ac_word=$2
18018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18019 $as_echo_n "checking for $ac_word... " >&6; }
18020 if ${ac_cv_path_OTOOL+:} false; then :
18021   $as_echo_n "(cached) " >&6
18022 else
18023   case $OTOOL in
18024   [\\/]* | ?:[\\/]*)
18025   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18026   ;;
18027   *)
18028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18029 for as_dir in $PATH
18030 do
18031   IFS=$as_save_IFS
18032   test -z "$as_dir" && as_dir=.
18033     for ac_exec_ext in '' $ac_executable_extensions; do
18034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18035     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18037     break 2
18038   fi
18039 done
18040   done
18041 IFS=$as_save_IFS
18042 
18043   ;;
18044 esac
18045 fi
18046 OTOOL=$ac_cv_path_OTOOL
18047 if test -n "$OTOOL"; then
18048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18049 $as_echo "$OTOOL" >&6; }
18050 else
18051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18052 $as_echo "no" >&6; }
18053 fi
18054 
18055 
18056   test -n "$OTOOL" && break
18057 done
18058 
18059     else
18060       # If it succeeded, then it was overridden by the user. We will use it
18061       # for the tool.
18062 
18063       # First remove it from the list of overridden variables, so we can test
18064       # for unknown variables in the end.
18065       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18066 
18067       # Check if the provided tool contains a complete path.
18068       tool_specified="$OTOOL"
18069       tool_basename="${tool_specified##*/}"
18070       if test "x$tool_basename" = "x$tool_specified"; then
18071         # A command without a complete path is provided, search $PATH.
18072         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18073 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18074         # Extract the first word of "$tool_basename", so it can be a program name with args.
18075 set dummy $tool_basename; ac_word=$2
18076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077 $as_echo_n "checking for $ac_word... " >&6; }
18078 if ${ac_cv_path_OTOOL+:} false; then :
18079   $as_echo_n "(cached) " >&6
18080 else
18081   case $OTOOL in
18082   [\\/]* | ?:[\\/]*)
18083   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18084   ;;
18085   *)
18086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087 for as_dir in $PATH
18088 do
18089   IFS=$as_save_IFS
18090   test -z "$as_dir" && as_dir=.
18091     for ac_exec_ext in '' $ac_executable_extensions; do
18092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095     break 2
18096   fi
18097 done
18098   done
18099 IFS=$as_save_IFS
18100 
18101   ;;
18102 esac
18103 fi
18104 OTOOL=$ac_cv_path_OTOOL
18105 if test -n "$OTOOL"; then
18106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18107 $as_echo "$OTOOL" >&6; }
18108 else
18109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110 $as_echo "no" >&6; }
18111 fi
18112 
18113 
18114         if test "x$OTOOL" = x; then
18115           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18116         fi
18117       else
18118         # Otherwise we believe it is a complete path. Use it as it is.
18119         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18120 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18121         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18122 $as_echo_n "checking for OTOOL... " >&6; }
18123         if test ! -x "$tool_specified"; then
18124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18125 $as_echo "not found" >&6; }
18126           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18127         fi
18128         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18129 $as_echo "$tool_specified" >&6; }
18130       fi
18131     fi
18132   fi
18133 
18134 
18135   if test "x$OTOOL" = "x"; then
18136     OTOOL="true"
18137   fi
18138 
18139 
18140   # Publish this variable in the help.
18141 
18142 
18143   if test "x$READELF" = x; then
18144     # The variable is not set by user, try to locate tool using the code snippet
18145     for ac_prog in greadelf readelf
18146 do
18147   # Extract the first word of "$ac_prog", so it can be a program name with args.
18148 set dummy $ac_prog; ac_word=$2
18149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18150 $as_echo_n "checking for $ac_word... " >&6; }
18151 if ${ac_cv_path_READELF+:} false; then :
18152   $as_echo_n "(cached) " >&6
18153 else
18154   case $READELF in
18155   [\\/]* | ?:[\\/]*)
18156   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18157   ;;
18158   *)
18159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18160 for as_dir in $PATH
18161 do
18162   IFS=$as_save_IFS
18163   test -z "$as_dir" && as_dir=.
18164     for ac_exec_ext in '' $ac_executable_extensions; do
18165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18166     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18168     break 2
18169   fi
18170 done
18171   done
18172 IFS=$as_save_IFS
18173 
18174   ;;
18175 esac
18176 fi
18177 READELF=$ac_cv_path_READELF
18178 if test -n "$READELF"; then
18179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18180 $as_echo "$READELF" >&6; }
18181 else
18182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18183 $as_echo "no" >&6; }
18184 fi
18185 
18186 
18187   test -n "$READELF" && break
18188 done
18189 
18190   else
18191     # The variable is set, but is it from the command line or the environment?
18192 
18193     # Try to remove the string !READELF! from our list.
18194     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18195     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18196       # If it failed, the variable was not from the command line. Ignore it,
18197       # but warn the user (except for BASH, which is always set by the calling BASH).
18198       if test "xREADELF" != xBASH; then
18199         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18200 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18201       fi
18202       # Try to locate tool using the code snippet
18203       for ac_prog in greadelf readelf
18204 do
18205   # Extract the first word of "$ac_prog", so it can be a program name with args.
18206 set dummy $ac_prog; ac_word=$2
18207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18208 $as_echo_n "checking for $ac_word... " >&6; }
18209 if ${ac_cv_path_READELF+:} false; then :
18210   $as_echo_n "(cached) " >&6
18211 else
18212   case $READELF in
18213   [\\/]* | ?:[\\/]*)
18214   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18215   ;;
18216   *)
18217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18218 for as_dir in $PATH
18219 do
18220   IFS=$as_save_IFS
18221   test -z "$as_dir" && as_dir=.
18222     for ac_exec_ext in '' $ac_executable_extensions; do
18223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18224     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18226     break 2
18227   fi
18228 done
18229   done
18230 IFS=$as_save_IFS
18231 
18232   ;;
18233 esac
18234 fi
18235 READELF=$ac_cv_path_READELF
18236 if test -n "$READELF"; then
18237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18238 $as_echo "$READELF" >&6; }
18239 else
18240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18241 $as_echo "no" >&6; }
18242 fi
18243 
18244 
18245   test -n "$READELF" && break
18246 done
18247 
18248     else
18249       # If it succeeded, then it was overridden by the user. We will use it
18250       # for the tool.
18251 
18252       # First remove it from the list of overridden variables, so we can test
18253       # for unknown variables in the end.
18254       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18255 
18256       # Check if the provided tool contains a complete path.
18257       tool_specified="$READELF"
18258       tool_basename="${tool_specified##*/}"
18259       if test "x$tool_basename" = "x$tool_specified"; then
18260         # A command without a complete path is provided, search $PATH.
18261         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18262 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18263         # Extract the first word of "$tool_basename", so it can be a program name with args.
18264 set dummy $tool_basename; ac_word=$2
18265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18266 $as_echo_n "checking for $ac_word... " >&6; }
18267 if ${ac_cv_path_READELF+:} false; then :
18268   $as_echo_n "(cached) " >&6
18269 else
18270   case $READELF in
18271   [\\/]* | ?:[\\/]*)
18272   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18273   ;;
18274   *)
18275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18276 for as_dir in $PATH
18277 do
18278   IFS=$as_save_IFS
18279   test -z "$as_dir" && as_dir=.
18280     for ac_exec_ext in '' $ac_executable_extensions; do
18281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18282     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18284     break 2
18285   fi
18286 done
18287   done
18288 IFS=$as_save_IFS
18289 
18290   ;;
18291 esac
18292 fi
18293 READELF=$ac_cv_path_READELF
18294 if test -n "$READELF"; then
18295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18296 $as_echo "$READELF" >&6; }
18297 else
18298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18299 $as_echo "no" >&6; }
18300 fi
18301 
18302 
18303         if test "x$READELF" = x; then
18304           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18305         fi
18306       else
18307         # Otherwise we believe it is a complete path. Use it as it is.
18308         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18309 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18310         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18311 $as_echo_n "checking for READELF... " >&6; }
18312         if test ! -x "$tool_specified"; then
18313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18314 $as_echo "not found" >&6; }
18315           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18316         fi
18317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18318 $as_echo "$tool_specified" >&6; }
18319       fi
18320     fi
18321   fi
18322 
18323 
18324 
18325 
18326   # Publish this variable in the help.
18327 
18328 
18329   if test "x$HG" = x; then
18330     # The variable is not set by user, try to locate tool using the code snippet
18331     for ac_prog in hg
18332 do
18333   # Extract the first word of "$ac_prog", so it can be a program name with args.
18334 set dummy $ac_prog; ac_word=$2
18335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18336 $as_echo_n "checking for $ac_word... " >&6; }
18337 if ${ac_cv_path_HG+:} false; then :
18338   $as_echo_n "(cached) " >&6
18339 else
18340   case $HG in
18341   [\\/]* | ?:[\\/]*)
18342   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18343   ;;
18344   *)
18345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18346 for as_dir in $PATH
18347 do
18348   IFS=$as_save_IFS
18349   test -z "$as_dir" && as_dir=.
18350     for ac_exec_ext in '' $ac_executable_extensions; do
18351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18352     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18354     break 2
18355   fi
18356 done
18357   done
18358 IFS=$as_save_IFS
18359 
18360   ;;
18361 esac
18362 fi
18363 HG=$ac_cv_path_HG
18364 if test -n "$HG"; then
18365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18366 $as_echo "$HG" >&6; }
18367 else
18368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18369 $as_echo "no" >&6; }
18370 fi
18371 
18372 
18373   test -n "$HG" && break
18374 done
18375 
18376   else
18377     # The variable is set, but is it from the command line or the environment?
18378 
18379     # Try to remove the string !HG! from our list.
18380     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18381     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18382       # If it failed, the variable was not from the command line. Ignore it,
18383       # but warn the user (except for BASH, which is always set by the calling BASH).
18384       if test "xHG" != xBASH; then
18385         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18386 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18387       fi
18388       # Try to locate tool using the code snippet
18389       for ac_prog in hg
18390 do
18391   # Extract the first word of "$ac_prog", so it can be a program name with args.
18392 set dummy $ac_prog; ac_word=$2
18393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18394 $as_echo_n "checking for $ac_word... " >&6; }
18395 if ${ac_cv_path_HG+:} false; then :
18396   $as_echo_n "(cached) " >&6
18397 else
18398   case $HG in
18399   [\\/]* | ?:[\\/]*)
18400   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18401   ;;
18402   *)
18403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18404 for as_dir in $PATH
18405 do
18406   IFS=$as_save_IFS
18407   test -z "$as_dir" && as_dir=.
18408     for ac_exec_ext in '' $ac_executable_extensions; do
18409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18410     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18412     break 2
18413   fi
18414 done
18415   done
18416 IFS=$as_save_IFS
18417 
18418   ;;
18419 esac
18420 fi
18421 HG=$ac_cv_path_HG
18422 if test -n "$HG"; then
18423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18424 $as_echo "$HG" >&6; }
18425 else
18426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18427 $as_echo "no" >&6; }
18428 fi
18429 
18430 
18431   test -n "$HG" && break
18432 done
18433 
18434     else
18435       # If it succeeded, then it was overridden by the user. We will use it
18436       # for the tool.
18437 
18438       # First remove it from the list of overridden variables, so we can test
18439       # for unknown variables in the end.
18440       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18441 
18442       # Check if the provided tool contains a complete path.
18443       tool_specified="$HG"
18444       tool_basename="${tool_specified##*/}"
18445       if test "x$tool_basename" = "x$tool_specified"; then
18446         # A command without a complete path is provided, search $PATH.
18447         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18448 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18449         # Extract the first word of "$tool_basename", so it can be a program name with args.
18450 set dummy $tool_basename; ac_word=$2
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18452 $as_echo_n "checking for $ac_word... " >&6; }
18453 if ${ac_cv_path_HG+:} false; then :
18454   $as_echo_n "(cached) " >&6
18455 else
18456   case $HG in
18457   [\\/]* | ?:[\\/]*)
18458   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18459   ;;
18460   *)
18461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18462 for as_dir in $PATH
18463 do
18464   IFS=$as_save_IFS
18465   test -z "$as_dir" && as_dir=.
18466     for ac_exec_ext in '' $ac_executable_extensions; do
18467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18468     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18470     break 2
18471   fi
18472 done
18473   done
18474 IFS=$as_save_IFS
18475 
18476   ;;
18477 esac
18478 fi
18479 HG=$ac_cv_path_HG
18480 if test -n "$HG"; then
18481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18482 $as_echo "$HG" >&6; }
18483 else
18484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18485 $as_echo "no" >&6; }
18486 fi
18487 
18488 
18489         if test "x$HG" = x; then
18490           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18491         fi
18492       else
18493         # Otherwise we believe it is a complete path. Use it as it is.
18494         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18495 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18497 $as_echo_n "checking for HG... " >&6; }
18498         if test ! -x "$tool_specified"; then
18499           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18500 $as_echo "not found" >&6; }
18501           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18502         fi
18503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18504 $as_echo "$tool_specified" >&6; }
18505       fi
18506     fi
18507   fi
18508 
18509 
18510 
18511 
18512   # Publish this variable in the help.
18513 
18514 
18515   if test "x$STAT" = x; then
18516     # The variable is not set by user, try to locate tool using the code snippet
18517     for ac_prog in stat
18518 do
18519   # Extract the first word of "$ac_prog", so it can be a program name with args.
18520 set dummy $ac_prog; ac_word=$2
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18522 $as_echo_n "checking for $ac_word... " >&6; }
18523 if ${ac_cv_path_STAT+:} false; then :
18524   $as_echo_n "(cached) " >&6
18525 else
18526   case $STAT in
18527   [\\/]* | ?:[\\/]*)
18528   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18529   ;;
18530   *)
18531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18532 for as_dir in $PATH
18533 do
18534   IFS=$as_save_IFS
18535   test -z "$as_dir" && as_dir=.
18536     for ac_exec_ext in '' $ac_executable_extensions; do
18537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18538     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18540     break 2
18541   fi
18542 done
18543   done
18544 IFS=$as_save_IFS
18545 
18546   ;;
18547 esac
18548 fi
18549 STAT=$ac_cv_path_STAT
18550 if test -n "$STAT"; then
18551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18552 $as_echo "$STAT" >&6; }
18553 else
18554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18555 $as_echo "no" >&6; }
18556 fi
18557 
18558 
18559   test -n "$STAT" && break
18560 done
18561 
18562   else
18563     # The variable is set, but is it from the command line or the environment?
18564 
18565     # Try to remove the string !STAT! from our list.
18566     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18567     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18568       # If it failed, the variable was not from the command line. Ignore it,
18569       # but warn the user (except for BASH, which is always set by the calling BASH).
18570       if test "xSTAT" != xBASH; then
18571         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18572 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18573       fi
18574       # Try to locate tool using the code snippet
18575       for ac_prog in stat
18576 do
18577   # Extract the first word of "$ac_prog", so it can be a program name with args.
18578 set dummy $ac_prog; ac_word=$2
18579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18580 $as_echo_n "checking for $ac_word... " >&6; }
18581 if ${ac_cv_path_STAT+:} false; then :
18582   $as_echo_n "(cached) " >&6
18583 else
18584   case $STAT in
18585   [\\/]* | ?:[\\/]*)
18586   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18587   ;;
18588   *)
18589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18590 for as_dir in $PATH
18591 do
18592   IFS=$as_save_IFS
18593   test -z "$as_dir" && as_dir=.
18594     for ac_exec_ext in '' $ac_executable_extensions; do
18595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18596     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18598     break 2
18599   fi
18600 done
18601   done
18602 IFS=$as_save_IFS
18603 
18604   ;;
18605 esac
18606 fi
18607 STAT=$ac_cv_path_STAT
18608 if test -n "$STAT"; then
18609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18610 $as_echo "$STAT" >&6; }
18611 else
18612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18613 $as_echo "no" >&6; }
18614 fi
18615 
18616 
18617   test -n "$STAT" && break
18618 done
18619 
18620     else
18621       # If it succeeded, then it was overridden by the user. We will use it
18622       # for the tool.
18623 
18624       # First remove it from the list of overridden variables, so we can test
18625       # for unknown variables in the end.
18626       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18627 
18628       # Check if the provided tool contains a complete path.
18629       tool_specified="$STAT"
18630       tool_basename="${tool_specified##*/}"
18631       if test "x$tool_basename" = "x$tool_specified"; then
18632         # A command without a complete path is provided, search $PATH.
18633         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18634 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18635         # Extract the first word of "$tool_basename", so it can be a program name with args.
18636 set dummy $tool_basename; ac_word=$2
18637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18638 $as_echo_n "checking for $ac_word... " >&6; }
18639 if ${ac_cv_path_STAT+:} false; then :
18640   $as_echo_n "(cached) " >&6
18641 else
18642   case $STAT in
18643   [\\/]* | ?:[\\/]*)
18644   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18645   ;;
18646   *)
18647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18648 for as_dir in $PATH
18649 do
18650   IFS=$as_save_IFS
18651   test -z "$as_dir" && as_dir=.
18652     for ac_exec_ext in '' $ac_executable_extensions; do
18653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18654     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18656     break 2
18657   fi
18658 done
18659   done
18660 IFS=$as_save_IFS
18661 
18662   ;;
18663 esac
18664 fi
18665 STAT=$ac_cv_path_STAT
18666 if test -n "$STAT"; then
18667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18668 $as_echo "$STAT" >&6; }
18669 else
18670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18671 $as_echo "no" >&6; }
18672 fi
18673 
18674 
18675         if test "x$STAT" = x; then
18676           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18677         fi
18678       else
18679         # Otherwise we believe it is a complete path. Use it as it is.
18680         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18681 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18682         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18683 $as_echo_n "checking for STAT... " >&6; }
18684         if test ! -x "$tool_specified"; then
18685           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18686 $as_echo "not found" >&6; }
18687           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18688         fi
18689         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18690 $as_echo "$tool_specified" >&6; }
18691       fi
18692     fi
18693   fi
18694 
18695 
18696 
18697 
18698   # Publish this variable in the help.
18699 
18700 
18701   if test "x$TIME" = x; then
18702     # The variable is not set by user, try to locate tool using the code snippet
18703     for ac_prog in time
18704 do
18705   # Extract the first word of "$ac_prog", so it can be a program name with args.
18706 set dummy $ac_prog; ac_word=$2
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18708 $as_echo_n "checking for $ac_word... " >&6; }
18709 if ${ac_cv_path_TIME+:} false; then :
18710   $as_echo_n "(cached) " >&6
18711 else
18712   case $TIME in
18713   [\\/]* | ?:[\\/]*)
18714   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18715   ;;
18716   *)
18717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18718 for as_dir in $PATH
18719 do
18720   IFS=$as_save_IFS
18721   test -z "$as_dir" && as_dir=.
18722     for ac_exec_ext in '' $ac_executable_extensions; do
18723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18724     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18726     break 2
18727   fi
18728 done
18729   done
18730 IFS=$as_save_IFS
18731 
18732   ;;
18733 esac
18734 fi
18735 TIME=$ac_cv_path_TIME
18736 if test -n "$TIME"; then
18737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18738 $as_echo "$TIME" >&6; }
18739 else
18740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18741 $as_echo "no" >&6; }
18742 fi
18743 
18744 
18745   test -n "$TIME" && break
18746 done
18747 
18748   else
18749     # The variable is set, but is it from the command line or the environment?
18750 
18751     # Try to remove the string !TIME! from our list.
18752     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18753     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18754       # If it failed, the variable was not from the command line. Ignore it,
18755       # but warn the user (except for BASH, which is always set by the calling BASH).
18756       if test "xTIME" != xBASH; then
18757         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18758 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18759       fi
18760       # Try to locate tool using the code snippet
18761       for ac_prog in time
18762 do
18763   # Extract the first word of "$ac_prog", so it can be a program name with args.
18764 set dummy $ac_prog; ac_word=$2
18765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18766 $as_echo_n "checking for $ac_word... " >&6; }
18767 if ${ac_cv_path_TIME+:} false; then :
18768   $as_echo_n "(cached) " >&6
18769 else
18770   case $TIME in
18771   [\\/]* | ?:[\\/]*)
18772   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18773   ;;
18774   *)
18775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18776 for as_dir in $PATH
18777 do
18778   IFS=$as_save_IFS
18779   test -z "$as_dir" && as_dir=.
18780     for ac_exec_ext in '' $ac_executable_extensions; do
18781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18782     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18784     break 2
18785   fi
18786 done
18787   done
18788 IFS=$as_save_IFS
18789 
18790   ;;
18791 esac
18792 fi
18793 TIME=$ac_cv_path_TIME
18794 if test -n "$TIME"; then
18795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18796 $as_echo "$TIME" >&6; }
18797 else
18798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18799 $as_echo "no" >&6; }
18800 fi
18801 
18802 
18803   test -n "$TIME" && break
18804 done
18805 
18806     else
18807       # If it succeeded, then it was overridden by the user. We will use it
18808       # for the tool.
18809 
18810       # First remove it from the list of overridden variables, so we can test
18811       # for unknown variables in the end.
18812       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18813 
18814       # Check if the provided tool contains a complete path.
18815       tool_specified="$TIME"
18816       tool_basename="${tool_specified##*/}"
18817       if test "x$tool_basename" = "x$tool_specified"; then
18818         # A command without a complete path is provided, search $PATH.
18819         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18820 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18821         # Extract the first word of "$tool_basename", so it can be a program name with args.
18822 set dummy $tool_basename; ac_word=$2
18823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18824 $as_echo_n "checking for $ac_word... " >&6; }
18825 if ${ac_cv_path_TIME+:} false; then :
18826   $as_echo_n "(cached) " >&6
18827 else
18828   case $TIME in
18829   [\\/]* | ?:[\\/]*)
18830   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18831   ;;
18832   *)
18833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18834 for as_dir in $PATH
18835 do
18836   IFS=$as_save_IFS
18837   test -z "$as_dir" && as_dir=.
18838     for ac_exec_ext in '' $ac_executable_extensions; do
18839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18840     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18842     break 2
18843   fi
18844 done
18845   done
18846 IFS=$as_save_IFS
18847 
18848   ;;
18849 esac
18850 fi
18851 TIME=$ac_cv_path_TIME
18852 if test -n "$TIME"; then
18853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18854 $as_echo "$TIME" >&6; }
18855 else
18856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18857 $as_echo "no" >&6; }
18858 fi
18859 
18860 
18861         if test "x$TIME" = x; then
18862           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18863         fi
18864       else
18865         # Otherwise we believe it is a complete path. Use it as it is.
18866         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18867 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18868         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18869 $as_echo_n "checking for TIME... " >&6; }
18870         if test ! -x "$tool_specified"; then
18871           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18872 $as_echo "not found" >&6; }
18873           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18874         fi
18875         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18876 $as_echo "$tool_specified" >&6; }
18877       fi
18878     fi
18879   fi
18880 
18881 
18882   # Check if it's GNU time
18883   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18884   if test "x$IS_GNU_TIME" != x; then
18885     IS_GNU_TIME=yes
18886   else
18887     IS_GNU_TIME=no
18888   fi
18889 
18890 
18891   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18892 
18893 
18894 
18895   # Publish this variable in the help.
18896 
18897 
18898   if test "x$DSYMUTIL" = x; then
18899     # The variable is not set by user, try to locate tool using the code snippet
18900     for ac_prog in dsymutil
18901 do
18902   # Extract the first word of "$ac_prog", so it can be a program name with args.
18903 set dummy $ac_prog; ac_word=$2
18904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18905 $as_echo_n "checking for $ac_word... " >&6; }
18906 if ${ac_cv_path_DSYMUTIL+:} false; then :
18907   $as_echo_n "(cached) " >&6
18908 else
18909   case $DSYMUTIL in
18910   [\\/]* | ?:[\\/]*)
18911   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18912   ;;
18913   *)
18914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18915 for as_dir in $PATH
18916 do
18917   IFS=$as_save_IFS
18918   test -z "$as_dir" && as_dir=.
18919     for ac_exec_ext in '' $ac_executable_extensions; do
18920   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18921     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18923     break 2
18924   fi
18925 done
18926   done
18927 IFS=$as_save_IFS
18928 
18929   ;;
18930 esac
18931 fi
18932 DSYMUTIL=$ac_cv_path_DSYMUTIL
18933 if test -n "$DSYMUTIL"; then
18934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18935 $as_echo "$DSYMUTIL" >&6; }
18936 else
18937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18938 $as_echo "no" >&6; }
18939 fi
18940 
18941 
18942   test -n "$DSYMUTIL" && break
18943 done
18944 
18945   else
18946     # The variable is set, but is it from the command line or the environment?
18947 
18948     # Try to remove the string !DSYMUTIL! from our list.
18949     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18950     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18951       # If it failed, the variable was not from the command line. Ignore it,
18952       # but warn the user (except for BASH, which is always set by the calling BASH).
18953       if test "xDSYMUTIL" != xBASH; then
18954         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18955 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18956       fi
18957       # Try to locate tool using the code snippet
18958       for ac_prog in dsymutil
18959 do
18960   # Extract the first word of "$ac_prog", so it can be a program name with args.
18961 set dummy $ac_prog; ac_word=$2
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18963 $as_echo_n "checking for $ac_word... " >&6; }
18964 if ${ac_cv_path_DSYMUTIL+:} false; then :
18965   $as_echo_n "(cached) " >&6
18966 else
18967   case $DSYMUTIL in
18968   [\\/]* | ?:[\\/]*)
18969   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18970   ;;
18971   *)
18972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18973 for as_dir in $PATH
18974 do
18975   IFS=$as_save_IFS
18976   test -z "$as_dir" && as_dir=.
18977     for ac_exec_ext in '' $ac_executable_extensions; do
18978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18979     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18981     break 2
18982   fi
18983 done
18984   done
18985 IFS=$as_save_IFS
18986 
18987   ;;
18988 esac
18989 fi
18990 DSYMUTIL=$ac_cv_path_DSYMUTIL
18991 if test -n "$DSYMUTIL"; then
18992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18993 $as_echo "$DSYMUTIL" >&6; }
18994 else
18995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18996 $as_echo "no" >&6; }
18997 fi
18998 
18999 
19000   test -n "$DSYMUTIL" && break
19001 done
19002 
19003     else
19004       # If it succeeded, then it was overridden by the user. We will use it
19005       # for the tool.
19006 
19007       # First remove it from the list of overridden variables, so we can test
19008       # for unknown variables in the end.
19009       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19010 
19011       # Check if the provided tool contains a complete path.
19012       tool_specified="$DSYMUTIL"
19013       tool_basename="${tool_specified##*/}"
19014       if test "x$tool_basename" = "x$tool_specified"; then
19015         # A command without a complete path is provided, search $PATH.
19016         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19017 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19018         # Extract the first word of "$tool_basename", so it can be a program name with args.
19019 set dummy $tool_basename; ac_word=$2
19020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19021 $as_echo_n "checking for $ac_word... " >&6; }
19022 if ${ac_cv_path_DSYMUTIL+:} false; then :
19023   $as_echo_n "(cached) " >&6
19024 else
19025   case $DSYMUTIL in
19026   [\\/]* | ?:[\\/]*)
19027   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19028   ;;
19029   *)
19030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19031 for as_dir in $PATH
19032 do
19033   IFS=$as_save_IFS
19034   test -z "$as_dir" && as_dir=.
19035     for ac_exec_ext in '' $ac_executable_extensions; do
19036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19037     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19039     break 2
19040   fi
19041 done
19042   done
19043 IFS=$as_save_IFS
19044 
19045   ;;
19046 esac
19047 fi
19048 DSYMUTIL=$ac_cv_path_DSYMUTIL
19049 if test -n "$DSYMUTIL"; then
19050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19051 $as_echo "$DSYMUTIL" >&6; }
19052 else
19053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19054 $as_echo "no" >&6; }
19055 fi
19056 
19057 
19058         if test "x$DSYMUTIL" = x; then
19059           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19060         fi
19061       else
19062         # Otherwise we believe it is a complete path. Use it as it is.
19063         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19064 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19065         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19066 $as_echo_n "checking for DSYMUTIL... " >&6; }
19067         if test ! -x "$tool_specified"; then
19068           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19069 $as_echo "not found" >&6; }
19070           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19071         fi
19072         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19073 $as_echo "$tool_specified" >&6; }
19074       fi
19075     fi
19076   fi
19077 
19078 
19079 
19080   if test "x$DSYMUTIL" = x; then
19081     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19082   fi
19083 
19084 
19085 
19086 
19087 
19088   # Publish this variable in the help.
19089 
19090 
19091   if test "x$XATTR" = x; then
19092     # The variable is not set by user, try to locate tool using the code snippet
19093     for ac_prog in xattr
19094 do
19095   # Extract the first word of "$ac_prog", so it can be a program name with args.
19096 set dummy $ac_prog; ac_word=$2
19097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19098 $as_echo_n "checking for $ac_word... " >&6; }
19099 if ${ac_cv_path_XATTR+:} false; then :
19100   $as_echo_n "(cached) " >&6
19101 else
19102   case $XATTR in
19103   [\\/]* | ?:[\\/]*)
19104   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19105   ;;
19106   *)
19107   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108 for as_dir in $PATH
19109 do
19110   IFS=$as_save_IFS
19111   test -z "$as_dir" && as_dir=.
19112     for ac_exec_ext in '' $ac_executable_extensions; do
19113   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19114     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19115     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116     break 2
19117   fi
19118 done
19119   done
19120 IFS=$as_save_IFS
19121 
19122   ;;
19123 esac
19124 fi
19125 XATTR=$ac_cv_path_XATTR
19126 if test -n "$XATTR"; then
19127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19128 $as_echo "$XATTR" >&6; }
19129 else
19130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131 $as_echo "no" >&6; }
19132 fi
19133 
19134 
19135   test -n "$XATTR" && break
19136 done
19137 
19138   else
19139     # The variable is set, but is it from the command line or the environment?
19140 
19141     # Try to remove the string !XATTR! from our list.
19142     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19143     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19144       # If it failed, the variable was not from the command line. Ignore it,
19145       # but warn the user (except for BASH, which is always set by the calling BASH).
19146       if test "xXATTR" != xBASH; then
19147         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19148 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19149       fi
19150       # Try to locate tool using the code snippet
19151       for ac_prog in xattr
19152 do
19153   # Extract the first word of "$ac_prog", so it can be a program name with args.
19154 set dummy $ac_prog; ac_word=$2
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19156 $as_echo_n "checking for $ac_word... " >&6; }
19157 if ${ac_cv_path_XATTR+:} false; then :
19158   $as_echo_n "(cached) " >&6
19159 else
19160   case $XATTR in
19161   [\\/]* | ?:[\\/]*)
19162   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19163   ;;
19164   *)
19165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19166 for as_dir in $PATH
19167 do
19168   IFS=$as_save_IFS
19169   test -z "$as_dir" && as_dir=.
19170     for ac_exec_ext in '' $ac_executable_extensions; do
19171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19172     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19174     break 2
19175   fi
19176 done
19177   done
19178 IFS=$as_save_IFS
19179 
19180   ;;
19181 esac
19182 fi
19183 XATTR=$ac_cv_path_XATTR
19184 if test -n "$XATTR"; then
19185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19186 $as_echo "$XATTR" >&6; }
19187 else
19188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19189 $as_echo "no" >&6; }
19190 fi
19191 
19192 
19193   test -n "$XATTR" && break
19194 done
19195 
19196     else
19197       # If it succeeded, then it was overridden by the user. We will use it
19198       # for the tool.
19199 
19200       # First remove it from the list of overridden variables, so we can test
19201       # for unknown variables in the end.
19202       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19203 
19204       # Check if the provided tool contains a complete path.
19205       tool_specified="$XATTR"
19206       tool_basename="${tool_specified##*/}"
19207       if test "x$tool_basename" = "x$tool_specified"; then
19208         # A command without a complete path is provided, search $PATH.
19209         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19210 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19211         # Extract the first word of "$tool_basename", so it can be a program name with args.
19212 set dummy $tool_basename; ac_word=$2
19213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19214 $as_echo_n "checking for $ac_word... " >&6; }
19215 if ${ac_cv_path_XATTR+:} false; then :
19216   $as_echo_n "(cached) " >&6
19217 else
19218   case $XATTR in
19219   [\\/]* | ?:[\\/]*)
19220   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19221   ;;
19222   *)
19223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19224 for as_dir in $PATH
19225 do
19226   IFS=$as_save_IFS
19227   test -z "$as_dir" && as_dir=.
19228     for ac_exec_ext in '' $ac_executable_extensions; do
19229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19230     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19232     break 2
19233   fi
19234 done
19235   done
19236 IFS=$as_save_IFS
19237 
19238   ;;
19239 esac
19240 fi
19241 XATTR=$ac_cv_path_XATTR
19242 if test -n "$XATTR"; then
19243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19244 $as_echo "$XATTR" >&6; }
19245 else
19246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19247 $as_echo "no" >&6; }
19248 fi
19249 
19250 
19251         if test "x$XATTR" = x; then
19252           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19253         fi
19254       else
19255         # Otherwise we believe it is a complete path. Use it as it is.
19256         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19257 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19259 $as_echo_n "checking for XATTR... " >&6; }
19260         if test ! -x "$tool_specified"; then
19261           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19262 $as_echo "not found" >&6; }
19263           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19264         fi
19265         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19266 $as_echo "$tool_specified" >&6; }
19267       fi
19268     fi
19269   fi
19270 
19271 
19272 
19273   if test "x$XATTR" = x; then
19274     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19275   fi
19276 
19277 
19278 
19279 
19280   # Publish this variable in the help.
19281 
19282 
19283   if test "x$CODESIGN" = x; then
19284     # The variable is not set by user, try to locate tool using the code snippet
19285     for ac_prog in codesign
19286 do
19287   # Extract the first word of "$ac_prog", so it can be a program name with args.
19288 set dummy $ac_prog; ac_word=$2
19289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19290 $as_echo_n "checking for $ac_word... " >&6; }
19291 if ${ac_cv_path_CODESIGN+:} false; then :
19292   $as_echo_n "(cached) " >&6
19293 else
19294   case $CODESIGN in
19295   [\\/]* | ?:[\\/]*)
19296   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19297   ;;
19298   *)
19299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19300 for as_dir in $PATH
19301 do
19302   IFS=$as_save_IFS
19303   test -z "$as_dir" && as_dir=.
19304     for ac_exec_ext in '' $ac_executable_extensions; do
19305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19306     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19308     break 2
19309   fi
19310 done
19311   done
19312 IFS=$as_save_IFS
19313 
19314   ;;
19315 esac
19316 fi
19317 CODESIGN=$ac_cv_path_CODESIGN
19318 if test -n "$CODESIGN"; then
19319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19320 $as_echo "$CODESIGN" >&6; }
19321 else
19322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19323 $as_echo "no" >&6; }
19324 fi
19325 
19326 
19327   test -n "$CODESIGN" && break
19328 done
19329 
19330   else
19331     # The variable is set, but is it from the command line or the environment?
19332 
19333     # Try to remove the string !CODESIGN! from our list.
19334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19336       # If it failed, the variable was not from the command line. Ignore it,
19337       # but warn the user (except for BASH, which is always set by the calling BASH).
19338       if test "xCODESIGN" != xBASH; then
19339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19340 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19341       fi
19342       # Try to locate tool using the code snippet
19343       for ac_prog in codesign
19344 do
19345   # Extract the first word of "$ac_prog", so it can be a program name with args.
19346 set dummy $ac_prog; ac_word=$2
19347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19348 $as_echo_n "checking for $ac_word... " >&6; }
19349 if ${ac_cv_path_CODESIGN+:} false; then :
19350   $as_echo_n "(cached) " >&6
19351 else
19352   case $CODESIGN in
19353   [\\/]* | ?:[\\/]*)
19354   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19355   ;;
19356   *)
19357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19358 for as_dir in $PATH
19359 do
19360   IFS=$as_save_IFS
19361   test -z "$as_dir" && as_dir=.
19362     for ac_exec_ext in '' $ac_executable_extensions; do
19363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19364     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19366     break 2
19367   fi
19368 done
19369   done
19370 IFS=$as_save_IFS
19371 
19372   ;;
19373 esac
19374 fi
19375 CODESIGN=$ac_cv_path_CODESIGN
19376 if test -n "$CODESIGN"; then
19377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19378 $as_echo "$CODESIGN" >&6; }
19379 else
19380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19381 $as_echo "no" >&6; }
19382 fi
19383 
19384 
19385   test -n "$CODESIGN" && break
19386 done
19387 
19388     else
19389       # If it succeeded, then it was overridden by the user. We will use it
19390       # for the tool.
19391 
19392       # First remove it from the list of overridden variables, so we can test
19393       # for unknown variables in the end.
19394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19395 
19396       # Check if the provided tool contains a complete path.
19397       tool_specified="$CODESIGN"
19398       tool_basename="${tool_specified##*/}"
19399       if test "x$tool_basename" = "x$tool_specified"; then
19400         # A command without a complete path is provided, search $PATH.
19401         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19402 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19403         # Extract the first word of "$tool_basename", so it can be a program name with args.
19404 set dummy $tool_basename; ac_word=$2
19405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19406 $as_echo_n "checking for $ac_word... " >&6; }
19407 if ${ac_cv_path_CODESIGN+:} false; then :
19408   $as_echo_n "(cached) " >&6
19409 else
19410   case $CODESIGN in
19411   [\\/]* | ?:[\\/]*)
19412   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19413   ;;
19414   *)
19415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19416 for as_dir in $PATH
19417 do
19418   IFS=$as_save_IFS
19419   test -z "$as_dir" && as_dir=.
19420     for ac_exec_ext in '' $ac_executable_extensions; do
19421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19422     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19424     break 2
19425   fi
19426 done
19427   done
19428 IFS=$as_save_IFS
19429 
19430   ;;
19431 esac
19432 fi
19433 CODESIGN=$ac_cv_path_CODESIGN
19434 if test -n "$CODESIGN"; then
19435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19436 $as_echo "$CODESIGN" >&6; }
19437 else
19438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19439 $as_echo "no" >&6; }
19440 fi
19441 
19442 
19443         if test "x$CODESIGN" = x; then
19444           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19445         fi
19446       else
19447         # Otherwise we believe it is a complete path. Use it as it is.
19448         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19449 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19450         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19451 $as_echo_n "checking for CODESIGN... " >&6; }
19452         if test ! -x "$tool_specified"; then
19453           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19454 $as_echo "not found" >&6; }
19455           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19456         fi
19457         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19458 $as_echo "$tool_specified" >&6; }
19459       fi
19460     fi
19461   fi
19462 
19463 
19464     if test "x$CODESIGN" != "x"; then
19465       # Verify that the openjdk_codesign certificate is present
19466       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19467 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19468       rm -f codesign-testfile
19469       touch codesign-testfile
19470       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19471       rm -f codesign-testfile
19472       if test "x$CODESIGN" = x; then
19473         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19474 $as_echo "no" >&6; }
19475       else
19476         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19477 $as_echo "yes" >&6; }
19478       fi
19479     fi
19480   fi
19481 
19482 
19483   # Test if bash supports pipefail.
19484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19485 $as_echo_n "checking if bash supports pipefail... " >&6; }
19486   if ${BASH} -c 'set -o pipefail'; then
19487     BASH_ARGS="$BASH_ARGS -o pipefail"
19488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19489 $as_echo "yes" >&6; }
19490   else
19491     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19492 $as_echo "no" >&6; }
19493   fi
19494 
19495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19496 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19497   if ${BASH} -e -c 'true'; then
19498     BASH_ARGS="$BASH_ARGS -e"
19499     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19500 $as_echo "yes" >&6; }
19501   else
19502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19503 $as_echo "no" >&6; }
19504   fi
19505 
19506 
19507 
19508 
19509 # Check if pkg-config is available.
19510 
19511 
19512 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19513         if test -n "$ac_tool_prefix"; then
19514   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19515 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19517 $as_echo_n "checking for $ac_word... " >&6; }
19518 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19519   $as_echo_n "(cached) " >&6
19520 else
19521   case $PKG_CONFIG in
19522   [\\/]* | ?:[\\/]*)
19523   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19524   ;;
19525   *)
19526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19527 for as_dir in $PATH
19528 do
19529   IFS=$as_save_IFS
19530   test -z "$as_dir" && as_dir=.
19531     for ac_exec_ext in '' $ac_executable_extensions; do
19532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19533     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19535     break 2
19536   fi
19537 done
19538   done
19539 IFS=$as_save_IFS
19540 
19541   ;;
19542 esac
19543 fi
19544 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19545 if test -n "$PKG_CONFIG"; then
19546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19547 $as_echo "$PKG_CONFIG" >&6; }
19548 else
19549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19550 $as_echo "no" >&6; }
19551 fi
19552 
19553 
19554 fi
19555 if test -z "$ac_cv_path_PKG_CONFIG"; then
19556   ac_pt_PKG_CONFIG=$PKG_CONFIG
19557   # Extract the first word of "pkg-config", so it can be a program name with args.
19558 set dummy pkg-config; ac_word=$2
19559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19560 $as_echo_n "checking for $ac_word... " >&6; }
19561 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19562   $as_echo_n "(cached) " >&6
19563 else
19564   case $ac_pt_PKG_CONFIG in
19565   [\\/]* | ?:[\\/]*)
19566   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19567   ;;
19568   *)
19569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19570 for as_dir in $PATH
19571 do
19572   IFS=$as_save_IFS
19573   test -z "$as_dir" && as_dir=.
19574     for ac_exec_ext in '' $ac_executable_extensions; do
19575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19576     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19578     break 2
19579   fi
19580 done
19581   done
19582 IFS=$as_save_IFS
19583 
19584   ;;
19585 esac
19586 fi
19587 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19588 if test -n "$ac_pt_PKG_CONFIG"; then
19589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19590 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19591 else
19592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19593 $as_echo "no" >&6; }
19594 fi
19595 
19596   if test "x$ac_pt_PKG_CONFIG" = x; then
19597     PKG_CONFIG=""
19598   else
19599     case $cross_compiling:$ac_tool_warned in
19600 yes:)
19601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19602 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19603 ac_tool_warned=yes ;;
19604 esac
19605     PKG_CONFIG=$ac_pt_PKG_CONFIG
19606   fi
19607 else
19608   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19609 fi
19610 
19611 fi
19612 if test -n "$PKG_CONFIG"; then
19613         _pkg_min_version=0.9.0
19614         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19615 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19616         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19617                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19618 $as_echo "yes" >&6; }
19619         else
19620                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19621 $as_echo "no" >&6; }
19622                 PKG_CONFIG=""
19623         fi
19624 
19625 fi
19626 
19627 # After basic tools have been setup, we can check build os specific details.
19628 
19629   ###############################################################################
19630 
19631   # Note that this is the build platform OS version!
19632 
19633   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19634   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19635   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19636   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19637 
19638 
19639 
19640 
19641 
19642 # Setup builddeps, for automatic downloading of tools we need.
19643 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19644 # boot-jdk setup, but we need to have basic tools setup first.
19645 
19646 
19647 # Check whether --with-builddeps-conf was given.
19648 if test "${with_builddeps_conf+set}" = set; then :
19649   withval=$with_builddeps_conf;
19650 fi
19651 
19652 
19653 
19654 # Check whether --with-builddeps-server was given.
19655 if test "${with_builddeps_server+set}" = set; then :
19656   withval=$with_builddeps_server;
19657 fi
19658 
19659 
19660 
19661 # Check whether --with-builddeps-dir was given.
19662 if test "${with_builddeps_dir+set}" = set; then :
19663   withval=$with_builddeps_dir;
19664 else
19665   with_builddeps_dir=/localhome/builddeps
19666 fi
19667 
19668 
19669 
19670 # Check whether --with-builddeps-group was given.
19671 if test "${with_builddeps_group+set}" = set; then :
19672   withval=$with_builddeps_group;
19673 fi
19674 
19675 
19676 
19677 
19678   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19679     if test "x$with_builddeps_conf" != x; then
19680       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19681 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19682       builddepsfile=$with_builddeps_conf
19683       if test -s $builddepsfile; then
19684         . $builddepsfile
19685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19686 $as_echo "loaded!" >&6; }
19687       else
19688         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19689       fi
19690     else
19691       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19692 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19693       builddepsfile=`mktemp`
19694       touch $builddepsfile
19695       # Put all found confs into a single file.
19696       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19697       # Source the file to acquire the variables
19698       if test -s $builddepsfile; then
19699         . $builddepsfile
19700         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19701 $as_echo "found at least one!" >&6; }
19702       else
19703         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19704       fi
19705     fi
19706     # Create build and target names that use _ instead of "-" and ".".
19707     # This is necessary to use them in variable names.
19708     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19709     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19710     # Extract rewrite information for build and target
19711     eval rewritten_build=\${REWRITE_${build_var}}
19712     if test "x$rewritten_build" = x; then
19713       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19714       echo Build stays the same $rewritten_build
19715     else
19716       echo Rewriting build for builddeps into $rewritten_build
19717     fi
19718     eval rewritten_target=\${REWRITE_${target_var}}
19719     if test "x$rewritten_target" = x; then
19720       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19721       echo Target stays the same $rewritten_target
19722     else
19723       echo Rewriting target for builddeps into $rewritten_target
19724     fi
19725     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19726     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19727   fi
19728   for ac_prog in 7z unzip
19729 do
19730   # Extract the first word of "$ac_prog", so it can be a program name with args.
19731 set dummy $ac_prog; ac_word=$2
19732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19733 $as_echo_n "checking for $ac_word... " >&6; }
19734 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19735   $as_echo_n "(cached) " >&6
19736 else
19737   if test -n "$BDEPS_UNZIP"; then
19738   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19739 else
19740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19741 for as_dir in $PATH
19742 do
19743   IFS=$as_save_IFS
19744   test -z "$as_dir" && as_dir=.
19745     for ac_exec_ext in '' $ac_executable_extensions; do
19746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19747     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19749     break 2
19750   fi
19751 done
19752   done
19753 IFS=$as_save_IFS
19754 
19755 fi
19756 fi
19757 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19758 if test -n "$BDEPS_UNZIP"; then
19759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19760 $as_echo "$BDEPS_UNZIP" >&6; }
19761 else
19762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19763 $as_echo "no" >&6; }
19764 fi
19765 
19766 
19767   test -n "$BDEPS_UNZIP" && break
19768 done
19769 
19770   if test "x$BDEPS_UNZIP" = x7z; then
19771     BDEPS_UNZIP="7z x"
19772   fi
19773 
19774   for ac_prog in wget lftp ftp
19775 do
19776   # Extract the first word of "$ac_prog", so it can be a program name with args.
19777 set dummy $ac_prog; ac_word=$2
19778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19779 $as_echo_n "checking for $ac_word... " >&6; }
19780 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19781   $as_echo_n "(cached) " >&6
19782 else
19783   if test -n "$BDEPS_FTP"; then
19784   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19785 else
19786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19787 for as_dir in $PATH
19788 do
19789   IFS=$as_save_IFS
19790   test -z "$as_dir" && as_dir=.
19791     for ac_exec_ext in '' $ac_executable_extensions; do
19792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19793     ac_cv_prog_BDEPS_FTP="$ac_prog"
19794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19795     break 2
19796   fi
19797 done
19798   done
19799 IFS=$as_save_IFS
19800 
19801 fi
19802 fi
19803 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19804 if test -n "$BDEPS_FTP"; then
19805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19806 $as_echo "$BDEPS_FTP" >&6; }
19807 else
19808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19809 $as_echo "no" >&6; }
19810 fi
19811 
19812 
19813   test -n "$BDEPS_FTP" && break
19814 done
19815 
19816 
19817 
19818 ###############################################################################
19819 #
19820 # Determine OpenJDK variants, options and version numbers.
19821 #
19822 ###############################################################################
19823 
19824 # We need build & target for this.
19825 
19826 
19827   ###############################################################################
19828   #
19829   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19830   # We always build headless support.
19831   #
19832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19833 $as_echo_n "checking headful support... " >&6; }
19834   # Check whether --enable-headful was given.
19835 if test "${enable_headful+set}" = set; then :
19836   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19837 else
19838   SUPPORT_HEADFUL=yes
19839 fi
19840 
19841 
19842   SUPPORT_HEADLESS=yes
19843   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19844 
19845   if test "x$SUPPORT_HEADFUL" = xyes; then
19846     # We are building both headful and headless.
19847     headful_msg="include support for both headful and headless"
19848   fi
19849 
19850   if test "x$SUPPORT_HEADFUL" = xno; then
19851     # Thus we are building headless only.
19852     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19853     headful_msg="headless only"
19854   fi
19855 
19856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19857 $as_echo "$headful_msg" >&6; }
19858 
19859 
19860 
19861 
19862 
19863   # Control wether Hotspot runs Queens test after build.
19864   # Check whether --enable-hotspot-test-in-build was given.
19865 if test "${enable_hotspot_test_in_build+set}" = set; then :
19866   enableval=$enable_hotspot_test_in_build;
19867 else
19868   enable_hotspot_test_in_build=no
19869 fi
19870 
19871   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19872     TEST_IN_BUILD=true
19873   else
19874     TEST_IN_BUILD=false
19875   fi
19876 
19877 
19878   ###############################################################################
19879   #
19880   # Choose cacerts source file
19881   #
19882 
19883 # Check whether --with-cacerts-file was given.
19884 if test "${with_cacerts_file+set}" = set; then :
19885   withval=$with_cacerts_file;
19886 fi
19887 
19888   if test "x$with_cacerts_file" != x; then
19889     CACERTS_FILE=$with_cacerts_file
19890   fi
19891 
19892 
19893   ###############################################################################
19894   #
19895   # Enable or disable unlimited crypto
19896   #
19897   # Check whether --enable-unlimited-crypto was given.
19898 if test "${enable_unlimited_crypto+set}" = set; then :
19899   enableval=$enable_unlimited_crypto;
19900 else
19901   enable_unlimited_crypto=no
19902 fi
19903 
19904   if test "x$enable_unlimited_crypto" = "xyes"; then
19905     UNLIMITED_CRYPTO=true
19906   else
19907     UNLIMITED_CRYPTO=false
19908   fi
19909 
19910 
19911   ###############################################################################
19912   #
19913   # Enable or disable the elliptic curve crypto implementation
19914   #
19915 
19916 
19917   ###############################################################################
19918   #
19919   # --enable-rmiconnector-iiop
19920   #
19921   # Check whether --enable-rmiconnector-iiop was given.
19922 if test "${enable_rmiconnector_iiop+set}" = set; then :
19923   enableval=$enable_rmiconnector_iiop;
19924 fi
19925 
19926   if test "x$enable_rmiconnector_iiop" = "xyes"; then
19927     RMICONNECTOR_IIOP=true
19928   else
19929     RMICONNECTOR_IIOP=false
19930   fi
19931 
19932 
19933   ###############################################################################
19934   #
19935   # Compress jars
19936   #
19937   COMPRESS_JARS=false
19938 
19939 
19940 
19941 
19942   # Source the version numbers
19943   . $AUTOCONF_DIR/version-numbers
19944 
19945   # Get the settings from parameters
19946 
19947 # Check whether --with-milestone was given.
19948 if test "${with_milestone+set}" = set; then :
19949   withval=$with_milestone;
19950 fi
19951 
19952   if test "x$with_milestone" = xyes; then
19953     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19954   elif test "x$with_milestone" != x; then
19955     MILESTONE="$with_milestone"
19956   fi
19957   if test "x$MILESTONE" = x; then
19958     MILESTONE=internal
19959   fi
19960 
19961 
19962 # Check whether --with-update-version was given.
19963 if test "${with_update_version+set}" = set; then :
19964   withval=$with_update_version;
19965 fi
19966 
19967   if test "x$with_update_version" = xyes; then
19968     as_fn_error $? "Update version must have a value" "$LINENO" 5
19969   elif test "x$with_update_version" != x; then
19970     JDK_UPDATE_VERSION="$with_update_version"
19971     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19972     # to a bug in expr (which reduces it to just X). To work around this, we
19973     # always add a 0 to one digit update versions.
19974     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19975       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19976     fi
19977   fi
19978 
19979 
19980 # Check whether --with-user-release-suffix was given.
19981 if test "${with_user_release_suffix+set}" = set; then :
19982   withval=$with_user_release_suffix;
19983 fi
19984 
19985   if test "x$with_user_release_suffix" = xyes; then
19986     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19987   elif test "x$with_user_release_suffix" != x; then
19988     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19989   fi
19990 
19991 
19992 # Check whether --with-build-number was given.
19993 if test "${with_build_number+set}" = set; then :
19994   withval=$with_build_number;
19995 fi
19996 
19997   if test "x$with_build_number" = xyes; then
19998     as_fn_error $? "Build number must have a value" "$LINENO" 5
19999   elif test "x$with_build_number" != x; then
20000     JDK_BUILD_NUMBER="$with_build_number"
20001   fi
20002   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20003   if test "x$JDK_BUILD_NUMBER" = x; then
20004     JDK_BUILD_NUMBER=b00
20005     if test "x$USER_RELEASE_SUFFIX" = x; then
20006       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20007       # Avoid [:alnum:] since it depends on the locale.
20008       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20009       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20010     fi
20011   fi
20012 
20013   # Now set the JDK version, milestone, build number etc.
20014 
20015 
20016 
20017 
20018 
20019 
20020 
20021 
20022 
20023 
20024 
20025 
20026 
20027 
20028 
20029 
20030 # Check whether --with-copyright-year was given.
20031 if test "${with_copyright_year+set}" = set; then :
20032   withval=$with_copyright_year;
20033 fi
20034 
20035   if test "x$with_copyright_year" = xyes; then
20036     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20037   elif test "x$with_copyright_year" != x; then
20038     COPYRIGHT_YEAR="$with_copyright_year"
20039   else
20040     COPYRIGHT_YEAR=`date +'%Y'`
20041   fi
20042 
20043 
20044   if test "x$JDK_UPDATE_VERSION" != x; then
20045     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20046   else
20047     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20048   fi
20049 
20050 
20051   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20052 
20053 
20054 
20055 ###############################################################################
20056 #
20057 # Setup BootJDK, used to bootstrap the build.
20058 #
20059 ###############################################################################
20060 
20061 
20062   BOOT_JDK_FOUND=no
20063 
20064 # Check whether --with-boot-jdk was given.
20065 if test "${with_boot_jdk+set}" = set; then :
20066   withval=$with_boot_jdk;
20067 fi
20068 
20069 
20070   # We look for the Boot JDK through various means, going from more certain to
20071   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20072   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20073   # must check if this is indeed valid; otherwise we'll continue looking.
20074 
20075   # Test: Is bootjdk explicitely set by command line arguments?
20076 
20077   if test "x$BOOT_JDK_FOUND" = xno; then
20078     # Now execute the test
20079 
20080   if test "x$with_boot_jdk" != x; then
20081     BOOT_JDK=$with_boot_jdk
20082     BOOT_JDK_FOUND=maybe
20083     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20084 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20085   fi
20086 
20087 
20088     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20089     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20090       # Do we have a bin/java?
20091       if test ! -x "$BOOT_JDK/bin/java"; then
20092         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20093 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20094         BOOT_JDK_FOUND=no
20095       else
20096         # Do we have a bin/javac?
20097         if test ! -x "$BOOT_JDK/bin/javac"; then
20098           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20100           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20101 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20102           BOOT_JDK_FOUND=no
20103         else
20104           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20105           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20106 
20107           # Extra M4 quote needed to protect [] in grep expression.
20108           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20109           if test "x$FOUND_CORRECT_VERSION" = x; then
20110             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20111 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20112             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20113 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20114             BOOT_JDK_FOUND=no
20115           else
20116             # We're done! :-)
20117             BOOT_JDK_FOUND=yes
20118 
20119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20120 
20121   # Input might be given as Windows format, start by converting to
20122   # unix format.
20123   path="$BOOT_JDK"
20124   new_path=`$CYGPATH -u "$path"`
20125 
20126   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20127   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20128   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20129   # "foo.exe" is OK but "foo" is an error.
20130   #
20131   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20132   # It is also a way to make sure we got the proper file name for the real test later on.
20133   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20134   if test "x$test_shortpath" = x; then
20135     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20136 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20137     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20138   fi
20139 
20140   # Call helper function which possibly converts this using DOS-style short mode.
20141   # If so, the updated path is stored in $new_path.
20142 
20143   input_path="$new_path"
20144   # Check if we need to convert this using DOS-style short mode. If the path
20145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20146   # take no chances and rewrite it.
20147   # Note: m4 eats our [], so we need to use [ and ] instead.
20148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20149   if test "x$has_forbidden_chars" != x; then
20150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20151     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20152     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20153     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20154       # Going to short mode and back again did indeed matter. Since short mode is
20155       # case insensitive, let's make it lowercase to improve readability.
20156       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20157       # Now convert it back to Unix-stile (cygpath)
20158       input_path=`$CYGPATH -u "$shortmode_path"`
20159       new_path="$input_path"
20160     fi
20161   fi
20162 
20163   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20164   if test "x$test_cygdrive_prefix" = x; then
20165     # As a simple fix, exclude /usr/bin since it's not a real path.
20166     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20167       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20168       # a path prefixed by /cygdrive for fixpath to work.
20169       new_path="$CYGWIN_ROOT_PATH$input_path"
20170     fi
20171   fi
20172 
20173 
20174   if test "x$path" != "x$new_path"; then
20175     BOOT_JDK="$new_path"
20176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20177 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20178   fi
20179 
20180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20181 
20182   path="$BOOT_JDK"
20183   has_colon=`$ECHO $path | $GREP ^.:`
20184   new_path="$path"
20185   if test "x$has_colon" = x; then
20186     # Not in mixed or Windows style, start by that.
20187     new_path=`cmd //c echo $path`
20188   fi
20189 
20190 
20191   input_path="$new_path"
20192   # Check if we need to convert this using DOS-style short mode. If the path
20193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20194   # take no chances and rewrite it.
20195   # Note: m4 eats our [], so we need to use [ and ] instead.
20196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20197   if test "x$has_forbidden_chars" != x; then
20198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20199     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20200   fi
20201 
20202 
20203   windows_path="$new_path"
20204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20205     unix_path=`$CYGPATH -u "$windows_path"`
20206     new_path="$unix_path"
20207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20209     new_path="$unix_path"
20210   fi
20211 
20212   if test "x$path" != "x$new_path"; then
20213     BOOT_JDK="$new_path"
20214     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20215 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20216   fi
20217 
20218   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20219   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20220 
20221   else
20222     # We're on a unix platform. Hooray! :)
20223     path="$BOOT_JDK"
20224     has_space=`$ECHO "$path" | $GREP " "`
20225     if test "x$has_space" != x; then
20226       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20228       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20229     fi
20230 
20231     # Use eval to expand a potential ~
20232     eval path="$path"
20233     if test ! -f "$path" && test ! -d "$path"; then
20234       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20235     fi
20236 
20237     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20238   fi
20239 
20240             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20241 $as_echo_n "checking for Boot JDK... " >&6; }
20242             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20243 $as_echo "$BOOT_JDK" >&6; }
20244             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20245 $as_echo_n "checking Boot JDK version... " >&6; }
20246             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20247             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20248 $as_echo "$BOOT_JDK_VERSION" >&6; }
20249           fi # end check jdk version
20250         fi # end check javac
20251       fi # end check java
20252     fi # end check boot jdk found
20253   fi
20254 
20255   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20256     # Having specified an argument which is incorrect will produce an instant failure;
20257     # we should not go on looking
20258     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20259   fi
20260 
20261   # Test: Is bootjdk available from builddeps?
20262 
20263   if test "x$BOOT_JDK_FOUND" = xno; then
20264     # Now execute the test
20265 
20266 
20267 
20268   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20269     # Source the builddeps file again, to make sure it uses the latest variables!
20270     . $builddepsfile
20271     # Look for a target and build machine specific resource!
20272     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20273     if test "x$resource" = x; then
20274       # Ok, lets instead look for a target specific resource
20275       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20276     fi
20277     if test "x$resource" = x; then
20278       # Ok, lets instead look for a build specific resource
20279       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20280     fi
20281     if test "x$resource" = x; then
20282       # Ok, lets instead look for a generic resource
20283       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20284       resource=${builddep_bootjdk}
20285     fi
20286     if test "x$resource" != x; then
20287       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20288 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20289       # If the resource in the builddeps.conf file is an existing directory,
20290       # for example /java/linux/cups
20291       if test -d ${resource}; then
20292         depdir=${resource}
20293       else
20294 
20295   # bootjdk is for example mymodule
20296   # $resource is for example libs/general/libmymod_1_2_3.zip
20297   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20298   # $with_builddeps_dir is for example /localhome/builddeps
20299   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20300   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20301   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20302   filename=`basename $resource`
20303   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20304   filebase=${filename%%.*}
20305   extension=${filename#*.}
20306   installdir=$with_builddeps_dir/$filebase
20307   if test ! -f $installdir/$filename.unpacked; then
20308     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20309 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20310     if test ! -d $installdir; then
20311       mkdir -p $installdir
20312     fi
20313     if test ! -d $installdir; then
20314       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20315     fi
20316     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20317     touch $tmpfile
20318     if test ! -f $tmpfile; then
20319       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20320     fi
20321 
20322   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20323   # $tmpfile is the local file name for the downloaded file.
20324   VALID_TOOL=no
20325   if test "x$BDEPS_FTP" = xwget; then
20326     VALID_TOOL=yes
20327     wget -O $tmpfile $with_builddeps_server/$resource
20328   fi
20329   if test "x$BDEPS_FTP" = xlftp; then
20330     VALID_TOOL=yes
20331     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20332   fi
20333   if test "x$BDEPS_FTP" = xftp; then
20334     VALID_TOOL=yes
20335     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20336     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20337     FTPUSERPWD=${FTPSERVER%%@*}
20338     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20339       FTPUSER=${userpwd%%:*}
20340       FTPPWD=${userpwd#*@}
20341       FTPSERVER=${FTPSERVER#*@}
20342     else
20343       FTPUSER=ftp
20344       FTPPWD=ftp
20345     fi
20346     # the "pass" command does not work on some
20347     # ftp clients (read ftp.exe) but if it works,
20348     # passive mode is better!
20349     ( \
20350         echo "user $FTPUSER $FTPPWD"        ; \
20351         echo "pass"                         ; \
20352         echo "bin"                          ; \
20353         echo "get $FTPPATH $tmpfile"              ; \
20354     ) | ftp -in $FTPSERVER
20355   fi
20356   if test "x$VALID_TOOL" != xyes; then
20357     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20358   fi
20359 
20360     mv $tmpfile $installdir/$filename
20361     if test ! -s $installdir/$filename; then
20362       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20363     fi
20364     case "$extension" in
20365       zip)  echo "Unzipping $installdir/$filename..."
20366         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20367         ;;
20368       tar.gz) echo "Untaring $installdir/$filename..."
20369         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20370         ;;
20371       tgz) echo "Untaring $installdir/$filename..."
20372         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20373         ;;
20374       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20375         ;;
20376     esac
20377   fi
20378   if test -f $installdir/$filename.unpacked; then
20379     depdir=$installdir
20380   fi
20381 
20382       fi
20383       # Source the builddeps file again, because in the previous command, the depdir
20384       # was updated to point at the current build dependency install directory.
20385       . $builddepsfile
20386       # Now extract variables from the builddeps.conf files.
20387       theroot=${builddep_bootjdk_ROOT}
20388       thecflags=${builddep_bootjdk_CFLAGS}
20389       thelibs=${builddep_bootjdk_LIBS}
20390       if test "x$depdir" = x; then
20391         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20392       fi
20393       BOOT_JDK=$depdir
20394       if test "x$theroot" != x; then
20395         BOOT_JDK="$theroot"
20396       fi
20397       if test "x$thecflags" != x; then
20398         BOOT_JDK_CFLAGS="$thecflags"
20399       fi
20400       if test "x$thelibs" != x; then
20401         BOOT_JDK_LIBS="$thelibs"
20402       fi
20403       BOOT_JDK_FOUND=maybe
20404       else BOOT_JDK_FOUND=no
20405 
20406     fi
20407     else BOOT_JDK_FOUND=no
20408 
20409   fi
20410 
20411 
20412 
20413     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20414     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20415       # Do we have a bin/java?
20416       if test ! -x "$BOOT_JDK/bin/java"; then
20417         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20419         BOOT_JDK_FOUND=no
20420       else
20421         # Do we have a bin/javac?
20422         if test ! -x "$BOOT_JDK/bin/javac"; then
20423           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20424 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20425           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20426 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20427           BOOT_JDK_FOUND=no
20428         else
20429           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20430           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20431 
20432           # Extra M4 quote needed to protect [] in grep expression.
20433           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20434           if test "x$FOUND_CORRECT_VERSION" = x; then
20435             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20437             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20438 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20439             BOOT_JDK_FOUND=no
20440           else
20441             # We're done! :-)
20442             BOOT_JDK_FOUND=yes
20443 
20444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20445 
20446   # Input might be given as Windows format, start by converting to
20447   # unix format.
20448   path="$BOOT_JDK"
20449   new_path=`$CYGPATH -u "$path"`
20450 
20451   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20452   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20453   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20454   # "foo.exe" is OK but "foo" is an error.
20455   #
20456   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20457   # It is also a way to make sure we got the proper file name for the real test later on.
20458   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20459   if test "x$test_shortpath" = x; then
20460     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20461 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20462     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20463   fi
20464 
20465   # Call helper function which possibly converts this using DOS-style short mode.
20466   # If so, the updated path is stored in $new_path.
20467 
20468   input_path="$new_path"
20469   # Check if we need to convert this using DOS-style short mode. If the path
20470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20471   # take no chances and rewrite it.
20472   # Note: m4 eats our [], so we need to use [ and ] instead.
20473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20474   if test "x$has_forbidden_chars" != x; then
20475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20476     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20477     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20478     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20479       # Going to short mode and back again did indeed matter. Since short mode is
20480       # case insensitive, let's make it lowercase to improve readability.
20481       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20482       # Now convert it back to Unix-stile (cygpath)
20483       input_path=`$CYGPATH -u "$shortmode_path"`
20484       new_path="$input_path"
20485     fi
20486   fi
20487 
20488   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20489   if test "x$test_cygdrive_prefix" = x; then
20490     # As a simple fix, exclude /usr/bin since it's not a real path.
20491     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20492       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20493       # a path prefixed by /cygdrive for fixpath to work.
20494       new_path="$CYGWIN_ROOT_PATH$input_path"
20495     fi
20496   fi
20497 
20498 
20499   if test "x$path" != "x$new_path"; then
20500     BOOT_JDK="$new_path"
20501     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20503   fi
20504 
20505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20506 
20507   path="$BOOT_JDK"
20508   has_colon=`$ECHO $path | $GREP ^.:`
20509   new_path="$path"
20510   if test "x$has_colon" = x; then
20511     # Not in mixed or Windows style, start by that.
20512     new_path=`cmd //c echo $path`
20513   fi
20514 
20515 
20516   input_path="$new_path"
20517   # Check if we need to convert this using DOS-style short mode. If the path
20518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20519   # take no chances and rewrite it.
20520   # Note: m4 eats our [], so we need to use [ and ] instead.
20521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20522   if test "x$has_forbidden_chars" != x; then
20523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20524     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20525   fi
20526 
20527 
20528   windows_path="$new_path"
20529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20530     unix_path=`$CYGPATH -u "$windows_path"`
20531     new_path="$unix_path"
20532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20534     new_path="$unix_path"
20535   fi
20536 
20537   if test "x$path" != "x$new_path"; then
20538     BOOT_JDK="$new_path"
20539     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20541   fi
20542 
20543   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20544   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20545 
20546   else
20547     # We're on a unix platform. Hooray! :)
20548     path="$BOOT_JDK"
20549     has_space=`$ECHO "$path" | $GREP " "`
20550     if test "x$has_space" != x; then
20551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20552 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20553       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20554     fi
20555 
20556     # Use eval to expand a potential ~
20557     eval path="$path"
20558     if test ! -f "$path" && test ! -d "$path"; then
20559       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20560     fi
20561 
20562     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20563   fi
20564 
20565             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20566 $as_echo_n "checking for Boot JDK... " >&6; }
20567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20568 $as_echo "$BOOT_JDK" >&6; }
20569             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20570 $as_echo_n "checking Boot JDK version... " >&6; }
20571             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20572             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20573 $as_echo "$BOOT_JDK_VERSION" >&6; }
20574           fi # end check jdk version
20575         fi # end check javac
20576       fi # end check java
20577     fi # end check boot jdk found
20578   fi
20579 
20580 
20581   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20582 
20583   if test "x$BOOT_JDK_FOUND" = xno; then
20584     # Now execute the test
20585 
20586   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20587     # First check at user selected default
20588 
20589   if test "x$BOOT_JDK_FOUND" = xno; then
20590     # Now execute the test
20591 
20592   if test -x /usr/libexec/java_home; then
20593     BOOT_JDK=`/usr/libexec/java_home `
20594     BOOT_JDK_FOUND=maybe
20595     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20596 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20597   fi
20598 
20599 
20600     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20601     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20602       # Do we have a bin/java?
20603       if test ! -x "$BOOT_JDK/bin/java"; then
20604         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20605 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20606         BOOT_JDK_FOUND=no
20607       else
20608         # Do we have a bin/javac?
20609         if test ! -x "$BOOT_JDK/bin/javac"; then
20610           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20611 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20612           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20613 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20614           BOOT_JDK_FOUND=no
20615         else
20616           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20617           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20618 
20619           # Extra M4 quote needed to protect [] in grep expression.
20620           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20621           if test "x$FOUND_CORRECT_VERSION" = x; then
20622             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20623 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20624             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20625 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20626             BOOT_JDK_FOUND=no
20627           else
20628             # We're done! :-)
20629             BOOT_JDK_FOUND=yes
20630 
20631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20632 
20633   # Input might be given as Windows format, start by converting to
20634   # unix format.
20635   path="$BOOT_JDK"
20636   new_path=`$CYGPATH -u "$path"`
20637 
20638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20641   # "foo.exe" is OK but "foo" is an error.
20642   #
20643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20644   # It is also a way to make sure we got the proper file name for the real test later on.
20645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20646   if test "x$test_shortpath" = x; then
20647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20648 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20649     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20650   fi
20651 
20652   # Call helper function which possibly converts this using DOS-style short mode.
20653   # If so, the updated path is stored in $new_path.
20654 
20655   input_path="$new_path"
20656   # Check if we need to convert this using DOS-style short mode. If the path
20657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20658   # take no chances and rewrite it.
20659   # Note: m4 eats our [], so we need to use [ and ] instead.
20660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20661   if test "x$has_forbidden_chars" != x; then
20662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20666       # Going to short mode and back again did indeed matter. Since short mode is
20667       # case insensitive, let's make it lowercase to improve readability.
20668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20669       # Now convert it back to Unix-stile (cygpath)
20670       input_path=`$CYGPATH -u "$shortmode_path"`
20671       new_path="$input_path"
20672     fi
20673   fi
20674 
20675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20676   if test "x$test_cygdrive_prefix" = x; then
20677     # As a simple fix, exclude /usr/bin since it's not a real path.
20678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20680       # a path prefixed by /cygdrive for fixpath to work.
20681       new_path="$CYGWIN_ROOT_PATH$input_path"
20682     fi
20683   fi
20684 
20685 
20686   if test "x$path" != "x$new_path"; then
20687     BOOT_JDK="$new_path"
20688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20689 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20690   fi
20691 
20692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20693 
20694   path="$BOOT_JDK"
20695   has_colon=`$ECHO $path | $GREP ^.:`
20696   new_path="$path"
20697   if test "x$has_colon" = x; then
20698     # Not in mixed or Windows style, start by that.
20699     new_path=`cmd //c echo $path`
20700   fi
20701 
20702 
20703   input_path="$new_path"
20704   # Check if we need to convert this using DOS-style short mode. If the path
20705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20706   # take no chances and rewrite it.
20707   # Note: m4 eats our [], so we need to use [ and ] instead.
20708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20709   if test "x$has_forbidden_chars" != x; then
20710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20712   fi
20713 
20714 
20715   windows_path="$new_path"
20716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20717     unix_path=`$CYGPATH -u "$windows_path"`
20718     new_path="$unix_path"
20719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20721     new_path="$unix_path"
20722   fi
20723 
20724   if test "x$path" != "x$new_path"; then
20725     BOOT_JDK="$new_path"
20726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20727 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20728   fi
20729 
20730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20732 
20733   else
20734     # We're on a unix platform. Hooray! :)
20735     path="$BOOT_JDK"
20736     has_space=`$ECHO "$path" | $GREP " "`
20737     if test "x$has_space" != x; then
20738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20739 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20740       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20741     fi
20742 
20743     # Use eval to expand a potential ~
20744     eval path="$path"
20745     if test ! -f "$path" && test ! -d "$path"; then
20746       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20747     fi
20748 
20749     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20750   fi
20751 
20752             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20753 $as_echo_n "checking for Boot JDK... " >&6; }
20754             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20755 $as_echo "$BOOT_JDK" >&6; }
20756             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20757 $as_echo_n "checking Boot JDK version... " >&6; }
20758             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20759             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20760 $as_echo "$BOOT_JDK_VERSION" >&6; }
20761           fi # end check jdk version
20762         fi # end check javac
20763       fi # end check java
20764     fi # end check boot jdk found
20765   fi
20766 
20767     # If that did not work out (e.g. too old), try explicit versions instead
20768 
20769   if test "x$BOOT_JDK_FOUND" = xno; then
20770     # Now execute the test
20771 
20772   if test -x /usr/libexec/java_home; then
20773     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20774     BOOT_JDK_FOUND=maybe
20775     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20776 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20777   fi
20778 
20779 
20780     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20781     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20782       # Do we have a bin/java?
20783       if test ! -x "$BOOT_JDK/bin/java"; then
20784         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20785 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20786         BOOT_JDK_FOUND=no
20787       else
20788         # Do we have a bin/javac?
20789         if test ! -x "$BOOT_JDK/bin/javac"; then
20790           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20791 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20792           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20793 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20794           BOOT_JDK_FOUND=no
20795         else
20796           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20797           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20798 
20799           # Extra M4 quote needed to protect [] in grep expression.
20800           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20801           if test "x$FOUND_CORRECT_VERSION" = x; then
20802             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20804             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20805 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20806             BOOT_JDK_FOUND=no
20807           else
20808             # We're done! :-)
20809             BOOT_JDK_FOUND=yes
20810 
20811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20812 
20813   # Input might be given as Windows format, start by converting to
20814   # unix format.
20815   path="$BOOT_JDK"
20816   new_path=`$CYGPATH -u "$path"`
20817 
20818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20821   # "foo.exe" is OK but "foo" is an error.
20822   #
20823   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20824   # It is also a way to make sure we got the proper file name for the real test later on.
20825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20826   if test "x$test_shortpath" = x; then
20827     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20828 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20829     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20830   fi
20831 
20832   # Call helper function which possibly converts this using DOS-style short mode.
20833   # If so, the updated path is stored in $new_path.
20834 
20835   input_path="$new_path"
20836   # Check if we need to convert this using DOS-style short mode. If the path
20837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20838   # take no chances and rewrite it.
20839   # Note: m4 eats our [], so we need to use [ and ] instead.
20840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20841   if test "x$has_forbidden_chars" != x; then
20842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20843     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20844     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20845     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20846       # Going to short mode and back again did indeed matter. Since short mode is
20847       # case insensitive, let's make it lowercase to improve readability.
20848       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20849       # Now convert it back to Unix-stile (cygpath)
20850       input_path=`$CYGPATH -u "$shortmode_path"`
20851       new_path="$input_path"
20852     fi
20853   fi
20854 
20855   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20856   if test "x$test_cygdrive_prefix" = x; then
20857     # As a simple fix, exclude /usr/bin since it's not a real path.
20858     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20859       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20860       # a path prefixed by /cygdrive for fixpath to work.
20861       new_path="$CYGWIN_ROOT_PATH$input_path"
20862     fi
20863   fi
20864 
20865 
20866   if test "x$path" != "x$new_path"; then
20867     BOOT_JDK="$new_path"
20868     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20869 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20870   fi
20871 
20872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20873 
20874   path="$BOOT_JDK"
20875   has_colon=`$ECHO $path | $GREP ^.:`
20876   new_path="$path"
20877   if test "x$has_colon" = x; then
20878     # Not in mixed or Windows style, start by that.
20879     new_path=`cmd //c echo $path`
20880   fi
20881 
20882 
20883   input_path="$new_path"
20884   # Check if we need to convert this using DOS-style short mode. If the path
20885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20886   # take no chances and rewrite it.
20887   # Note: m4 eats our [], so we need to use [ and ] instead.
20888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20889   if test "x$has_forbidden_chars" != x; then
20890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20891     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20892   fi
20893 
20894 
20895   windows_path="$new_path"
20896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20897     unix_path=`$CYGPATH -u "$windows_path"`
20898     new_path="$unix_path"
20899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20901     new_path="$unix_path"
20902   fi
20903 
20904   if test "x$path" != "x$new_path"; then
20905     BOOT_JDK="$new_path"
20906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20907 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20908   fi
20909 
20910   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20911   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20912 
20913   else
20914     # We're on a unix platform. Hooray! :)
20915     path="$BOOT_JDK"
20916     has_space=`$ECHO "$path" | $GREP " "`
20917     if test "x$has_space" != x; then
20918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20920       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20921     fi
20922 
20923     # Use eval to expand a potential ~
20924     eval path="$path"
20925     if test ! -f "$path" && test ! -d "$path"; then
20926       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20927     fi
20928 
20929     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20930   fi
20931 
20932             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20933 $as_echo_n "checking for Boot JDK... " >&6; }
20934             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20935 $as_echo "$BOOT_JDK" >&6; }
20936             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20937 $as_echo_n "checking Boot JDK version... " >&6; }
20938             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20939             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20940 $as_echo "$BOOT_JDK_VERSION" >&6; }
20941           fi # end check jdk version
20942         fi # end check javac
20943       fi # end check java
20944     fi # end check boot jdk found
20945   fi
20946 
20947 
20948   if test "x$BOOT_JDK_FOUND" = xno; then
20949     # Now execute the test
20950 
20951   if test -x /usr/libexec/java_home; then
20952     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20953     BOOT_JDK_FOUND=maybe
20954     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20955 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20956   fi
20957 
20958 
20959     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20960     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20961       # Do we have a bin/java?
20962       if test ! -x "$BOOT_JDK/bin/java"; then
20963         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20964 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20965         BOOT_JDK_FOUND=no
20966       else
20967         # Do we have a bin/javac?
20968         if test ! -x "$BOOT_JDK/bin/javac"; then
20969           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20970 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20971           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20972 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20973           BOOT_JDK_FOUND=no
20974         else
20975           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20976           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20977 
20978           # Extra M4 quote needed to protect [] in grep expression.
20979           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20980           if test "x$FOUND_CORRECT_VERSION" = x; then
20981             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20982 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20983             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20984 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20985             BOOT_JDK_FOUND=no
20986           else
20987             # We're done! :-)
20988             BOOT_JDK_FOUND=yes
20989 
20990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20991 
20992   # Input might be given as Windows format, start by converting to
20993   # unix format.
20994   path="$BOOT_JDK"
20995   new_path=`$CYGPATH -u "$path"`
20996 
20997   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20998   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20999   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21000   # "foo.exe" is OK but "foo" is an error.
21001   #
21002   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21003   # It is also a way to make sure we got the proper file name for the real test later on.
21004   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21005   if test "x$test_shortpath" = x; then
21006     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21007 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21008     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21009   fi
21010 
21011   # Call helper function which possibly converts this using DOS-style short mode.
21012   # If so, the updated path is stored in $new_path.
21013 
21014   input_path="$new_path"
21015   # Check if we need to convert this using DOS-style short mode. If the path
21016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21017   # take no chances and rewrite it.
21018   # Note: m4 eats our [], so we need to use [ and ] instead.
21019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21020   if test "x$has_forbidden_chars" != x; then
21021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21025       # Going to short mode and back again did indeed matter. Since short mode is
21026       # case insensitive, let's make it lowercase to improve readability.
21027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21028       # Now convert it back to Unix-stile (cygpath)
21029       input_path=`$CYGPATH -u "$shortmode_path"`
21030       new_path="$input_path"
21031     fi
21032   fi
21033 
21034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21035   if test "x$test_cygdrive_prefix" = x; then
21036     # As a simple fix, exclude /usr/bin since it's not a real path.
21037     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21039       # a path prefixed by /cygdrive for fixpath to work.
21040       new_path="$CYGWIN_ROOT_PATH$input_path"
21041     fi
21042   fi
21043 
21044 
21045   if test "x$path" != "x$new_path"; then
21046     BOOT_JDK="$new_path"
21047     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21048 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21049   fi
21050 
21051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21052 
21053   path="$BOOT_JDK"
21054   has_colon=`$ECHO $path | $GREP ^.:`
21055   new_path="$path"
21056   if test "x$has_colon" = x; then
21057     # Not in mixed or Windows style, start by that.
21058     new_path=`cmd //c echo $path`
21059   fi
21060 
21061 
21062   input_path="$new_path"
21063   # Check if we need to convert this using DOS-style short mode. If the path
21064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21065   # take no chances and rewrite it.
21066   # Note: m4 eats our [], so we need to use [ and ] instead.
21067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21068   if test "x$has_forbidden_chars" != x; then
21069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21071   fi
21072 
21073 
21074   windows_path="$new_path"
21075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21076     unix_path=`$CYGPATH -u "$windows_path"`
21077     new_path="$unix_path"
21078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21080     new_path="$unix_path"
21081   fi
21082 
21083   if test "x$path" != "x$new_path"; then
21084     BOOT_JDK="$new_path"
21085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21086 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21087   fi
21088 
21089   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21090   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21091 
21092   else
21093     # We're on a unix platform. Hooray! :)
21094     path="$BOOT_JDK"
21095     has_space=`$ECHO "$path" | $GREP " "`
21096     if test "x$has_space" != x; then
21097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21098 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21099       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21100     fi
21101 
21102     # Use eval to expand a potential ~
21103     eval path="$path"
21104     if test ! -f "$path" && test ! -d "$path"; then
21105       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21106     fi
21107 
21108     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21109   fi
21110 
21111             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21112 $as_echo_n "checking for Boot JDK... " >&6; }
21113             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21114 $as_echo "$BOOT_JDK" >&6; }
21115             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21116 $as_echo_n "checking Boot JDK version... " >&6; }
21117             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21118             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21119 $as_echo "$BOOT_JDK_VERSION" >&6; }
21120           fi # end check jdk version
21121         fi # end check javac
21122       fi # end check java
21123     fi # end check boot jdk found
21124   fi
21125 
21126 
21127   if test "x$BOOT_JDK_FOUND" = xno; then
21128     # Now execute the test
21129 
21130   if test -x /usr/libexec/java_home; then
21131     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21132     BOOT_JDK_FOUND=maybe
21133     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21134 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21135   fi
21136 
21137 
21138     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21139     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21140       # Do we have a bin/java?
21141       if test ! -x "$BOOT_JDK/bin/java"; then
21142         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21143 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21144         BOOT_JDK_FOUND=no
21145       else
21146         # Do we have a bin/javac?
21147         if test ! -x "$BOOT_JDK/bin/javac"; then
21148           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21149 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21150           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21151 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21152           BOOT_JDK_FOUND=no
21153         else
21154           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21155           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21156 
21157           # Extra M4 quote needed to protect [] in grep expression.
21158           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21159           if test "x$FOUND_CORRECT_VERSION" = x; then
21160             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21161 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21162             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21163 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21164             BOOT_JDK_FOUND=no
21165           else
21166             # We're done! :-)
21167             BOOT_JDK_FOUND=yes
21168 
21169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21170 
21171   # Input might be given as Windows format, start by converting to
21172   # unix format.
21173   path="$BOOT_JDK"
21174   new_path=`$CYGPATH -u "$path"`
21175 
21176   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21177   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21178   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21179   # "foo.exe" is OK but "foo" is an error.
21180   #
21181   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21182   # It is also a way to make sure we got the proper file name for the real test later on.
21183   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21184   if test "x$test_shortpath" = x; then
21185     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21186 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21187     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21188   fi
21189 
21190   # Call helper function which possibly converts this using DOS-style short mode.
21191   # If so, the updated path is stored in $new_path.
21192 
21193   input_path="$new_path"
21194   # Check if we need to convert this using DOS-style short mode. If the path
21195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21196   # take no chances and rewrite it.
21197   # Note: m4 eats our [], so we need to use [ and ] instead.
21198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21199   if test "x$has_forbidden_chars" != x; then
21200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21201     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21202     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21203     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21204       # Going to short mode and back again did indeed matter. Since short mode is
21205       # case insensitive, let's make it lowercase to improve readability.
21206       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21207       # Now convert it back to Unix-stile (cygpath)
21208       input_path=`$CYGPATH -u "$shortmode_path"`
21209       new_path="$input_path"
21210     fi
21211   fi
21212 
21213   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21214   if test "x$test_cygdrive_prefix" = x; then
21215     # As a simple fix, exclude /usr/bin since it's not a real path.
21216     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21217       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21218       # a path prefixed by /cygdrive for fixpath to work.
21219       new_path="$CYGWIN_ROOT_PATH$input_path"
21220     fi
21221   fi
21222 
21223 
21224   if test "x$path" != "x$new_path"; then
21225     BOOT_JDK="$new_path"
21226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21227 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21228   fi
21229 
21230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21231 
21232   path="$BOOT_JDK"
21233   has_colon=`$ECHO $path | $GREP ^.:`
21234   new_path="$path"
21235   if test "x$has_colon" = x; then
21236     # Not in mixed or Windows style, start by that.
21237     new_path=`cmd //c echo $path`
21238   fi
21239 
21240 
21241   input_path="$new_path"
21242   # Check if we need to convert this using DOS-style short mode. If the path
21243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21244   # take no chances and rewrite it.
21245   # Note: m4 eats our [], so we need to use [ and ] instead.
21246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21247   if test "x$has_forbidden_chars" != x; then
21248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21249     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21250   fi
21251 
21252 
21253   windows_path="$new_path"
21254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21255     unix_path=`$CYGPATH -u "$windows_path"`
21256     new_path="$unix_path"
21257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21259     new_path="$unix_path"
21260   fi
21261 
21262   if test "x$path" != "x$new_path"; then
21263     BOOT_JDK="$new_path"
21264     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21265 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21266   fi
21267 
21268   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21269   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21270 
21271   else
21272     # We're on a unix platform. Hooray! :)
21273     path="$BOOT_JDK"
21274     has_space=`$ECHO "$path" | $GREP " "`
21275     if test "x$has_space" != x; then
21276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21277 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21278       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21279     fi
21280 
21281     # Use eval to expand a potential ~
21282     eval path="$path"
21283     if test ! -f "$path" && test ! -d "$path"; then
21284       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21285     fi
21286 
21287     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21288   fi
21289 
21290             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21291 $as_echo_n "checking for Boot JDK... " >&6; }
21292             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21293 $as_echo "$BOOT_JDK" >&6; }
21294             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21295 $as_echo_n "checking Boot JDK version... " >&6; }
21296             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21297             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21298 $as_echo "$BOOT_JDK_VERSION" >&6; }
21299           fi # end check jdk version
21300         fi # end check javac
21301       fi # end check java
21302     fi # end check boot jdk found
21303   fi
21304 
21305   fi
21306 
21307 
21308     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21309     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21310       # Do we have a bin/java?
21311       if test ! -x "$BOOT_JDK/bin/java"; then
21312         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21313 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21314         BOOT_JDK_FOUND=no
21315       else
21316         # Do we have a bin/javac?
21317         if test ! -x "$BOOT_JDK/bin/javac"; then
21318           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21319 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21320           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21321 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21322           BOOT_JDK_FOUND=no
21323         else
21324           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21325           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21326 
21327           # Extra M4 quote needed to protect [] in grep expression.
21328           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21329           if test "x$FOUND_CORRECT_VERSION" = x; then
21330             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21332             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21333 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21334             BOOT_JDK_FOUND=no
21335           else
21336             # We're done! :-)
21337             BOOT_JDK_FOUND=yes
21338 
21339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21340 
21341   # Input might be given as Windows format, start by converting to
21342   # unix format.
21343   path="$BOOT_JDK"
21344   new_path=`$CYGPATH -u "$path"`
21345 
21346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21349   # "foo.exe" is OK but "foo" is an error.
21350   #
21351   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21352   # It is also a way to make sure we got the proper file name for the real test later on.
21353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21354   if test "x$test_shortpath" = x; then
21355     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21356 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21357     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21358   fi
21359 
21360   # Call helper function which possibly converts this using DOS-style short mode.
21361   # If so, the updated path is stored in $new_path.
21362 
21363   input_path="$new_path"
21364   # Check if we need to convert this using DOS-style short mode. If the path
21365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21366   # take no chances and rewrite it.
21367   # Note: m4 eats our [], so we need to use [ and ] instead.
21368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21369   if test "x$has_forbidden_chars" != x; then
21370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21371     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21372     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21373     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21374       # Going to short mode and back again did indeed matter. Since short mode is
21375       # case insensitive, let's make it lowercase to improve readability.
21376       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21377       # Now convert it back to Unix-stile (cygpath)
21378       input_path=`$CYGPATH -u "$shortmode_path"`
21379       new_path="$input_path"
21380     fi
21381   fi
21382 
21383   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21384   if test "x$test_cygdrive_prefix" = x; then
21385     # As a simple fix, exclude /usr/bin since it's not a real path.
21386     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21387       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21388       # a path prefixed by /cygdrive for fixpath to work.
21389       new_path="$CYGWIN_ROOT_PATH$input_path"
21390     fi
21391   fi
21392 
21393 
21394   if test "x$path" != "x$new_path"; then
21395     BOOT_JDK="$new_path"
21396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21397 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21398   fi
21399 
21400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21401 
21402   path="$BOOT_JDK"
21403   has_colon=`$ECHO $path | $GREP ^.:`
21404   new_path="$path"
21405   if test "x$has_colon" = x; then
21406     # Not in mixed or Windows style, start by that.
21407     new_path=`cmd //c echo $path`
21408   fi
21409 
21410 
21411   input_path="$new_path"
21412   # Check if we need to convert this using DOS-style short mode. If the path
21413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21414   # take no chances and rewrite it.
21415   # Note: m4 eats our [], so we need to use [ and ] instead.
21416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21417   if test "x$has_forbidden_chars" != x; then
21418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21420   fi
21421 
21422 
21423   windows_path="$new_path"
21424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21425     unix_path=`$CYGPATH -u "$windows_path"`
21426     new_path="$unix_path"
21427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21429     new_path="$unix_path"
21430   fi
21431 
21432   if test "x$path" != "x$new_path"; then
21433     BOOT_JDK="$new_path"
21434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21435 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21436   fi
21437 
21438   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21439   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21440 
21441   else
21442     # We're on a unix platform. Hooray! :)
21443     path="$BOOT_JDK"
21444     has_space=`$ECHO "$path" | $GREP " "`
21445     if test "x$has_space" != x; then
21446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21447 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21448       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21449     fi
21450 
21451     # Use eval to expand a potential ~
21452     eval path="$path"
21453     if test ! -f "$path" && test ! -d "$path"; then
21454       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21455     fi
21456 
21457     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21458   fi
21459 
21460             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21461 $as_echo_n "checking for Boot JDK... " >&6; }
21462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21463 $as_echo "$BOOT_JDK" >&6; }
21464             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21465 $as_echo_n "checking Boot JDK version... " >&6; }
21466             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21467             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21468 $as_echo "$BOOT_JDK_VERSION" >&6; }
21469           fi # end check jdk version
21470         fi # end check javac
21471       fi # end check java
21472     fi # end check boot jdk found
21473   fi
21474 
21475 
21476   # Test: Is $JAVA_HOME set?
21477 
21478   if test "x$BOOT_JDK_FOUND" = xno; then
21479     # Now execute the test
21480 
21481   if test "x$JAVA_HOME" != x; then
21482     JAVA_HOME_PROCESSED="$JAVA_HOME"
21483 
21484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21485 
21486   # Input might be given as Windows format, start by converting to
21487   # unix format.
21488   path="$JAVA_HOME_PROCESSED"
21489   new_path=`$CYGPATH -u "$path"`
21490 
21491   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21492   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21493   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21494   # "foo.exe" is OK but "foo" is an error.
21495   #
21496   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21497   # It is also a way to make sure we got the proper file name for the real test later on.
21498   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21499   if test "x$test_shortpath" = x; then
21500     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21501 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21502     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21503   fi
21504 
21505   # Call helper function which possibly converts this using DOS-style short mode.
21506   # If so, the updated path is stored in $new_path.
21507 
21508   input_path="$new_path"
21509   # Check if we need to convert this using DOS-style short mode. If the path
21510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21511   # take no chances and rewrite it.
21512   # Note: m4 eats our [], so we need to use [ and ] instead.
21513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21514   if test "x$has_forbidden_chars" != x; then
21515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21516     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21517     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21518     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21519       # Going to short mode and back again did indeed matter. Since short mode is
21520       # case insensitive, let's make it lowercase to improve readability.
21521       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21522       # Now convert it back to Unix-stile (cygpath)
21523       input_path=`$CYGPATH -u "$shortmode_path"`
21524       new_path="$input_path"
21525     fi
21526   fi
21527 
21528   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21529   if test "x$test_cygdrive_prefix" = x; then
21530     # As a simple fix, exclude /usr/bin since it's not a real path.
21531     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21532       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21533       # a path prefixed by /cygdrive for fixpath to work.
21534       new_path="$CYGWIN_ROOT_PATH$input_path"
21535     fi
21536   fi
21537 
21538 
21539   if test "x$path" != "x$new_path"; then
21540     JAVA_HOME_PROCESSED="$new_path"
21541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21542 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21543   fi
21544 
21545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21546 
21547   path="$JAVA_HOME_PROCESSED"
21548   has_colon=`$ECHO $path | $GREP ^.:`
21549   new_path="$path"
21550   if test "x$has_colon" = x; then
21551     # Not in mixed or Windows style, start by that.
21552     new_path=`cmd //c echo $path`
21553   fi
21554 
21555 
21556   input_path="$new_path"
21557   # Check if we need to convert this using DOS-style short mode. If the path
21558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21559   # take no chances and rewrite it.
21560   # Note: m4 eats our [], so we need to use [ and ] instead.
21561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21562   if test "x$has_forbidden_chars" != x; then
21563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21564     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21565   fi
21566 
21567 
21568   windows_path="$new_path"
21569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21570     unix_path=`$CYGPATH -u "$windows_path"`
21571     new_path="$unix_path"
21572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21573     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21574     new_path="$unix_path"
21575   fi
21576 
21577   if test "x$path" != "x$new_path"; then
21578     JAVA_HOME_PROCESSED="$new_path"
21579     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21580 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21581   fi
21582 
21583   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21584   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21585 
21586   else
21587     # We're on a unix platform. Hooray! :)
21588     path="$JAVA_HOME_PROCESSED"
21589     has_space=`$ECHO "$path" | $GREP " "`
21590     if test "x$has_space" != x; then
21591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21592 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21593       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21594     fi
21595 
21596     # Use eval to expand a potential ~
21597     eval path="$path"
21598     if test ! -f "$path" && test ! -d "$path"; then
21599       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21600     fi
21601 
21602     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21603   fi
21604 
21605     if test ! -d "$JAVA_HOME_PROCESSED"; then
21606       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21607 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21608     else
21609       # Aha, the user has set a JAVA_HOME
21610       # let us use that as the Boot JDK.
21611       BOOT_JDK="$JAVA_HOME_PROCESSED"
21612       BOOT_JDK_FOUND=maybe
21613       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21614 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21615     fi
21616   fi
21617 
21618 
21619     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21620     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21621       # Do we have a bin/java?
21622       if test ! -x "$BOOT_JDK/bin/java"; then
21623         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21625         BOOT_JDK_FOUND=no
21626       else
21627         # Do we have a bin/javac?
21628         if test ! -x "$BOOT_JDK/bin/javac"; then
21629           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21631           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21632 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21633           BOOT_JDK_FOUND=no
21634         else
21635           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21636           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21637 
21638           # Extra M4 quote needed to protect [] in grep expression.
21639           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21640           if test "x$FOUND_CORRECT_VERSION" = x; then
21641             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21643             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21644 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21645             BOOT_JDK_FOUND=no
21646           else
21647             # We're done! :-)
21648             BOOT_JDK_FOUND=yes
21649 
21650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21651 
21652   # Input might be given as Windows format, start by converting to
21653   # unix format.
21654   path="$BOOT_JDK"
21655   new_path=`$CYGPATH -u "$path"`
21656 
21657   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21658   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21659   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21660   # "foo.exe" is OK but "foo" is an error.
21661   #
21662   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21663   # It is also a way to make sure we got the proper file name for the real test later on.
21664   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21665   if test "x$test_shortpath" = x; then
21666     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21667 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21668     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21669   fi
21670 
21671   # Call helper function which possibly converts this using DOS-style short mode.
21672   # If so, the updated path is stored in $new_path.
21673 
21674   input_path="$new_path"
21675   # Check if we need to convert this using DOS-style short mode. If the path
21676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21677   # take no chances and rewrite it.
21678   # Note: m4 eats our [], so we need to use [ and ] instead.
21679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21680   if test "x$has_forbidden_chars" != x; then
21681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21682     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21683     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21684     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21685       # Going to short mode and back again did indeed matter. Since short mode is
21686       # case insensitive, let's make it lowercase to improve readability.
21687       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21688       # Now convert it back to Unix-stile (cygpath)
21689       input_path=`$CYGPATH -u "$shortmode_path"`
21690       new_path="$input_path"
21691     fi
21692   fi
21693 
21694   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21695   if test "x$test_cygdrive_prefix" = x; then
21696     # As a simple fix, exclude /usr/bin since it's not a real path.
21697     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21698       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21699       # a path prefixed by /cygdrive for fixpath to work.
21700       new_path="$CYGWIN_ROOT_PATH$input_path"
21701     fi
21702   fi
21703 
21704 
21705   if test "x$path" != "x$new_path"; then
21706     BOOT_JDK="$new_path"
21707     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21708 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21709   fi
21710 
21711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21712 
21713   path="$BOOT_JDK"
21714   has_colon=`$ECHO $path | $GREP ^.:`
21715   new_path="$path"
21716   if test "x$has_colon" = x; then
21717     # Not in mixed or Windows style, start by that.
21718     new_path=`cmd //c echo $path`
21719   fi
21720 
21721 
21722   input_path="$new_path"
21723   # Check if we need to convert this using DOS-style short mode. If the path
21724   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21725   # take no chances and rewrite it.
21726   # Note: m4 eats our [], so we need to use [ and ] instead.
21727   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21728   if test "x$has_forbidden_chars" != x; then
21729     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21730     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21731   fi
21732 
21733 
21734   windows_path="$new_path"
21735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21736     unix_path=`$CYGPATH -u "$windows_path"`
21737     new_path="$unix_path"
21738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21740     new_path="$unix_path"
21741   fi
21742 
21743   if test "x$path" != "x$new_path"; then
21744     BOOT_JDK="$new_path"
21745     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21746 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21747   fi
21748 
21749   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21750   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21751 
21752   else
21753     # We're on a unix platform. Hooray! :)
21754     path="$BOOT_JDK"
21755     has_space=`$ECHO "$path" | $GREP " "`
21756     if test "x$has_space" != x; then
21757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21758 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21759       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21760     fi
21761 
21762     # Use eval to expand a potential ~
21763     eval path="$path"
21764     if test ! -f "$path" && test ! -d "$path"; then
21765       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21766     fi
21767 
21768     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21769   fi
21770 
21771             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21772 $as_echo_n "checking for Boot JDK... " >&6; }
21773             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21774 $as_echo "$BOOT_JDK" >&6; }
21775             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21776 $as_echo_n "checking Boot JDK version... " >&6; }
21777             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21778             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21779 $as_echo "$BOOT_JDK_VERSION" >&6; }
21780           fi # end check jdk version
21781         fi # end check javac
21782       fi # end check java
21783     fi # end check boot jdk found
21784   fi
21785 
21786 
21787   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21788 
21789   if test "x$BOOT_JDK_FOUND" = xno; then
21790     # Now execute the test
21791 
21792   # Extract the first word of "javac", so it can be a program name with args.
21793 set dummy javac; ac_word=$2
21794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21795 $as_echo_n "checking for $ac_word... " >&6; }
21796 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21797   $as_echo_n "(cached) " >&6
21798 else
21799   case $JAVAC_CHECK in
21800   [\\/]* | ?:[\\/]*)
21801   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21802   ;;
21803   *)
21804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21805 for as_dir in $PATH
21806 do
21807   IFS=$as_save_IFS
21808   test -z "$as_dir" && as_dir=.
21809     for ac_exec_ext in '' $ac_executable_extensions; do
21810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21811     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21813     break 2
21814   fi
21815 done
21816   done
21817 IFS=$as_save_IFS
21818 
21819   ;;
21820 esac
21821 fi
21822 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21823 if test -n "$JAVAC_CHECK"; then
21824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21825 $as_echo "$JAVAC_CHECK" >&6; }
21826 else
21827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21828 $as_echo "no" >&6; }
21829 fi
21830 
21831 
21832   # Extract the first word of "java", so it can be a program name with args.
21833 set dummy java; ac_word=$2
21834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21835 $as_echo_n "checking for $ac_word... " >&6; }
21836 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21837   $as_echo_n "(cached) " >&6
21838 else
21839   case $JAVA_CHECK in
21840   [\\/]* | ?:[\\/]*)
21841   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21842   ;;
21843   *)
21844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21845 for as_dir in $PATH
21846 do
21847   IFS=$as_save_IFS
21848   test -z "$as_dir" && as_dir=.
21849     for ac_exec_ext in '' $ac_executable_extensions; do
21850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21851     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21853     break 2
21854   fi
21855 done
21856   done
21857 IFS=$as_save_IFS
21858 
21859   ;;
21860 esac
21861 fi
21862 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21863 if test -n "$JAVA_CHECK"; then
21864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21865 $as_echo "$JAVA_CHECK" >&6; }
21866 else
21867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21868 $as_echo "no" >&6; }
21869 fi
21870 
21871 
21872   BINARY="$JAVAC_CHECK"
21873   if test "x$JAVAC_CHECK" = x; then
21874     BINARY="$JAVA_CHECK"
21875   fi
21876   if test "x$BINARY" != x; then
21877     # So there is a java(c) binary, it might be part of a JDK.
21878     # Lets find the JDK/JRE directory by following symbolic links.
21879     # Linux/GNU systems often have links from /usr/bin/java to
21880     # /etc/alternatives/java to the real JDK binary.
21881 
21882   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21883     # Follow a chain of symbolic links. Use readlink
21884     # where it exists, else fall back to horribly
21885     # complicated shell code.
21886     if test "x$READLINK_TESTED" != yes; then
21887       # On MacOSX there is a readlink tool with a different
21888       # purpose than the GNU readlink tool. Check the found readlink.
21889       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21890       if test "x$ISGNU" = x; then
21891         # A readlink that we do not know how to use.
21892         # Are there other non-GNU readlinks out there?
21893         READLINK_TESTED=yes
21894         READLINK=
21895       fi
21896     fi
21897 
21898     if test "x$READLINK" != x; then
21899       BINARY=`$READLINK -f $BINARY`
21900     else
21901       # Save the current directory for restoring afterwards
21902       STARTDIR=$PWD
21903       COUNTER=0
21904       sym_link_dir=`$DIRNAME $BINARY`
21905       sym_link_file=`$BASENAME $BINARY`
21906       cd $sym_link_dir
21907       # Use -P flag to resolve symlinks in directories.
21908       cd `$THEPWDCMD -P`
21909       sym_link_dir=`$THEPWDCMD -P`
21910       # Resolve file symlinks
21911       while test $COUNTER -lt 20; do
21912         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21913         if test "x$ISLINK" == x; then
21914           # This is not a symbolic link! We are done!
21915           break
21916         fi
21917         # Again resolve directory symlinks since the target of the just found
21918         # link could be in a different directory
21919         cd `$DIRNAME $ISLINK`
21920         sym_link_dir=`$THEPWDCMD -P`
21921         sym_link_file=`$BASENAME $ISLINK`
21922         let COUNTER=COUNTER+1
21923       done
21924       cd $STARTDIR
21925       BINARY=$sym_link_dir/$sym_link_file
21926     fi
21927   fi
21928 
21929     BOOT_JDK=`dirname "$BINARY"`
21930     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21931     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21932       # Looks like we found ourselves an JDK
21933       BOOT_JDK_FOUND=maybe
21934       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21935 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21936     fi
21937   fi
21938 
21939 
21940     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21941     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21942       # Do we have a bin/java?
21943       if test ! -x "$BOOT_JDK/bin/java"; then
21944         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21945 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21946         BOOT_JDK_FOUND=no
21947       else
21948         # Do we have a bin/javac?
21949         if test ! -x "$BOOT_JDK/bin/javac"; then
21950           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21951 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21952           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21953 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21954           BOOT_JDK_FOUND=no
21955         else
21956           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21957           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21958 
21959           # Extra M4 quote needed to protect [] in grep expression.
21960           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21961           if test "x$FOUND_CORRECT_VERSION" = x; then
21962             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21964             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21965 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21966             BOOT_JDK_FOUND=no
21967           else
21968             # We're done! :-)
21969             BOOT_JDK_FOUND=yes
21970 
21971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21972 
21973   # Input might be given as Windows format, start by converting to
21974   # unix format.
21975   path="$BOOT_JDK"
21976   new_path=`$CYGPATH -u "$path"`
21977 
21978   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21979   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21980   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21981   # "foo.exe" is OK but "foo" is an error.
21982   #
21983   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21984   # It is also a way to make sure we got the proper file name for the real test later on.
21985   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21986   if test "x$test_shortpath" = x; then
21987     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21988 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21989     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21990   fi
21991 
21992   # Call helper function which possibly converts this using DOS-style short mode.
21993   # If so, the updated path is stored in $new_path.
21994 
21995   input_path="$new_path"
21996   # Check if we need to convert this using DOS-style short mode. If the path
21997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21998   # take no chances and rewrite it.
21999   # Note: m4 eats our [], so we need to use [ and ] instead.
22000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22001   if test "x$has_forbidden_chars" != x; then
22002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22003     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22004     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22005     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22006       # Going to short mode and back again did indeed matter. Since short mode is
22007       # case insensitive, let's make it lowercase to improve readability.
22008       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22009       # Now convert it back to Unix-stile (cygpath)
22010       input_path=`$CYGPATH -u "$shortmode_path"`
22011       new_path="$input_path"
22012     fi
22013   fi
22014 
22015   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22016   if test "x$test_cygdrive_prefix" = x; then
22017     # As a simple fix, exclude /usr/bin since it's not a real path.
22018     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22019       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22020       # a path prefixed by /cygdrive for fixpath to work.
22021       new_path="$CYGWIN_ROOT_PATH$input_path"
22022     fi
22023   fi
22024 
22025 
22026   if test "x$path" != "x$new_path"; then
22027     BOOT_JDK="$new_path"
22028     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22029 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22030   fi
22031 
22032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22033 
22034   path="$BOOT_JDK"
22035   has_colon=`$ECHO $path | $GREP ^.:`
22036   new_path="$path"
22037   if test "x$has_colon" = x; then
22038     # Not in mixed or Windows style, start by that.
22039     new_path=`cmd //c echo $path`
22040   fi
22041 
22042 
22043   input_path="$new_path"
22044   # Check if we need to convert this using DOS-style short mode. If the path
22045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22046   # take no chances and rewrite it.
22047   # Note: m4 eats our [], so we need to use [ and ] instead.
22048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22049   if test "x$has_forbidden_chars" != x; then
22050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22051     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22052   fi
22053 
22054 
22055   windows_path="$new_path"
22056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22057     unix_path=`$CYGPATH -u "$windows_path"`
22058     new_path="$unix_path"
22059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22061     new_path="$unix_path"
22062   fi
22063 
22064   if test "x$path" != "x$new_path"; then
22065     BOOT_JDK="$new_path"
22066     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22067 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22068   fi
22069 
22070   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22071   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22072 
22073   else
22074     # We're on a unix platform. Hooray! :)
22075     path="$BOOT_JDK"
22076     has_space=`$ECHO "$path" | $GREP " "`
22077     if test "x$has_space" != x; then
22078       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22079 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22080       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22081     fi
22082 
22083     # Use eval to expand a potential ~
22084     eval path="$path"
22085     if test ! -f "$path" && test ! -d "$path"; then
22086       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22087     fi
22088 
22089     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22090   fi
22091 
22092             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22093 $as_echo_n "checking for Boot JDK... " >&6; }
22094             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22095 $as_echo "$BOOT_JDK" >&6; }
22096             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22097 $as_echo_n "checking Boot JDK version... " >&6; }
22098             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22100 $as_echo "$BOOT_JDK_VERSION" >&6; }
22101           fi # end check jdk version
22102         fi # end check javac
22103       fi # end check java
22104     fi # end check boot jdk found
22105   fi
22106 
22107 
22108   # Test: Is there a JDK installed in default, well-known locations?
22109 
22110   if test "x$BOOT_JDK_FOUND" = xno; then
22111     # Now execute the test
22112 
22113   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22114 
22115   if test "x$BOOT_JDK_FOUND" = xno; then
22116     # Now execute the test
22117 
22118   if test "x$ProgramW6432" != x; then
22119     VIRTUAL_DIR="$ProgramW6432/Java"
22120 
22121   windows_path="$VIRTUAL_DIR"
22122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22123     unix_path=`$CYGPATH -u "$windows_path"`
22124     VIRTUAL_DIR="$unix_path"
22125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22126     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22127     VIRTUAL_DIR="$unix_path"
22128   fi
22129 
22130 
22131   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22132   BOOT_JDK_SUFFIX=""
22133   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22134   if test "x$ALL_JDKS_FOUND" != x; then
22135     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22136 
22137   if test "x$BOOT_JDK_FOUND" = xno; then
22138     # Now execute the test
22139 
22140         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22141         if test -d "$BOOT_JDK"; then
22142           BOOT_JDK_FOUND=maybe
22143           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22144 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22145         fi
22146 
22147 
22148     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22149     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22150       # Do we have a bin/java?
22151       if test ! -x "$BOOT_JDK/bin/java"; then
22152         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22153 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22154         BOOT_JDK_FOUND=no
22155       else
22156         # Do we have a bin/javac?
22157         if test ! -x "$BOOT_JDK/bin/javac"; then
22158           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22160           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22161 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22162           BOOT_JDK_FOUND=no
22163         else
22164           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22165           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22166 
22167           # Extra M4 quote needed to protect [] in grep expression.
22168           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22169           if test "x$FOUND_CORRECT_VERSION" = x; then
22170             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22171 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22172             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22173 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22174             BOOT_JDK_FOUND=no
22175           else
22176             # We're done! :-)
22177             BOOT_JDK_FOUND=yes
22178 
22179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22180 
22181   # Input might be given as Windows format, start by converting to
22182   # unix format.
22183   path="$BOOT_JDK"
22184   new_path=`$CYGPATH -u "$path"`
22185 
22186   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22187   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22188   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22189   # "foo.exe" is OK but "foo" is an error.
22190   #
22191   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22192   # It is also a way to make sure we got the proper file name for the real test later on.
22193   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22194   if test "x$test_shortpath" = x; then
22195     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22196 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22197     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22198   fi
22199 
22200   # Call helper function which possibly converts this using DOS-style short mode.
22201   # If so, the updated path is stored in $new_path.
22202 
22203   input_path="$new_path"
22204   # Check if we need to convert this using DOS-style short mode. If the path
22205   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22206   # take no chances and rewrite it.
22207   # Note: m4 eats our [], so we need to use [ and ] instead.
22208   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22209   if test "x$has_forbidden_chars" != x; then
22210     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22211     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22212     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22213     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22214       # Going to short mode and back again did indeed matter. Since short mode is
22215       # case insensitive, let's make it lowercase to improve readability.
22216       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22217       # Now convert it back to Unix-stile (cygpath)
22218       input_path=`$CYGPATH -u "$shortmode_path"`
22219       new_path="$input_path"
22220     fi
22221   fi
22222 
22223   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22224   if test "x$test_cygdrive_prefix" = x; then
22225     # As a simple fix, exclude /usr/bin since it's not a real path.
22226     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22227       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22228       # a path prefixed by /cygdrive for fixpath to work.
22229       new_path="$CYGWIN_ROOT_PATH$input_path"
22230     fi
22231   fi
22232 
22233 
22234   if test "x$path" != "x$new_path"; then
22235     BOOT_JDK="$new_path"
22236     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22237 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22238   fi
22239 
22240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22241 
22242   path="$BOOT_JDK"
22243   has_colon=`$ECHO $path | $GREP ^.:`
22244   new_path="$path"
22245   if test "x$has_colon" = x; then
22246     # Not in mixed or Windows style, start by that.
22247     new_path=`cmd //c echo $path`
22248   fi
22249 
22250 
22251   input_path="$new_path"
22252   # Check if we need to convert this using DOS-style short mode. If the path
22253   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22254   # take no chances and rewrite it.
22255   # Note: m4 eats our [], so we need to use [ and ] instead.
22256   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22257   if test "x$has_forbidden_chars" != x; then
22258     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22259     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22260   fi
22261 
22262 
22263   windows_path="$new_path"
22264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22265     unix_path=`$CYGPATH -u "$windows_path"`
22266     new_path="$unix_path"
22267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22269     new_path="$unix_path"
22270   fi
22271 
22272   if test "x$path" != "x$new_path"; then
22273     BOOT_JDK="$new_path"
22274     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22275 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22276   fi
22277 
22278   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22279   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22280 
22281   else
22282     # We're on a unix platform. Hooray! :)
22283     path="$BOOT_JDK"
22284     has_space=`$ECHO "$path" | $GREP " "`
22285     if test "x$has_space" != x; then
22286       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22287 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22288       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22289     fi
22290 
22291     # Use eval to expand a potential ~
22292     eval path="$path"
22293     if test ! -f "$path" && test ! -d "$path"; then
22294       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22295     fi
22296 
22297     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22298   fi
22299 
22300             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22301 $as_echo_n "checking for Boot JDK... " >&6; }
22302             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22303 $as_echo "$BOOT_JDK" >&6; }
22304             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22305 $as_echo_n "checking Boot JDK version... " >&6; }
22306             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22307             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22308 $as_echo "$BOOT_JDK_VERSION" >&6; }
22309           fi # end check jdk version
22310         fi # end check javac
22311       fi # end check java
22312     fi # end check boot jdk found
22313   fi
22314 
22315     done
22316   fi
22317 
22318   fi
22319 
22320 
22321     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22322     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22323       # Do we have a bin/java?
22324       if test ! -x "$BOOT_JDK/bin/java"; then
22325         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22326 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22327         BOOT_JDK_FOUND=no
22328       else
22329         # Do we have a bin/javac?
22330         if test ! -x "$BOOT_JDK/bin/javac"; then
22331           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22332 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22333           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22334 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22335           BOOT_JDK_FOUND=no
22336         else
22337           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22338           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22339 
22340           # Extra M4 quote needed to protect [] in grep expression.
22341           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22342           if test "x$FOUND_CORRECT_VERSION" = x; then
22343             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22344 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22345             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22346 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22347             BOOT_JDK_FOUND=no
22348           else
22349             # We're done! :-)
22350             BOOT_JDK_FOUND=yes
22351 
22352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22353 
22354   # Input might be given as Windows format, start by converting to
22355   # unix format.
22356   path="$BOOT_JDK"
22357   new_path=`$CYGPATH -u "$path"`
22358 
22359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22362   # "foo.exe" is OK but "foo" is an error.
22363   #
22364   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22365   # It is also a way to make sure we got the proper file name for the real test later on.
22366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22367   if test "x$test_shortpath" = x; then
22368     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22369 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22370     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22371   fi
22372 
22373   # Call helper function which possibly converts this using DOS-style short mode.
22374   # If so, the updated path is stored in $new_path.
22375 
22376   input_path="$new_path"
22377   # Check if we need to convert this using DOS-style short mode. If the path
22378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22379   # take no chances and rewrite it.
22380   # Note: m4 eats our [], so we need to use [ and ] instead.
22381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22382   if test "x$has_forbidden_chars" != x; then
22383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22387       # Going to short mode and back again did indeed matter. Since short mode is
22388       # case insensitive, let's make it lowercase to improve readability.
22389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22390       # Now convert it back to Unix-stile (cygpath)
22391       input_path=`$CYGPATH -u "$shortmode_path"`
22392       new_path="$input_path"
22393     fi
22394   fi
22395 
22396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22397   if test "x$test_cygdrive_prefix" = x; then
22398     # As a simple fix, exclude /usr/bin since it's not a real path.
22399     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22401       # a path prefixed by /cygdrive for fixpath to work.
22402       new_path="$CYGWIN_ROOT_PATH$input_path"
22403     fi
22404   fi
22405 
22406 
22407   if test "x$path" != "x$new_path"; then
22408     BOOT_JDK="$new_path"
22409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22410 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22411   fi
22412 
22413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22414 
22415   path="$BOOT_JDK"
22416   has_colon=`$ECHO $path | $GREP ^.:`
22417   new_path="$path"
22418   if test "x$has_colon" = x; then
22419     # Not in mixed or Windows style, start by that.
22420     new_path=`cmd //c echo $path`
22421   fi
22422 
22423 
22424   input_path="$new_path"
22425   # Check if we need to convert this using DOS-style short mode. If the path
22426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22427   # take no chances and rewrite it.
22428   # Note: m4 eats our [], so we need to use [ and ] instead.
22429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22430   if test "x$has_forbidden_chars" != x; then
22431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22433   fi
22434 
22435 
22436   windows_path="$new_path"
22437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22438     unix_path=`$CYGPATH -u "$windows_path"`
22439     new_path="$unix_path"
22440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22442     new_path="$unix_path"
22443   fi
22444 
22445   if test "x$path" != "x$new_path"; then
22446     BOOT_JDK="$new_path"
22447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22448 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22449   fi
22450 
22451   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22452   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22453 
22454   else
22455     # We're on a unix platform. Hooray! :)
22456     path="$BOOT_JDK"
22457     has_space=`$ECHO "$path" | $GREP " "`
22458     if test "x$has_space" != x; then
22459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22460 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22461       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22462     fi
22463 
22464     # Use eval to expand a potential ~
22465     eval path="$path"
22466     if test ! -f "$path" && test ! -d "$path"; then
22467       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22468     fi
22469 
22470     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22471   fi
22472 
22473             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22474 $as_echo_n "checking for Boot JDK... " >&6; }
22475             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22476 $as_echo "$BOOT_JDK" >&6; }
22477             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22478 $as_echo_n "checking Boot JDK version... " >&6; }
22479             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22480             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22481 $as_echo "$BOOT_JDK_VERSION" >&6; }
22482           fi # end check jdk version
22483         fi # end check javac
22484       fi # end check java
22485     fi # end check boot jdk found
22486   fi
22487 
22488 
22489   if test "x$BOOT_JDK_FOUND" = xno; then
22490     # Now execute the test
22491 
22492   if test "x$PROGRAMW6432" != x; then
22493     VIRTUAL_DIR="$PROGRAMW6432/Java"
22494 
22495   windows_path="$VIRTUAL_DIR"
22496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22497     unix_path=`$CYGPATH -u "$windows_path"`
22498     VIRTUAL_DIR="$unix_path"
22499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22501     VIRTUAL_DIR="$unix_path"
22502   fi
22503 
22504 
22505   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22506   BOOT_JDK_SUFFIX=""
22507   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22508   if test "x$ALL_JDKS_FOUND" != x; then
22509     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22510 
22511   if test "x$BOOT_JDK_FOUND" = xno; then
22512     # Now execute the test
22513 
22514         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22515         if test -d "$BOOT_JDK"; then
22516           BOOT_JDK_FOUND=maybe
22517           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22518 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22519         fi
22520 
22521 
22522     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22523     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22524       # Do we have a bin/java?
22525       if test ! -x "$BOOT_JDK/bin/java"; then
22526         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22527 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22528         BOOT_JDK_FOUND=no
22529       else
22530         # Do we have a bin/javac?
22531         if test ! -x "$BOOT_JDK/bin/javac"; then
22532           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22533 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22534           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22535 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22536           BOOT_JDK_FOUND=no
22537         else
22538           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22539           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22540 
22541           # Extra M4 quote needed to protect [] in grep expression.
22542           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22543           if test "x$FOUND_CORRECT_VERSION" = x; then
22544             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22545 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22546             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22547 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22548             BOOT_JDK_FOUND=no
22549           else
22550             # We're done! :-)
22551             BOOT_JDK_FOUND=yes
22552 
22553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22554 
22555   # Input might be given as Windows format, start by converting to
22556   # unix format.
22557   path="$BOOT_JDK"
22558   new_path=`$CYGPATH -u "$path"`
22559 
22560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22563   # "foo.exe" is OK but "foo" is an error.
22564   #
22565   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22566   # It is also a way to make sure we got the proper file name for the real test later on.
22567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22568   if test "x$test_shortpath" = x; then
22569     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22570 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22571     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22572   fi
22573 
22574   # Call helper function which possibly converts this using DOS-style short mode.
22575   # If so, the updated path is stored in $new_path.
22576 
22577   input_path="$new_path"
22578   # Check if we need to convert this using DOS-style short mode. If the path
22579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22580   # take no chances and rewrite it.
22581   # Note: m4 eats our [], so we need to use [ and ] instead.
22582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22583   if test "x$has_forbidden_chars" != x; then
22584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22585     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22586     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22587     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22588       # Going to short mode and back again did indeed matter. Since short mode is
22589       # case insensitive, let's make it lowercase to improve readability.
22590       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22591       # Now convert it back to Unix-stile (cygpath)
22592       input_path=`$CYGPATH -u "$shortmode_path"`
22593       new_path="$input_path"
22594     fi
22595   fi
22596 
22597   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22598   if test "x$test_cygdrive_prefix" = x; then
22599     # As a simple fix, exclude /usr/bin since it's not a real path.
22600     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22601       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22602       # a path prefixed by /cygdrive for fixpath to work.
22603       new_path="$CYGWIN_ROOT_PATH$input_path"
22604     fi
22605   fi
22606 
22607 
22608   if test "x$path" != "x$new_path"; then
22609     BOOT_JDK="$new_path"
22610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22611 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22612   fi
22613 
22614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22615 
22616   path="$BOOT_JDK"
22617   has_colon=`$ECHO $path | $GREP ^.:`
22618   new_path="$path"
22619   if test "x$has_colon" = x; then
22620     # Not in mixed or Windows style, start by that.
22621     new_path=`cmd //c echo $path`
22622   fi
22623 
22624 
22625   input_path="$new_path"
22626   # Check if we need to convert this using DOS-style short mode. If the path
22627   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22628   # take no chances and rewrite it.
22629   # Note: m4 eats our [], so we need to use [ and ] instead.
22630   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22631   if test "x$has_forbidden_chars" != x; then
22632     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22633     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22634   fi
22635 
22636 
22637   windows_path="$new_path"
22638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22639     unix_path=`$CYGPATH -u "$windows_path"`
22640     new_path="$unix_path"
22641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22643     new_path="$unix_path"
22644   fi
22645 
22646   if test "x$path" != "x$new_path"; then
22647     BOOT_JDK="$new_path"
22648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22649 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22650   fi
22651 
22652   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22653   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22654 
22655   else
22656     # We're on a unix platform. Hooray! :)
22657     path="$BOOT_JDK"
22658     has_space=`$ECHO "$path" | $GREP " "`
22659     if test "x$has_space" != x; then
22660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22661 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22662       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22663     fi
22664 
22665     # Use eval to expand a potential ~
22666     eval path="$path"
22667     if test ! -f "$path" && test ! -d "$path"; then
22668       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22669     fi
22670 
22671     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22672   fi
22673 
22674             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22675 $as_echo_n "checking for Boot JDK... " >&6; }
22676             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22677 $as_echo "$BOOT_JDK" >&6; }
22678             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22679 $as_echo_n "checking Boot JDK version... " >&6; }
22680             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22681             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22682 $as_echo "$BOOT_JDK_VERSION" >&6; }
22683           fi # end check jdk version
22684         fi # end check javac
22685       fi # end check java
22686     fi # end check boot jdk found
22687   fi
22688 
22689     done
22690   fi
22691 
22692   fi
22693 
22694 
22695     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22696     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22697       # Do we have a bin/java?
22698       if test ! -x "$BOOT_JDK/bin/java"; then
22699         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22700 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22701         BOOT_JDK_FOUND=no
22702       else
22703         # Do we have a bin/javac?
22704         if test ! -x "$BOOT_JDK/bin/javac"; then
22705           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22707           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22708 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22709           BOOT_JDK_FOUND=no
22710         else
22711           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22712           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22713 
22714           # Extra M4 quote needed to protect [] in grep expression.
22715           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22716           if test "x$FOUND_CORRECT_VERSION" = x; then
22717             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22719             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22720 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22721             BOOT_JDK_FOUND=no
22722           else
22723             # We're done! :-)
22724             BOOT_JDK_FOUND=yes
22725 
22726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22727 
22728   # Input might be given as Windows format, start by converting to
22729   # unix format.
22730   path="$BOOT_JDK"
22731   new_path=`$CYGPATH -u "$path"`
22732 
22733   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22734   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22735   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22736   # "foo.exe" is OK but "foo" is an error.
22737   #
22738   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22739   # It is also a way to make sure we got the proper file name for the real test later on.
22740   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22741   if test "x$test_shortpath" = x; then
22742     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22743 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22744     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22745   fi
22746 
22747   # Call helper function which possibly converts this using DOS-style short mode.
22748   # If so, the updated path is stored in $new_path.
22749 
22750   input_path="$new_path"
22751   # Check if we need to convert this using DOS-style short mode. If the path
22752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22753   # take no chances and rewrite it.
22754   # Note: m4 eats our [], so we need to use [ and ] instead.
22755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22756   if test "x$has_forbidden_chars" != x; then
22757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22761       # Going to short mode and back again did indeed matter. Since short mode is
22762       # case insensitive, let's make it lowercase to improve readability.
22763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22764       # Now convert it back to Unix-stile (cygpath)
22765       input_path=`$CYGPATH -u "$shortmode_path"`
22766       new_path="$input_path"
22767     fi
22768   fi
22769 
22770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22771   if test "x$test_cygdrive_prefix" = x; then
22772     # As a simple fix, exclude /usr/bin since it's not a real path.
22773     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22775       # a path prefixed by /cygdrive for fixpath to work.
22776       new_path="$CYGWIN_ROOT_PATH$input_path"
22777     fi
22778   fi
22779 
22780 
22781   if test "x$path" != "x$new_path"; then
22782     BOOT_JDK="$new_path"
22783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22784 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22785   fi
22786 
22787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22788 
22789   path="$BOOT_JDK"
22790   has_colon=`$ECHO $path | $GREP ^.:`
22791   new_path="$path"
22792   if test "x$has_colon" = x; then
22793     # Not in mixed or Windows style, start by that.
22794     new_path=`cmd //c echo $path`
22795   fi
22796 
22797 
22798   input_path="$new_path"
22799   # Check if we need to convert this using DOS-style short mode. If the path
22800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22801   # take no chances and rewrite it.
22802   # Note: m4 eats our [], so we need to use [ and ] instead.
22803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22804   if test "x$has_forbidden_chars" != x; then
22805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22806     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22807   fi
22808 
22809 
22810   windows_path="$new_path"
22811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22812     unix_path=`$CYGPATH -u "$windows_path"`
22813     new_path="$unix_path"
22814   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22815     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22816     new_path="$unix_path"
22817   fi
22818 
22819   if test "x$path" != "x$new_path"; then
22820     BOOT_JDK="$new_path"
22821     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22822 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22823   fi
22824 
22825   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22826   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22827 
22828   else
22829     # We're on a unix platform. Hooray! :)
22830     path="$BOOT_JDK"
22831     has_space=`$ECHO "$path" | $GREP " "`
22832     if test "x$has_space" != x; then
22833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22834 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22835       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22836     fi
22837 
22838     # Use eval to expand a potential ~
22839     eval path="$path"
22840     if test ! -f "$path" && test ! -d "$path"; then
22841       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22842     fi
22843 
22844     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22845   fi
22846 
22847             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22848 $as_echo_n "checking for Boot JDK... " >&6; }
22849             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22850 $as_echo "$BOOT_JDK" >&6; }
22851             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22852 $as_echo_n "checking Boot JDK version... " >&6; }
22853             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22854             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22855 $as_echo "$BOOT_JDK_VERSION" >&6; }
22856           fi # end check jdk version
22857         fi # end check javac
22858       fi # end check java
22859     fi # end check boot jdk found
22860   fi
22861 
22862 
22863   if test "x$BOOT_JDK_FOUND" = xno; then
22864     # Now execute the test
22865 
22866   if test "x$PROGRAMFILES" != x; then
22867     VIRTUAL_DIR="$PROGRAMFILES/Java"
22868 
22869   windows_path="$VIRTUAL_DIR"
22870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22871     unix_path=`$CYGPATH -u "$windows_path"`
22872     VIRTUAL_DIR="$unix_path"
22873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22875     VIRTUAL_DIR="$unix_path"
22876   fi
22877 
22878 
22879   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22880   BOOT_JDK_SUFFIX=""
22881   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22882   if test "x$ALL_JDKS_FOUND" != x; then
22883     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22884 
22885   if test "x$BOOT_JDK_FOUND" = xno; then
22886     # Now execute the test
22887 
22888         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22889         if test -d "$BOOT_JDK"; then
22890           BOOT_JDK_FOUND=maybe
22891           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22892 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22893         fi
22894 
22895 
22896     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22897     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22898       # Do we have a bin/java?
22899       if test ! -x "$BOOT_JDK/bin/java"; then
22900         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22901 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22902         BOOT_JDK_FOUND=no
22903       else
22904         # Do we have a bin/javac?
22905         if test ! -x "$BOOT_JDK/bin/javac"; then
22906           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22907 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22908           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22909 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22910           BOOT_JDK_FOUND=no
22911         else
22912           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22913           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22914 
22915           # Extra M4 quote needed to protect [] in grep expression.
22916           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22917           if test "x$FOUND_CORRECT_VERSION" = x; then
22918             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22920             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22921 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22922             BOOT_JDK_FOUND=no
22923           else
22924             # We're done! :-)
22925             BOOT_JDK_FOUND=yes
22926 
22927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22928 
22929   # Input might be given as Windows format, start by converting to
22930   # unix format.
22931   path="$BOOT_JDK"
22932   new_path=`$CYGPATH -u "$path"`
22933 
22934   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22935   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22936   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22937   # "foo.exe" is OK but "foo" is an error.
22938   #
22939   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22940   # It is also a way to make sure we got the proper file name for the real test later on.
22941   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22942   if test "x$test_shortpath" = x; then
22943     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22944 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22945     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22946   fi
22947 
22948   # Call helper function which possibly converts this using DOS-style short mode.
22949   # If so, the updated path is stored in $new_path.
22950 
22951   input_path="$new_path"
22952   # Check if we need to convert this using DOS-style short mode. If the path
22953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22954   # take no chances and rewrite it.
22955   # Note: m4 eats our [], so we need to use [ and ] instead.
22956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22957   if test "x$has_forbidden_chars" != x; then
22958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22959     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22960     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22961     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22962       # Going to short mode and back again did indeed matter. Since short mode is
22963       # case insensitive, let's make it lowercase to improve readability.
22964       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22965       # Now convert it back to Unix-stile (cygpath)
22966       input_path=`$CYGPATH -u "$shortmode_path"`
22967       new_path="$input_path"
22968     fi
22969   fi
22970 
22971   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22972   if test "x$test_cygdrive_prefix" = x; then
22973     # As a simple fix, exclude /usr/bin since it's not a real path.
22974     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22975       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22976       # a path prefixed by /cygdrive for fixpath to work.
22977       new_path="$CYGWIN_ROOT_PATH$input_path"
22978     fi
22979   fi
22980 
22981 
22982   if test "x$path" != "x$new_path"; then
22983     BOOT_JDK="$new_path"
22984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22986   fi
22987 
22988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22989 
22990   path="$BOOT_JDK"
22991   has_colon=`$ECHO $path | $GREP ^.:`
22992   new_path="$path"
22993   if test "x$has_colon" = x; then
22994     # Not in mixed or Windows style, start by that.
22995     new_path=`cmd //c echo $path`
22996   fi
22997 
22998 
22999   input_path="$new_path"
23000   # Check if we need to convert this using DOS-style short mode. If the path
23001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23002   # take no chances and rewrite it.
23003   # Note: m4 eats our [], so we need to use [ and ] instead.
23004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23005   if test "x$has_forbidden_chars" != x; then
23006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23008   fi
23009 
23010 
23011   windows_path="$new_path"
23012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23013     unix_path=`$CYGPATH -u "$windows_path"`
23014     new_path="$unix_path"
23015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23017     new_path="$unix_path"
23018   fi
23019 
23020   if test "x$path" != "x$new_path"; then
23021     BOOT_JDK="$new_path"
23022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23023 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23024   fi
23025 
23026   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23027   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23028 
23029   else
23030     # We're on a unix platform. Hooray! :)
23031     path="$BOOT_JDK"
23032     has_space=`$ECHO "$path" | $GREP " "`
23033     if test "x$has_space" != x; then
23034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23035 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23036       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23037     fi
23038 
23039     # Use eval to expand a potential ~
23040     eval path="$path"
23041     if test ! -f "$path" && test ! -d "$path"; then
23042       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23043     fi
23044 
23045     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23046   fi
23047 
23048             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23049 $as_echo_n "checking for Boot JDK... " >&6; }
23050             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23051 $as_echo "$BOOT_JDK" >&6; }
23052             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23053 $as_echo_n "checking Boot JDK version... " >&6; }
23054             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23056 $as_echo "$BOOT_JDK_VERSION" >&6; }
23057           fi # end check jdk version
23058         fi # end check javac
23059       fi # end check java
23060     fi # end check boot jdk found
23061   fi
23062 
23063     done
23064   fi
23065 
23066   fi
23067 
23068 
23069     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23070     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23071       # Do we have a bin/java?
23072       if test ! -x "$BOOT_JDK/bin/java"; then
23073         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23075         BOOT_JDK_FOUND=no
23076       else
23077         # Do we have a bin/javac?
23078         if test ! -x "$BOOT_JDK/bin/javac"; then
23079           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23081           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23082 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23083           BOOT_JDK_FOUND=no
23084         else
23085           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23086           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23087 
23088           # Extra M4 quote needed to protect [] in grep expression.
23089           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23090           if test "x$FOUND_CORRECT_VERSION" = x; then
23091             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23093             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23094 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23095             BOOT_JDK_FOUND=no
23096           else
23097             # We're done! :-)
23098             BOOT_JDK_FOUND=yes
23099 
23100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23101 
23102   # Input might be given as Windows format, start by converting to
23103   # unix format.
23104   path="$BOOT_JDK"
23105   new_path=`$CYGPATH -u "$path"`
23106 
23107   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23108   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23109   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23110   # "foo.exe" is OK but "foo" is an error.
23111   #
23112   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23113   # It is also a way to make sure we got the proper file name for the real test later on.
23114   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23115   if test "x$test_shortpath" = x; then
23116     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23117 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23118     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23119   fi
23120 
23121   # Call helper function which possibly converts this using DOS-style short mode.
23122   # If so, the updated path is stored in $new_path.
23123 
23124   input_path="$new_path"
23125   # Check if we need to convert this using DOS-style short mode. If the path
23126   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23127   # take no chances and rewrite it.
23128   # Note: m4 eats our [], so we need to use [ and ] instead.
23129   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23130   if test "x$has_forbidden_chars" != x; then
23131     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23132     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23133     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23134     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23135       # Going to short mode and back again did indeed matter. Since short mode is
23136       # case insensitive, let's make it lowercase to improve readability.
23137       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23138       # Now convert it back to Unix-stile (cygpath)
23139       input_path=`$CYGPATH -u "$shortmode_path"`
23140       new_path="$input_path"
23141     fi
23142   fi
23143 
23144   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23145   if test "x$test_cygdrive_prefix" = x; then
23146     # As a simple fix, exclude /usr/bin since it's not a real path.
23147     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23148       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23149       # a path prefixed by /cygdrive for fixpath to work.
23150       new_path="$CYGWIN_ROOT_PATH$input_path"
23151     fi
23152   fi
23153 
23154 
23155   if test "x$path" != "x$new_path"; then
23156     BOOT_JDK="$new_path"
23157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23158 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23159   fi
23160 
23161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23162 
23163   path="$BOOT_JDK"
23164   has_colon=`$ECHO $path | $GREP ^.:`
23165   new_path="$path"
23166   if test "x$has_colon" = x; then
23167     # Not in mixed or Windows style, start by that.
23168     new_path=`cmd //c echo $path`
23169   fi
23170 
23171 
23172   input_path="$new_path"
23173   # Check if we need to convert this using DOS-style short mode. If the path
23174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23175   # take no chances and rewrite it.
23176   # Note: m4 eats our [], so we need to use [ and ] instead.
23177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23178   if test "x$has_forbidden_chars" != x; then
23179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23180     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181   fi
23182 
23183 
23184   windows_path="$new_path"
23185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23186     unix_path=`$CYGPATH -u "$windows_path"`
23187     new_path="$unix_path"
23188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23190     new_path="$unix_path"
23191   fi
23192 
23193   if test "x$path" != "x$new_path"; then
23194     BOOT_JDK="$new_path"
23195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23196 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23197   fi
23198 
23199   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23200   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23201 
23202   else
23203     # We're on a unix platform. Hooray! :)
23204     path="$BOOT_JDK"
23205     has_space=`$ECHO "$path" | $GREP " "`
23206     if test "x$has_space" != x; then
23207       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23208 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23209       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23210     fi
23211 
23212     # Use eval to expand a potential ~
23213     eval path="$path"
23214     if test ! -f "$path" && test ! -d "$path"; then
23215       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23216     fi
23217 
23218     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23219   fi
23220 
23221             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23222 $as_echo_n "checking for Boot JDK... " >&6; }
23223             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23224 $as_echo "$BOOT_JDK" >&6; }
23225             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23226 $as_echo_n "checking Boot JDK version... " >&6; }
23227             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23229 $as_echo "$BOOT_JDK_VERSION" >&6; }
23230           fi # end check jdk version
23231         fi # end check javac
23232       fi # end check java
23233     fi # end check boot jdk found
23234   fi
23235 
23236 
23237   if test "x$BOOT_JDK_FOUND" = xno; then
23238     # Now execute the test
23239 
23240   if test "x$ProgramFiles" != x; then
23241     VIRTUAL_DIR="$ProgramFiles/Java"
23242 
23243   windows_path="$VIRTUAL_DIR"
23244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23245     unix_path=`$CYGPATH -u "$windows_path"`
23246     VIRTUAL_DIR="$unix_path"
23247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23249     VIRTUAL_DIR="$unix_path"
23250   fi
23251 
23252 
23253   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23254   BOOT_JDK_SUFFIX=""
23255   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23256   if test "x$ALL_JDKS_FOUND" != x; then
23257     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23258 
23259   if test "x$BOOT_JDK_FOUND" = xno; then
23260     # Now execute the test
23261 
23262         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23263         if test -d "$BOOT_JDK"; then
23264           BOOT_JDK_FOUND=maybe
23265           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23266 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23267         fi
23268 
23269 
23270     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23271     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23272       # Do we have a bin/java?
23273       if test ! -x "$BOOT_JDK/bin/java"; then
23274         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23276         BOOT_JDK_FOUND=no
23277       else
23278         # Do we have a bin/javac?
23279         if test ! -x "$BOOT_JDK/bin/javac"; then
23280           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23281 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23282           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23283 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23284           BOOT_JDK_FOUND=no
23285         else
23286           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23287           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23288 
23289           # Extra M4 quote needed to protect [] in grep expression.
23290           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23291           if test "x$FOUND_CORRECT_VERSION" = x; then
23292             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23293 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23294             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23295 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23296             BOOT_JDK_FOUND=no
23297           else
23298             # We're done! :-)
23299             BOOT_JDK_FOUND=yes
23300 
23301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23302 
23303   # Input might be given as Windows format, start by converting to
23304   # unix format.
23305   path="$BOOT_JDK"
23306   new_path=`$CYGPATH -u "$path"`
23307 
23308   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23309   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23310   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23311   # "foo.exe" is OK but "foo" is an error.
23312   #
23313   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23314   # It is also a way to make sure we got the proper file name for the real test later on.
23315   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23316   if test "x$test_shortpath" = x; then
23317     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23318 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23319     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23320   fi
23321 
23322   # Call helper function which possibly converts this using DOS-style short mode.
23323   # If so, the updated path is stored in $new_path.
23324 
23325   input_path="$new_path"
23326   # Check if we need to convert this using DOS-style short mode. If the path
23327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23328   # take no chances and rewrite it.
23329   # Note: m4 eats our [], so we need to use [ and ] instead.
23330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23331   if test "x$has_forbidden_chars" != x; then
23332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23333     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23334     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23335     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23336       # Going to short mode and back again did indeed matter. Since short mode is
23337       # case insensitive, let's make it lowercase to improve readability.
23338       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23339       # Now convert it back to Unix-stile (cygpath)
23340       input_path=`$CYGPATH -u "$shortmode_path"`
23341       new_path="$input_path"
23342     fi
23343   fi
23344 
23345   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23346   if test "x$test_cygdrive_prefix" = x; then
23347     # As a simple fix, exclude /usr/bin since it's not a real path.
23348     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23349       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23350       # a path prefixed by /cygdrive for fixpath to work.
23351       new_path="$CYGWIN_ROOT_PATH$input_path"
23352     fi
23353   fi
23354 
23355 
23356   if test "x$path" != "x$new_path"; then
23357     BOOT_JDK="$new_path"
23358     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23359 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23360   fi
23361 
23362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23363 
23364   path="$BOOT_JDK"
23365   has_colon=`$ECHO $path | $GREP ^.:`
23366   new_path="$path"
23367   if test "x$has_colon" = x; then
23368     # Not in mixed or Windows style, start by that.
23369     new_path=`cmd //c echo $path`
23370   fi
23371 
23372 
23373   input_path="$new_path"
23374   # Check if we need to convert this using DOS-style short mode. If the path
23375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23376   # take no chances and rewrite it.
23377   # Note: m4 eats our [], so we need to use [ and ] instead.
23378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23379   if test "x$has_forbidden_chars" != x; then
23380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23381     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23382   fi
23383 
23384 
23385   windows_path="$new_path"
23386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23387     unix_path=`$CYGPATH -u "$windows_path"`
23388     new_path="$unix_path"
23389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23391     new_path="$unix_path"
23392   fi
23393 
23394   if test "x$path" != "x$new_path"; then
23395     BOOT_JDK="$new_path"
23396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23397 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23398   fi
23399 
23400   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23401   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23402 
23403   else
23404     # We're on a unix platform. Hooray! :)
23405     path="$BOOT_JDK"
23406     has_space=`$ECHO "$path" | $GREP " "`
23407     if test "x$has_space" != x; then
23408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23409 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23410       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23411     fi
23412 
23413     # Use eval to expand a potential ~
23414     eval path="$path"
23415     if test ! -f "$path" && test ! -d "$path"; then
23416       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23417     fi
23418 
23419     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23420   fi
23421 
23422             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23423 $as_echo_n "checking for Boot JDK... " >&6; }
23424             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23425 $as_echo "$BOOT_JDK" >&6; }
23426             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23427 $as_echo_n "checking Boot JDK version... " >&6; }
23428             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23429             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23430 $as_echo "$BOOT_JDK_VERSION" >&6; }
23431           fi # end check jdk version
23432         fi # end check javac
23433       fi # end check java
23434     fi # end check boot jdk found
23435   fi
23436 
23437     done
23438   fi
23439 
23440   fi
23441 
23442 
23443     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23444     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23445       # Do we have a bin/java?
23446       if test ! -x "$BOOT_JDK/bin/java"; then
23447         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23449         BOOT_JDK_FOUND=no
23450       else
23451         # Do we have a bin/javac?
23452         if test ! -x "$BOOT_JDK/bin/javac"; then
23453           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23455           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23456 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23457           BOOT_JDK_FOUND=no
23458         else
23459           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23460           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23461 
23462           # Extra M4 quote needed to protect [] in grep expression.
23463           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23464           if test "x$FOUND_CORRECT_VERSION" = x; then
23465             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23466 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23467             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23468 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23469             BOOT_JDK_FOUND=no
23470           else
23471             # We're done! :-)
23472             BOOT_JDK_FOUND=yes
23473 
23474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23475 
23476   # Input might be given as Windows format, start by converting to
23477   # unix format.
23478   path="$BOOT_JDK"
23479   new_path=`$CYGPATH -u "$path"`
23480 
23481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23484   # "foo.exe" is OK but "foo" is an error.
23485   #
23486   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23487   # It is also a way to make sure we got the proper file name for the real test later on.
23488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23489   if test "x$test_shortpath" = x; then
23490     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23491 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23492     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23493   fi
23494 
23495   # Call helper function which possibly converts this using DOS-style short mode.
23496   # If so, the updated path is stored in $new_path.
23497 
23498   input_path="$new_path"
23499   # Check if we need to convert this using DOS-style short mode. If the path
23500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23501   # take no chances and rewrite it.
23502   # Note: m4 eats our [], so we need to use [ and ] instead.
23503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23504   if test "x$has_forbidden_chars" != x; then
23505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23506     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23507     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23508     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23509       # Going to short mode and back again did indeed matter. Since short mode is
23510       # case insensitive, let's make it lowercase to improve readability.
23511       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23512       # Now convert it back to Unix-stile (cygpath)
23513       input_path=`$CYGPATH -u "$shortmode_path"`
23514       new_path="$input_path"
23515     fi
23516   fi
23517 
23518   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23519   if test "x$test_cygdrive_prefix" = x; then
23520     # As a simple fix, exclude /usr/bin since it's not a real path.
23521     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23522       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23523       # a path prefixed by /cygdrive for fixpath to work.
23524       new_path="$CYGWIN_ROOT_PATH$input_path"
23525     fi
23526   fi
23527 
23528 
23529   if test "x$path" != "x$new_path"; then
23530     BOOT_JDK="$new_path"
23531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23532 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23533   fi
23534 
23535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23536 
23537   path="$BOOT_JDK"
23538   has_colon=`$ECHO $path | $GREP ^.:`
23539   new_path="$path"
23540   if test "x$has_colon" = x; then
23541     # Not in mixed or Windows style, start by that.
23542     new_path=`cmd //c echo $path`
23543   fi
23544 
23545 
23546   input_path="$new_path"
23547   # Check if we need to convert this using DOS-style short mode. If the path
23548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23549   # take no chances and rewrite it.
23550   # Note: m4 eats our [], so we need to use [ and ] instead.
23551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23552   if test "x$has_forbidden_chars" != x; then
23553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23555   fi
23556 
23557 
23558   windows_path="$new_path"
23559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23560     unix_path=`$CYGPATH -u "$windows_path"`
23561     new_path="$unix_path"
23562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23564     new_path="$unix_path"
23565   fi
23566 
23567   if test "x$path" != "x$new_path"; then
23568     BOOT_JDK="$new_path"
23569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23570 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23571   fi
23572 
23573   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23574   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23575 
23576   else
23577     # We're on a unix platform. Hooray! :)
23578     path="$BOOT_JDK"
23579     has_space=`$ECHO "$path" | $GREP " "`
23580     if test "x$has_space" != x; then
23581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23582 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23583       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23584     fi
23585 
23586     # Use eval to expand a potential ~
23587     eval path="$path"
23588     if test ! -f "$path" && test ! -d "$path"; then
23589       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23590     fi
23591 
23592     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23593   fi
23594 
23595             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23596 $as_echo_n "checking for Boot JDK... " >&6; }
23597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23598 $as_echo "$BOOT_JDK" >&6; }
23599             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23600 $as_echo_n "checking Boot JDK version... " >&6; }
23601             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23602             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23603 $as_echo "$BOOT_JDK_VERSION" >&6; }
23604           fi # end check jdk version
23605         fi # end check javac
23606       fi # end check java
23607     fi # end check boot jdk found
23608   fi
23609 
23610 
23611   if test "x$BOOT_JDK_FOUND" = xno; then
23612     # Now execute the test
23613 
23614   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23615   BOOT_JDK_SUFFIX=""
23616   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23617   if test "x$ALL_JDKS_FOUND" != x; then
23618     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23619 
23620   if test "x$BOOT_JDK_FOUND" = xno; then
23621     # Now execute the test
23622 
23623         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23624         if test -d "$BOOT_JDK"; then
23625           BOOT_JDK_FOUND=maybe
23626           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23627 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23628         fi
23629 
23630 
23631     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23632     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23633       # Do we have a bin/java?
23634       if test ! -x "$BOOT_JDK/bin/java"; then
23635         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23637         BOOT_JDK_FOUND=no
23638       else
23639         # Do we have a bin/javac?
23640         if test ! -x "$BOOT_JDK/bin/javac"; then
23641           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23642 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23643           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23644 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23645           BOOT_JDK_FOUND=no
23646         else
23647           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23648           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23649 
23650           # Extra M4 quote needed to protect [] in grep expression.
23651           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23652           if test "x$FOUND_CORRECT_VERSION" = x; then
23653             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23655             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23656 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23657             BOOT_JDK_FOUND=no
23658           else
23659             # We're done! :-)
23660             BOOT_JDK_FOUND=yes
23661 
23662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23663 
23664   # Input might be given as Windows format, start by converting to
23665   # unix format.
23666   path="$BOOT_JDK"
23667   new_path=`$CYGPATH -u "$path"`
23668 
23669   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23670   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23671   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23672   # "foo.exe" is OK but "foo" is an error.
23673   #
23674   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23675   # It is also a way to make sure we got the proper file name for the real test later on.
23676   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23677   if test "x$test_shortpath" = x; then
23678     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23679 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23680     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23681   fi
23682 
23683   # Call helper function which possibly converts this using DOS-style short mode.
23684   # If so, the updated path is stored in $new_path.
23685 
23686   input_path="$new_path"
23687   # Check if we need to convert this using DOS-style short mode. If the path
23688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23689   # take no chances and rewrite it.
23690   # Note: m4 eats our [], so we need to use [ and ] instead.
23691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23692   if test "x$has_forbidden_chars" != x; then
23693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23697       # Going to short mode and back again did indeed matter. Since short mode is
23698       # case insensitive, let's make it lowercase to improve readability.
23699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23700       # Now convert it back to Unix-stile (cygpath)
23701       input_path=`$CYGPATH -u "$shortmode_path"`
23702       new_path="$input_path"
23703     fi
23704   fi
23705 
23706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23707   if test "x$test_cygdrive_prefix" = x; then
23708     # As a simple fix, exclude /usr/bin since it's not a real path.
23709     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23711       # a path prefixed by /cygdrive for fixpath to work.
23712       new_path="$CYGWIN_ROOT_PATH$input_path"
23713     fi
23714   fi
23715 
23716 
23717   if test "x$path" != "x$new_path"; then
23718     BOOT_JDK="$new_path"
23719     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23720 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23721   fi
23722 
23723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23724 
23725   path="$BOOT_JDK"
23726   has_colon=`$ECHO $path | $GREP ^.:`
23727   new_path="$path"
23728   if test "x$has_colon" = x; then
23729     # Not in mixed or Windows style, start by that.
23730     new_path=`cmd //c echo $path`
23731   fi
23732 
23733 
23734   input_path="$new_path"
23735   # Check if we need to convert this using DOS-style short mode. If the path
23736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23737   # take no chances and rewrite it.
23738   # Note: m4 eats our [], so we need to use [ and ] instead.
23739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23740   if test "x$has_forbidden_chars" != x; then
23741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23743   fi
23744 
23745 
23746   windows_path="$new_path"
23747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23748     unix_path=`$CYGPATH -u "$windows_path"`
23749     new_path="$unix_path"
23750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23752     new_path="$unix_path"
23753   fi
23754 
23755   if test "x$path" != "x$new_path"; then
23756     BOOT_JDK="$new_path"
23757     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23758 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23759   fi
23760 
23761   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23762   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23763 
23764   else
23765     # We're on a unix platform. Hooray! :)
23766     path="$BOOT_JDK"
23767     has_space=`$ECHO "$path" | $GREP " "`
23768     if test "x$has_space" != x; then
23769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23770 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23771       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23772     fi
23773 
23774     # Use eval to expand a potential ~
23775     eval path="$path"
23776     if test ! -f "$path" && test ! -d "$path"; then
23777       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23778     fi
23779 
23780     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23781   fi
23782 
23783             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23784 $as_echo_n "checking for Boot JDK... " >&6; }
23785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23786 $as_echo "$BOOT_JDK" >&6; }
23787             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23788 $as_echo_n "checking Boot JDK version... " >&6; }
23789             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23791 $as_echo "$BOOT_JDK_VERSION" >&6; }
23792           fi # end check jdk version
23793         fi # end check javac
23794       fi # end check java
23795     fi # end check boot jdk found
23796   fi
23797 
23798     done
23799   fi
23800 
23801 
23802     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23803     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23804       # Do we have a bin/java?
23805       if test ! -x "$BOOT_JDK/bin/java"; then
23806         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23808         BOOT_JDK_FOUND=no
23809       else
23810         # Do we have a bin/javac?
23811         if test ! -x "$BOOT_JDK/bin/javac"; then
23812           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23814           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23815 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23816           BOOT_JDK_FOUND=no
23817         else
23818           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23819           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23820 
23821           # Extra M4 quote needed to protect [] in grep expression.
23822           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23823           if test "x$FOUND_CORRECT_VERSION" = x; then
23824             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23825 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23826             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23827 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23828             BOOT_JDK_FOUND=no
23829           else
23830             # We're done! :-)
23831             BOOT_JDK_FOUND=yes
23832 
23833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23834 
23835   # Input might be given as Windows format, start by converting to
23836   # unix format.
23837   path="$BOOT_JDK"
23838   new_path=`$CYGPATH -u "$path"`
23839 
23840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23843   # "foo.exe" is OK but "foo" is an error.
23844   #
23845   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23846   # It is also a way to make sure we got the proper file name for the real test later on.
23847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23848   if test "x$test_shortpath" = x; then
23849     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23850 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23851     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23852   fi
23853 
23854   # Call helper function which possibly converts this using DOS-style short mode.
23855   # If so, the updated path is stored in $new_path.
23856 
23857   input_path="$new_path"
23858   # Check if we need to convert this using DOS-style short mode. If the path
23859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23860   # take no chances and rewrite it.
23861   # Note: m4 eats our [], so we need to use [ and ] instead.
23862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23863   if test "x$has_forbidden_chars" != x; then
23864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23865     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23866     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23867     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23868       # Going to short mode and back again did indeed matter. Since short mode is
23869       # case insensitive, let's make it lowercase to improve readability.
23870       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23871       # Now convert it back to Unix-stile (cygpath)
23872       input_path=`$CYGPATH -u "$shortmode_path"`
23873       new_path="$input_path"
23874     fi
23875   fi
23876 
23877   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23878   if test "x$test_cygdrive_prefix" = x; then
23879     # As a simple fix, exclude /usr/bin since it's not a real path.
23880     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23881       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23882       # a path prefixed by /cygdrive for fixpath to work.
23883       new_path="$CYGWIN_ROOT_PATH$input_path"
23884     fi
23885   fi
23886 
23887 
23888   if test "x$path" != "x$new_path"; then
23889     BOOT_JDK="$new_path"
23890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23891 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23892   fi
23893 
23894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23895 
23896   path="$BOOT_JDK"
23897   has_colon=`$ECHO $path | $GREP ^.:`
23898   new_path="$path"
23899   if test "x$has_colon" = x; then
23900     # Not in mixed or Windows style, start by that.
23901     new_path=`cmd //c echo $path`
23902   fi
23903 
23904 
23905   input_path="$new_path"
23906   # Check if we need to convert this using DOS-style short mode. If the path
23907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23908   # take no chances and rewrite it.
23909   # Note: m4 eats our [], so we need to use [ and ] instead.
23910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23911   if test "x$has_forbidden_chars" != x; then
23912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23913     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23914   fi
23915 
23916 
23917   windows_path="$new_path"
23918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23919     unix_path=`$CYGPATH -u "$windows_path"`
23920     new_path="$unix_path"
23921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23923     new_path="$unix_path"
23924   fi
23925 
23926   if test "x$path" != "x$new_path"; then
23927     BOOT_JDK="$new_path"
23928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23929 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23930   fi
23931 
23932   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23933   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23934 
23935   else
23936     # We're on a unix platform. Hooray! :)
23937     path="$BOOT_JDK"
23938     has_space=`$ECHO "$path" | $GREP " "`
23939     if test "x$has_space" != x; then
23940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23941 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23942       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23943     fi
23944 
23945     # Use eval to expand a potential ~
23946     eval path="$path"
23947     if test ! -f "$path" && test ! -d "$path"; then
23948       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23949     fi
23950 
23951     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23952   fi
23953 
23954             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23955 $as_echo_n "checking for Boot JDK... " >&6; }
23956             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23957 $as_echo "$BOOT_JDK" >&6; }
23958             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23959 $as_echo_n "checking Boot JDK version... " >&6; }
23960             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23961             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23962 $as_echo "$BOOT_JDK_VERSION" >&6; }
23963           fi # end check jdk version
23964         fi # end check javac
23965       fi # end check java
23966     fi # end check boot jdk found
23967   fi
23968 
23969   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23970 
23971   if test "x$BOOT_JDK_FOUND" = xno; then
23972     # Now execute the test
23973 
23974   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23975   BOOT_JDK_SUFFIX="/Contents/Home"
23976   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23977   if test "x$ALL_JDKS_FOUND" != x; then
23978     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23979 
23980   if test "x$BOOT_JDK_FOUND" = xno; then
23981     # Now execute the test
23982 
23983         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23984         if test -d "$BOOT_JDK"; then
23985           BOOT_JDK_FOUND=maybe
23986           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23987 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23988         fi
23989 
23990 
23991     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23992     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23993       # Do we have a bin/java?
23994       if test ! -x "$BOOT_JDK/bin/java"; then
23995         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23997         BOOT_JDK_FOUND=no
23998       else
23999         # Do we have a bin/javac?
24000         if test ! -x "$BOOT_JDK/bin/javac"; then
24001           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24002 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24003           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24004 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24005           BOOT_JDK_FOUND=no
24006         else
24007           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24008           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24009 
24010           # Extra M4 quote needed to protect [] in grep expression.
24011           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24012           if test "x$FOUND_CORRECT_VERSION" = x; then
24013             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24015             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24016 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24017             BOOT_JDK_FOUND=no
24018           else
24019             # We're done! :-)
24020             BOOT_JDK_FOUND=yes
24021 
24022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24023 
24024   # Input might be given as Windows format, start by converting to
24025   # unix format.
24026   path="$BOOT_JDK"
24027   new_path=`$CYGPATH -u "$path"`
24028 
24029   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24030   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24031   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24032   # "foo.exe" is OK but "foo" is an error.
24033   #
24034   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24035   # It is also a way to make sure we got the proper file name for the real test later on.
24036   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24037   if test "x$test_shortpath" = x; then
24038     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24039 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24040     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24041   fi
24042 
24043   # Call helper function which possibly converts this using DOS-style short mode.
24044   # If so, the updated path is stored in $new_path.
24045 
24046   input_path="$new_path"
24047   # Check if we need to convert this using DOS-style short mode. If the path
24048   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24049   # take no chances and rewrite it.
24050   # Note: m4 eats our [], so we need to use [ and ] instead.
24051   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24052   if test "x$has_forbidden_chars" != x; then
24053     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24054     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24055     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24056     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24057       # Going to short mode and back again did indeed matter. Since short mode is
24058       # case insensitive, let's make it lowercase to improve readability.
24059       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24060       # Now convert it back to Unix-stile (cygpath)
24061       input_path=`$CYGPATH -u "$shortmode_path"`
24062       new_path="$input_path"
24063     fi
24064   fi
24065 
24066   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24067   if test "x$test_cygdrive_prefix" = x; then
24068     # As a simple fix, exclude /usr/bin since it's not a real path.
24069     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24070       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24071       # a path prefixed by /cygdrive for fixpath to work.
24072       new_path="$CYGWIN_ROOT_PATH$input_path"
24073     fi
24074   fi
24075 
24076 
24077   if test "x$path" != "x$new_path"; then
24078     BOOT_JDK="$new_path"
24079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24080 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24081   fi
24082 
24083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24084 
24085   path="$BOOT_JDK"
24086   has_colon=`$ECHO $path | $GREP ^.:`
24087   new_path="$path"
24088   if test "x$has_colon" = x; then
24089     # Not in mixed or Windows style, start by that.
24090     new_path=`cmd //c echo $path`
24091   fi
24092 
24093 
24094   input_path="$new_path"
24095   # Check if we need to convert this using DOS-style short mode. If the path
24096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24097   # take no chances and rewrite it.
24098   # Note: m4 eats our [], so we need to use [ and ] instead.
24099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24100   if test "x$has_forbidden_chars" != x; then
24101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24102     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24103   fi
24104 
24105 
24106   windows_path="$new_path"
24107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24108     unix_path=`$CYGPATH -u "$windows_path"`
24109     new_path="$unix_path"
24110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24112     new_path="$unix_path"
24113   fi
24114 
24115   if test "x$path" != "x$new_path"; then
24116     BOOT_JDK="$new_path"
24117     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24118 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24119   fi
24120 
24121   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24122   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24123 
24124   else
24125     # We're on a unix platform. Hooray! :)
24126     path="$BOOT_JDK"
24127     has_space=`$ECHO "$path" | $GREP " "`
24128     if test "x$has_space" != x; then
24129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24130 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24131       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24132     fi
24133 
24134     # Use eval to expand a potential ~
24135     eval path="$path"
24136     if test ! -f "$path" && test ! -d "$path"; then
24137       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24138     fi
24139 
24140     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24141   fi
24142 
24143             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24144 $as_echo_n "checking for Boot JDK... " >&6; }
24145             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24146 $as_echo "$BOOT_JDK" >&6; }
24147             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24148 $as_echo_n "checking Boot JDK version... " >&6; }
24149             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24151 $as_echo "$BOOT_JDK_VERSION" >&6; }
24152           fi # end check jdk version
24153         fi # end check javac
24154       fi # end check java
24155     fi # end check boot jdk found
24156   fi
24157 
24158     done
24159   fi
24160 
24161 
24162     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24163     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24164       # Do we have a bin/java?
24165       if test ! -x "$BOOT_JDK/bin/java"; then
24166         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24168         BOOT_JDK_FOUND=no
24169       else
24170         # Do we have a bin/javac?
24171         if test ! -x "$BOOT_JDK/bin/javac"; then
24172           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24174           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24175 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24176           BOOT_JDK_FOUND=no
24177         else
24178           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24179           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24180 
24181           # Extra M4 quote needed to protect [] in grep expression.
24182           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24183           if test "x$FOUND_CORRECT_VERSION" = x; then
24184             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24186             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24187 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24188             BOOT_JDK_FOUND=no
24189           else
24190             # We're done! :-)
24191             BOOT_JDK_FOUND=yes
24192 
24193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24194 
24195   # Input might be given as Windows format, start by converting to
24196   # unix format.
24197   path="$BOOT_JDK"
24198   new_path=`$CYGPATH -u "$path"`
24199 
24200   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24201   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24202   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24203   # "foo.exe" is OK but "foo" is an error.
24204   #
24205   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24206   # It is also a way to make sure we got the proper file name for the real test later on.
24207   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24208   if test "x$test_shortpath" = x; then
24209     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24210 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24211     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24212   fi
24213 
24214   # Call helper function which possibly converts this using DOS-style short mode.
24215   # If so, the updated path is stored in $new_path.
24216 
24217   input_path="$new_path"
24218   # Check if we need to convert this using DOS-style short mode. If the path
24219   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24220   # take no chances and rewrite it.
24221   # Note: m4 eats our [], so we need to use [ and ] instead.
24222   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24223   if test "x$has_forbidden_chars" != x; then
24224     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24225     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24226     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24227     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24228       # Going to short mode and back again did indeed matter. Since short mode is
24229       # case insensitive, let's make it lowercase to improve readability.
24230       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231       # Now convert it back to Unix-stile (cygpath)
24232       input_path=`$CYGPATH -u "$shortmode_path"`
24233       new_path="$input_path"
24234     fi
24235   fi
24236 
24237   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24238   if test "x$test_cygdrive_prefix" = x; then
24239     # As a simple fix, exclude /usr/bin since it's not a real path.
24240     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24241       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24242       # a path prefixed by /cygdrive for fixpath to work.
24243       new_path="$CYGWIN_ROOT_PATH$input_path"
24244     fi
24245   fi
24246 
24247 
24248   if test "x$path" != "x$new_path"; then
24249     BOOT_JDK="$new_path"
24250     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24251 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24252   fi
24253 
24254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24255 
24256   path="$BOOT_JDK"
24257   has_colon=`$ECHO $path | $GREP ^.:`
24258   new_path="$path"
24259   if test "x$has_colon" = x; then
24260     # Not in mixed or Windows style, start by that.
24261     new_path=`cmd //c echo $path`
24262   fi
24263 
24264 
24265   input_path="$new_path"
24266   # Check if we need to convert this using DOS-style short mode. If the path
24267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24268   # take no chances and rewrite it.
24269   # Note: m4 eats our [], so we need to use [ and ] instead.
24270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24271   if test "x$has_forbidden_chars" != x; then
24272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24273     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24274   fi
24275 
24276 
24277   windows_path="$new_path"
24278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24279     unix_path=`$CYGPATH -u "$windows_path"`
24280     new_path="$unix_path"
24281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24283     new_path="$unix_path"
24284   fi
24285 
24286   if test "x$path" != "x$new_path"; then
24287     BOOT_JDK="$new_path"
24288     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24289 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24290   fi
24291 
24292   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24293   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24294 
24295   else
24296     # We're on a unix platform. Hooray! :)
24297     path="$BOOT_JDK"
24298     has_space=`$ECHO "$path" | $GREP " "`
24299     if test "x$has_space" != x; then
24300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24301 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24302       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24303     fi
24304 
24305     # Use eval to expand a potential ~
24306     eval path="$path"
24307     if test ! -f "$path" && test ! -d "$path"; then
24308       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24309     fi
24310 
24311     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24312   fi
24313 
24314             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24315 $as_echo_n "checking for Boot JDK... " >&6; }
24316             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24317 $as_echo "$BOOT_JDK" >&6; }
24318             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24319 $as_echo_n "checking Boot JDK version... " >&6; }
24320             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24321             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24322 $as_echo "$BOOT_JDK_VERSION" >&6; }
24323           fi # end check jdk version
24324         fi # end check javac
24325       fi # end check java
24326     fi # end check boot jdk found
24327   fi
24328 
24329 
24330   if test "x$BOOT_JDK_FOUND" = xno; then
24331     # Now execute the test
24332 
24333   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24334   BOOT_JDK_SUFFIX="/Contents/Home"
24335   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24336   if test "x$ALL_JDKS_FOUND" != x; then
24337     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24338 
24339   if test "x$BOOT_JDK_FOUND" = xno; then
24340     # Now execute the test
24341 
24342         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24343         if test -d "$BOOT_JDK"; then
24344           BOOT_JDK_FOUND=maybe
24345           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24346 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24347         fi
24348 
24349 
24350     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24351     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24352       # Do we have a bin/java?
24353       if test ! -x "$BOOT_JDK/bin/java"; then
24354         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24356         BOOT_JDK_FOUND=no
24357       else
24358         # Do we have a bin/javac?
24359         if test ! -x "$BOOT_JDK/bin/javac"; then
24360           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24362           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24363 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24364           BOOT_JDK_FOUND=no
24365         else
24366           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24367           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24368 
24369           # Extra M4 quote needed to protect [] in grep expression.
24370           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24371           if test "x$FOUND_CORRECT_VERSION" = x; then
24372             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24373 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24374             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24375 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24376             BOOT_JDK_FOUND=no
24377           else
24378             # We're done! :-)
24379             BOOT_JDK_FOUND=yes
24380 
24381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24382 
24383   # Input might be given as Windows format, start by converting to
24384   # unix format.
24385   path="$BOOT_JDK"
24386   new_path=`$CYGPATH -u "$path"`
24387 
24388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24391   # "foo.exe" is OK but "foo" is an error.
24392   #
24393   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24394   # It is also a way to make sure we got the proper file name for the real test later on.
24395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24396   if test "x$test_shortpath" = x; then
24397     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24398 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24399     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24400   fi
24401 
24402   # Call helper function which possibly converts this using DOS-style short mode.
24403   # If so, the updated path is stored in $new_path.
24404 
24405   input_path="$new_path"
24406   # Check if we need to convert this using DOS-style short mode. If the path
24407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24408   # take no chances and rewrite it.
24409   # Note: m4 eats our [], so we need to use [ and ] instead.
24410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24411   if test "x$has_forbidden_chars" != x; then
24412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24416       # Going to short mode and back again did indeed matter. Since short mode is
24417       # case insensitive, let's make it lowercase to improve readability.
24418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24419       # Now convert it back to Unix-stile (cygpath)
24420       input_path=`$CYGPATH -u "$shortmode_path"`
24421       new_path="$input_path"
24422     fi
24423   fi
24424 
24425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24426   if test "x$test_cygdrive_prefix" = x; then
24427     # As a simple fix, exclude /usr/bin since it's not a real path.
24428     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24430       # a path prefixed by /cygdrive for fixpath to work.
24431       new_path="$CYGWIN_ROOT_PATH$input_path"
24432     fi
24433   fi
24434 
24435 
24436   if test "x$path" != "x$new_path"; then
24437     BOOT_JDK="$new_path"
24438     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24439 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24440   fi
24441 
24442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443 
24444   path="$BOOT_JDK"
24445   has_colon=`$ECHO $path | $GREP ^.:`
24446   new_path="$path"
24447   if test "x$has_colon" = x; then
24448     # Not in mixed or Windows style, start by that.
24449     new_path=`cmd //c echo $path`
24450   fi
24451 
24452 
24453   input_path="$new_path"
24454   # Check if we need to convert this using DOS-style short mode. If the path
24455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24456   # take no chances and rewrite it.
24457   # Note: m4 eats our [], so we need to use [ and ] instead.
24458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24459   if test "x$has_forbidden_chars" != x; then
24460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24461     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24462   fi
24463 
24464 
24465   windows_path="$new_path"
24466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24467     unix_path=`$CYGPATH -u "$windows_path"`
24468     new_path="$unix_path"
24469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24471     new_path="$unix_path"
24472   fi
24473 
24474   if test "x$path" != "x$new_path"; then
24475     BOOT_JDK="$new_path"
24476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24477 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24478   fi
24479 
24480   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24481   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24482 
24483   else
24484     # We're on a unix platform. Hooray! :)
24485     path="$BOOT_JDK"
24486     has_space=`$ECHO "$path" | $GREP " "`
24487     if test "x$has_space" != x; then
24488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24489 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24490       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24491     fi
24492 
24493     # Use eval to expand a potential ~
24494     eval path="$path"
24495     if test ! -f "$path" && test ! -d "$path"; then
24496       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24497     fi
24498 
24499     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24500   fi
24501 
24502             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24503 $as_echo_n "checking for Boot JDK... " >&6; }
24504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24505 $as_echo "$BOOT_JDK" >&6; }
24506             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24507 $as_echo_n "checking Boot JDK version... " >&6; }
24508             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24509             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24510 $as_echo "$BOOT_JDK_VERSION" >&6; }
24511           fi # end check jdk version
24512         fi # end check javac
24513       fi # end check java
24514     fi # end check boot jdk found
24515   fi
24516 
24517     done
24518   fi
24519 
24520 
24521     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24522     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24523       # Do we have a bin/java?
24524       if test ! -x "$BOOT_JDK/bin/java"; then
24525         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24526 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24527         BOOT_JDK_FOUND=no
24528       else
24529         # Do we have a bin/javac?
24530         if test ! -x "$BOOT_JDK/bin/javac"; then
24531           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24533           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24534 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24535           BOOT_JDK_FOUND=no
24536         else
24537           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24538           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24539 
24540           # Extra M4 quote needed to protect [] in grep expression.
24541           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24542           if test "x$FOUND_CORRECT_VERSION" = x; then
24543             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24544 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24545             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24546 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24547             BOOT_JDK_FOUND=no
24548           else
24549             # We're done! :-)
24550             BOOT_JDK_FOUND=yes
24551 
24552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24553 
24554   # Input might be given as Windows format, start by converting to
24555   # unix format.
24556   path="$BOOT_JDK"
24557   new_path=`$CYGPATH -u "$path"`
24558 
24559   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24560   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24561   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24562   # "foo.exe" is OK but "foo" is an error.
24563   #
24564   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24565   # It is also a way to make sure we got the proper file name for the real test later on.
24566   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24567   if test "x$test_shortpath" = x; then
24568     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24569 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24570     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24571   fi
24572 
24573   # Call helper function which possibly converts this using DOS-style short mode.
24574   # If so, the updated path is stored in $new_path.
24575 
24576   input_path="$new_path"
24577   # Check if we need to convert this using DOS-style short mode. If the path
24578   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24579   # take no chances and rewrite it.
24580   # Note: m4 eats our [], so we need to use [ and ] instead.
24581   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24582   if test "x$has_forbidden_chars" != x; then
24583     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24584     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24585     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24586     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24587       # Going to short mode and back again did indeed matter. Since short mode is
24588       # case insensitive, let's make it lowercase to improve readability.
24589       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24590       # Now convert it back to Unix-stile (cygpath)
24591       input_path=`$CYGPATH -u "$shortmode_path"`
24592       new_path="$input_path"
24593     fi
24594   fi
24595 
24596   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24597   if test "x$test_cygdrive_prefix" = x; then
24598     # As a simple fix, exclude /usr/bin since it's not a real path.
24599     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24600       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24601       # a path prefixed by /cygdrive for fixpath to work.
24602       new_path="$CYGWIN_ROOT_PATH$input_path"
24603     fi
24604   fi
24605 
24606 
24607   if test "x$path" != "x$new_path"; then
24608     BOOT_JDK="$new_path"
24609     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24610 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24611   fi
24612 
24613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24614 
24615   path="$BOOT_JDK"
24616   has_colon=`$ECHO $path | $GREP ^.:`
24617   new_path="$path"
24618   if test "x$has_colon" = x; then
24619     # Not in mixed or Windows style, start by that.
24620     new_path=`cmd //c echo $path`
24621   fi
24622 
24623 
24624   input_path="$new_path"
24625   # Check if we need to convert this using DOS-style short mode. If the path
24626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24627   # take no chances and rewrite it.
24628   # Note: m4 eats our [], so we need to use [ and ] instead.
24629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24630   if test "x$has_forbidden_chars" != x; then
24631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24632     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24633   fi
24634 
24635 
24636   windows_path="$new_path"
24637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24638     unix_path=`$CYGPATH -u "$windows_path"`
24639     new_path="$unix_path"
24640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24642     new_path="$unix_path"
24643   fi
24644 
24645   if test "x$path" != "x$new_path"; then
24646     BOOT_JDK="$new_path"
24647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24649   fi
24650 
24651   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24652   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24653 
24654   else
24655     # We're on a unix platform. Hooray! :)
24656     path="$BOOT_JDK"
24657     has_space=`$ECHO "$path" | $GREP " "`
24658     if test "x$has_space" != x; then
24659       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24660 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24661       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24662     fi
24663 
24664     # Use eval to expand a potential ~
24665     eval path="$path"
24666     if test ! -f "$path" && test ! -d "$path"; then
24667       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24668     fi
24669 
24670     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24671   fi
24672 
24673             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24674 $as_echo_n "checking for Boot JDK... " >&6; }
24675             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24676 $as_echo "$BOOT_JDK" >&6; }
24677             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24678 $as_echo_n "checking Boot JDK version... " >&6; }
24679             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24680             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24681 $as_echo "$BOOT_JDK_VERSION" >&6; }
24682           fi # end check jdk version
24683         fi # end check javac
24684       fi # end check java
24685     fi # end check boot jdk found
24686   fi
24687 
24688   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24689 
24690   if test "x$BOOT_JDK_FOUND" = xno; then
24691     # Now execute the test
24692 
24693   BOOT_JDK_PREFIX="/usr/lib/jvm"
24694   BOOT_JDK_SUFFIX=""
24695   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24696   if test "x$ALL_JDKS_FOUND" != x; then
24697     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24698 
24699   if test "x$BOOT_JDK_FOUND" = xno; then
24700     # Now execute the test
24701 
24702         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24703         if test -d "$BOOT_JDK"; then
24704           BOOT_JDK_FOUND=maybe
24705           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24706 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24707         fi
24708 
24709 
24710     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24711     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24712       # Do we have a bin/java?
24713       if test ! -x "$BOOT_JDK/bin/java"; then
24714         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24715 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24716         BOOT_JDK_FOUND=no
24717       else
24718         # Do we have a bin/javac?
24719         if test ! -x "$BOOT_JDK/bin/javac"; then
24720           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24721 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24722           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24723 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24724           BOOT_JDK_FOUND=no
24725         else
24726           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24727           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24728 
24729           # Extra M4 quote needed to protect [] in grep expression.
24730           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24731           if test "x$FOUND_CORRECT_VERSION" = x; then
24732             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24733 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24734             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24735 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24736             BOOT_JDK_FOUND=no
24737           else
24738             # We're done! :-)
24739             BOOT_JDK_FOUND=yes
24740 
24741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24742 
24743   # Input might be given as Windows format, start by converting to
24744   # unix format.
24745   path="$BOOT_JDK"
24746   new_path=`$CYGPATH -u "$path"`
24747 
24748   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24749   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24750   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24751   # "foo.exe" is OK but "foo" is an error.
24752   #
24753   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24754   # It is also a way to make sure we got the proper file name for the real test later on.
24755   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24756   if test "x$test_shortpath" = x; then
24757     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24758 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24759     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24760   fi
24761 
24762   # Call helper function which possibly converts this using DOS-style short mode.
24763   # If so, the updated path is stored in $new_path.
24764 
24765   input_path="$new_path"
24766   # Check if we need to convert this using DOS-style short mode. If the path
24767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24768   # take no chances and rewrite it.
24769   # Note: m4 eats our [], so we need to use [ and ] instead.
24770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24771   if test "x$has_forbidden_chars" != x; then
24772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24773     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24774     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24775     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24776       # Going to short mode and back again did indeed matter. Since short mode is
24777       # case insensitive, let's make it lowercase to improve readability.
24778       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24779       # Now convert it back to Unix-stile (cygpath)
24780       input_path=`$CYGPATH -u "$shortmode_path"`
24781       new_path="$input_path"
24782     fi
24783   fi
24784 
24785   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24786   if test "x$test_cygdrive_prefix" = x; then
24787     # As a simple fix, exclude /usr/bin since it's not a real path.
24788     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24789       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24790       # a path prefixed by /cygdrive for fixpath to work.
24791       new_path="$CYGWIN_ROOT_PATH$input_path"
24792     fi
24793   fi
24794 
24795 
24796   if test "x$path" != "x$new_path"; then
24797     BOOT_JDK="$new_path"
24798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24799 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24800   fi
24801 
24802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24803 
24804   path="$BOOT_JDK"
24805   has_colon=`$ECHO $path | $GREP ^.:`
24806   new_path="$path"
24807   if test "x$has_colon" = x; then
24808     # Not in mixed or Windows style, start by that.
24809     new_path=`cmd //c echo $path`
24810   fi
24811 
24812 
24813   input_path="$new_path"
24814   # Check if we need to convert this using DOS-style short mode. If the path
24815   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24816   # take no chances and rewrite it.
24817   # Note: m4 eats our [], so we need to use [ and ] instead.
24818   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24819   if test "x$has_forbidden_chars" != x; then
24820     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24821     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24822   fi
24823 
24824 
24825   windows_path="$new_path"
24826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24827     unix_path=`$CYGPATH -u "$windows_path"`
24828     new_path="$unix_path"
24829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24831     new_path="$unix_path"
24832   fi
24833 
24834   if test "x$path" != "x$new_path"; then
24835     BOOT_JDK="$new_path"
24836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24838   fi
24839 
24840   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24841   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24842 
24843   else
24844     # We're on a unix platform. Hooray! :)
24845     path="$BOOT_JDK"
24846     has_space=`$ECHO "$path" | $GREP " "`
24847     if test "x$has_space" != x; then
24848       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24849 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24850       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24851     fi
24852 
24853     # Use eval to expand a potential ~
24854     eval path="$path"
24855     if test ! -f "$path" && test ! -d "$path"; then
24856       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24857     fi
24858 
24859     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24860   fi
24861 
24862             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24863 $as_echo_n "checking for Boot JDK... " >&6; }
24864             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24865 $as_echo "$BOOT_JDK" >&6; }
24866             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24867 $as_echo_n "checking Boot JDK version... " >&6; }
24868             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24869             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24870 $as_echo "$BOOT_JDK_VERSION" >&6; }
24871           fi # end check jdk version
24872         fi # end check javac
24873       fi # end check java
24874     fi # end check boot jdk found
24875   fi
24876 
24877     done
24878   fi
24879 
24880 
24881     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24882     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24883       # Do we have a bin/java?
24884       if test ! -x "$BOOT_JDK/bin/java"; then
24885         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24886 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24887         BOOT_JDK_FOUND=no
24888       else
24889         # Do we have a bin/javac?
24890         if test ! -x "$BOOT_JDK/bin/javac"; then
24891           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24892 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24893           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24894 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24895           BOOT_JDK_FOUND=no
24896         else
24897           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24898           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24899 
24900           # Extra M4 quote needed to protect [] in grep expression.
24901           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24902           if test "x$FOUND_CORRECT_VERSION" = x; then
24903             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24905             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24906 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24907             BOOT_JDK_FOUND=no
24908           else
24909             # We're done! :-)
24910             BOOT_JDK_FOUND=yes
24911 
24912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24913 
24914   # Input might be given as Windows format, start by converting to
24915   # unix format.
24916   path="$BOOT_JDK"
24917   new_path=`$CYGPATH -u "$path"`
24918 
24919   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24920   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24921   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24922   # "foo.exe" is OK but "foo" is an error.
24923   #
24924   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24925   # It is also a way to make sure we got the proper file name for the real test later on.
24926   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24927   if test "x$test_shortpath" = x; then
24928     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24930     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24931   fi
24932 
24933   # Call helper function which possibly converts this using DOS-style short mode.
24934   # If so, the updated path is stored in $new_path.
24935 
24936   input_path="$new_path"
24937   # Check if we need to convert this using DOS-style short mode. If the path
24938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24939   # take no chances and rewrite it.
24940   # Note: m4 eats our [], so we need to use [ and ] instead.
24941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24942   if test "x$has_forbidden_chars" != x; then
24943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24947       # Going to short mode and back again did indeed matter. Since short mode is
24948       # case insensitive, let's make it lowercase to improve readability.
24949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24950       # Now convert it back to Unix-stile (cygpath)
24951       input_path=`$CYGPATH -u "$shortmode_path"`
24952       new_path="$input_path"
24953     fi
24954   fi
24955 
24956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24957   if test "x$test_cygdrive_prefix" = x; then
24958     # As a simple fix, exclude /usr/bin since it's not a real path.
24959     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24961       # a path prefixed by /cygdrive for fixpath to work.
24962       new_path="$CYGWIN_ROOT_PATH$input_path"
24963     fi
24964   fi
24965 
24966 
24967   if test "x$path" != "x$new_path"; then
24968     BOOT_JDK="$new_path"
24969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24970 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24971   fi
24972 
24973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24974 
24975   path="$BOOT_JDK"
24976   has_colon=`$ECHO $path | $GREP ^.:`
24977   new_path="$path"
24978   if test "x$has_colon" = x; then
24979     # Not in mixed or Windows style, start by that.
24980     new_path=`cmd //c echo $path`
24981   fi
24982 
24983 
24984   input_path="$new_path"
24985   # Check if we need to convert this using DOS-style short mode. If the path
24986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24987   # take no chances and rewrite it.
24988   # Note: m4 eats our [], so we need to use [ and ] instead.
24989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24990   if test "x$has_forbidden_chars" != x; then
24991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24993   fi
24994 
24995 
24996   windows_path="$new_path"
24997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24998     unix_path=`$CYGPATH -u "$windows_path"`
24999     new_path="$unix_path"
25000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25002     new_path="$unix_path"
25003   fi
25004 
25005   if test "x$path" != "x$new_path"; then
25006     BOOT_JDK="$new_path"
25007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25008 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25009   fi
25010 
25011   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25012   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25013 
25014   else
25015     # We're on a unix platform. Hooray! :)
25016     path="$BOOT_JDK"
25017     has_space=`$ECHO "$path" | $GREP " "`
25018     if test "x$has_space" != x; then
25019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25020 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25021       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25022     fi
25023 
25024     # Use eval to expand a potential ~
25025     eval path="$path"
25026     if test ! -f "$path" && test ! -d "$path"; then
25027       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25028     fi
25029 
25030     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25031   fi
25032 
25033             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25034 $as_echo_n "checking for Boot JDK... " >&6; }
25035             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25036 $as_echo "$BOOT_JDK" >&6; }
25037             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25038 $as_echo_n "checking Boot JDK version... " >&6; }
25039             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25040             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25041 $as_echo "$BOOT_JDK_VERSION" >&6; }
25042           fi # end check jdk version
25043         fi # end check javac
25044       fi # end check java
25045     fi # end check boot jdk found
25046   fi
25047 
25048   fi
25049 
25050 
25051     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25052     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25053       # Do we have a bin/java?
25054       if test ! -x "$BOOT_JDK/bin/java"; then
25055         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25057         BOOT_JDK_FOUND=no
25058       else
25059         # Do we have a bin/javac?
25060         if test ! -x "$BOOT_JDK/bin/javac"; then
25061           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25063           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25064 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25065           BOOT_JDK_FOUND=no
25066         else
25067           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25068           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25069 
25070           # Extra M4 quote needed to protect [] in grep expression.
25071           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25072           if test "x$FOUND_CORRECT_VERSION" = x; then
25073             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25075             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25076 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25077             BOOT_JDK_FOUND=no
25078           else
25079             # We're done! :-)
25080             BOOT_JDK_FOUND=yes
25081 
25082   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25083 
25084   # Input might be given as Windows format, start by converting to
25085   # unix format.
25086   path="$BOOT_JDK"
25087   new_path=`$CYGPATH -u "$path"`
25088 
25089   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25090   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25091   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25092   # "foo.exe" is OK but "foo" is an error.
25093   #
25094   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25095   # It is also a way to make sure we got the proper file name for the real test later on.
25096   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25097   if test "x$test_shortpath" = x; then
25098     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25099 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25100     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25101   fi
25102 
25103   # Call helper function which possibly converts this using DOS-style short mode.
25104   # If so, the updated path is stored in $new_path.
25105 
25106   input_path="$new_path"
25107   # Check if we need to convert this using DOS-style short mode. If the path
25108   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25109   # take no chances and rewrite it.
25110   # Note: m4 eats our [], so we need to use [ and ] instead.
25111   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25112   if test "x$has_forbidden_chars" != x; then
25113     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25114     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25115     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25116     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25117       # Going to short mode and back again did indeed matter. Since short mode is
25118       # case insensitive, let's make it lowercase to improve readability.
25119       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25120       # Now convert it back to Unix-stile (cygpath)
25121       input_path=`$CYGPATH -u "$shortmode_path"`
25122       new_path="$input_path"
25123     fi
25124   fi
25125 
25126   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25127   if test "x$test_cygdrive_prefix" = x; then
25128     # As a simple fix, exclude /usr/bin since it's not a real path.
25129     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25130       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25131       # a path prefixed by /cygdrive for fixpath to work.
25132       new_path="$CYGWIN_ROOT_PATH$input_path"
25133     fi
25134   fi
25135 
25136 
25137   if test "x$path" != "x$new_path"; then
25138     BOOT_JDK="$new_path"
25139     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25140 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25141   fi
25142 
25143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25144 
25145   path="$BOOT_JDK"
25146   has_colon=`$ECHO $path | $GREP ^.:`
25147   new_path="$path"
25148   if test "x$has_colon" = x; then
25149     # Not in mixed or Windows style, start by that.
25150     new_path=`cmd //c echo $path`
25151   fi
25152 
25153 
25154   input_path="$new_path"
25155   # Check if we need to convert this using DOS-style short mode. If the path
25156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25157   # take no chances and rewrite it.
25158   # Note: m4 eats our [], so we need to use [ and ] instead.
25159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25160   if test "x$has_forbidden_chars" != x; then
25161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25162     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25163   fi
25164 
25165 
25166   windows_path="$new_path"
25167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25168     unix_path=`$CYGPATH -u "$windows_path"`
25169     new_path="$unix_path"
25170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25171     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25172     new_path="$unix_path"
25173   fi
25174 
25175   if test "x$path" != "x$new_path"; then
25176     BOOT_JDK="$new_path"
25177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25178 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25179   fi
25180 
25181   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25182   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25183 
25184   else
25185     # We're on a unix platform. Hooray! :)
25186     path="$BOOT_JDK"
25187     has_space=`$ECHO "$path" | $GREP " "`
25188     if test "x$has_space" != x; then
25189       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25190 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25191       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25192     fi
25193 
25194     # Use eval to expand a potential ~
25195     eval path="$path"
25196     if test ! -f "$path" && test ! -d "$path"; then
25197       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25198     fi
25199 
25200     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25201   fi
25202 
25203             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25204 $as_echo_n "checking for Boot JDK... " >&6; }
25205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25206 $as_echo "$BOOT_JDK" >&6; }
25207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25208 $as_echo_n "checking Boot JDK version... " >&6; }
25209             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25210             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25211 $as_echo "$BOOT_JDK_VERSION" >&6; }
25212           fi # end check jdk version
25213         fi # end check javac
25214       fi # end check java
25215     fi # end check boot jdk found
25216   fi
25217 
25218 
25219   # If we haven't found anything yet, we've truly lost. Give up.
25220   if test "x$BOOT_JDK_FOUND" = xno; then
25221 
25222   # Print a helpful message on how to acquire the necessary build dependency.
25223   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25224   MISSING_DEPENDENCY=openjdk
25225 
25226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25227     cygwin_help $MISSING_DEPENDENCY
25228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25229     msys_help $MISSING_DEPENDENCY
25230   else
25231     PKGHANDLER_COMMAND=
25232 
25233     case $PKGHANDLER in
25234       apt-get)
25235         apt_help     $MISSING_DEPENDENCY ;;
25236       yum)
25237         yum_help     $MISSING_DEPENDENCY ;;
25238       port)
25239         port_help    $MISSING_DEPENDENCY ;;
25240       pkgutil)
25241         pkgutil_help $MISSING_DEPENDENCY ;;
25242       pkgadd)
25243         pkgadd_help  $MISSING_DEPENDENCY ;;
25244     esac
25245 
25246     if test "x$PKGHANDLER_COMMAND" != x; then
25247       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25248     fi
25249   fi
25250 
25251     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25252 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25253     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25254 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25255     as_fn_error $? "Cannot continue" "$LINENO" 5
25256   fi
25257 
25258 
25259 
25260   # Setup tools from the Boot JDK.
25261 
25262   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25263 
25264   # Publish this variable in the help.
25265 
25266 
25267   if test "x$JAVA" = x; then
25268     # The variable is not set by user, try to locate tool using the code snippet
25269 
25270       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25271 $as_echo_n "checking for java in Boot JDK... " >&6; }
25272       JAVA=$BOOT_JDK/bin/java
25273       if test ! -x $JAVA; then
25274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25275 $as_echo "not found" >&6; }
25276         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25277 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25278         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25279       fi
25280       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25281 $as_echo "ok" >&6; }
25282 
25283 
25284   else
25285     # The variable is set, but is it from the command line or the environment?
25286 
25287     # Try to remove the string !JAVA! from our list.
25288     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25289     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25290       # If it failed, the variable was not from the command line. Ignore it,
25291       # but warn the user (except for BASH, which is always set by the calling BASH).
25292       if test "xJAVA" != xBASH; then
25293         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25294 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25295       fi
25296       # Try to locate tool using the code snippet
25297 
25298       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25299 $as_echo_n "checking for java in Boot JDK... " >&6; }
25300       JAVA=$BOOT_JDK/bin/java
25301       if test ! -x $JAVA; then
25302         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25303 $as_echo "not found" >&6; }
25304         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25305 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25306         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25307       fi
25308       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25309 $as_echo "ok" >&6; }
25310 
25311 
25312     else
25313       # If it succeeded, then it was overridden by the user. We will use it
25314       # for the tool.
25315 
25316       # First remove it from the list of overridden variables, so we can test
25317       # for unknown variables in the end.
25318       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25319 
25320       # Check if the provided tool contains a complete path.
25321       tool_specified="$JAVA"
25322       tool_basename="${tool_specified##*/}"
25323       if test "x$tool_basename" = "x$tool_specified"; then
25324         # A command without a complete path is provided, search $PATH.
25325         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25326 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25327         # Extract the first word of "$tool_basename", so it can be a program name with args.
25328 set dummy $tool_basename; ac_word=$2
25329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25330 $as_echo_n "checking for $ac_word... " >&6; }
25331 if ${ac_cv_path_JAVA+:} false; then :
25332   $as_echo_n "(cached) " >&6
25333 else
25334   case $JAVA in
25335   [\\/]* | ?:[\\/]*)
25336   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25337   ;;
25338   *)
25339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25340 for as_dir in $PATH
25341 do
25342   IFS=$as_save_IFS
25343   test -z "$as_dir" && as_dir=.
25344     for ac_exec_ext in '' $ac_executable_extensions; do
25345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25346     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25348     break 2
25349   fi
25350 done
25351   done
25352 IFS=$as_save_IFS
25353 
25354   ;;
25355 esac
25356 fi
25357 JAVA=$ac_cv_path_JAVA
25358 if test -n "$JAVA"; then
25359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25360 $as_echo "$JAVA" >&6; }
25361 else
25362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25363 $as_echo "no" >&6; }
25364 fi
25365 
25366 
25367         if test "x$JAVA" = x; then
25368           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25369         fi
25370       else
25371         # Otherwise we believe it is a complete path. Use it as it is.
25372         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25373 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25375 $as_echo_n "checking for JAVA... " >&6; }
25376         if test ! -x "$tool_specified"; then
25377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25378 $as_echo "not found" >&6; }
25379           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25380         fi
25381         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25382 $as_echo "$tool_specified" >&6; }
25383       fi
25384     fi
25385   fi
25386 
25387 
25388 
25389   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25390 
25391   # Publish this variable in the help.
25392 
25393 
25394   if test "x$JAVAC" = x; then
25395     # The variable is not set by user, try to locate tool using the code snippet
25396 
25397       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25398 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25399       JAVAC=$BOOT_JDK/bin/javac
25400       if test ! -x $JAVAC; then
25401         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25402 $as_echo "not found" >&6; }
25403         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25404 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25405         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25406       fi
25407       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25408 $as_echo "ok" >&6; }
25409 
25410 
25411   else
25412     # The variable is set, but is it from the command line or the environment?
25413 
25414     # Try to remove the string !JAVAC! from our list.
25415     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25416     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25417       # If it failed, the variable was not from the command line. Ignore it,
25418       # but warn the user (except for BASH, which is always set by the calling BASH).
25419       if test "xJAVAC" != xBASH; then
25420         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25421 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25422       fi
25423       # Try to locate tool using the code snippet
25424 
25425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25426 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25427       JAVAC=$BOOT_JDK/bin/javac
25428       if test ! -x $JAVAC; then
25429         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25430 $as_echo "not found" >&6; }
25431         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25432 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25433         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25434       fi
25435       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25436 $as_echo "ok" >&6; }
25437 
25438 
25439     else
25440       # If it succeeded, then it was overridden by the user. We will use it
25441       # for the tool.
25442 
25443       # First remove it from the list of overridden variables, so we can test
25444       # for unknown variables in the end.
25445       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25446 
25447       # Check if the provided tool contains a complete path.
25448       tool_specified="$JAVAC"
25449       tool_basename="${tool_specified##*/}"
25450       if test "x$tool_basename" = "x$tool_specified"; then
25451         # A command without a complete path is provided, search $PATH.
25452         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25453 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25454         # Extract the first word of "$tool_basename", so it can be a program name with args.
25455 set dummy $tool_basename; ac_word=$2
25456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25457 $as_echo_n "checking for $ac_word... " >&6; }
25458 if ${ac_cv_path_JAVAC+:} false; then :
25459   $as_echo_n "(cached) " >&6
25460 else
25461   case $JAVAC in
25462   [\\/]* | ?:[\\/]*)
25463   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25464   ;;
25465   *)
25466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25467 for as_dir in $PATH
25468 do
25469   IFS=$as_save_IFS
25470   test -z "$as_dir" && as_dir=.
25471     for ac_exec_ext in '' $ac_executable_extensions; do
25472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25473     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25475     break 2
25476   fi
25477 done
25478   done
25479 IFS=$as_save_IFS
25480 
25481   ;;
25482 esac
25483 fi
25484 JAVAC=$ac_cv_path_JAVAC
25485 if test -n "$JAVAC"; then
25486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25487 $as_echo "$JAVAC" >&6; }
25488 else
25489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25490 $as_echo "no" >&6; }
25491 fi
25492 
25493 
25494         if test "x$JAVAC" = x; then
25495           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25496         fi
25497       else
25498         # Otherwise we believe it is a complete path. Use it as it is.
25499         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25500 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25501         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25502 $as_echo_n "checking for JAVAC... " >&6; }
25503         if test ! -x "$tool_specified"; then
25504           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25505 $as_echo "not found" >&6; }
25506           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25507         fi
25508         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25509 $as_echo "$tool_specified" >&6; }
25510       fi
25511     fi
25512   fi
25513 
25514 
25515 
25516   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25517 
25518   # Publish this variable in the help.
25519 
25520 
25521   if test "x$JAVAH" = x; then
25522     # The variable is not set by user, try to locate tool using the code snippet
25523 
25524       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25525 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25526       JAVAH=$BOOT_JDK/bin/javah
25527       if test ! -x $JAVAH; then
25528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25529 $as_echo "not found" >&6; }
25530         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25531 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25532         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25533       fi
25534       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25535 $as_echo "ok" >&6; }
25536 
25537 
25538   else
25539     # The variable is set, but is it from the command line or the environment?
25540 
25541     # Try to remove the string !JAVAH! from our list.
25542     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25543     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25544       # If it failed, the variable was not from the command line. Ignore it,
25545       # but warn the user (except for BASH, which is always set by the calling BASH).
25546       if test "xJAVAH" != xBASH; then
25547         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25548 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25549       fi
25550       # Try to locate tool using the code snippet
25551 
25552       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25553 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25554       JAVAH=$BOOT_JDK/bin/javah
25555       if test ! -x $JAVAH; then
25556         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25557 $as_echo "not found" >&6; }
25558         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25559 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25560         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25561       fi
25562       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25563 $as_echo "ok" >&6; }
25564 
25565 
25566     else
25567       # If it succeeded, then it was overridden by the user. We will use it
25568       # for the tool.
25569 
25570       # First remove it from the list of overridden variables, so we can test
25571       # for unknown variables in the end.
25572       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25573 
25574       # Check if the provided tool contains a complete path.
25575       tool_specified="$JAVAH"
25576       tool_basename="${tool_specified##*/}"
25577       if test "x$tool_basename" = "x$tool_specified"; then
25578         # A command without a complete path is provided, search $PATH.
25579         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25580 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25581         # Extract the first word of "$tool_basename", so it can be a program name with args.
25582 set dummy $tool_basename; ac_word=$2
25583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25584 $as_echo_n "checking for $ac_word... " >&6; }
25585 if ${ac_cv_path_JAVAH+:} false; then :
25586   $as_echo_n "(cached) " >&6
25587 else
25588   case $JAVAH in
25589   [\\/]* | ?:[\\/]*)
25590   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25591   ;;
25592   *)
25593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25594 for as_dir in $PATH
25595 do
25596   IFS=$as_save_IFS
25597   test -z "$as_dir" && as_dir=.
25598     for ac_exec_ext in '' $ac_executable_extensions; do
25599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25600     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25602     break 2
25603   fi
25604 done
25605   done
25606 IFS=$as_save_IFS
25607 
25608   ;;
25609 esac
25610 fi
25611 JAVAH=$ac_cv_path_JAVAH
25612 if test -n "$JAVAH"; then
25613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25614 $as_echo "$JAVAH" >&6; }
25615 else
25616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25617 $as_echo "no" >&6; }
25618 fi
25619 
25620 
25621         if test "x$JAVAH" = x; then
25622           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25623         fi
25624       else
25625         # Otherwise we believe it is a complete path. Use it as it is.
25626         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25627 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25628         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25629 $as_echo_n "checking for JAVAH... " >&6; }
25630         if test ! -x "$tool_specified"; then
25631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25632 $as_echo "not found" >&6; }
25633           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25634         fi
25635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25636 $as_echo "$tool_specified" >&6; }
25637       fi
25638     fi
25639   fi
25640 
25641 
25642 
25643   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25644 
25645   # Publish this variable in the help.
25646 
25647 
25648   if test "x$JAR" = x; then
25649     # The variable is not set by user, try to locate tool using the code snippet
25650 
25651       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25652 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25653       JAR=$BOOT_JDK/bin/jar
25654       if test ! -x $JAR; then
25655         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25656 $as_echo "not found" >&6; }
25657         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25658 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25659         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25660       fi
25661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25662 $as_echo "ok" >&6; }
25663 
25664 
25665   else
25666     # The variable is set, but is it from the command line or the environment?
25667 
25668     # Try to remove the string !JAR! from our list.
25669     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25670     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25671       # If it failed, the variable was not from the command line. Ignore it,
25672       # but warn the user (except for BASH, which is always set by the calling BASH).
25673       if test "xJAR" != xBASH; then
25674         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25675 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25676       fi
25677       # Try to locate tool using the code snippet
25678 
25679       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25680 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25681       JAR=$BOOT_JDK/bin/jar
25682       if test ! -x $JAR; then
25683         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25684 $as_echo "not found" >&6; }
25685         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25686 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25687         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25688       fi
25689       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25690 $as_echo "ok" >&6; }
25691 
25692 
25693     else
25694       # If it succeeded, then it was overridden by the user. We will use it
25695       # for the tool.
25696 
25697       # First remove it from the list of overridden variables, so we can test
25698       # for unknown variables in the end.
25699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25700 
25701       # Check if the provided tool contains a complete path.
25702       tool_specified="$JAR"
25703       tool_basename="${tool_specified##*/}"
25704       if test "x$tool_basename" = "x$tool_specified"; then
25705         # A command without a complete path is provided, search $PATH.
25706         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25707 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25708         # Extract the first word of "$tool_basename", so it can be a program name with args.
25709 set dummy $tool_basename; ac_word=$2
25710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25711 $as_echo_n "checking for $ac_word... " >&6; }
25712 if ${ac_cv_path_JAR+:} false; then :
25713   $as_echo_n "(cached) " >&6
25714 else
25715   case $JAR in
25716   [\\/]* | ?:[\\/]*)
25717   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25718   ;;
25719   *)
25720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25721 for as_dir in $PATH
25722 do
25723   IFS=$as_save_IFS
25724   test -z "$as_dir" && as_dir=.
25725     for ac_exec_ext in '' $ac_executable_extensions; do
25726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25727     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25729     break 2
25730   fi
25731 done
25732   done
25733 IFS=$as_save_IFS
25734 
25735   ;;
25736 esac
25737 fi
25738 JAR=$ac_cv_path_JAR
25739 if test -n "$JAR"; then
25740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25741 $as_echo "$JAR" >&6; }
25742 else
25743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25744 $as_echo "no" >&6; }
25745 fi
25746 
25747 
25748         if test "x$JAR" = x; then
25749           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25750         fi
25751       else
25752         # Otherwise we believe it is a complete path. Use it as it is.
25753         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25754 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25755         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25756 $as_echo_n "checking for JAR... " >&6; }
25757         if test ! -x "$tool_specified"; then
25758           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25759 $as_echo "not found" >&6; }
25760           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25761         fi
25762         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25763 $as_echo "$tool_specified" >&6; }
25764       fi
25765     fi
25766   fi
25767 
25768 
25769 
25770   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25771 
25772   # Publish this variable in the help.
25773 
25774 
25775   if test "x$NATIVE2ASCII" = x; then
25776     # The variable is not set by user, try to locate tool using the code snippet
25777 
25778       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25779 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25780       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25781       if test ! -x $NATIVE2ASCII; then
25782         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25783 $as_echo "not found" >&6; }
25784         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25785 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25786         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25787       fi
25788       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25789 $as_echo "ok" >&6; }
25790 
25791 
25792   else
25793     # The variable is set, but is it from the command line or the environment?
25794 
25795     # Try to remove the string !NATIVE2ASCII! from our list.
25796     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25797     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25798       # If it failed, the variable was not from the command line. Ignore it,
25799       # but warn the user (except for BASH, which is always set by the calling BASH).
25800       if test "xNATIVE2ASCII" != xBASH; then
25801         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25802 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25803       fi
25804       # Try to locate tool using the code snippet
25805 
25806       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25807 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25808       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25809       if test ! -x $NATIVE2ASCII; then
25810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25811 $as_echo "not found" >&6; }
25812         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25813 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25814         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25815       fi
25816       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25817 $as_echo "ok" >&6; }
25818 
25819 
25820     else
25821       # If it succeeded, then it was overridden by the user. We will use it
25822       # for the tool.
25823 
25824       # First remove it from the list of overridden variables, so we can test
25825       # for unknown variables in the end.
25826       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25827 
25828       # Check if the provided tool contains a complete path.
25829       tool_specified="$NATIVE2ASCII"
25830       tool_basename="${tool_specified##*/}"
25831       if test "x$tool_basename" = "x$tool_specified"; then
25832         # A command without a complete path is provided, search $PATH.
25833         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25834 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25835         # Extract the first word of "$tool_basename", so it can be a program name with args.
25836 set dummy $tool_basename; ac_word=$2
25837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25838 $as_echo_n "checking for $ac_word... " >&6; }
25839 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25840   $as_echo_n "(cached) " >&6
25841 else
25842   case $NATIVE2ASCII in
25843   [\\/]* | ?:[\\/]*)
25844   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25845   ;;
25846   *)
25847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25848 for as_dir in $PATH
25849 do
25850   IFS=$as_save_IFS
25851   test -z "$as_dir" && as_dir=.
25852     for ac_exec_ext in '' $ac_executable_extensions; do
25853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25854     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25856     break 2
25857   fi
25858 done
25859   done
25860 IFS=$as_save_IFS
25861 
25862   ;;
25863 esac
25864 fi
25865 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25866 if test -n "$NATIVE2ASCII"; then
25867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25868 $as_echo "$NATIVE2ASCII" >&6; }
25869 else
25870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25871 $as_echo "no" >&6; }
25872 fi
25873 
25874 
25875         if test "x$NATIVE2ASCII" = x; then
25876           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25877         fi
25878       else
25879         # Otherwise we believe it is a complete path. Use it as it is.
25880         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25881 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25883 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
25884         if test ! -x "$tool_specified"; then
25885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25886 $as_echo "not found" >&6; }
25887           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25888         fi
25889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25890 $as_echo "$tool_specified" >&6; }
25891       fi
25892     fi
25893   fi
25894 
25895 
25896 
25897   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25898 
25899   # Publish this variable in the help.
25900 
25901 
25902   if test "x$JARSIGNER" = x; then
25903     # The variable is not set by user, try to locate tool using the code snippet
25904 
25905       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25906 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25907       JARSIGNER=$BOOT_JDK/bin/jarsigner
25908       if test ! -x $JARSIGNER; then
25909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25910 $as_echo "not found" >&6; }
25911         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25912 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25913         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25914       fi
25915       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25916 $as_echo "ok" >&6; }
25917 
25918 
25919   else
25920     # The variable is set, but is it from the command line or the environment?
25921 
25922     # Try to remove the string !JARSIGNER! from our list.
25923     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25924     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25925       # If it failed, the variable was not from the command line. Ignore it,
25926       # but warn the user (except for BASH, which is always set by the calling BASH).
25927       if test "xJARSIGNER" != xBASH; then
25928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25929 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25930       fi
25931       # Try to locate tool using the code snippet
25932 
25933       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25934 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25935       JARSIGNER=$BOOT_JDK/bin/jarsigner
25936       if test ! -x $JARSIGNER; then
25937         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25938 $as_echo "not found" >&6; }
25939         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25940 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25941         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25942       fi
25943       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25944 $as_echo "ok" >&6; }
25945 
25946 
25947     else
25948       # If it succeeded, then it was overridden by the user. We will use it
25949       # for the tool.
25950 
25951       # First remove it from the list of overridden variables, so we can test
25952       # for unknown variables in the end.
25953       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25954 
25955       # Check if the provided tool contains a complete path.
25956       tool_specified="$JARSIGNER"
25957       tool_basename="${tool_specified##*/}"
25958       if test "x$tool_basename" = "x$tool_specified"; then
25959         # A command without a complete path is provided, search $PATH.
25960         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25961 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25962         # Extract the first word of "$tool_basename", so it can be a program name with args.
25963 set dummy $tool_basename; ac_word=$2
25964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25965 $as_echo_n "checking for $ac_word... " >&6; }
25966 if ${ac_cv_path_JARSIGNER+:} false; then :
25967   $as_echo_n "(cached) " >&6
25968 else
25969   case $JARSIGNER in
25970   [\\/]* | ?:[\\/]*)
25971   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25972   ;;
25973   *)
25974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25975 for as_dir in $PATH
25976 do
25977   IFS=$as_save_IFS
25978   test -z "$as_dir" && as_dir=.
25979     for ac_exec_ext in '' $ac_executable_extensions; do
25980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25981     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25983     break 2
25984   fi
25985 done
25986   done
25987 IFS=$as_save_IFS
25988 
25989   ;;
25990 esac
25991 fi
25992 JARSIGNER=$ac_cv_path_JARSIGNER
25993 if test -n "$JARSIGNER"; then
25994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25995 $as_echo "$JARSIGNER" >&6; }
25996 else
25997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25998 $as_echo "no" >&6; }
25999 fi
26000 
26001 
26002         if test "x$JARSIGNER" = x; then
26003           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26004         fi
26005       else
26006         # Otherwise we believe it is a complete path. Use it as it is.
26007         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26008 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26010 $as_echo_n "checking for JARSIGNER... " >&6; }
26011         if test ! -x "$tool_specified"; then
26012           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26013 $as_echo "not found" >&6; }
26014           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26015         fi
26016         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26017 $as_echo "$tool_specified" >&6; }
26018       fi
26019     fi
26020   fi
26021 
26022 
26023 
26024   # Finally, set some other options...
26025 
26026   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26027   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26028 
26029 
26030 
26031 
26032 ###############################################################################
26033 #
26034 # Configure the sources to use. We can add or override individual directories.
26035 #
26036 ###############################################################################
26037 
26038 
26039   # Where are the sources. Any of these can be overridden
26040   # using --with-override-corba and the likes.
26041   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26042   CORBA_TOPDIR="$SRC_ROOT/corba"
26043   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26044   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26045   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26046   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26047   JDK_TOPDIR="$SRC_ROOT/jdk"
26048 
26049 
26050 
26051 
26052 
26053 
26054 
26055 
26056 
26057 
26058   ###############################################################################
26059   #
26060   # Pickup additional source for a component from outside of the source root
26061   # or override source for a component.
26062   #
26063 
26064 # Check whether --with-add-source-root was given.
26065 if test "${with_add_source_root+set}" = set; then :
26066   withval=$with_add_source_root;
26067 fi
26068 
26069 
26070 
26071 # Check whether --with-override-source-root was given.
26072 if test "${with_override_source_root+set}" = set; then :
26073   withval=$with_override_source_root;
26074 fi
26075 
26076 
26077 
26078 # Check whether --with-adds-and-overrides was given.
26079 if test "${with_adds_and_overrides+set}" = set; then :
26080   withval=$with_adds_and_overrides;
26081 fi
26082 
26083 
26084   if test "x$with_adds_and_overrides" != x; then
26085     with_add_source_root="$with_adds_and_overrides/adds"
26086     with_override_source_root="$with_adds_and_overrides/overrides"
26087   fi
26088 
26089   if test "x$with_add_source_root" != x; then
26090     if ! test -d $with_add_source_root; then
26091       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26092     fi
26093     CURDIR="$PWD"
26094     cd "$with_add_source_root"
26095     ADD_SRC_ROOT="`pwd`"
26096     cd "$CURDIR"
26097     # Verify that the addon source root does not have any root makefiles.
26098     # If it does, then it is usually an error, prevent this.
26099     if test -f $with_add_source_root/langtools/make/Makefile; then
26100       as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26101     fi
26102     if test -f $with_add_source_root/corba/make/Makefile; then
26103       as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26104     fi
26105     if test -f $with_add_source_root/jaxp/make/Makefile; then
26106       as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26107     fi
26108     if test -f $with_add_source_root/jaxws/make/Makefile; then
26109       as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26110     fi
26111     if test -f $with_add_source_root/hotspot/make/Makefile; then
26112       as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26113     fi
26114     if test -f $with_add_source_root/nashorn/make/Makefile; then
26115       as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26116     fi
26117     if test -f $with_add_source_root/jdk/make/Makefile; then
26118       as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26119     fi
26120   fi
26121 
26122 
26123   if test "x$with_override_source_root" != x; then
26124     if ! test -d $with_override_source_root; then
26125       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26126     fi
26127     CURDIR="$PWD"
26128     cd "$with_override_source_root"
26129     OVERRIDE_SRC_ROOT="`pwd`"
26130     cd "$CURDIR"
26131     if test -f $with_override_source_root/langtools/make/Makefile; then
26132       as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26133     fi
26134     if test -f $with_override_source_root/corba/make/Makefile; then
26135       as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26136     fi
26137     if test -f $with_override_source_root/jaxp/make/Makefile; then
26138       as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26139     fi
26140     if test -f $with_override_source_root/jaxws/make/Makefile; then
26141       as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26142     fi
26143     if test -f $with_override_source_root/hotspot/make/Makefile; then
26144       as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26145     fi
26146     if test -f $with_override_source_root/nashorn/make/Makefile; then
26147       as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26148     fi
26149     if test -f $with_override_source_root/jdk/make/Makefile; then
26150       as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26151     fi
26152   fi
26153 
26154 
26155   ###############################################################################
26156   #
26157   # Override a repo completely, this is used for example when you have 3 small
26158   # development sandboxes of the langtools sources and want to avoid having 3 full
26159   # OpenJDK sources checked out on disk.
26160   #
26161   # Assuming that the 3 langtools sandboxes are located here:
26162   # /home/fredrik/sandbox1/langtools
26163   # /home/fredrik/sandbox2/langtools
26164   # /home/fredrik/sandbox3/langtools
26165   #
26166   # From the source root you create build subdirs manually:
26167   #     mkdir -p build1 build2 build3
26168   # in each build directory run:
26169   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26170   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26171   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26172   #
26173 
26174 
26175 # Check whether --with-override-langtools was given.
26176 if test "${with_override_langtools+set}" = set; then :
26177   withval=$with_override_langtools;
26178 fi
26179 
26180 
26181 
26182 # Check whether --with-override-corba was given.
26183 if test "${with_override_corba+set}" = set; then :
26184   withval=$with_override_corba;
26185 fi
26186 
26187 
26188 
26189 # Check whether --with-override-jaxp was given.
26190 if test "${with_override_jaxp+set}" = set; then :
26191   withval=$with_override_jaxp;
26192 fi
26193 
26194 
26195 
26196 # Check whether --with-override-jaxws was given.
26197 if test "${with_override_jaxws+set}" = set; then :
26198   withval=$with_override_jaxws;
26199 fi
26200 
26201 
26202 
26203 # Check whether --with-override-hotspot was given.
26204 if test "${with_override_hotspot+set}" = set; then :
26205   withval=$with_override_hotspot;
26206 fi
26207 
26208 
26209 
26210 # Check whether --with-override-nashorn was given.
26211 if test "${with_override_nashorn+set}" = set; then :
26212   withval=$with_override_nashorn;
26213 fi
26214 
26215 
26216 
26217 # Check whether --with-override-jdk was given.
26218 if test "${with_override_jdk+set}" = set; then :
26219   withval=$with_override_jdk;
26220 fi
26221 
26222 
26223   if test "x$with_override_langtools" != x; then
26224     CURDIR="$PWD"
26225     cd "$with_override_langtools"
26226     LANGTOOLS_TOPDIR="`pwd`"
26227     cd "$CURDIR"
26228     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26229       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26230     fi
26231     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26232 $as_echo_n "checking if langtools should be overridden... " >&6; }
26233     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26234 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26235   fi
26236   if test "x$with_override_corba" != x; then
26237     CURDIR="$PWD"
26238     cd "$with_override_corba"
26239     CORBA_TOPDIR="`pwd`"
26240     cd "$CURDIR"
26241     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26242       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26243     fi
26244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26245 $as_echo_n "checking if corba should be overridden... " >&6; }
26246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26247 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26248   fi
26249   if test "x$with_override_jaxp" != x; then
26250     CURDIR="$PWD"
26251     cd "$with_override_jaxp"
26252     JAXP_TOPDIR="`pwd`"
26253     cd "$CURDIR"
26254     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26255       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26256     fi
26257     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26258 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26260 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26261   fi
26262   if test "x$with_override_jaxws" != x; then
26263     CURDIR="$PWD"
26264     cd "$with_override_jaxws"
26265     JAXWS_TOPDIR="`pwd`"
26266     cd "$CURDIR"
26267     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26268       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26269     fi
26270     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26271 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26272     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26273 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26274   fi
26275   if test "x$with_override_hotspot" != x; then
26276     CURDIR="$PWD"
26277     cd "$with_override_hotspot"
26278     HOTSPOT_TOPDIR="`pwd`"
26279     cd "$CURDIR"
26280     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26281       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26282     fi
26283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26284 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26285     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26286 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26287   fi
26288   if test "x$with_override_nashorn" != x; then
26289     CURDIR="$PWD"
26290     cd "$with_override_nashorn"
26291     NASHORN_TOPDIR="`pwd`"
26292     cd "$CURDIR"
26293     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26294       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26295     fi
26296     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26297 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26299 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26300   fi
26301   if test "x$with_override_jdk" != x; then
26302     CURDIR="$PWD"
26303     cd "$with_override_jdk"
26304     JDK_TOPDIR="`pwd`"
26305     cd "$CURDIR"
26306     if ! test -f $JDK_TOPDIR/make/Makefile; then
26307       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26308     fi
26309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26310 $as_echo_n "checking if JDK should be overridden... " >&6; }
26311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26312 $as_echo "yes with $JDK_TOPDIR" >&6; }
26313   fi
26314 
26315 
26316   BUILD_OUTPUT="$OUTPUT_ROOT"
26317 
26318 
26319   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26320   BUILD_HOTSPOT=true
26321 
26322 
26323 
26324 # Check whether --with-import-hotspot was given.
26325 if test "${with_import_hotspot+set}" = set; then :
26326   withval=$with_import_hotspot;
26327 fi
26328 
26329   if test "x$with_import_hotspot" != x; then
26330     CURDIR="$PWD"
26331     cd "$with_import_hotspot"
26332     HOTSPOT_DIST="`pwd`"
26333     cd "$CURDIR"
26334     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26335       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26336     fi
26337     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26338 $as_echo_n "checking if hotspot should be imported... " >&6; }
26339     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26340 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26341     BUILD_HOTSPOT=false
26342   fi
26343 
26344   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26345 
26346 
26347 ###############################################################################
26348 #
26349 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26350 # native code.
26351 #
26352 ###############################################################################
26353 
26354 # First determine the toolchain type (compiler family)
26355 
26356 
26357 # Check whether --with-toolchain-type was given.
26358 if test "${with_toolchain_type+set}" = set; then :
26359   withval=$with_toolchain_type;
26360 fi
26361 
26362 
26363   # Use indirect variable referencing
26364   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26365   VALID_TOOLCHAINS=${!toolchain_var_name}
26366 
26367   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26368     if test -n "$XCODEBUILD"; then
26369       # On Mac OS X, default toolchain to clang after Xcode 5
26370       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26371       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26372       if test $? -ne 0; then
26373         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26374       fi
26375       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26376           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26377           $CUT -f 1 -d .`
26378       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26379 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26380       if test $XCODE_MAJOR_VERSION -ge 5; then
26381           DEFAULT_TOOLCHAIN="clang"
26382       else
26383           DEFAULT_TOOLCHAIN="gcc"
26384       fi
26385     else
26386       # If Xcode is not installed, but the command line tools are
26387       # then we can't run xcodebuild. On these systems we should
26388       # default to clang
26389       DEFAULT_TOOLCHAIN="clang"
26390     fi
26391   else
26392     # First toolchain type in the list is the default
26393     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26394   fi
26395 
26396   if test "x$with_toolchain_type" = xlist; then
26397     # List all toolchains
26398     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26399 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26400     for toolchain in $VALID_TOOLCHAINS; do
26401       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26402       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26403       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26404     done
26405 
26406     exit 0
26407   elif test "x$with_toolchain_type" != x; then
26408     # User override; check that it is valid
26409     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26410       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26411 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26412       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26413 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26414       as_fn_error $? "Cannot continue." "$LINENO" 5
26415     fi
26416     TOOLCHAIN_TYPE=$with_toolchain_type
26417   else
26418     # No flag given, use default
26419     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26420   fi
26421 
26422 
26423   TOOLCHAIN_CC_BINARY_clang="clang"
26424   TOOLCHAIN_CC_BINARY_gcc="gcc"
26425   TOOLCHAIN_CC_BINARY_microsoft="cl"
26426   TOOLCHAIN_CC_BINARY_solstudio="cc"
26427   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26428 
26429   TOOLCHAIN_CXX_BINARY_clang="clang++"
26430   TOOLCHAIN_CXX_BINARY_gcc="g++"
26431   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26432   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26433   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26434 
26435   # Use indirect variable referencing
26436   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26437   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26438   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26439   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26440   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26441   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26442 
26443 
26444   # Define filename patterns
26445   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26446     LIBRARY_PREFIX=
26447     SHARED_LIBRARY_SUFFIX='.dll'
26448     STATIC_LIBRARY_SUFFIX='.lib'
26449     SHARED_LIBRARY='$1.dll'
26450     STATIC_LIBRARY='$1.lib'
26451     OBJ_SUFFIX='.obj'
26452     EXE_SUFFIX='.exe'
26453   else
26454     LIBRARY_PREFIX=lib
26455     SHARED_LIBRARY_SUFFIX='.so'
26456     STATIC_LIBRARY_SUFFIX='.a'
26457     SHARED_LIBRARY='lib$1.so'
26458     STATIC_LIBRARY='lib$1.a'
26459     OBJ_SUFFIX='.o'
26460     EXE_SUFFIX=''
26461     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26462       SHARED_LIBRARY='lib$1.dylib'
26463       SHARED_LIBRARY_SUFFIX='.dylib'
26464     fi
26465   fi
26466 
26467 
26468 
26469 
26470 
26471 
26472 
26473 
26474 
26475 
26476   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26477     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26478 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26479   else
26480     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26481 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26482   fi
26483 
26484 
26485 # Then detect the actual binaries needed
26486 
26487   # FIXME: Is this needed?
26488   ac_ext=cpp
26489 ac_cpp='$CXXCPP $CPPFLAGS'
26490 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26491 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26492 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26493 
26494 
26495   # Store the CFLAGS etc passed to the configure script.
26496   ORG_CFLAGS="$CFLAGS"
26497   ORG_CXXFLAGS="$CXXFLAGS"
26498   ORG_OBJCFLAGS="$OBJCFLAGS"
26499 
26500   # On Windows, we need to detect the visual studio installation first.
26501   # This will change the PATH, but we need to keep that new PATH even
26502   # after toolchain detection is done, since the compiler (on x86) uses
26503   # it for DLL resolution in runtime.
26504   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26505 
26506   # Store path to cygwin link.exe to help excluding it when searching for
26507   # VS linker. This must be done before changing the PATH when looking for VS.
26508   # Extract the first word of "link", so it can be a program name with args.
26509 set dummy link; ac_word=$2
26510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26511 $as_echo_n "checking for $ac_word... " >&6; }
26512 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26513   $as_echo_n "(cached) " >&6
26514 else
26515   case $CYGWIN_LINK in
26516   [\\/]* | ?:[\\/]*)
26517   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26518   ;;
26519   *)
26520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26521 for as_dir in $PATH
26522 do
26523   IFS=$as_save_IFS
26524   test -z "$as_dir" && as_dir=.
26525     for ac_exec_ext in '' $ac_executable_extensions; do
26526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26527     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26529     break 2
26530   fi
26531 done
26532   done
26533 IFS=$as_save_IFS
26534 
26535   ;;
26536 esac
26537 fi
26538 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26539 if test -n "$CYGWIN_LINK"; then
26540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26541 $as_echo "$CYGWIN_LINK" >&6; }
26542 else
26543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26544 $as_echo "no" >&6; }
26545 fi
26546 
26547 
26548   if test "x$CYGWIN_LINK" != x; then
26549     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26550 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26551     "$CYGWIN_LINK" --version > /dev/null
26552     if test $? -eq 0 ; then
26553       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26554 $as_echo "yes" >&6; }
26555     else
26556       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26557 $as_echo "no" >&6; }
26558       # This might be the VS linker. Don't exclude it later on.
26559       CYGWIN_LINK=""
26560     fi
26561   fi
26562 
26563   # First-hand choice is to locate and run the vsvars bat file.
26564 
26565 
26566 # Check whether --with-toolchain-version was given.
26567 if test "${with_toolchain_version+set}" = set; then :
26568   withval=$with_toolchain_version;
26569 fi
26570 
26571 
26572   if test "x$with_toolchain_version" = xlist; then
26573     # List all toolchains
26574     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26575 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26576     for version in $VALID_VS_VERSIONS; do
26577       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26578       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26579     done
26580 
26581     exit 0
26582   elif test "x$with_toolchain_version" != x; then
26583     # User override; check that it is valid
26584     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26585       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26586 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26587       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26588 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26589       as_fn_error $? "Cannot continue." "$LINENO" 5
26590     fi
26591     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26592   else
26593     # No flag given, use default
26594     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26595   fi
26596 
26597   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26598 
26599   VS_VERSION="$VS_VERSION"
26600   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26601   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26602   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26603   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26604 
26605   # When using --with-tools-dir, assume it points to the correct and default
26606   # version of Visual Studio or that --with-toolchain-version was also set.
26607   if test "x$with_tools_dir" != x; then
26608 
26609   if test "x$VS_ENV_CMD" = x; then
26610     VS_VERSION="${VS_VERSION}"
26611     VS_BASE="$with_tools_dir/../.."
26612     METHOD="--with-tools-dir"
26613 
26614     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26615       VCVARSFILE="vc/bin/vcvars32.bat"
26616     else
26617       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26618     fi
26619 
26620 
26621   windows_path="$VS_BASE"
26622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26623     unix_path=`$CYGPATH -u "$windows_path"`
26624     VS_BASE="$unix_path"
26625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26626     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26627     VS_BASE="$unix_path"
26628   fi
26629 
26630     if test -d "$VS_BASE"; then
26631       if test -f "$VS_BASE/$VCVARSFILE"; then
26632         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26633 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26634         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26635         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26636         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26637         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26638       else
26639         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26640 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26641         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26642 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26643       fi
26644     fi
26645   fi
26646 
26647 
26648   if test "x$VS_ENV_CMD" = x; then
26649     VS_VERSION="${VS_VERSION}"
26650     VS_BASE="$with_tools_dir/../../.."
26651     METHOD="--with-tools-dir"
26652 
26653     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26654       VCVARSFILE="vc/bin/vcvars32.bat"
26655     else
26656       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26657     fi
26658 
26659 
26660   windows_path="$VS_BASE"
26661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26662     unix_path=`$CYGPATH -u "$windows_path"`
26663     VS_BASE="$unix_path"
26664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26666     VS_BASE="$unix_path"
26667   fi
26668 
26669     if test -d "$VS_BASE"; then
26670       if test -f "$VS_BASE/$VCVARSFILE"; then
26671         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26672 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26673         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26674         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26675         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26676         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26677       else
26678         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26679 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26680         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26681 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26682       fi
26683     fi
26684   fi
26685 
26686     if test "x$VS_ENV_CMD" = x; then
26687       # Having specified an argument which is incorrect will produce an instant failure;
26688       # we should not go on looking
26689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26690 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26691       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26692 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26693       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26694 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26695       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26696     fi
26697   fi
26698 
26699   VS_ENV_CMD=""
26700   VS_ENV_ARGS=""
26701 
26702   if test "x$VS_COMNTOOLS" != x; then
26703 
26704   if test "x$VS_ENV_CMD" = x; then
26705     VS_VERSION="${VS_VERSION}"
26706     VS_BASE="$VS_COMNTOOLS/../.."
26707     METHOD="$VS_COMNTOOLS_VAR variable"
26708 
26709     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26710       VCVARSFILE="vc/bin/vcvars32.bat"
26711     else
26712       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26713     fi
26714 
26715 
26716   windows_path="$VS_BASE"
26717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26718     unix_path=`$CYGPATH -u "$windows_path"`
26719     VS_BASE="$unix_path"
26720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26722     VS_BASE="$unix_path"
26723   fi
26724 
26725     if test -d "$VS_BASE"; then
26726       if test -f "$VS_BASE/$VCVARSFILE"; then
26727         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26728 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26729         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26730         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26731         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26732         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26733       else
26734         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26735 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26736         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26737 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26738       fi
26739     fi
26740   fi
26741 
26742   fi
26743   if test "x$PROGRAMFILES" != x; then
26744 
26745   if test "x$VS_ENV_CMD" = x; then
26746     VS_VERSION="${VS_VERSION}"
26747     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26748     METHOD="well-known name"
26749 
26750     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26751       VCVARSFILE="vc/bin/vcvars32.bat"
26752     else
26753       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26754     fi
26755 
26756 
26757   windows_path="$VS_BASE"
26758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759     unix_path=`$CYGPATH -u "$windows_path"`
26760     VS_BASE="$unix_path"
26761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26763     VS_BASE="$unix_path"
26764   fi
26765 
26766     if test -d "$VS_BASE"; then
26767       if test -f "$VS_BASE/$VCVARSFILE"; then
26768         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26769 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26770         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26771         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26772         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26773         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26774       else
26775         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26776 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26777         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26778 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26779       fi
26780     fi
26781   fi
26782 
26783   fi
26784   # Work around the insanely named ProgramFiles(x86) env variable
26785   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26786   if test "x$PROGRAMFILES_X86" != x; then
26787 
26788   if test "x$VS_ENV_CMD" = x; then
26789     VS_VERSION="${VS_VERSION}"
26790     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26791     METHOD="well-known name"
26792 
26793     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26794       VCVARSFILE="vc/bin/vcvars32.bat"
26795     else
26796       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26797     fi
26798 
26799 
26800   windows_path="$VS_BASE"
26801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26802     unix_path=`$CYGPATH -u "$windows_path"`
26803     VS_BASE="$unix_path"
26804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26806     VS_BASE="$unix_path"
26807   fi
26808 
26809     if test -d "$VS_BASE"; then
26810       if test -f "$VS_BASE/$VCVARSFILE"; then
26811         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26812 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26813         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26814         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26815         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26816         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26817       else
26818         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26819 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26820         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26821 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26822       fi
26823     fi
26824   fi
26825 
26826   fi
26827 
26828   if test "x$VS_ENV_CMD" = x; then
26829     VS_VERSION="${VS_VERSION}"
26830     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26831     METHOD="well-known name"
26832 
26833     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26834       VCVARSFILE="vc/bin/vcvars32.bat"
26835     else
26836       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26837     fi
26838 
26839 
26840   windows_path="$VS_BASE"
26841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26842     unix_path=`$CYGPATH -u "$windows_path"`
26843     VS_BASE="$unix_path"
26844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26846     VS_BASE="$unix_path"
26847   fi
26848 
26849     if test -d "$VS_BASE"; then
26850       if test -f "$VS_BASE/$VCVARSFILE"; then
26851         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26852 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26853         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26854         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26855         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26856         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26857       else
26858         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26859 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26860         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26861 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26862       fi
26863     fi
26864   fi
26865 
26866 
26867   if test "x$VS_ENV_CMD" = x; then
26868     VS_VERSION="${VS_VERSION}"
26869     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
26870     METHOD="well-known name"
26871 
26872     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26873       VCVARSFILE="vc/bin/vcvars32.bat"
26874     else
26875       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26876     fi
26877 
26878 
26879   windows_path="$VS_BASE"
26880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26881     unix_path=`$CYGPATH -u "$windows_path"`
26882     VS_BASE="$unix_path"
26883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26885     VS_BASE="$unix_path"
26886   fi
26887 
26888     if test -d "$VS_BASE"; then
26889       if test -f "$VS_BASE/$VCVARSFILE"; then
26890         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26891 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26892         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26893         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26894         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26895         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26896       else
26897         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26898 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26899         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26900 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26901       fi
26902     fi
26903   fi
26904 
26905 
26906   if test "x$SDK_INSTALL_DIR" != x; then
26907     if test "x$ProgramW6432" != x; then
26908 
26909   if test "x$VS_ENV_CMD" = x; then
26910     VS_VERSION="${VS_VERSION}"
26911     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
26912     METHOD="well-known name"
26913 
26914   windows_path="$WIN_SDK_BASE"
26915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26916     unix_path=`$CYGPATH -u "$windows_path"`
26917     WIN_SDK_BASE="$unix_path"
26918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26920     WIN_SDK_BASE="$unix_path"
26921   fi
26922 
26923     if test -d "$WIN_SDK_BASE"; then
26924       # There have been cases of partial or broken SDK installations. A missing
26925       # lib dir is not going to work.
26926       if test ! -d "$WIN_SDK_BASE/lib"; then
26927         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26928 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26929         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26930 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26931       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26932         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26933 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26934         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26935         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26936           VS_ENV_ARGS="/x86"
26937         else
26938           VS_ENV_ARGS="/x64"
26939         fi
26940         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26941         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26942         # TODO: improve detection for other versions of SDK
26943         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26944       else
26945         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26946 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26947         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26948 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26949       fi
26950     fi
26951   fi
26952 
26953     fi
26954     if test "x$PROGRAMW6432" != x; then
26955 
26956   if test "x$VS_ENV_CMD" = x; then
26957     VS_VERSION="${VS_VERSION}"
26958     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26959     METHOD="well-known name"
26960 
26961   windows_path="$WIN_SDK_BASE"
26962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26963     unix_path=`$CYGPATH -u "$windows_path"`
26964     WIN_SDK_BASE="$unix_path"
26965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26967     WIN_SDK_BASE="$unix_path"
26968   fi
26969 
26970     if test -d "$WIN_SDK_BASE"; then
26971       # There have been cases of partial or broken SDK installations. A missing
26972       # lib dir is not going to work.
26973       if test ! -d "$WIN_SDK_BASE/lib"; then
26974         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26975 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26976         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26977 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26978       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26979         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26980 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26981         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26982         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26983           VS_ENV_ARGS="/x86"
26984         else
26985           VS_ENV_ARGS="/x64"
26986         fi
26987         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26988         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26989         # TODO: improve detection for other versions of SDK
26990         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26991       else
26992         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26993 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26994         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26995 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26996       fi
26997     fi
26998   fi
26999 
27000     fi
27001     if test "x$PROGRAMFILES" != x; then
27002 
27003   if test "x$VS_ENV_CMD" = x; then
27004     VS_VERSION="${VS_VERSION}"
27005     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27006     METHOD="well-known name"
27007 
27008   windows_path="$WIN_SDK_BASE"
27009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27010     unix_path=`$CYGPATH -u "$windows_path"`
27011     WIN_SDK_BASE="$unix_path"
27012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27014     WIN_SDK_BASE="$unix_path"
27015   fi
27016 
27017     if test -d "$WIN_SDK_BASE"; then
27018       # There have been cases of partial or broken SDK installations. A missing
27019       # lib dir is not going to work.
27020       if test ! -d "$WIN_SDK_BASE/lib"; then
27021         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27022 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27023         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27024 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27025       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27026         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27027 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27028         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27029         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27030           VS_ENV_ARGS="/x86"
27031         else
27032           VS_ENV_ARGS="/x64"
27033         fi
27034         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27035         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27036         # TODO: improve detection for other versions of SDK
27037         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27038       else
27039         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27040 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27041         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27042 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27043       fi
27044     fi
27045   fi
27046 
27047     fi
27048 
27049   if test "x$VS_ENV_CMD" = x; then
27050     VS_VERSION="${VS_VERSION}"
27051     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27052     METHOD="well-known name"
27053 
27054   windows_path="$WIN_SDK_BASE"
27055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27056     unix_path=`$CYGPATH -u "$windows_path"`
27057     WIN_SDK_BASE="$unix_path"
27058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27060     WIN_SDK_BASE="$unix_path"
27061   fi
27062 
27063     if test -d "$WIN_SDK_BASE"; then
27064       # There have been cases of partial or broken SDK installations. A missing
27065       # lib dir is not going to work.
27066       if test ! -d "$WIN_SDK_BASE/lib"; then
27067         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27068 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27069         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27070 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27071       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27072         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27073 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27074         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27075         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27076           VS_ENV_ARGS="/x86"
27077         else
27078           VS_ENV_ARGS="/x64"
27079         fi
27080         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27081         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27082         # TODO: improve detection for other versions of SDK
27083         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27084       else
27085         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27086 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27087         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27088 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27089       fi
27090     fi
27091   fi
27092 
27093 
27094   if test "x$VS_ENV_CMD" = x; then
27095     VS_VERSION="${VS_VERSION}"
27096     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27097     METHOD="well-known name"
27098 
27099   windows_path="$WIN_SDK_BASE"
27100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27101     unix_path=`$CYGPATH -u "$windows_path"`
27102     WIN_SDK_BASE="$unix_path"
27103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27105     WIN_SDK_BASE="$unix_path"
27106   fi
27107 
27108     if test -d "$WIN_SDK_BASE"; then
27109       # There have been cases of partial or broken SDK installations. A missing
27110       # lib dir is not going to work.
27111       if test ! -d "$WIN_SDK_BASE/lib"; then
27112         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27113 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27114         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27115 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27116       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27117         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27118 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27119         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27120         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27121           VS_ENV_ARGS="/x86"
27122         else
27123           VS_ENV_ARGS="/x64"
27124         fi
27125         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27126         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27127         # TODO: improve detection for other versions of SDK
27128         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27129       else
27130         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27131 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27132         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27133 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27134       fi
27135     fi
27136   fi
27137 
27138   fi
27139 
27140     if test "x$VS_ENV_CMD" != x; then
27141       TOOLCHAIN_VERSION=$VS_VERSION
27142       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27143       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27144       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27145       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27146       # The rest of the variables are already evaled while probing
27147       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27148 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27149       break
27150     fi
27151   done
27152 
27153 
27154   if test "x$VS_ENV_CMD" != x; then
27155     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27156 
27157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27158 
27159   # First separate the path from the arguments. This will split at the first
27160   # space.
27161   complete="$VS_ENV_CMD"
27162   path="${complete%% *}"
27163   tmp="$complete EOL"
27164   arguments="${tmp#* }"
27165 
27166   # Input might be given as Windows format, start by converting to
27167   # unix format.
27168   new_path=`$CYGPATH -u "$path"`
27169 
27170   # Now try to locate executable using which
27171   new_path=`$WHICH "$new_path" 2> /dev/null`
27172   # bat and cmd files are not always considered executable in cygwin causing which
27173   # to not find them
27174   if test "x$new_path" = x \
27175       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27176       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27177     new_path=`$CYGPATH -u "$path"`
27178   fi
27179   if test "x$new_path" = x; then
27180     # Oops. Which didn't find the executable.
27181     # The splitting of arguments from the executable at a space might have been incorrect,
27182     # since paths with space are more likely in Windows. Give it another try with the whole
27183     # argument.
27184     path="$complete"
27185     arguments="EOL"
27186     new_path=`$CYGPATH -u "$path"`
27187     new_path=`$WHICH "$new_path" 2> /dev/null`
27188     # bat and cmd files are not always considered executable in cygwin causing which
27189     # to not find them
27190     if test "x$new_path" = x \
27191         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27192         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27193       new_path=`$CYGPATH -u "$path"`
27194     fi
27195     if test "x$new_path" = x; then
27196       # It's still not found. Now this is an unrecoverable error.
27197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27198 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27199       has_space=`$ECHO "$complete" | $GREP " "`
27200       if test "x$has_space" != x; then
27201         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27202 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27203       fi
27204       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27205     fi
27206   fi
27207 
27208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27211   # "foo.exe" is OK but "foo" is an error.
27212   #
27213   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27214   # It is also a way to make sure we got the proper file name for the real test later on.
27215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27216   if test "x$test_shortpath" = x; then
27217     # Short path failed, file does not exist as specified.
27218     # Try adding .exe or .cmd
27219     if test -f "${new_path}.exe"; then
27220       input_to_shortpath="${new_path}.exe"
27221     elif test -f "${new_path}.cmd"; then
27222       input_to_shortpath="${new_path}.cmd"
27223     else
27224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27225 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27226       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27227 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27228       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27229     fi
27230   else
27231     input_to_shortpath="$new_path"
27232   fi
27233 
27234   # Call helper function which possibly converts this using DOS-style short mode.
27235   # If so, the updated path is stored in $new_path.
27236   new_path="$input_to_shortpath"
27237 
27238   input_path="$input_to_shortpath"
27239   # Check if we need to convert this using DOS-style short mode. If the path
27240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27241   # take no chances and rewrite it.
27242   # Note: m4 eats our [], so we need to use [ and ] instead.
27243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27244   if test "x$has_forbidden_chars" != x; then
27245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27249       # Going to short mode and back again did indeed matter. Since short mode is
27250       # case insensitive, let's make it lowercase to improve readability.
27251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27252       # Now convert it back to Unix-stile (cygpath)
27253       input_path=`$CYGPATH -u "$shortmode_path"`
27254       new_path="$input_path"
27255     fi
27256   fi
27257 
27258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27259   if test "x$test_cygdrive_prefix" = x; then
27260     # As a simple fix, exclude /usr/bin since it's not a real path.
27261     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27263       # a path prefixed by /cygdrive for fixpath to work.
27264       new_path="$CYGWIN_ROOT_PATH$input_path"
27265     fi
27266   fi
27267 
27268   # remove trailing .exe if any
27269   new_path="${new_path/%.exe/}"
27270 
27271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27272 
27273   # First separate the path from the arguments. This will split at the first
27274   # space.
27275   complete="$VS_ENV_CMD"
27276   path="${complete%% *}"
27277   tmp="$complete EOL"
27278   arguments="${tmp#* }"
27279 
27280   # Input might be given as Windows format, start by converting to
27281   # unix format.
27282   new_path="$path"
27283 
27284   windows_path="$new_path"
27285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27286     unix_path=`$CYGPATH -u "$windows_path"`
27287     new_path="$unix_path"
27288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27290     new_path="$unix_path"
27291   fi
27292 
27293 
27294   # Now try to locate executable using which
27295   new_path=`$WHICH "$new_path" 2> /dev/null`
27296 
27297   if test "x$new_path" = x; then
27298     # Oops. Which didn't find the executable.
27299     # The splitting of arguments from the executable at a space might have been incorrect,
27300     # since paths with space are more likely in Windows. Give it another try with the whole
27301     # argument.
27302     path="$complete"
27303     arguments="EOL"
27304     new_path="$path"
27305 
27306   windows_path="$new_path"
27307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27308     unix_path=`$CYGPATH -u "$windows_path"`
27309     new_path="$unix_path"
27310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27312     new_path="$unix_path"
27313   fi
27314 
27315 
27316     new_path=`$WHICH "$new_path" 2> /dev/null`
27317     # bat and cmd files are not always considered executable in MSYS causing which
27318     # to not find them
27319     if test "x$new_path" = x \
27320         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27321         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27322       new_path="$path"
27323 
27324   windows_path="$new_path"
27325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27326     unix_path=`$CYGPATH -u "$windows_path"`
27327     new_path="$unix_path"
27328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27330     new_path="$unix_path"
27331   fi
27332 
27333     fi
27334 
27335     if test "x$new_path" = x; then
27336       # It's still not found. Now this is an unrecoverable error.
27337       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27338 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27339       has_space=`$ECHO "$complete" | $GREP " "`
27340       if test "x$has_space" != x; then
27341         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27342 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27343       fi
27344       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27345     fi
27346   fi
27347 
27348   # Now new_path has a complete unix path to the binary
27349   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27350     # Keep paths in /bin as-is, but remove trailing .exe if any
27351     new_path="${new_path/%.exe/}"
27352     # Do not save /bin paths to all_fixpath_prefixes!
27353   else
27354     # Not in mixed or Windows style, start by that.
27355     new_path=`cmd //c echo $new_path`
27356 
27357   input_path="$new_path"
27358   # Check if we need to convert this using DOS-style short mode. If the path
27359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27360   # take no chances and rewrite it.
27361   # Note: m4 eats our [], so we need to use [ and ] instead.
27362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27363   if test "x$has_forbidden_chars" != x; then
27364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27366   fi
27367 
27368     # Output is in $new_path
27369 
27370   windows_path="$new_path"
27371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27372     unix_path=`$CYGPATH -u "$windows_path"`
27373     new_path="$unix_path"
27374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27376     new_path="$unix_path"
27377   fi
27378 
27379     # remove trailing .exe if any
27380     new_path="${new_path/%.exe/}"
27381 
27382     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27383     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27384   fi
27385 
27386   else
27387     # We're on a unix platform. Hooray! :)
27388     # First separate the path from the arguments. This will split at the first
27389     # space.
27390     complete="$VS_ENV_CMD"
27391     path="${complete%% *}"
27392     tmp="$complete EOL"
27393     arguments="${tmp#* }"
27394 
27395     # Cannot rely on the command "which" here since it doesn't always work.
27396     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27397     if test -z "$is_absolute_path"; then
27398       # Path to executable is not absolute. Find it.
27399       IFS_save="$IFS"
27400       IFS=:
27401       for p in $PATH; do
27402         if test -f "$p/$path" && test -x "$p/$path"; then
27403           new_path="$p/$path"
27404           break
27405         fi
27406       done
27407       IFS="$IFS_save"
27408     else
27409       # This is an absolute path, we can use it without further modifications.
27410       new_path="$path"
27411     fi
27412 
27413     if test "x$new_path" = x; then
27414       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27415 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27416       has_space=`$ECHO "$complete" | $GREP " "`
27417       if test "x$has_space" != x; then
27418         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27419 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27420       fi
27421       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27422     fi
27423   fi
27424 
27425   # Now join together the path and the arguments once again
27426   if test "x$arguments" != xEOL; then
27427     new_complete="$new_path ${arguments% *}"
27428   else
27429     new_complete="$new_path"
27430   fi
27431 
27432   if test "x$complete" != "x$new_complete"; then
27433     VS_ENV_CMD="$new_complete"
27434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27435 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27436   fi
27437 
27438 
27439     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27440     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27441 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27442 
27443     # We need to create a couple of temporary files.
27444     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27445     $MKDIR -p $VS_ENV_TMP_DIR
27446 
27447     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27448     # Instead create a shell script which will set the relevant variables when run.
27449     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27450 
27451   unix_path="$WINPATH_VS_ENV_CMD"
27452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27453     windows_path=`$CYGPATH -m "$unix_path"`
27454     WINPATH_VS_ENV_CMD="$windows_path"
27455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27456     windows_path=`cmd //c echo $unix_path`
27457     WINPATH_VS_ENV_CMD="$windows_path"
27458   fi
27459 
27460     WINPATH_BASH="$BASH"
27461 
27462   unix_path="$WINPATH_BASH"
27463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27464     windows_path=`$CYGPATH -m "$unix_path"`
27465     WINPATH_BASH="$windows_path"
27466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27467     windows_path=`cmd //c echo $unix_path`
27468     WINPATH_BASH="$windows_path"
27469   fi
27470 
27471 
27472     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27473     # script (executable by bash) that will setup the important variables.
27474     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27475     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27476     # This will end up something like:
27477     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27478     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27479     # These will end up something like:
27480     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27481     # The trailing space for everyone except PATH is no typo, but is needed due
27482     # to trailing \ in the Windows paths. These will be stripped later.
27483     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27484     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27485     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27486     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27487     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27488     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27489 
27490     # Now execute the newly created bat file.
27491     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27492     # Change directory so we don't need to mess with Windows paths in redirects.
27493     cd $VS_ENV_TMP_DIR
27494     cmd /c extract-vs-env.bat | $CAT
27495     cd $CURDIR
27496 
27497     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27498       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27499 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27500       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27501 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27502       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27503 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27504       as_fn_error $? "Cannot continue" "$LINENO" 5
27505     fi
27506 
27507     # Now set all paths and other env variables. This will allow the rest of
27508     # the configure script to find and run the compiler in the proper way.
27509     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27510 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27511     . $VS_ENV_TMP_DIR/set-vs-env.sh
27512     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27513     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27514   else
27515     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27516     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27517 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27518   fi
27519 
27520   # At this point, we should have correct variables in the environment, or we can't continue.
27521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27522 $as_echo_n "checking for Visual Studio variables... " >&6; }
27523 
27524   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27525     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27526       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27527 $as_echo "present but broken" >&6; }
27528       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27529     else
27530       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27531 $as_echo "ok" >&6; }
27532       # Remove any trailing "\" ";" and " " from the variables.
27533       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27534       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27535       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27536       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27537       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27538       # Remove any paths containing # (typically F#) as that messes up make. This
27539       # is needed if visual studio was installed with F# support.
27540       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27541 
27542 
27543 
27544 
27545 
27546       # Convert VS_INCLUDE into SYSROOT_CFLAGS
27547       OLDIFS="$IFS"
27548       IFS=";"
27549       for i in $VS_INCLUDE; do
27550         ipath=$i
27551         IFS="$OLDIFS"
27552 
27553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27554 
27555   # Input might be given as Windows format, start by converting to
27556   # unix format.
27557   path="$ipath"
27558   new_path=`$CYGPATH -u "$path"`
27559 
27560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27563   # "foo.exe" is OK but "foo" is an error.
27564   #
27565   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27566   # It is also a way to make sure we got the proper file name for the real test later on.
27567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27568   if test "x$test_shortpath" = x; then
27569     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27570 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27571     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27572   fi
27573 
27574   # Call helper function which possibly converts this using DOS-style short mode.
27575   # If so, the updated path is stored in $new_path.
27576 
27577   input_path="$new_path"
27578   # Check if we need to convert this using DOS-style short mode. If the path
27579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27580   # take no chances and rewrite it.
27581   # Note: m4 eats our [], so we need to use [ and ] instead.
27582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27583   if test "x$has_forbidden_chars" != x; then
27584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27585     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27586     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27587     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27588       # Going to short mode and back again did indeed matter. Since short mode is
27589       # case insensitive, let's make it lowercase to improve readability.
27590       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27591       # Now convert it back to Unix-stile (cygpath)
27592       input_path=`$CYGPATH -u "$shortmode_path"`
27593       new_path="$input_path"
27594     fi
27595   fi
27596 
27597   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27598   if test "x$test_cygdrive_prefix" = x; then
27599     # As a simple fix, exclude /usr/bin since it's not a real path.
27600     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27601       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27602       # a path prefixed by /cygdrive for fixpath to work.
27603       new_path="$CYGWIN_ROOT_PATH$input_path"
27604     fi
27605   fi
27606 
27607 
27608   if test "x$path" != "x$new_path"; then
27609     ipath="$new_path"
27610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27611 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27612   fi
27613 
27614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27615 
27616   path="$ipath"
27617   has_colon=`$ECHO $path | $GREP ^.:`
27618   new_path="$path"
27619   if test "x$has_colon" = x; then
27620     # Not in mixed or Windows style, start by that.
27621     new_path=`cmd //c echo $path`
27622   fi
27623 
27624 
27625   input_path="$new_path"
27626   # Check if we need to convert this using DOS-style short mode. If the path
27627   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27628   # take no chances and rewrite it.
27629   # Note: m4 eats our [], so we need to use [ and ] instead.
27630   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27631   if test "x$has_forbidden_chars" != x; then
27632     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27633     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27634   fi
27635 
27636 
27637   windows_path="$new_path"
27638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27639     unix_path=`$CYGPATH -u "$windows_path"`
27640     new_path="$unix_path"
27641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27643     new_path="$unix_path"
27644   fi
27645 
27646   if test "x$path" != "x$new_path"; then
27647     ipath="$new_path"
27648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27649 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27650   fi
27651 
27652   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27653   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27654 
27655   else
27656     # We're on a unix platform. Hooray! :)
27657     path="$ipath"
27658     has_space=`$ECHO "$path" | $GREP " "`
27659     if test "x$has_space" != x; then
27660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27661 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27662       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27663     fi
27664 
27665     # Use eval to expand a potential ~
27666     eval path="$path"
27667     if test ! -f "$path" && test ! -d "$path"; then
27668       as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27669     fi
27670 
27671     ipath="`cd "$path"; $THEPWDCMD -L`"
27672   fi
27673 
27674         IFS=";"
27675         SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27676       done
27677       # Convert VS_LIB into SYSROOT_LDFLAGS
27678       for i in $VS_LIB; do
27679         libpath=$i
27680         IFS="$OLDIFS"
27681 
27682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27683 
27684   # Input might be given as Windows format, start by converting to
27685   # unix format.
27686   path="$libpath"
27687   new_path=`$CYGPATH -u "$path"`
27688 
27689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27692   # "foo.exe" is OK but "foo" is an error.
27693   #
27694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27695   # It is also a way to make sure we got the proper file name for the real test later on.
27696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27697   if test "x$test_shortpath" = x; then
27698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27699 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27700     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27701   fi
27702 
27703   # Call helper function which possibly converts this using DOS-style short mode.
27704   # If so, the updated path is stored in $new_path.
27705 
27706   input_path="$new_path"
27707   # Check if we need to convert this using DOS-style short mode. If the path
27708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27709   # take no chances and rewrite it.
27710   # Note: m4 eats our [], so we need to use [ and ] instead.
27711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27712   if test "x$has_forbidden_chars" != x; then
27713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27717       # Going to short mode and back again did indeed matter. Since short mode is
27718       # case insensitive, let's make it lowercase to improve readability.
27719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27720       # Now convert it back to Unix-stile (cygpath)
27721       input_path=`$CYGPATH -u "$shortmode_path"`
27722       new_path="$input_path"
27723     fi
27724   fi
27725 
27726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27727   if test "x$test_cygdrive_prefix" = x; then
27728     # As a simple fix, exclude /usr/bin since it's not a real path.
27729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27731       # a path prefixed by /cygdrive for fixpath to work.
27732       new_path="$CYGWIN_ROOT_PATH$input_path"
27733     fi
27734   fi
27735 
27736 
27737   if test "x$path" != "x$new_path"; then
27738     libpath="$new_path"
27739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27740 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27741   fi
27742 
27743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27744 
27745   path="$libpath"
27746   has_colon=`$ECHO $path | $GREP ^.:`
27747   new_path="$path"
27748   if test "x$has_colon" = x; then
27749     # Not in mixed or Windows style, start by that.
27750     new_path=`cmd //c echo $path`
27751   fi
27752 
27753 
27754   input_path="$new_path"
27755   # Check if we need to convert this using DOS-style short mode. If the path
27756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27757   # take no chances and rewrite it.
27758   # Note: m4 eats our [], so we need to use [ and ] instead.
27759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27760   if test "x$has_forbidden_chars" != x; then
27761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27763   fi
27764 
27765 
27766   windows_path="$new_path"
27767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27768     unix_path=`$CYGPATH -u "$windows_path"`
27769     new_path="$unix_path"
27770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27772     new_path="$unix_path"
27773   fi
27774 
27775   if test "x$path" != "x$new_path"; then
27776     libpath="$new_path"
27777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27778 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27779   fi
27780 
27781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27783 
27784   else
27785     # We're on a unix platform. Hooray! :)
27786     path="$libpath"
27787     has_space=`$ECHO "$path" | $GREP " "`
27788     if test "x$has_space" != x; then
27789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27790 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27791       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27792     fi
27793 
27794     # Use eval to expand a potential ~
27795     eval path="$path"
27796     if test ! -f "$path" && test ! -d "$path"; then
27797       as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
27798     fi
27799 
27800     libpath="`cd "$path"; $THEPWDCMD -L`"
27801   fi
27802 
27803         IFS=";"
27804         SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
27805       done
27806       IFS="$OLDIFS"
27807     fi
27808   else
27809     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27810 $as_echo "not found" >&6; }
27811 
27812     if test "x$VS_ENV_CMD" = x; then
27813       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27814 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27815       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27816 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27817     else
27818       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27819 $as_echo "$as_me: Running the extraction script failed." >&6;}
27820     fi
27821     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27822 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27823     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27824 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27825     as_fn_error $? "Cannot continue" "$LINENO" 5
27826   fi
27827 
27828     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27829     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27830     PATH="$VS_PATH"
27831     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27832     export INCLUDE="$VS_INCLUDE"
27833     export LIB="$VS_LIB"
27834   fi
27835 
27836   # autoconf magic only relies on PATH, so update it if tools dir is specified
27837   OLD_PATH="$PATH"
27838 
27839   # For solaris we really need solaris tools, and not the GNU equivalent.
27840   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27841   # so add that to path before starting to probe.
27842   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27843   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27844     PATH="/usr/ccs/bin:$PATH"
27845   fi
27846 
27847   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27848   # override all other locations.
27849   if test "x$TOOLCHAIN_PATH" != x; then
27850     PATH=$TOOLCHAIN_PATH:$PATH
27851   fi
27852 
27853 
27854   #
27855   # Setup the compilers (CC and CXX)
27856   #
27857 
27858   COMPILER_NAME=C
27859   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27860 
27861   if test "x$CC" != x; then
27862     # User has supplied compiler name already, always let that override.
27863     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27864 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27865     if test "x`basename $CC`" = "x$CC"; then
27866       # A command without a complete path is provided, search $PATH.
27867 
27868       for ac_prog in $CC
27869 do
27870   # Extract the first word of "$ac_prog", so it can be a program name with args.
27871 set dummy $ac_prog; ac_word=$2
27872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27873 $as_echo_n "checking for $ac_word... " >&6; }
27874 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27875   $as_echo_n "(cached) " >&6
27876 else
27877   case $POTENTIAL_CC in
27878   [\\/]* | ?:[\\/]*)
27879   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27880   ;;
27881   *)
27882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27883 for as_dir in $PATH
27884 do
27885   IFS=$as_save_IFS
27886   test -z "$as_dir" && as_dir=.
27887     for ac_exec_ext in '' $ac_executable_extensions; do
27888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27889     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27891     break 2
27892   fi
27893 done
27894   done
27895 IFS=$as_save_IFS
27896 
27897   ;;
27898 esac
27899 fi
27900 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27901 if test -n "$POTENTIAL_CC"; then
27902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27903 $as_echo "$POTENTIAL_CC" >&6; }
27904 else
27905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27906 $as_echo "no" >&6; }
27907 fi
27908 
27909 
27910   test -n "$POTENTIAL_CC" && break
27911 done
27912 
27913       if test "x$POTENTIAL_CC" != x; then
27914         CC=$POTENTIAL_CC
27915       else
27916         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27917       fi
27918     else
27919       # Otherwise it might already be a complete path
27920       if test ! -x "$CC"; then
27921         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27922       fi
27923     fi
27924   else
27925     # No user supplied value. Locate compiler ourselves.
27926 
27927     # If we are cross compiling, assume cross compilation tools follows the
27928     # cross compilation standard where they are prefixed with the autoconf
27929     # standard name for the target. For example the binary
27930     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27931     # If we are not cross compiling, then the default compiler name will be
27932     # used.
27933 
27934     CC=
27935     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27936     # before checking the rest of the PATH.
27937     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27938     # step, this should not be necessary.
27939     if test -n "$TOOLCHAIN_PATH"; then
27940       PATH_save="$PATH"
27941       PATH="$TOOLCHAIN_PATH"
27942       for ac_prog in $SEARCH_LIST
27943 do
27944   # Extract the first word of "$ac_prog", so it can be a program name with args.
27945 set dummy $ac_prog; ac_word=$2
27946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27947 $as_echo_n "checking for $ac_word... " >&6; }
27948 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27949   $as_echo_n "(cached) " >&6
27950 else
27951   case $TOOLCHAIN_PATH_CC in
27952   [\\/]* | ?:[\\/]*)
27953   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27954   ;;
27955   *)
27956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27957 for as_dir in $PATH
27958 do
27959   IFS=$as_save_IFS
27960   test -z "$as_dir" && as_dir=.
27961     for ac_exec_ext in '' $ac_executable_extensions; do
27962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27963     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27965     break 2
27966   fi
27967 done
27968   done
27969 IFS=$as_save_IFS
27970 
27971   ;;
27972 esac
27973 fi
27974 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27975 if test -n "$TOOLCHAIN_PATH_CC"; then
27976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27977 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27978 else
27979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27980 $as_echo "no" >&6; }
27981 fi
27982 
27983 
27984   test -n "$TOOLCHAIN_PATH_CC" && break
27985 done
27986 
27987       CC=$TOOLCHAIN_PATH_CC
27988       PATH="$PATH_save"
27989     fi
27990 
27991     # AC_PATH_PROGS can't be run multiple times with the same variable,
27992     # so create a new name for this run.
27993     if test "x$CC" = x; then
27994       for ac_prog in $SEARCH_LIST
27995 do
27996   # Extract the first word of "$ac_prog", so it can be a program name with args.
27997 set dummy $ac_prog; ac_word=$2
27998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27999 $as_echo_n "checking for $ac_word... " >&6; }
28000 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28001   $as_echo_n "(cached) " >&6
28002 else
28003   case $POTENTIAL_CC in
28004   [\\/]* | ?:[\\/]*)
28005   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28006   ;;
28007   *)
28008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28009 for as_dir in $PATH
28010 do
28011   IFS=$as_save_IFS
28012   test -z "$as_dir" && as_dir=.
28013     for ac_exec_ext in '' $ac_executable_extensions; do
28014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28015     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28017     break 2
28018   fi
28019 done
28020   done
28021 IFS=$as_save_IFS
28022 
28023   ;;
28024 esac
28025 fi
28026 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28027 if test -n "$POTENTIAL_CC"; then
28028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28029 $as_echo "$POTENTIAL_CC" >&6; }
28030 else
28031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28032 $as_echo "no" >&6; }
28033 fi
28034 
28035 
28036   test -n "$POTENTIAL_CC" && break
28037 done
28038 
28039       CC=$POTENTIAL_CC
28040     fi
28041 
28042     if test "x$CC" = x; then
28043 
28044   # Print a helpful message on how to acquire the necessary build dependency.
28045   # devkit is the help tag: freetype, cups, pulse, alsa etc
28046   MISSING_DEPENDENCY=devkit
28047 
28048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28049     cygwin_help $MISSING_DEPENDENCY
28050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28051     msys_help $MISSING_DEPENDENCY
28052   else
28053     PKGHANDLER_COMMAND=
28054 
28055     case $PKGHANDLER in
28056       apt-get)
28057         apt_help     $MISSING_DEPENDENCY ;;
28058       yum)
28059         yum_help     $MISSING_DEPENDENCY ;;
28060       port)
28061         port_help    $MISSING_DEPENDENCY ;;
28062       pkgutil)
28063         pkgutil_help $MISSING_DEPENDENCY ;;
28064       pkgadd)
28065         pkgadd_help  $MISSING_DEPENDENCY ;;
28066     esac
28067 
28068     if test "x$PKGHANDLER_COMMAND" != x; then
28069       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28070     fi
28071   fi
28072 
28073       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28074     fi
28075   fi
28076 
28077   # Now we have a compiler binary in CC. Make sure it's okay.
28078 
28079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28080 
28081   # First separate the path from the arguments. This will split at the first
28082   # space.
28083   complete="$CC"
28084   path="${complete%% *}"
28085   tmp="$complete EOL"
28086   arguments="${tmp#* }"
28087 
28088   # Input might be given as Windows format, start by converting to
28089   # unix format.
28090   new_path=`$CYGPATH -u "$path"`
28091 
28092   # Now try to locate executable using which
28093   new_path=`$WHICH "$new_path" 2> /dev/null`
28094   # bat and cmd files are not always considered executable in cygwin causing which
28095   # to not find them
28096   if test "x$new_path" = x \
28097       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28098       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28099     new_path=`$CYGPATH -u "$path"`
28100   fi
28101   if test "x$new_path" = x; then
28102     # Oops. Which didn't find the executable.
28103     # The splitting of arguments from the executable at a space might have been incorrect,
28104     # since paths with space are more likely in Windows. Give it another try with the whole
28105     # argument.
28106     path="$complete"
28107     arguments="EOL"
28108     new_path=`$CYGPATH -u "$path"`
28109     new_path=`$WHICH "$new_path" 2> /dev/null`
28110     # bat and cmd files are not always considered executable in cygwin causing which
28111     # to not find them
28112     if test "x$new_path" = x \
28113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28115       new_path=`$CYGPATH -u "$path"`
28116     fi
28117     if test "x$new_path" = x; then
28118       # It's still not found. Now this is an unrecoverable error.
28119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28120 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28121       has_space=`$ECHO "$complete" | $GREP " "`
28122       if test "x$has_space" != x; then
28123         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28124 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28125       fi
28126       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28127     fi
28128   fi
28129 
28130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28133   # "foo.exe" is OK but "foo" is an error.
28134   #
28135   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28136   # It is also a way to make sure we got the proper file name for the real test later on.
28137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28138   if test "x$test_shortpath" = x; then
28139     # Short path failed, file does not exist as specified.
28140     # Try adding .exe or .cmd
28141     if test -f "${new_path}.exe"; then
28142       input_to_shortpath="${new_path}.exe"
28143     elif test -f "${new_path}.cmd"; then
28144       input_to_shortpath="${new_path}.cmd"
28145     else
28146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28147 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28148       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28149 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28150       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28151     fi
28152   else
28153     input_to_shortpath="$new_path"
28154   fi
28155 
28156   # Call helper function which possibly converts this using DOS-style short mode.
28157   # If so, the updated path is stored in $new_path.
28158   new_path="$input_to_shortpath"
28159 
28160   input_path="$input_to_shortpath"
28161   # Check if we need to convert this using DOS-style short mode. If the path
28162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28163   # take no chances and rewrite it.
28164   # Note: m4 eats our [], so we need to use [ and ] instead.
28165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28166   if test "x$has_forbidden_chars" != x; then
28167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28171       # Going to short mode and back again did indeed matter. Since short mode is
28172       # case insensitive, let's make it lowercase to improve readability.
28173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28174       # Now convert it back to Unix-stile (cygpath)
28175       input_path=`$CYGPATH -u "$shortmode_path"`
28176       new_path="$input_path"
28177     fi
28178   fi
28179 
28180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28181   if test "x$test_cygdrive_prefix" = x; then
28182     # As a simple fix, exclude /usr/bin since it's not a real path.
28183     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28185       # a path prefixed by /cygdrive for fixpath to work.
28186       new_path="$CYGWIN_ROOT_PATH$input_path"
28187     fi
28188   fi
28189 
28190   # remove trailing .exe if any
28191   new_path="${new_path/%.exe/}"
28192 
28193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28194 
28195   # First separate the path from the arguments. This will split at the first
28196   # space.
28197   complete="$CC"
28198   path="${complete%% *}"
28199   tmp="$complete EOL"
28200   arguments="${tmp#* }"
28201 
28202   # Input might be given as Windows format, start by converting to
28203   # unix format.
28204   new_path="$path"
28205 
28206   windows_path="$new_path"
28207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28208     unix_path=`$CYGPATH -u "$windows_path"`
28209     new_path="$unix_path"
28210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28212     new_path="$unix_path"
28213   fi
28214 
28215 
28216   # Now try to locate executable using which
28217   new_path=`$WHICH "$new_path" 2> /dev/null`
28218 
28219   if test "x$new_path" = x; then
28220     # Oops. Which didn't find the executable.
28221     # The splitting of arguments from the executable at a space might have been incorrect,
28222     # since paths with space are more likely in Windows. Give it another try with the whole
28223     # argument.
28224     path="$complete"
28225     arguments="EOL"
28226     new_path="$path"
28227 
28228   windows_path="$new_path"
28229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28230     unix_path=`$CYGPATH -u "$windows_path"`
28231     new_path="$unix_path"
28232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28234     new_path="$unix_path"
28235   fi
28236 
28237 
28238     new_path=`$WHICH "$new_path" 2> /dev/null`
28239     # bat and cmd files are not always considered executable in MSYS causing which
28240     # to not find them
28241     if test "x$new_path" = x \
28242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28244       new_path="$path"
28245 
28246   windows_path="$new_path"
28247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28248     unix_path=`$CYGPATH -u "$windows_path"`
28249     new_path="$unix_path"
28250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28252     new_path="$unix_path"
28253   fi
28254 
28255     fi
28256 
28257     if test "x$new_path" = x; then
28258       # It's still not found. Now this is an unrecoverable error.
28259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28260 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28261       has_space=`$ECHO "$complete" | $GREP " "`
28262       if test "x$has_space" != x; then
28263         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28264 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28265       fi
28266       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28267     fi
28268   fi
28269 
28270   # Now new_path has a complete unix path to the binary
28271   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28272     # Keep paths in /bin as-is, but remove trailing .exe if any
28273     new_path="${new_path/%.exe/}"
28274     # Do not save /bin paths to all_fixpath_prefixes!
28275   else
28276     # Not in mixed or Windows style, start by that.
28277     new_path=`cmd //c echo $new_path`
28278 
28279   input_path="$new_path"
28280   # Check if we need to convert this using DOS-style short mode. If the path
28281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28282   # take no chances and rewrite it.
28283   # Note: m4 eats our [], so we need to use [ and ] instead.
28284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28285   if test "x$has_forbidden_chars" != x; then
28286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28287     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28288   fi
28289 
28290     # Output is in $new_path
28291 
28292   windows_path="$new_path"
28293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28294     unix_path=`$CYGPATH -u "$windows_path"`
28295     new_path="$unix_path"
28296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28298     new_path="$unix_path"
28299   fi
28300 
28301     # remove trailing .exe if any
28302     new_path="${new_path/%.exe/}"
28303 
28304     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28305     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28306   fi
28307 
28308   else
28309     # We're on a unix platform. Hooray! :)
28310     # First separate the path from the arguments. This will split at the first
28311     # space.
28312     complete="$CC"
28313     path="${complete%% *}"
28314     tmp="$complete EOL"
28315     arguments="${tmp#* }"
28316 
28317     # Cannot rely on the command "which" here since it doesn't always work.
28318     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28319     if test -z "$is_absolute_path"; then
28320       # Path to executable is not absolute. Find it.
28321       IFS_save="$IFS"
28322       IFS=:
28323       for p in $PATH; do
28324         if test -f "$p/$path" && test -x "$p/$path"; then
28325           new_path="$p/$path"
28326           break
28327         fi
28328       done
28329       IFS="$IFS_save"
28330     else
28331       # This is an absolute path, we can use it without further modifications.
28332       new_path="$path"
28333     fi
28334 
28335     if test "x$new_path" = x; then
28336       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28337 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28338       has_space=`$ECHO "$complete" | $GREP " "`
28339       if test "x$has_space" != x; then
28340         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28341 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28342       fi
28343       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28344     fi
28345   fi
28346 
28347   # Now join together the path and the arguments once again
28348   if test "x$arguments" != xEOL; then
28349     new_complete="$new_path ${arguments% *}"
28350   else
28351     new_complete="$new_path"
28352   fi
28353 
28354   if test "x$complete" != "x$new_complete"; then
28355     CC="$new_complete"
28356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28357 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28358   fi
28359 
28360   TEST_COMPILER="$CC"
28361   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28362   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28363   if test "x$OPENJDK_BUILD_OS" != xaix; then
28364     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28366 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28367 
28368   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28369     # Follow a chain of symbolic links. Use readlink
28370     # where it exists, else fall back to horribly
28371     # complicated shell code.
28372     if test "x$READLINK_TESTED" != yes; then
28373       # On MacOSX there is a readlink tool with a different
28374       # purpose than the GNU readlink tool. Check the found readlink.
28375       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28376       if test "x$ISGNU" = x; then
28377         # A readlink that we do not know how to use.
28378         # Are there other non-GNU readlinks out there?
28379         READLINK_TESTED=yes
28380         READLINK=
28381       fi
28382     fi
28383 
28384     if test "x$READLINK" != x; then
28385       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28386     else
28387       # Save the current directory for restoring afterwards
28388       STARTDIR=$PWD
28389       COUNTER=0
28390       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28391       sym_link_file=`$BASENAME $TEST_COMPILER`
28392       cd $sym_link_dir
28393       # Use -P flag to resolve symlinks in directories.
28394       cd `$THEPWDCMD -P`
28395       sym_link_dir=`$THEPWDCMD -P`
28396       # Resolve file symlinks
28397       while test $COUNTER -lt 20; do
28398         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28399         if test "x$ISLINK" == x; then
28400           # This is not a symbolic link! We are done!
28401           break
28402         fi
28403         # Again resolve directory symlinks since the target of the just found
28404         # link could be in a different directory
28405         cd `$DIRNAME $ISLINK`
28406         sym_link_dir=`$THEPWDCMD -P`
28407         sym_link_file=`$BASENAME $ISLINK`
28408         let COUNTER=COUNTER+1
28409       done
28410       cd $STARTDIR
28411       TEST_COMPILER=$sym_link_dir/$sym_link_file
28412     fi
28413   fi
28414 
28415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28416 $as_echo "$TEST_COMPILER" >&6; }
28417   fi
28418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28419 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28420 
28421   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28422   if test "x$COMPILER_BASENAME" = "xccache"; then
28423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28424 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28425     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28426     # We want to control ccache invocation ourselves, so ignore this cc and try
28427     # searching again.
28428 
28429     # Remove the path to the fake ccache cc from the PATH
28430     RETRY_COMPILER_SAVED_PATH="$PATH"
28431     COMPILER_DIRNAME=`$DIRNAME $CC`
28432     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28433 
28434     # Try again looking for our compiler
28435     if test -n "$ac_tool_prefix"; then
28436   for ac_prog in $TOOLCHAIN_CC_BINARY
28437   do
28438     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28439 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28441 $as_echo_n "checking for $ac_word... " >&6; }
28442 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28443   $as_echo_n "(cached) " >&6
28444 else
28445   if test -n "$PROPER_COMPILER_CC"; then
28446   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28447 else
28448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28449 for as_dir in $PATH
28450 do
28451   IFS=$as_save_IFS
28452   test -z "$as_dir" && as_dir=.
28453     for ac_exec_ext in '' $ac_executable_extensions; do
28454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28455     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28457     break 2
28458   fi
28459 done
28460   done
28461 IFS=$as_save_IFS
28462 
28463 fi
28464 fi
28465 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28466 if test -n "$PROPER_COMPILER_CC"; then
28467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28468 $as_echo "$PROPER_COMPILER_CC" >&6; }
28469 else
28470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28471 $as_echo "no" >&6; }
28472 fi
28473 
28474 
28475     test -n "$PROPER_COMPILER_CC" && break
28476   done
28477 fi
28478 if test -z "$PROPER_COMPILER_CC"; then
28479   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28480   for ac_prog in $TOOLCHAIN_CC_BINARY
28481 do
28482   # Extract the first word of "$ac_prog", so it can be a program name with args.
28483 set dummy $ac_prog; ac_word=$2
28484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28485 $as_echo_n "checking for $ac_word... " >&6; }
28486 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28487   $as_echo_n "(cached) " >&6
28488 else
28489   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28490   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28491 else
28492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28493 for as_dir in $PATH
28494 do
28495   IFS=$as_save_IFS
28496   test -z "$as_dir" && as_dir=.
28497     for ac_exec_ext in '' $ac_executable_extensions; do
28498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28499     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28501     break 2
28502   fi
28503 done
28504   done
28505 IFS=$as_save_IFS
28506 
28507 fi
28508 fi
28509 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28510 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28512 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28513 else
28514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28515 $as_echo "no" >&6; }
28516 fi
28517 
28518 
28519   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28520 done
28521 
28522   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28523     PROPER_COMPILER_CC=""
28524   else
28525     case $cross_compiling:$ac_tool_warned in
28526 yes:)
28527 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28528 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28529 ac_tool_warned=yes ;;
28530 esac
28531     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28532   fi
28533 fi
28534 
28535 
28536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28537 
28538   # First separate the path from the arguments. This will split at the first
28539   # space.
28540   complete="$PROPER_COMPILER_CC"
28541   path="${complete%% *}"
28542   tmp="$complete EOL"
28543   arguments="${tmp#* }"
28544 
28545   # Input might be given as Windows format, start by converting to
28546   # unix format.
28547   new_path=`$CYGPATH -u "$path"`
28548 
28549   # Now try to locate executable using which
28550   new_path=`$WHICH "$new_path" 2> /dev/null`
28551   # bat and cmd files are not always considered executable in cygwin causing which
28552   # to not find them
28553   if test "x$new_path" = x \
28554       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28555       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28556     new_path=`$CYGPATH -u "$path"`
28557   fi
28558   if test "x$new_path" = x; then
28559     # Oops. Which didn't find the executable.
28560     # The splitting of arguments from the executable at a space might have been incorrect,
28561     # since paths with space are more likely in Windows. Give it another try with the whole
28562     # argument.
28563     path="$complete"
28564     arguments="EOL"
28565     new_path=`$CYGPATH -u "$path"`
28566     new_path=`$WHICH "$new_path" 2> /dev/null`
28567     # bat and cmd files are not always considered executable in cygwin causing which
28568     # to not find them
28569     if test "x$new_path" = x \
28570         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28571         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28572       new_path=`$CYGPATH -u "$path"`
28573     fi
28574     if test "x$new_path" = x; then
28575       # It's still not found. Now this is an unrecoverable error.
28576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28577 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28578       has_space=`$ECHO "$complete" | $GREP " "`
28579       if test "x$has_space" != x; then
28580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28582       fi
28583       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28584     fi
28585   fi
28586 
28587   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28588   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28589   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28590   # "foo.exe" is OK but "foo" is an error.
28591   #
28592   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28593   # It is also a way to make sure we got the proper file name for the real test later on.
28594   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28595   if test "x$test_shortpath" = x; then
28596     # Short path failed, file does not exist as specified.
28597     # Try adding .exe or .cmd
28598     if test -f "${new_path}.exe"; then
28599       input_to_shortpath="${new_path}.exe"
28600     elif test -f "${new_path}.cmd"; then
28601       input_to_shortpath="${new_path}.cmd"
28602     else
28603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28604 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28605       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28606 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28607       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28608     fi
28609   else
28610     input_to_shortpath="$new_path"
28611   fi
28612 
28613   # Call helper function which possibly converts this using DOS-style short mode.
28614   # If so, the updated path is stored in $new_path.
28615   new_path="$input_to_shortpath"
28616 
28617   input_path="$input_to_shortpath"
28618   # Check if we need to convert this using DOS-style short mode. If the path
28619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28620   # take no chances and rewrite it.
28621   # Note: m4 eats our [], so we need to use [ and ] instead.
28622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28623   if test "x$has_forbidden_chars" != x; then
28624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28625     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28626     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28627     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28628       # Going to short mode and back again did indeed matter. Since short mode is
28629       # case insensitive, let's make it lowercase to improve readability.
28630       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28631       # Now convert it back to Unix-stile (cygpath)
28632       input_path=`$CYGPATH -u "$shortmode_path"`
28633       new_path="$input_path"
28634     fi
28635   fi
28636 
28637   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28638   if test "x$test_cygdrive_prefix" = x; then
28639     # As a simple fix, exclude /usr/bin since it's not a real path.
28640     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28641       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28642       # a path prefixed by /cygdrive for fixpath to work.
28643       new_path="$CYGWIN_ROOT_PATH$input_path"
28644     fi
28645   fi
28646 
28647   # remove trailing .exe if any
28648   new_path="${new_path/%.exe/}"
28649 
28650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28651 
28652   # First separate the path from the arguments. This will split at the first
28653   # space.
28654   complete="$PROPER_COMPILER_CC"
28655   path="${complete%% *}"
28656   tmp="$complete EOL"
28657   arguments="${tmp#* }"
28658 
28659   # Input might be given as Windows format, start by converting to
28660   # unix format.
28661   new_path="$path"
28662 
28663   windows_path="$new_path"
28664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28665     unix_path=`$CYGPATH -u "$windows_path"`
28666     new_path="$unix_path"
28667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28669     new_path="$unix_path"
28670   fi
28671 
28672 
28673   # Now try to locate executable using which
28674   new_path=`$WHICH "$new_path" 2> /dev/null`
28675 
28676   if test "x$new_path" = x; then
28677     # Oops. Which didn't find the executable.
28678     # The splitting of arguments from the executable at a space might have been incorrect,
28679     # since paths with space are more likely in Windows. Give it another try with the whole
28680     # argument.
28681     path="$complete"
28682     arguments="EOL"
28683     new_path="$path"
28684 
28685   windows_path="$new_path"
28686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28687     unix_path=`$CYGPATH -u "$windows_path"`
28688     new_path="$unix_path"
28689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28691     new_path="$unix_path"
28692   fi
28693 
28694 
28695     new_path=`$WHICH "$new_path" 2> /dev/null`
28696     # bat and cmd files are not always considered executable in MSYS causing which
28697     # to not find them
28698     if test "x$new_path" = x \
28699         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28700         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28701       new_path="$path"
28702 
28703   windows_path="$new_path"
28704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28705     unix_path=`$CYGPATH -u "$windows_path"`
28706     new_path="$unix_path"
28707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28709     new_path="$unix_path"
28710   fi
28711 
28712     fi
28713 
28714     if test "x$new_path" = x; then
28715       # It's still not found. Now this is an unrecoverable error.
28716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28717 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28718       has_space=`$ECHO "$complete" | $GREP " "`
28719       if test "x$has_space" != x; then
28720         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28721 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28722       fi
28723       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28724     fi
28725   fi
28726 
28727   # Now new_path has a complete unix path to the binary
28728   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28729     # Keep paths in /bin as-is, but remove trailing .exe if any
28730     new_path="${new_path/%.exe/}"
28731     # Do not save /bin paths to all_fixpath_prefixes!
28732   else
28733     # Not in mixed or Windows style, start by that.
28734     new_path=`cmd //c echo $new_path`
28735 
28736   input_path="$new_path"
28737   # Check if we need to convert this using DOS-style short mode. If the path
28738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28739   # take no chances and rewrite it.
28740   # Note: m4 eats our [], so we need to use [ and ] instead.
28741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28742   if test "x$has_forbidden_chars" != x; then
28743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28744     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28745   fi
28746 
28747     # Output is in $new_path
28748 
28749   windows_path="$new_path"
28750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28751     unix_path=`$CYGPATH -u "$windows_path"`
28752     new_path="$unix_path"
28753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28755     new_path="$unix_path"
28756   fi
28757 
28758     # remove trailing .exe if any
28759     new_path="${new_path/%.exe/}"
28760 
28761     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28762     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28763   fi
28764 
28765   else
28766     # We're on a unix platform. Hooray! :)
28767     # First separate the path from the arguments. This will split at the first
28768     # space.
28769     complete="$PROPER_COMPILER_CC"
28770     path="${complete%% *}"
28771     tmp="$complete EOL"
28772     arguments="${tmp#* }"
28773 
28774     # Cannot rely on the command "which" here since it doesn't always work.
28775     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28776     if test -z "$is_absolute_path"; then
28777       # Path to executable is not absolute. Find it.
28778       IFS_save="$IFS"
28779       IFS=:
28780       for p in $PATH; do
28781         if test -f "$p/$path" && test -x "$p/$path"; then
28782           new_path="$p/$path"
28783           break
28784         fi
28785       done
28786       IFS="$IFS_save"
28787     else
28788       # This is an absolute path, we can use it without further modifications.
28789       new_path="$path"
28790     fi
28791 
28792     if test "x$new_path" = x; then
28793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28794 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28795       has_space=`$ECHO "$complete" | $GREP " "`
28796       if test "x$has_space" != x; then
28797         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28798 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28799       fi
28800       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28801     fi
28802   fi
28803 
28804   # Now join together the path and the arguments once again
28805   if test "x$arguments" != xEOL; then
28806     new_complete="$new_path ${arguments% *}"
28807   else
28808     new_complete="$new_path"
28809   fi
28810 
28811   if test "x$complete" != "x$new_complete"; then
28812     PROPER_COMPILER_CC="$new_complete"
28813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28814 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28815   fi
28816 
28817     PATH="$RETRY_COMPILER_SAVED_PATH"
28818 
28819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28820 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28821 
28822   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28823     # Follow a chain of symbolic links. Use readlink
28824     # where it exists, else fall back to horribly
28825     # complicated shell code.
28826     if test "x$READLINK_TESTED" != yes; then
28827       # On MacOSX there is a readlink tool with a different
28828       # purpose than the GNU readlink tool. Check the found readlink.
28829       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28830       if test "x$ISGNU" = x; then
28831         # A readlink that we do not know how to use.
28832         # Are there other non-GNU readlinks out there?
28833         READLINK_TESTED=yes
28834         READLINK=
28835       fi
28836     fi
28837 
28838     if test "x$READLINK" != x; then
28839       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28840     else
28841       # Save the current directory for restoring afterwards
28842       STARTDIR=$PWD
28843       COUNTER=0
28844       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28845       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28846       cd $sym_link_dir
28847       # Use -P flag to resolve symlinks in directories.
28848       cd `$THEPWDCMD -P`
28849       sym_link_dir=`$THEPWDCMD -P`
28850       # Resolve file symlinks
28851       while test $COUNTER -lt 20; do
28852         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28853         if test "x$ISLINK" == x; then
28854           # This is not a symbolic link! We are done!
28855           break
28856         fi
28857         # Again resolve directory symlinks since the target of the just found
28858         # link could be in a different directory
28859         cd `$DIRNAME $ISLINK`
28860         sym_link_dir=`$THEPWDCMD -P`
28861         sym_link_file=`$BASENAME $ISLINK`
28862         let COUNTER=COUNTER+1
28863       done
28864       cd $STARTDIR
28865       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28866     fi
28867   fi
28868 
28869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28870 $as_echo "$PROPER_COMPILER_CC" >&6; }
28871     CC="$PROPER_COMPILER_CC"
28872   else
28873     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28874 $as_echo "no, keeping CC" >&6; }
28875   fi
28876 
28877 
28878   COMPILER=$CC
28879   COMPILER_NAME=$COMPILER_NAME
28880 
28881   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28882     # cc -V output typically looks like
28883     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28884     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28885     # Check that this is likely to be the Solaris Studio cc.
28886     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28887     if test $? -ne 0; then
28888       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28889       { $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
28890 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28891       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28892 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28893       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28894 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28895       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28896     fi
28897     # Remove usage instructions (if present), and
28898     # collapse compiler output into a single line
28899     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28900         $SED -e 's/ *[Uu]sage:.*//'`
28901     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28902         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28903   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28904     # xlc -qversion output typically looks like
28905     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28906     #     Version: 11.01.0000.0015
28907     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28908     # Check that this is likely to be the IBM XL C compiler.
28909     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28910     if test $? -ne 0; then
28911       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28912       { $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
28913 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28914       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28915 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28916       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28917 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28918       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28919     fi
28920     # Collapse compiler output into a single line
28921     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28922     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28923         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28924   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28925     # There is no specific version flag, but all output starts with a version string.
28926     # First line typically looks something like:
28927     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28928     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28929     # Check that this is likely to be Microsoft CL.EXE.
28930     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28931     if test $? -ne 0; then
28932       { $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
28933 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28934       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28935 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28936       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28937     fi
28938     # Collapse compiler output into a single line
28939     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28940     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28941         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28942   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28943     # gcc --version output typically looks like
28944     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28945     #     Copyright (C) 2013 Free Software Foundation, Inc.
28946     #     This is free software; see the source for copying conditions.  There is NO
28947     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28948     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28949     # Check that this is likely to be GCC.
28950     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28951     if test $? -ne 0; then
28952       { $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
28953 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28954       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28955 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28956       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28957     fi
28958     # Remove Copyright and legalese from version string, and
28959     # collapse into a single line
28960     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28961         $SED -e 's/ *Copyright .*//'`
28962     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28963         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28964   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28965     # clang --version output typically looks like
28966     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28967     #    clang version 3.3 (tags/RELEASE_33/final)
28968     # or
28969     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28970     #    Target: x86_64-pc-linux-gnu
28971     #    Thread model: posix
28972     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28973     # Check that this is likely to be clang
28974     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28975     if test $? -ne 0; then
28976       { $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
28977 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28978       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28979 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28980       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28981     fi
28982     # Collapse compiler output into a single line
28983     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28984     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28985         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28986   else
28987       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28988   fi
28989   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28990   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28991   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28992   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28993 
28994   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28995 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28996 
28997 
28998   # Now that we have resolved CC ourself, let autoconf have its go at it
28999   ac_ext=c
29000 ac_cpp='$CPP $CPPFLAGS'
29001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29004 if test -n "$ac_tool_prefix"; then
29005   for ac_prog in $CC
29006   do
29007     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29008 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29010 $as_echo_n "checking for $ac_word... " >&6; }
29011 if ${ac_cv_prog_CC+:} false; then :
29012   $as_echo_n "(cached) " >&6
29013 else
29014   if test -n "$CC"; then
29015   ac_cv_prog_CC="$CC" # Let the user override the test.
29016 else
29017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29018 for as_dir in $PATH
29019 do
29020   IFS=$as_save_IFS
29021   test -z "$as_dir" && as_dir=.
29022     for ac_exec_ext in '' $ac_executable_extensions; do
29023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29024     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29026     break 2
29027   fi
29028 done
29029   done
29030 IFS=$as_save_IFS
29031 
29032 fi
29033 fi
29034 CC=$ac_cv_prog_CC
29035 if test -n "$CC"; then
29036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29037 $as_echo "$CC" >&6; }
29038 else
29039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29040 $as_echo "no" >&6; }
29041 fi
29042 
29043 
29044     test -n "$CC" && break
29045   done
29046 fi
29047 if test -z "$CC"; then
29048   ac_ct_CC=$CC
29049   for ac_prog in $CC
29050 do
29051   # Extract the first word of "$ac_prog", so it can be a program name with args.
29052 set dummy $ac_prog; ac_word=$2
29053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29054 $as_echo_n "checking for $ac_word... " >&6; }
29055 if ${ac_cv_prog_ac_ct_CC+:} false; then :
29056   $as_echo_n "(cached) " >&6
29057 else
29058   if test -n "$ac_ct_CC"; then
29059   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29060 else
29061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29062 for as_dir in $PATH
29063 do
29064   IFS=$as_save_IFS
29065   test -z "$as_dir" && as_dir=.
29066     for ac_exec_ext in '' $ac_executable_extensions; do
29067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29068     ac_cv_prog_ac_ct_CC="$ac_prog"
29069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29070     break 2
29071   fi
29072 done
29073   done
29074 IFS=$as_save_IFS
29075 
29076 fi
29077 fi
29078 ac_ct_CC=$ac_cv_prog_ac_ct_CC
29079 if test -n "$ac_ct_CC"; then
29080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29081 $as_echo "$ac_ct_CC" >&6; }
29082 else
29083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29084 $as_echo "no" >&6; }
29085 fi
29086 
29087 
29088   test -n "$ac_ct_CC" && break
29089 done
29090 
29091   if test "x$ac_ct_CC" = x; then
29092     CC=""
29093   else
29094     case $cross_compiling:$ac_tool_warned in
29095 yes:)
29096 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29097 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29098 ac_tool_warned=yes ;;
29099 esac
29100     CC=$ac_ct_CC
29101   fi
29102 fi
29103 
29104 
29105 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29106 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29107 as_fn_error $? "no acceptable C compiler found in \$PATH
29108 See \`config.log' for more details" "$LINENO" 5; }
29109 
29110 # Provide some information about the compiler.
29111 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29112 set X $ac_compile
29113 ac_compiler=$2
29114 for ac_option in --version -v -V -qversion; do
29115   { { ac_try="$ac_compiler $ac_option >&5"
29116 case "(($ac_try" in
29117   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29118   *) ac_try_echo=$ac_try;;
29119 esac
29120 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29121 $as_echo "$ac_try_echo"; } >&5
29122   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29123   ac_status=$?
29124   if test -s conftest.err; then
29125     sed '10a\
29126 ... rest of stderr output deleted ...
29127          10q' conftest.err >conftest.er1
29128     cat conftest.er1 >&5
29129   fi
29130   rm -f conftest.er1 conftest.err
29131   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29132   test $ac_status = 0; }
29133 done
29134 
29135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29136 /* end confdefs.h.  */
29137 
29138 int
29139 main ()
29140 {
29141 
29142   ;
29143   return 0;
29144 }
29145 _ACEOF
29146 ac_clean_files_save=$ac_clean_files
29147 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29148 # Try to create an executable without -o first, disregard a.out.
29149 # It will help us diagnose broken compilers, and finding out an intuition
29150 # of exeext.
29151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29152 $as_echo_n "checking whether the C compiler works... " >&6; }
29153 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29154 
29155 # The possible output files:
29156 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29157 
29158 ac_rmfiles=
29159 for ac_file in $ac_files
29160 do
29161   case $ac_file in
29162     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29163     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29164   esac
29165 done
29166 rm -f $ac_rmfiles
29167 
29168 if { { ac_try="$ac_link_default"
29169 case "(($ac_try" in
29170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29171   *) ac_try_echo=$ac_try;;
29172 esac
29173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29174 $as_echo "$ac_try_echo"; } >&5
29175   (eval "$ac_link_default") 2>&5
29176   ac_status=$?
29177   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29178   test $ac_status = 0; }; then :
29179   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29180 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29181 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
29182 # so that the user can short-circuit this test for compilers unknown to
29183 # Autoconf.
29184 for ac_file in $ac_files ''
29185 do
29186   test -f "$ac_file" || continue
29187   case $ac_file in
29188     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29189         ;;
29190     [ab].out )
29191         # We found the default executable, but exeext='' is most
29192         # certainly right.
29193         break;;
29194     *.* )
29195         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29196         then :; else
29197            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29198         fi
29199         # We set ac_cv_exeext here because the later test for it is not
29200         # safe: cross compilers may not add the suffix if given an `-o'
29201         # argument, so we may need to know it at that point already.
29202         # Even if this section looks crufty: it has the advantage of
29203         # actually working.
29204         break;;
29205     * )
29206         break;;
29207   esac
29208 done
29209 test "$ac_cv_exeext" = no && ac_cv_exeext=
29210 
29211 else
29212   ac_file=''
29213 fi
29214 if test -z "$ac_file"; then :
29215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29216 $as_echo "no" >&6; }
29217 $as_echo "$as_me: failed program was:" >&5
29218 sed 's/^/| /' conftest.$ac_ext >&5
29219 
29220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29222 as_fn_error 77 "C compiler cannot create executables
29223 See \`config.log' for more details" "$LINENO" 5; }
29224 else
29225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29226 $as_echo "yes" >&6; }
29227 fi
29228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29229 $as_echo_n "checking for C compiler default output file name... " >&6; }
29230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29231 $as_echo "$ac_file" >&6; }
29232 ac_exeext=$ac_cv_exeext
29233 
29234 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29235 ac_clean_files=$ac_clean_files_save
29236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29237 $as_echo_n "checking for suffix of executables... " >&6; }
29238 if { { ac_try="$ac_link"
29239 case "(($ac_try" in
29240   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29241   *) ac_try_echo=$ac_try;;
29242 esac
29243 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29244 $as_echo "$ac_try_echo"; } >&5
29245   (eval "$ac_link") 2>&5
29246   ac_status=$?
29247   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29248   test $ac_status = 0; }; then :
29249   # If both `conftest.exe' and `conftest' are `present' (well, observable)
29250 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29251 # work properly (i.e., refer to `conftest.exe'), while it won't with
29252 # `rm'.
29253 for ac_file in conftest.exe conftest conftest.*; do
29254   test -f "$ac_file" || continue
29255   case $ac_file in
29256     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29257     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29258           break;;
29259     * ) break;;
29260   esac
29261 done
29262 else
29263   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29264 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29265 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29266 See \`config.log' for more details" "$LINENO" 5; }
29267 fi
29268 rm -f conftest conftest$ac_cv_exeext
29269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29270 $as_echo "$ac_cv_exeext" >&6; }
29271 
29272 rm -f conftest.$ac_ext
29273 EXEEXT=$ac_cv_exeext
29274 ac_exeext=$EXEEXT
29275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29276 /* end confdefs.h.  */
29277 #include <stdio.h>
29278 int
29279 main ()
29280 {
29281 FILE *f = fopen ("conftest.out", "w");
29282  return ferror (f) || fclose (f) != 0;
29283 
29284   ;
29285   return 0;
29286 }
29287 _ACEOF
29288 ac_clean_files="$ac_clean_files conftest.out"
29289 # Check that the compiler produces executables we can run.  If not, either
29290 # the compiler is broken, or we cross compile.
29291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29292 $as_echo_n "checking whether we are cross compiling... " >&6; }
29293 if test "$cross_compiling" != yes; then
29294   { { ac_try="$ac_link"
29295 case "(($ac_try" in
29296   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29297   *) ac_try_echo=$ac_try;;
29298 esac
29299 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29300 $as_echo "$ac_try_echo"; } >&5
29301   (eval "$ac_link") 2>&5
29302   ac_status=$?
29303   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29304   test $ac_status = 0; }
29305   if { ac_try='./conftest$ac_cv_exeext'
29306   { { case "(($ac_try" in
29307   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29308   *) ac_try_echo=$ac_try;;
29309 esac
29310 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29311 $as_echo "$ac_try_echo"; } >&5
29312   (eval "$ac_try") 2>&5
29313   ac_status=$?
29314   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29315   test $ac_status = 0; }; }; then
29316     cross_compiling=no
29317   else
29318     if test "$cross_compiling" = maybe; then
29319         cross_compiling=yes
29320     else
29321         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29322 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29323 as_fn_error $? "cannot run C compiled programs.
29324 If you meant to cross compile, use \`--host'.
29325 See \`config.log' for more details" "$LINENO" 5; }
29326     fi
29327   fi
29328 fi
29329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29330 $as_echo "$cross_compiling" >&6; }
29331 
29332 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29333 ac_clean_files=$ac_clean_files_save
29334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29335 $as_echo_n "checking for suffix of object files... " >&6; }
29336 if ${ac_cv_objext+:} false; then :
29337   $as_echo_n "(cached) " >&6
29338 else
29339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29340 /* end confdefs.h.  */
29341 
29342 int
29343 main ()
29344 {
29345 
29346   ;
29347   return 0;
29348 }
29349 _ACEOF
29350 rm -f conftest.o conftest.obj
29351 if { { ac_try="$ac_compile"
29352 case "(($ac_try" in
29353   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29354   *) ac_try_echo=$ac_try;;
29355 esac
29356 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29357 $as_echo "$ac_try_echo"; } >&5
29358   (eval "$ac_compile") 2>&5
29359   ac_status=$?
29360   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29361   test $ac_status = 0; }; then :
29362   for ac_file in conftest.o conftest.obj conftest.*; do
29363   test -f "$ac_file" || continue;
29364   case $ac_file in
29365     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29366     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29367        break;;
29368   esac
29369 done
29370 else
29371   $as_echo "$as_me: failed program was:" >&5
29372 sed 's/^/| /' conftest.$ac_ext >&5
29373 
29374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29375 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29376 as_fn_error $? "cannot compute suffix of object files: cannot compile
29377 See \`config.log' for more details" "$LINENO" 5; }
29378 fi
29379 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29380 fi
29381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29382 $as_echo "$ac_cv_objext" >&6; }
29383 OBJEXT=$ac_cv_objext
29384 ac_objext=$OBJEXT
29385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29386 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29387 if ${ac_cv_c_compiler_gnu+:} false; then :
29388   $as_echo_n "(cached) " >&6
29389 else
29390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29391 /* end confdefs.h.  */
29392 
29393 int
29394 main ()
29395 {
29396 #ifndef __GNUC__
29397        choke me
29398 #endif
29399 
29400   ;
29401   return 0;
29402 }
29403 _ACEOF
29404 if ac_fn_c_try_compile "$LINENO"; then :
29405   ac_compiler_gnu=yes
29406 else
29407   ac_compiler_gnu=no
29408 fi
29409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29410 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29411 
29412 fi
29413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29414 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29415 if test $ac_compiler_gnu = yes; then
29416   GCC=yes
29417 else
29418   GCC=
29419 fi
29420 ac_test_CFLAGS=${CFLAGS+set}
29421 ac_save_CFLAGS=$CFLAGS
29422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29423 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29424 if ${ac_cv_prog_cc_g+:} false; then :
29425   $as_echo_n "(cached) " >&6
29426 else
29427   ac_save_c_werror_flag=$ac_c_werror_flag
29428    ac_c_werror_flag=yes
29429    ac_cv_prog_cc_g=no
29430    CFLAGS="-g"
29431    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29432 /* end confdefs.h.  */
29433 
29434 int
29435 main ()
29436 {
29437 
29438   ;
29439   return 0;
29440 }
29441 _ACEOF
29442 if ac_fn_c_try_compile "$LINENO"; then :
29443   ac_cv_prog_cc_g=yes
29444 else
29445   CFLAGS=""
29446       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29447 /* end confdefs.h.  */
29448 
29449 int
29450 main ()
29451 {
29452 
29453   ;
29454   return 0;
29455 }
29456 _ACEOF
29457 if ac_fn_c_try_compile "$LINENO"; then :
29458 
29459 else
29460   ac_c_werror_flag=$ac_save_c_werror_flag
29461          CFLAGS="-g"
29462          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29463 /* end confdefs.h.  */
29464 
29465 int
29466 main ()
29467 {
29468 
29469   ;
29470   return 0;
29471 }
29472 _ACEOF
29473 if ac_fn_c_try_compile "$LINENO"; then :
29474   ac_cv_prog_cc_g=yes
29475 fi
29476 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29477 fi
29478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29479 fi
29480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29481    ac_c_werror_flag=$ac_save_c_werror_flag
29482 fi
29483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29484 $as_echo "$ac_cv_prog_cc_g" >&6; }
29485 if test "$ac_test_CFLAGS" = set; then
29486   CFLAGS=$ac_save_CFLAGS
29487 elif test $ac_cv_prog_cc_g = yes; then
29488   if test "$GCC" = yes; then
29489     CFLAGS="-g -O2"
29490   else
29491     CFLAGS="-g"
29492   fi
29493 else
29494   if test "$GCC" = yes; then
29495     CFLAGS="-O2"
29496   else
29497     CFLAGS=
29498   fi
29499 fi
29500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29501 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29502 if ${ac_cv_prog_cc_c89+:} false; then :
29503   $as_echo_n "(cached) " >&6
29504 else
29505   ac_cv_prog_cc_c89=no
29506 ac_save_CC=$CC
29507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29508 /* end confdefs.h.  */
29509 #include <stdarg.h>
29510 #include <stdio.h>
29511 struct stat;
29512 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29513 struct buf { int x; };
29514 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29515 static char *e (p, i)
29516      char **p;
29517      int i;
29518 {
29519   return p[i];
29520 }
29521 static char *f (char * (*g) (char **, int), char **p, ...)
29522 {
29523   char *s;
29524   va_list v;
29525   va_start (v,p);
29526   s = g (p, va_arg (v,int));
29527   va_end (v);
29528   return s;
29529 }
29530 
29531 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29532    function prototypes and stuff, but not '\xHH' hex character constants.
29533    These don't provoke an error unfortunately, instead are silently treated
29534    as 'x'.  The following induces an error, until -std is added to get
29535    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29536    array size at least.  It's necessary to write '\x00'==0 to get something
29537    that's true only with -std.  */
29538 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29539 
29540 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29541    inside strings and character constants.  */
29542 #define FOO(x) 'x'
29543 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29544 
29545 int test (int i, double x);
29546 struct s1 {int (*f) (int a);};
29547 struct s2 {int (*f) (double a);};
29548 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29549 int argc;
29550 char **argv;
29551 int
29552 main ()
29553 {
29554 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29555   ;
29556   return 0;
29557 }
29558 _ACEOF
29559 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29560         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29561 do
29562   CC="$ac_save_CC $ac_arg"
29563   if ac_fn_c_try_compile "$LINENO"; then :
29564   ac_cv_prog_cc_c89=$ac_arg
29565 fi
29566 rm -f core conftest.err conftest.$ac_objext
29567   test "x$ac_cv_prog_cc_c89" != "xno" && break
29568 done
29569 rm -f conftest.$ac_ext
29570 CC=$ac_save_CC
29571 
29572 fi
29573 # AC_CACHE_VAL
29574 case "x$ac_cv_prog_cc_c89" in
29575   x)
29576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29577 $as_echo "none needed" >&6; } ;;
29578   xno)
29579     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29580 $as_echo "unsupported" >&6; } ;;
29581   *)
29582     CC="$CC $ac_cv_prog_cc_c89"
29583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29584 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29585 esac
29586 if test "x$ac_cv_prog_cc_c89" != xno; then :
29587 
29588 fi
29589 
29590 ac_ext=cpp
29591 ac_cpp='$CXXCPP $CPPFLAGS'
29592 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29593 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29594 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29595 
29596 
29597 
29598   COMPILER_NAME=C++
29599   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29600 
29601   if test "x$CXX" != x; then
29602     # User has supplied compiler name already, always let that override.
29603     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29604 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29605     if test "x`basename $CXX`" = "x$CXX"; then
29606       # A command without a complete path is provided, search $PATH.
29607 
29608       for ac_prog in $CXX
29609 do
29610   # Extract the first word of "$ac_prog", so it can be a program name with args.
29611 set dummy $ac_prog; ac_word=$2
29612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29613 $as_echo_n "checking for $ac_word... " >&6; }
29614 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29615   $as_echo_n "(cached) " >&6
29616 else
29617   case $POTENTIAL_CXX in
29618   [\\/]* | ?:[\\/]*)
29619   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29620   ;;
29621   *)
29622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29623 for as_dir in $PATH
29624 do
29625   IFS=$as_save_IFS
29626   test -z "$as_dir" && as_dir=.
29627     for ac_exec_ext in '' $ac_executable_extensions; do
29628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29629     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29631     break 2
29632   fi
29633 done
29634   done
29635 IFS=$as_save_IFS
29636 
29637   ;;
29638 esac
29639 fi
29640 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29641 if test -n "$POTENTIAL_CXX"; then
29642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29643 $as_echo "$POTENTIAL_CXX" >&6; }
29644 else
29645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29646 $as_echo "no" >&6; }
29647 fi
29648 
29649 
29650   test -n "$POTENTIAL_CXX" && break
29651 done
29652 
29653       if test "x$POTENTIAL_CXX" != x; then
29654         CXX=$POTENTIAL_CXX
29655       else
29656         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29657       fi
29658     else
29659       # Otherwise it might already be a complete path
29660       if test ! -x "$CXX"; then
29661         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29662       fi
29663     fi
29664   else
29665     # No user supplied value. Locate compiler ourselves.
29666 
29667     # If we are cross compiling, assume cross compilation tools follows the
29668     # cross compilation standard where they are prefixed with the autoconf
29669     # standard name for the target. For example the binary
29670     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29671     # If we are not cross compiling, then the default compiler name will be
29672     # used.
29673 
29674     CXX=
29675     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29676     # before checking the rest of the PATH.
29677     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29678     # step, this should not be necessary.
29679     if test -n "$TOOLCHAIN_PATH"; then
29680       PATH_save="$PATH"
29681       PATH="$TOOLCHAIN_PATH"
29682       for ac_prog in $SEARCH_LIST
29683 do
29684   # Extract the first word of "$ac_prog", so it can be a program name with args.
29685 set dummy $ac_prog; ac_word=$2
29686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29687 $as_echo_n "checking for $ac_word... " >&6; }
29688 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29689   $as_echo_n "(cached) " >&6
29690 else
29691   case $TOOLCHAIN_PATH_CXX in
29692   [\\/]* | ?:[\\/]*)
29693   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29694   ;;
29695   *)
29696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29697 for as_dir in $PATH
29698 do
29699   IFS=$as_save_IFS
29700   test -z "$as_dir" && as_dir=.
29701     for ac_exec_ext in '' $ac_executable_extensions; do
29702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29703     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29705     break 2
29706   fi
29707 done
29708   done
29709 IFS=$as_save_IFS
29710 
29711   ;;
29712 esac
29713 fi
29714 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29715 if test -n "$TOOLCHAIN_PATH_CXX"; then
29716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29717 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29718 else
29719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29720 $as_echo "no" >&6; }
29721 fi
29722 
29723 
29724   test -n "$TOOLCHAIN_PATH_CXX" && break
29725 done
29726 
29727       CXX=$TOOLCHAIN_PATH_CXX
29728       PATH="$PATH_save"
29729     fi
29730 
29731     # AC_PATH_PROGS can't be run multiple times with the same variable,
29732     # so create a new name for this run.
29733     if test "x$CXX" = x; then
29734       for ac_prog in $SEARCH_LIST
29735 do
29736   # Extract the first word of "$ac_prog", so it can be a program name with args.
29737 set dummy $ac_prog; ac_word=$2
29738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29739 $as_echo_n "checking for $ac_word... " >&6; }
29740 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29741   $as_echo_n "(cached) " >&6
29742 else
29743   case $POTENTIAL_CXX in
29744   [\\/]* | ?:[\\/]*)
29745   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29746   ;;
29747   *)
29748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29749 for as_dir in $PATH
29750 do
29751   IFS=$as_save_IFS
29752   test -z "$as_dir" && as_dir=.
29753     for ac_exec_ext in '' $ac_executable_extensions; do
29754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29755     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29757     break 2
29758   fi
29759 done
29760   done
29761 IFS=$as_save_IFS
29762 
29763   ;;
29764 esac
29765 fi
29766 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29767 if test -n "$POTENTIAL_CXX"; then
29768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29769 $as_echo "$POTENTIAL_CXX" >&6; }
29770 else
29771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29772 $as_echo "no" >&6; }
29773 fi
29774 
29775 
29776   test -n "$POTENTIAL_CXX" && break
29777 done
29778 
29779       CXX=$POTENTIAL_CXX
29780     fi
29781 
29782     if test "x$CXX" = x; then
29783 
29784   # Print a helpful message on how to acquire the necessary build dependency.
29785   # devkit is the help tag: freetype, cups, pulse, alsa etc
29786   MISSING_DEPENDENCY=devkit
29787 
29788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29789     cygwin_help $MISSING_DEPENDENCY
29790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29791     msys_help $MISSING_DEPENDENCY
29792   else
29793     PKGHANDLER_COMMAND=
29794 
29795     case $PKGHANDLER in
29796       apt-get)
29797         apt_help     $MISSING_DEPENDENCY ;;
29798       yum)
29799         yum_help     $MISSING_DEPENDENCY ;;
29800       port)
29801         port_help    $MISSING_DEPENDENCY ;;
29802       pkgutil)
29803         pkgutil_help $MISSING_DEPENDENCY ;;
29804       pkgadd)
29805         pkgadd_help  $MISSING_DEPENDENCY ;;
29806     esac
29807 
29808     if test "x$PKGHANDLER_COMMAND" != x; then
29809       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29810     fi
29811   fi
29812 
29813       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29814     fi
29815   fi
29816 
29817   # Now we have a compiler binary in CXX. Make sure it's okay.
29818 
29819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29820 
29821   # First separate the path from the arguments. This will split at the first
29822   # space.
29823   complete="$CXX"
29824   path="${complete%% *}"
29825   tmp="$complete EOL"
29826   arguments="${tmp#* }"
29827 
29828   # Input might be given as Windows format, start by converting to
29829   # unix format.
29830   new_path=`$CYGPATH -u "$path"`
29831 
29832   # Now try to locate executable using which
29833   new_path=`$WHICH "$new_path" 2> /dev/null`
29834   # bat and cmd files are not always considered executable in cygwin causing which
29835   # to not find them
29836   if test "x$new_path" = x \
29837       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29838       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29839     new_path=`$CYGPATH -u "$path"`
29840   fi
29841   if test "x$new_path" = x; then
29842     # Oops. Which didn't find the executable.
29843     # The splitting of arguments from the executable at a space might have been incorrect,
29844     # since paths with space are more likely in Windows. Give it another try with the whole
29845     # argument.
29846     path="$complete"
29847     arguments="EOL"
29848     new_path=`$CYGPATH -u "$path"`
29849     new_path=`$WHICH "$new_path" 2> /dev/null`
29850     # bat and cmd files are not always considered executable in cygwin causing which
29851     # to not find them
29852     if test "x$new_path" = x \
29853         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29854         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29855       new_path=`$CYGPATH -u "$path"`
29856     fi
29857     if test "x$new_path" = x; then
29858       # It's still not found. Now this is an unrecoverable error.
29859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29860 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29861       has_space=`$ECHO "$complete" | $GREP " "`
29862       if test "x$has_space" != x; then
29863         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29864 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29865       fi
29866       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29867     fi
29868   fi
29869 
29870   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29871   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29872   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29873   # "foo.exe" is OK but "foo" is an error.
29874   #
29875   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29876   # It is also a way to make sure we got the proper file name for the real test later on.
29877   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29878   if test "x$test_shortpath" = x; then
29879     # Short path failed, file does not exist as specified.
29880     # Try adding .exe or .cmd
29881     if test -f "${new_path}.exe"; then
29882       input_to_shortpath="${new_path}.exe"
29883     elif test -f "${new_path}.cmd"; then
29884       input_to_shortpath="${new_path}.cmd"
29885     else
29886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29887 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29888       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29889 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29890       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29891     fi
29892   else
29893     input_to_shortpath="$new_path"
29894   fi
29895 
29896   # Call helper function which possibly converts this using DOS-style short mode.
29897   # If so, the updated path is stored in $new_path.
29898   new_path="$input_to_shortpath"
29899 
29900   input_path="$input_to_shortpath"
29901   # Check if we need to convert this using DOS-style short mode. If the path
29902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29903   # take no chances and rewrite it.
29904   # Note: m4 eats our [], so we need to use [ and ] instead.
29905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29906   if test "x$has_forbidden_chars" != x; then
29907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29908     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29909     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29910     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29911       # Going to short mode and back again did indeed matter. Since short mode is
29912       # case insensitive, let's make it lowercase to improve readability.
29913       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29914       # Now convert it back to Unix-stile (cygpath)
29915       input_path=`$CYGPATH -u "$shortmode_path"`
29916       new_path="$input_path"
29917     fi
29918   fi
29919 
29920   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29921   if test "x$test_cygdrive_prefix" = x; then
29922     # As a simple fix, exclude /usr/bin since it's not a real path.
29923     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29924       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29925       # a path prefixed by /cygdrive for fixpath to work.
29926       new_path="$CYGWIN_ROOT_PATH$input_path"
29927     fi
29928   fi
29929 
29930   # remove trailing .exe if any
29931   new_path="${new_path/%.exe/}"
29932 
29933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29934 
29935   # First separate the path from the arguments. This will split at the first
29936   # space.
29937   complete="$CXX"
29938   path="${complete%% *}"
29939   tmp="$complete EOL"
29940   arguments="${tmp#* }"
29941 
29942   # Input might be given as Windows format, start by converting to
29943   # unix format.
29944   new_path="$path"
29945 
29946   windows_path="$new_path"
29947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29948     unix_path=`$CYGPATH -u "$windows_path"`
29949     new_path="$unix_path"
29950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29952     new_path="$unix_path"
29953   fi
29954 
29955 
29956   # Now try to locate executable using which
29957   new_path=`$WHICH "$new_path" 2> /dev/null`
29958 
29959   if test "x$new_path" = x; then
29960     # Oops. Which didn't find the executable.
29961     # The splitting of arguments from the executable at a space might have been incorrect,
29962     # since paths with space are more likely in Windows. Give it another try with the whole
29963     # argument.
29964     path="$complete"
29965     arguments="EOL"
29966     new_path="$path"
29967 
29968   windows_path="$new_path"
29969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29970     unix_path=`$CYGPATH -u "$windows_path"`
29971     new_path="$unix_path"
29972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29974     new_path="$unix_path"
29975   fi
29976 
29977 
29978     new_path=`$WHICH "$new_path" 2> /dev/null`
29979     # bat and cmd files are not always considered executable in MSYS causing which
29980     # to not find them
29981     if test "x$new_path" = x \
29982         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29983         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29984       new_path="$path"
29985 
29986   windows_path="$new_path"
29987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29988     unix_path=`$CYGPATH -u "$windows_path"`
29989     new_path="$unix_path"
29990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29992     new_path="$unix_path"
29993   fi
29994 
29995     fi
29996 
29997     if test "x$new_path" = x; then
29998       # It's still not found. Now this is an unrecoverable error.
29999       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30000 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30001       has_space=`$ECHO "$complete" | $GREP " "`
30002       if test "x$has_space" != x; then
30003         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30005       fi
30006       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30007     fi
30008   fi
30009 
30010   # Now new_path has a complete unix path to the binary
30011   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30012     # Keep paths in /bin as-is, but remove trailing .exe if any
30013     new_path="${new_path/%.exe/}"
30014     # Do not save /bin paths to all_fixpath_prefixes!
30015   else
30016     # Not in mixed or Windows style, start by that.
30017     new_path=`cmd //c echo $new_path`
30018 
30019   input_path="$new_path"
30020   # Check if we need to convert this using DOS-style short mode. If the path
30021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30022   # take no chances and rewrite it.
30023   # Note: m4 eats our [], so we need to use [ and ] instead.
30024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30025   if test "x$has_forbidden_chars" != x; then
30026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30027     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30028   fi
30029 
30030     # Output is in $new_path
30031 
30032   windows_path="$new_path"
30033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30034     unix_path=`$CYGPATH -u "$windows_path"`
30035     new_path="$unix_path"
30036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30037     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30038     new_path="$unix_path"
30039   fi
30040 
30041     # remove trailing .exe if any
30042     new_path="${new_path/%.exe/}"
30043 
30044     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30045     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30046   fi
30047 
30048   else
30049     # We're on a unix platform. Hooray! :)
30050     # First separate the path from the arguments. This will split at the first
30051     # space.
30052     complete="$CXX"
30053     path="${complete%% *}"
30054     tmp="$complete EOL"
30055     arguments="${tmp#* }"
30056 
30057     # Cannot rely on the command "which" here since it doesn't always work.
30058     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30059     if test -z "$is_absolute_path"; then
30060       # Path to executable is not absolute. Find it.
30061       IFS_save="$IFS"
30062       IFS=:
30063       for p in $PATH; do
30064         if test -f "$p/$path" && test -x "$p/$path"; then
30065           new_path="$p/$path"
30066           break
30067         fi
30068       done
30069       IFS="$IFS_save"
30070     else
30071       # This is an absolute path, we can use it without further modifications.
30072       new_path="$path"
30073     fi
30074 
30075     if test "x$new_path" = x; then
30076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30077 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30078       has_space=`$ECHO "$complete" | $GREP " "`
30079       if test "x$has_space" != x; then
30080         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30081 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30082       fi
30083       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30084     fi
30085   fi
30086 
30087   # Now join together the path and the arguments once again
30088   if test "x$arguments" != xEOL; then
30089     new_complete="$new_path ${arguments% *}"
30090   else
30091     new_complete="$new_path"
30092   fi
30093 
30094   if test "x$complete" != "x$new_complete"; then
30095     CXX="$new_complete"
30096     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30097 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30098   fi
30099 
30100   TEST_COMPILER="$CXX"
30101   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30102   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30103   if test "x$OPENJDK_BUILD_OS" != xaix; then
30104     # FIXME: This test should not be needed anymore; we don't do that for any platform.
30105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30106 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30107 
30108   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30109     # Follow a chain of symbolic links. Use readlink
30110     # where it exists, else fall back to horribly
30111     # complicated shell code.
30112     if test "x$READLINK_TESTED" != yes; then
30113       # On MacOSX there is a readlink tool with a different
30114       # purpose than the GNU readlink tool. Check the found readlink.
30115       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30116       if test "x$ISGNU" = x; then
30117         # A readlink that we do not know how to use.
30118         # Are there other non-GNU readlinks out there?
30119         READLINK_TESTED=yes
30120         READLINK=
30121       fi
30122     fi
30123 
30124     if test "x$READLINK" != x; then
30125       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30126     else
30127       # Save the current directory for restoring afterwards
30128       STARTDIR=$PWD
30129       COUNTER=0
30130       sym_link_dir=`$DIRNAME $TEST_COMPILER`
30131       sym_link_file=`$BASENAME $TEST_COMPILER`
30132       cd $sym_link_dir
30133       # Use -P flag to resolve symlinks in directories.
30134       cd `$THEPWDCMD -P`
30135       sym_link_dir=`$THEPWDCMD -P`
30136       # Resolve file symlinks
30137       while test $COUNTER -lt 20; do
30138         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30139         if test "x$ISLINK" == x; then
30140           # This is not a symbolic link! We are done!
30141           break
30142         fi
30143         # Again resolve directory symlinks since the target of the just found
30144         # link could be in a different directory
30145         cd `$DIRNAME $ISLINK`
30146         sym_link_dir=`$THEPWDCMD -P`
30147         sym_link_file=`$BASENAME $ISLINK`
30148         let COUNTER=COUNTER+1
30149       done
30150       cd $STARTDIR
30151       TEST_COMPILER=$sym_link_dir/$sym_link_file
30152     fi
30153   fi
30154 
30155     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30156 $as_echo "$TEST_COMPILER" >&6; }
30157   fi
30158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30159 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
30160 
30161   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30162   if test "x$COMPILER_BASENAME" = "xccache"; then
30163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30164 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30165     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30166     # We want to control ccache invocation ourselves, so ignore this cc and try
30167     # searching again.
30168 
30169     # Remove the path to the fake ccache cc from the PATH
30170     RETRY_COMPILER_SAVED_PATH="$PATH"
30171     COMPILER_DIRNAME=`$DIRNAME $CXX`
30172     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30173 
30174     # Try again looking for our compiler
30175     if test -n "$ac_tool_prefix"; then
30176   for ac_prog in $TOOLCHAIN_CXX_BINARY
30177   do
30178     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30179 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30181 $as_echo_n "checking for $ac_word... " >&6; }
30182 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30183   $as_echo_n "(cached) " >&6
30184 else
30185   if test -n "$PROPER_COMPILER_CXX"; then
30186   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30187 else
30188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30189 for as_dir in $PATH
30190 do
30191   IFS=$as_save_IFS
30192   test -z "$as_dir" && as_dir=.
30193     for ac_exec_ext in '' $ac_executable_extensions; do
30194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30195     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30197     break 2
30198   fi
30199 done
30200   done
30201 IFS=$as_save_IFS
30202 
30203 fi
30204 fi
30205 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30206 if test -n "$PROPER_COMPILER_CXX"; then
30207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30208 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30209 else
30210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30211 $as_echo "no" >&6; }
30212 fi
30213 
30214 
30215     test -n "$PROPER_COMPILER_CXX" && break
30216   done
30217 fi
30218 if test -z "$PROPER_COMPILER_CXX"; then
30219   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30220   for ac_prog in $TOOLCHAIN_CXX_BINARY
30221 do
30222   # Extract the first word of "$ac_prog", so it can be a program name with args.
30223 set dummy $ac_prog; ac_word=$2
30224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30225 $as_echo_n "checking for $ac_word... " >&6; }
30226 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30227   $as_echo_n "(cached) " >&6
30228 else
30229   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30230   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30231 else
30232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30233 for as_dir in $PATH
30234 do
30235   IFS=$as_save_IFS
30236   test -z "$as_dir" && as_dir=.
30237     for ac_exec_ext in '' $ac_executable_extensions; do
30238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30239     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30241     break 2
30242   fi
30243 done
30244   done
30245 IFS=$as_save_IFS
30246 
30247 fi
30248 fi
30249 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30250 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30252 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30253 else
30254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30255 $as_echo "no" >&6; }
30256 fi
30257 
30258 
30259   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30260 done
30261 
30262   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30263     PROPER_COMPILER_CXX=""
30264   else
30265     case $cross_compiling:$ac_tool_warned in
30266 yes:)
30267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30268 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30269 ac_tool_warned=yes ;;
30270 esac
30271     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30272   fi
30273 fi
30274 
30275 
30276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30277 
30278   # First separate the path from the arguments. This will split at the first
30279   # space.
30280   complete="$PROPER_COMPILER_CXX"
30281   path="${complete%% *}"
30282   tmp="$complete EOL"
30283   arguments="${tmp#* }"
30284 
30285   # Input might be given as Windows format, start by converting to
30286   # unix format.
30287   new_path=`$CYGPATH -u "$path"`
30288 
30289   # Now try to locate executable using which
30290   new_path=`$WHICH "$new_path" 2> /dev/null`
30291   # bat and cmd files are not always considered executable in cygwin causing which
30292   # to not find them
30293   if test "x$new_path" = x \
30294       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30295       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30296     new_path=`$CYGPATH -u "$path"`
30297   fi
30298   if test "x$new_path" = x; then
30299     # Oops. Which didn't find the executable.
30300     # The splitting of arguments from the executable at a space might have been incorrect,
30301     # since paths with space are more likely in Windows. Give it another try with the whole
30302     # argument.
30303     path="$complete"
30304     arguments="EOL"
30305     new_path=`$CYGPATH -u "$path"`
30306     new_path=`$WHICH "$new_path" 2> /dev/null`
30307     # bat and cmd files are not always considered executable in cygwin causing which
30308     # to not find them
30309     if test "x$new_path" = x \
30310         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30311         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30312       new_path=`$CYGPATH -u "$path"`
30313     fi
30314     if test "x$new_path" = x; then
30315       # It's still not found. Now this is an unrecoverable error.
30316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30317 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30318       has_space=`$ECHO "$complete" | $GREP " "`
30319       if test "x$has_space" != x; then
30320         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30321 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30322       fi
30323       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30324     fi
30325   fi
30326 
30327   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30328   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30329   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30330   # "foo.exe" is OK but "foo" is an error.
30331   #
30332   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30333   # It is also a way to make sure we got the proper file name for the real test later on.
30334   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30335   if test "x$test_shortpath" = x; then
30336     # Short path failed, file does not exist as specified.
30337     # Try adding .exe or .cmd
30338     if test -f "${new_path}.exe"; then
30339       input_to_shortpath="${new_path}.exe"
30340     elif test -f "${new_path}.cmd"; then
30341       input_to_shortpath="${new_path}.cmd"
30342     else
30343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30344 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30345       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30346 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30347       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30348     fi
30349   else
30350     input_to_shortpath="$new_path"
30351   fi
30352 
30353   # Call helper function which possibly converts this using DOS-style short mode.
30354   # If so, the updated path is stored in $new_path.
30355   new_path="$input_to_shortpath"
30356 
30357   input_path="$input_to_shortpath"
30358   # Check if we need to convert this using DOS-style short mode. If the path
30359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30360   # take no chances and rewrite it.
30361   # Note: m4 eats our [], so we need to use [ and ] instead.
30362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30363   if test "x$has_forbidden_chars" != x; then
30364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30365     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30366     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30367     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30368       # Going to short mode and back again did indeed matter. Since short mode is
30369       # case insensitive, let's make it lowercase to improve readability.
30370       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30371       # Now convert it back to Unix-stile (cygpath)
30372       input_path=`$CYGPATH -u "$shortmode_path"`
30373       new_path="$input_path"
30374     fi
30375   fi
30376 
30377   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30378   if test "x$test_cygdrive_prefix" = x; then
30379     # As a simple fix, exclude /usr/bin since it's not a real path.
30380     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30381       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30382       # a path prefixed by /cygdrive for fixpath to work.
30383       new_path="$CYGWIN_ROOT_PATH$input_path"
30384     fi
30385   fi
30386 
30387   # remove trailing .exe if any
30388   new_path="${new_path/%.exe/}"
30389 
30390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30391 
30392   # First separate the path from the arguments. This will split at the first
30393   # space.
30394   complete="$PROPER_COMPILER_CXX"
30395   path="${complete%% *}"
30396   tmp="$complete EOL"
30397   arguments="${tmp#* }"
30398 
30399   # Input might be given as Windows format, start by converting to
30400   # unix format.
30401   new_path="$path"
30402 
30403   windows_path="$new_path"
30404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30405     unix_path=`$CYGPATH -u "$windows_path"`
30406     new_path="$unix_path"
30407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30409     new_path="$unix_path"
30410   fi
30411 
30412 
30413   # Now try to locate executable using which
30414   new_path=`$WHICH "$new_path" 2> /dev/null`
30415 
30416   if test "x$new_path" = x; then
30417     # Oops. Which didn't find the executable.
30418     # The splitting of arguments from the executable at a space might have been incorrect,
30419     # since paths with space are more likely in Windows. Give it another try with the whole
30420     # argument.
30421     path="$complete"
30422     arguments="EOL"
30423     new_path="$path"
30424 
30425   windows_path="$new_path"
30426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30427     unix_path=`$CYGPATH -u "$windows_path"`
30428     new_path="$unix_path"
30429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30431     new_path="$unix_path"
30432   fi
30433 
30434 
30435     new_path=`$WHICH "$new_path" 2> /dev/null`
30436     # bat and cmd files are not always considered executable in MSYS causing which
30437     # to not find them
30438     if test "x$new_path" = x \
30439         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30440         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30441       new_path="$path"
30442 
30443   windows_path="$new_path"
30444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30445     unix_path=`$CYGPATH -u "$windows_path"`
30446     new_path="$unix_path"
30447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30449     new_path="$unix_path"
30450   fi
30451 
30452     fi
30453 
30454     if test "x$new_path" = x; then
30455       # It's still not found. Now this is an unrecoverable error.
30456       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30457 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30458       has_space=`$ECHO "$complete" | $GREP " "`
30459       if test "x$has_space" != x; then
30460         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30461 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30462       fi
30463       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30464     fi
30465   fi
30466 
30467   # Now new_path has a complete unix path to the binary
30468   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30469     # Keep paths in /bin as-is, but remove trailing .exe if any
30470     new_path="${new_path/%.exe/}"
30471     # Do not save /bin paths to all_fixpath_prefixes!
30472   else
30473     # Not in mixed or Windows style, start by that.
30474     new_path=`cmd //c echo $new_path`
30475 
30476   input_path="$new_path"
30477   # Check if we need to convert this using DOS-style short mode. If the path
30478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30479   # take no chances and rewrite it.
30480   # Note: m4 eats our [], so we need to use [ and ] instead.
30481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30482   if test "x$has_forbidden_chars" != x; then
30483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30484     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30485   fi
30486 
30487     # Output is in $new_path
30488 
30489   windows_path="$new_path"
30490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30491     unix_path=`$CYGPATH -u "$windows_path"`
30492     new_path="$unix_path"
30493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30495     new_path="$unix_path"
30496   fi
30497 
30498     # remove trailing .exe if any
30499     new_path="${new_path/%.exe/}"
30500 
30501     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30502     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30503   fi
30504 
30505   else
30506     # We're on a unix platform. Hooray! :)
30507     # First separate the path from the arguments. This will split at the first
30508     # space.
30509     complete="$PROPER_COMPILER_CXX"
30510     path="${complete%% *}"
30511     tmp="$complete EOL"
30512     arguments="${tmp#* }"
30513 
30514     # Cannot rely on the command "which" here since it doesn't always work.
30515     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30516     if test -z "$is_absolute_path"; then
30517       # Path to executable is not absolute. Find it.
30518       IFS_save="$IFS"
30519       IFS=:
30520       for p in $PATH; do
30521         if test -f "$p/$path" && test -x "$p/$path"; then
30522           new_path="$p/$path"
30523           break
30524         fi
30525       done
30526       IFS="$IFS_save"
30527     else
30528       # This is an absolute path, we can use it without further modifications.
30529       new_path="$path"
30530     fi
30531 
30532     if test "x$new_path" = x; then
30533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30534 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30535       has_space=`$ECHO "$complete" | $GREP " "`
30536       if test "x$has_space" != x; then
30537         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30538 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30539       fi
30540       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30541     fi
30542   fi
30543 
30544   # Now join together the path and the arguments once again
30545   if test "x$arguments" != xEOL; then
30546     new_complete="$new_path ${arguments% *}"
30547   else
30548     new_complete="$new_path"
30549   fi
30550 
30551   if test "x$complete" != "x$new_complete"; then
30552     PROPER_COMPILER_CXX="$new_complete"
30553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30554 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30555   fi
30556 
30557     PATH="$RETRY_COMPILER_SAVED_PATH"
30558 
30559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30560 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30561 
30562   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30563     # Follow a chain of symbolic links. Use readlink
30564     # where it exists, else fall back to horribly
30565     # complicated shell code.
30566     if test "x$READLINK_TESTED" != yes; then
30567       # On MacOSX there is a readlink tool with a different
30568       # purpose than the GNU readlink tool. Check the found readlink.
30569       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30570       if test "x$ISGNU" = x; then
30571         # A readlink that we do not know how to use.
30572         # Are there other non-GNU readlinks out there?
30573         READLINK_TESTED=yes
30574         READLINK=
30575       fi
30576     fi
30577 
30578     if test "x$READLINK" != x; then
30579       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30580     else
30581       # Save the current directory for restoring afterwards
30582       STARTDIR=$PWD
30583       COUNTER=0
30584       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30585       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30586       cd $sym_link_dir
30587       # Use -P flag to resolve symlinks in directories.
30588       cd `$THEPWDCMD -P`
30589       sym_link_dir=`$THEPWDCMD -P`
30590       # Resolve file symlinks
30591       while test $COUNTER -lt 20; do
30592         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30593         if test "x$ISLINK" == x; then
30594           # This is not a symbolic link! We are done!
30595           break
30596         fi
30597         # Again resolve directory symlinks since the target of the just found
30598         # link could be in a different directory
30599         cd `$DIRNAME $ISLINK`
30600         sym_link_dir=`$THEPWDCMD -P`
30601         sym_link_file=`$BASENAME $ISLINK`
30602         let COUNTER=COUNTER+1
30603       done
30604       cd $STARTDIR
30605       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30606     fi
30607   fi
30608 
30609     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30610 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30611     CXX="$PROPER_COMPILER_CXX"
30612   else
30613     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30614 $as_echo "no, keeping CXX" >&6; }
30615   fi
30616 
30617 
30618   COMPILER=$CXX
30619   COMPILER_NAME=$COMPILER_NAME
30620 
30621   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30622     # cc -V output typically looks like
30623     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30624     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30625     # Check that this is likely to be the Solaris Studio cc.
30626     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30627     if test $? -ne 0; then
30628       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30629       { $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
30630 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30631       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30632 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30633       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30634 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30635       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30636     fi
30637     # Remove usage instructions (if present), and
30638     # collapse compiler output into a single line
30639     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30640         $SED -e 's/ *[Uu]sage:.*//'`
30641     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30642         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30643   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30644     # xlc -qversion output typically looks like
30645     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30646     #     Version: 11.01.0000.0015
30647     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30648     # Check that this is likely to be the IBM XL C compiler.
30649     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30650     if test $? -ne 0; then
30651       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30652       { $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
30653 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30654       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30655 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30656       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30657 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30658       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30659     fi
30660     # Collapse compiler output into a single line
30661     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30662     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30663         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30664   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30665     # There is no specific version flag, but all output starts with a version string.
30666     # First line typically looks something like:
30667     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30668     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30669     # Check that this is likely to be Microsoft CL.EXE.
30670     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30671     if test $? -ne 0; then
30672       { $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
30673 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30674       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30675 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30676       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30677     fi
30678     # Collapse compiler output into a single line
30679     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30680     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30681         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30682   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30683     # gcc --version output typically looks like
30684     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30685     #     Copyright (C) 2013 Free Software Foundation, Inc.
30686     #     This is free software; see the source for copying conditions.  There is NO
30687     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30688     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30689     # Check that this is likely to be GCC.
30690     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30691     if test $? -ne 0; then
30692       { $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
30693 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30694       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30695 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30696       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30697     fi
30698     # Remove Copyright and legalese from version string, and
30699     # collapse into a single line
30700     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30701         $SED -e 's/ *Copyright .*//'`
30702     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30703         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30704   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30705     # clang --version output typically looks like
30706     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30707     #    clang version 3.3 (tags/RELEASE_33/final)
30708     # or
30709     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30710     #    Target: x86_64-pc-linux-gnu
30711     #    Thread model: posix
30712     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30713     # Check that this is likely to be clang
30714     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30715     if test $? -ne 0; then
30716       { $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
30717 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30718       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30719 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30720       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30721     fi
30722     # Collapse compiler output into a single line
30723     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30724     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30725         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30726   else
30727       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30728   fi
30729   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30730   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30731   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30732   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30733 
30734   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30735 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30736 
30737 
30738   # Now that we have resolved CXX ourself, let autoconf have its go at it
30739   ac_ext=cpp
30740 ac_cpp='$CXXCPP $CPPFLAGS'
30741 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30742 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30743 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30744 if test -z "$CXX"; then
30745   if test -n "$CCC"; then
30746     CXX=$CCC
30747   else
30748     if test -n "$ac_tool_prefix"; then
30749   for ac_prog in $CXX
30750   do
30751     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30752 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30754 $as_echo_n "checking for $ac_word... " >&6; }
30755 if ${ac_cv_prog_CXX+:} false; then :
30756   $as_echo_n "(cached) " >&6
30757 else
30758   if test -n "$CXX"; then
30759   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30760 else
30761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30762 for as_dir in $PATH
30763 do
30764   IFS=$as_save_IFS
30765   test -z "$as_dir" && as_dir=.
30766     for ac_exec_ext in '' $ac_executable_extensions; do
30767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30768     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30770     break 2
30771   fi
30772 done
30773   done
30774 IFS=$as_save_IFS
30775 
30776 fi
30777 fi
30778 CXX=$ac_cv_prog_CXX
30779 if test -n "$CXX"; then
30780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30781 $as_echo "$CXX" >&6; }
30782 else
30783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30784 $as_echo "no" >&6; }
30785 fi
30786 
30787 
30788     test -n "$CXX" && break
30789   done
30790 fi
30791 if test -z "$CXX"; then
30792   ac_ct_CXX=$CXX
30793   for ac_prog in $CXX
30794 do
30795   # Extract the first word of "$ac_prog", so it can be a program name with args.
30796 set dummy $ac_prog; ac_word=$2
30797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30798 $as_echo_n "checking for $ac_word... " >&6; }
30799 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30800   $as_echo_n "(cached) " >&6
30801 else
30802   if test -n "$ac_ct_CXX"; then
30803   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30804 else
30805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30806 for as_dir in $PATH
30807 do
30808   IFS=$as_save_IFS
30809   test -z "$as_dir" && as_dir=.
30810     for ac_exec_ext in '' $ac_executable_extensions; do
30811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30812     ac_cv_prog_ac_ct_CXX="$ac_prog"
30813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30814     break 2
30815   fi
30816 done
30817   done
30818 IFS=$as_save_IFS
30819 
30820 fi
30821 fi
30822 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30823 if test -n "$ac_ct_CXX"; then
30824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30825 $as_echo "$ac_ct_CXX" >&6; }
30826 else
30827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30828 $as_echo "no" >&6; }
30829 fi
30830 
30831 
30832   test -n "$ac_ct_CXX" && break
30833 done
30834 
30835   if test "x$ac_ct_CXX" = x; then
30836     CXX="g++"
30837   else
30838     case $cross_compiling:$ac_tool_warned in
30839 yes:)
30840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30841 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30842 ac_tool_warned=yes ;;
30843 esac
30844     CXX=$ac_ct_CXX
30845   fi
30846 fi
30847 
30848   fi
30849 fi
30850 # Provide some information about the compiler.
30851 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30852 set X $ac_compile
30853 ac_compiler=$2
30854 for ac_option in --version -v -V -qversion; do
30855   { { ac_try="$ac_compiler $ac_option >&5"
30856 case "(($ac_try" in
30857   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30858   *) ac_try_echo=$ac_try;;
30859 esac
30860 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30861 $as_echo "$ac_try_echo"; } >&5
30862   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30863   ac_status=$?
30864   if test -s conftest.err; then
30865     sed '10a\
30866 ... rest of stderr output deleted ...
30867          10q' conftest.err >conftest.er1
30868     cat conftest.er1 >&5
30869   fi
30870   rm -f conftest.er1 conftest.err
30871   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30872   test $ac_status = 0; }
30873 done
30874 
30875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30876 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30877 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30878   $as_echo_n "(cached) " >&6
30879 else
30880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30881 /* end confdefs.h.  */
30882 
30883 int
30884 main ()
30885 {
30886 #ifndef __GNUC__
30887        choke me
30888 #endif
30889 
30890   ;
30891   return 0;
30892 }
30893 _ACEOF
30894 if ac_fn_cxx_try_compile "$LINENO"; then :
30895   ac_compiler_gnu=yes
30896 else
30897   ac_compiler_gnu=no
30898 fi
30899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30900 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30901 
30902 fi
30903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30904 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30905 if test $ac_compiler_gnu = yes; then
30906   GXX=yes
30907 else
30908   GXX=
30909 fi
30910 ac_test_CXXFLAGS=${CXXFLAGS+set}
30911 ac_save_CXXFLAGS=$CXXFLAGS
30912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30913 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30914 if ${ac_cv_prog_cxx_g+:} false; then :
30915   $as_echo_n "(cached) " >&6
30916 else
30917   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30918    ac_cxx_werror_flag=yes
30919    ac_cv_prog_cxx_g=no
30920    CXXFLAGS="-g"
30921    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30922 /* end confdefs.h.  */
30923 
30924 int
30925 main ()
30926 {
30927 
30928   ;
30929   return 0;
30930 }
30931 _ACEOF
30932 if ac_fn_cxx_try_compile "$LINENO"; then :
30933   ac_cv_prog_cxx_g=yes
30934 else
30935   CXXFLAGS=""
30936       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30937 /* end confdefs.h.  */
30938 
30939 int
30940 main ()
30941 {
30942 
30943   ;
30944   return 0;
30945 }
30946 _ACEOF
30947 if ac_fn_cxx_try_compile "$LINENO"; then :
30948 
30949 else
30950   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30951          CXXFLAGS="-g"
30952          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30953 /* end confdefs.h.  */
30954 
30955 int
30956 main ()
30957 {
30958 
30959   ;
30960   return 0;
30961 }
30962 _ACEOF
30963 if ac_fn_cxx_try_compile "$LINENO"; then :
30964   ac_cv_prog_cxx_g=yes
30965 fi
30966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30967 fi
30968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30969 fi
30970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30971    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30972 fi
30973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30974 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30975 if test "$ac_test_CXXFLAGS" = set; then
30976   CXXFLAGS=$ac_save_CXXFLAGS
30977 elif test $ac_cv_prog_cxx_g = yes; then
30978   if test "$GXX" = yes; then
30979     CXXFLAGS="-g -O2"
30980   else
30981     CXXFLAGS="-g"
30982   fi
30983 else
30984   if test "$GXX" = yes; then
30985     CXXFLAGS="-O2"
30986   else
30987     CXXFLAGS=
30988   fi
30989 fi
30990 ac_ext=cpp
30991 ac_cpp='$CXXCPP $CPPFLAGS'
30992 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30993 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30994 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30995 
30996 
30997   #
30998   # Setup the preprocessor (CPP and CXXCPP)
30999   #
31000   ac_ext=c
31001 ac_cpp='$CPP $CPPFLAGS'
31002 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31003 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31004 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31006 $as_echo_n "checking how to run the C preprocessor... " >&6; }
31007 # On Suns, sometimes $CPP names a directory.
31008 if test -n "$CPP" && test -d "$CPP"; then
31009   CPP=
31010 fi
31011 if test -z "$CPP"; then
31012   if ${ac_cv_prog_CPP+:} false; then :
31013   $as_echo_n "(cached) " >&6
31014 else
31015       # Double quotes because CPP needs to be expanded
31016     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31017     do
31018       ac_preproc_ok=false
31019 for ac_c_preproc_warn_flag in '' yes
31020 do
31021   # Use a header file that comes with gcc, so configuring glibc
31022   # with a fresh cross-compiler works.
31023   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31024   # <limits.h> exists even on freestanding compilers.
31025   # On the NeXT, cc -E runs the code through the compiler's parser,
31026   # not just through cpp. "Syntax error" is here to catch this case.
31027   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31028 /* end confdefs.h.  */
31029 #ifdef __STDC__
31030 # include <limits.h>
31031 #else
31032 # include <assert.h>
31033 #endif
31034                      Syntax error
31035 _ACEOF
31036 if ac_fn_c_try_cpp "$LINENO"; then :
31037 
31038 else
31039   # Broken: fails on valid input.
31040 continue
31041 fi
31042 rm -f conftest.err conftest.i conftest.$ac_ext
31043 
31044   # OK, works on sane cases.  Now check whether nonexistent headers
31045   # can be detected and how.
31046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31047 /* end confdefs.h.  */
31048 #include <ac_nonexistent.h>
31049 _ACEOF
31050 if ac_fn_c_try_cpp "$LINENO"; then :
31051   # Broken: success on invalid input.
31052 continue
31053 else
31054   # Passes both tests.
31055 ac_preproc_ok=:
31056 break
31057 fi
31058 rm -f conftest.err conftest.i conftest.$ac_ext
31059 
31060 done
31061 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31062 rm -f conftest.i conftest.err conftest.$ac_ext
31063 if $ac_preproc_ok; then :
31064   break
31065 fi
31066 
31067     done
31068     ac_cv_prog_CPP=$CPP
31069 
31070 fi
31071   CPP=$ac_cv_prog_CPP
31072 else
31073   ac_cv_prog_CPP=$CPP
31074 fi
31075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31076 $as_echo "$CPP" >&6; }
31077 ac_preproc_ok=false
31078 for ac_c_preproc_warn_flag in '' yes
31079 do
31080   # Use a header file that comes with gcc, so configuring glibc
31081   # with a fresh cross-compiler works.
31082   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31083   # <limits.h> exists even on freestanding compilers.
31084   # On the NeXT, cc -E runs the code through the compiler's parser,
31085   # not just through cpp. "Syntax error" is here to catch this case.
31086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31087 /* end confdefs.h.  */
31088 #ifdef __STDC__
31089 # include <limits.h>
31090 #else
31091 # include <assert.h>
31092 #endif
31093                      Syntax error
31094 _ACEOF
31095 if ac_fn_c_try_cpp "$LINENO"; then :
31096 
31097 else
31098   # Broken: fails on valid input.
31099 continue
31100 fi
31101 rm -f conftest.err conftest.i conftest.$ac_ext
31102 
31103   # OK, works on sane cases.  Now check whether nonexistent headers
31104   # can be detected and how.
31105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31106 /* end confdefs.h.  */
31107 #include <ac_nonexistent.h>
31108 _ACEOF
31109 if ac_fn_c_try_cpp "$LINENO"; then :
31110   # Broken: success on invalid input.
31111 continue
31112 else
31113   # Passes both tests.
31114 ac_preproc_ok=:
31115 break
31116 fi
31117 rm -f conftest.err conftest.i conftest.$ac_ext
31118 
31119 done
31120 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31121 rm -f conftest.i conftest.err conftest.$ac_ext
31122 if $ac_preproc_ok; then :
31123 
31124 else
31125   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31127 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31128 See \`config.log' for more details" "$LINENO" 5; }
31129 fi
31130 
31131 ac_ext=cpp
31132 ac_cpp='$CXXCPP $CPPFLAGS'
31133 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31134 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31135 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31136 
31137 
31138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31139 
31140   # First separate the path from the arguments. This will split at the first
31141   # space.
31142   complete="$CPP"
31143   path="${complete%% *}"
31144   tmp="$complete EOL"
31145   arguments="${tmp#* }"
31146 
31147   # Input might be given as Windows format, start by converting to
31148   # unix format.
31149   new_path=`$CYGPATH -u "$path"`
31150 
31151   # Now try to locate executable using which
31152   new_path=`$WHICH "$new_path" 2> /dev/null`
31153   # bat and cmd files are not always considered executable in cygwin causing which
31154   # to not find them
31155   if test "x$new_path" = x \
31156       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31157       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31158     new_path=`$CYGPATH -u "$path"`
31159   fi
31160   if test "x$new_path" = x; then
31161     # Oops. Which didn't find the executable.
31162     # The splitting of arguments from the executable at a space might have been incorrect,
31163     # since paths with space are more likely in Windows. Give it another try with the whole
31164     # argument.
31165     path="$complete"
31166     arguments="EOL"
31167     new_path=`$CYGPATH -u "$path"`
31168     new_path=`$WHICH "$new_path" 2> /dev/null`
31169     # bat and cmd files are not always considered executable in cygwin causing which
31170     # to not find them
31171     if test "x$new_path" = x \
31172         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31173         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31174       new_path=`$CYGPATH -u "$path"`
31175     fi
31176     if test "x$new_path" = x; then
31177       # It's still not found. Now this is an unrecoverable error.
31178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31179 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31180       has_space=`$ECHO "$complete" | $GREP " "`
31181       if test "x$has_space" != x; then
31182         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31183 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31184       fi
31185       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31186     fi
31187   fi
31188 
31189   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31190   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31191   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31192   # "foo.exe" is OK but "foo" is an error.
31193   #
31194   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31195   # It is also a way to make sure we got the proper file name for the real test later on.
31196   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31197   if test "x$test_shortpath" = x; then
31198     # Short path failed, file does not exist as specified.
31199     # Try adding .exe or .cmd
31200     if test -f "${new_path}.exe"; then
31201       input_to_shortpath="${new_path}.exe"
31202     elif test -f "${new_path}.cmd"; then
31203       input_to_shortpath="${new_path}.cmd"
31204     else
31205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31206 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31207       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31208 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31209       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31210     fi
31211   else
31212     input_to_shortpath="$new_path"
31213   fi
31214 
31215   # Call helper function which possibly converts this using DOS-style short mode.
31216   # If so, the updated path is stored in $new_path.
31217   new_path="$input_to_shortpath"
31218 
31219   input_path="$input_to_shortpath"
31220   # Check if we need to convert this using DOS-style short mode. If the path
31221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31222   # take no chances and rewrite it.
31223   # Note: m4 eats our [], so we need to use [ and ] instead.
31224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31225   if test "x$has_forbidden_chars" != x; then
31226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31227     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31228     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31229     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31230       # Going to short mode and back again did indeed matter. Since short mode is
31231       # case insensitive, let's make it lowercase to improve readability.
31232       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31233       # Now convert it back to Unix-stile (cygpath)
31234       input_path=`$CYGPATH -u "$shortmode_path"`
31235       new_path="$input_path"
31236     fi
31237   fi
31238 
31239   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31240   if test "x$test_cygdrive_prefix" = x; then
31241     # As a simple fix, exclude /usr/bin since it's not a real path.
31242     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31243       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31244       # a path prefixed by /cygdrive for fixpath to work.
31245       new_path="$CYGWIN_ROOT_PATH$input_path"
31246     fi
31247   fi
31248 
31249   # remove trailing .exe if any
31250   new_path="${new_path/%.exe/}"
31251 
31252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31253 
31254   # First separate the path from the arguments. This will split at the first
31255   # space.
31256   complete="$CPP"
31257   path="${complete%% *}"
31258   tmp="$complete EOL"
31259   arguments="${tmp#* }"
31260 
31261   # Input might be given as Windows format, start by converting to
31262   # unix format.
31263   new_path="$path"
31264 
31265   windows_path="$new_path"
31266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31267     unix_path=`$CYGPATH -u "$windows_path"`
31268     new_path="$unix_path"
31269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31271     new_path="$unix_path"
31272   fi
31273 
31274 
31275   # Now try to locate executable using which
31276   new_path=`$WHICH "$new_path" 2> /dev/null`
31277 
31278   if test "x$new_path" = x; then
31279     # Oops. Which didn't find the executable.
31280     # The splitting of arguments from the executable at a space might have been incorrect,
31281     # since paths with space are more likely in Windows. Give it another try with the whole
31282     # argument.
31283     path="$complete"
31284     arguments="EOL"
31285     new_path="$path"
31286 
31287   windows_path="$new_path"
31288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31289     unix_path=`$CYGPATH -u "$windows_path"`
31290     new_path="$unix_path"
31291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31293     new_path="$unix_path"
31294   fi
31295 
31296 
31297     new_path=`$WHICH "$new_path" 2> /dev/null`
31298     # bat and cmd files are not always considered executable in MSYS causing which
31299     # to not find them
31300     if test "x$new_path" = x \
31301         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31302         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31303       new_path="$path"
31304 
31305   windows_path="$new_path"
31306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31307     unix_path=`$CYGPATH -u "$windows_path"`
31308     new_path="$unix_path"
31309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31311     new_path="$unix_path"
31312   fi
31313 
31314     fi
31315 
31316     if test "x$new_path" = x; then
31317       # It's still not found. Now this is an unrecoverable error.
31318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31319 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31320       has_space=`$ECHO "$complete" | $GREP " "`
31321       if test "x$has_space" != x; then
31322         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31323 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31324       fi
31325       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31326     fi
31327   fi
31328 
31329   # Now new_path has a complete unix path to the binary
31330   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31331     # Keep paths in /bin as-is, but remove trailing .exe if any
31332     new_path="${new_path/%.exe/}"
31333     # Do not save /bin paths to all_fixpath_prefixes!
31334   else
31335     # Not in mixed or Windows style, start by that.
31336     new_path=`cmd //c echo $new_path`
31337 
31338   input_path="$new_path"
31339   # Check if we need to convert this using DOS-style short mode. If the path
31340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31341   # take no chances and rewrite it.
31342   # Note: m4 eats our [], so we need to use [ and ] instead.
31343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31344   if test "x$has_forbidden_chars" != x; then
31345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31346     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31347   fi
31348 
31349     # Output is in $new_path
31350 
31351   windows_path="$new_path"
31352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31353     unix_path=`$CYGPATH -u "$windows_path"`
31354     new_path="$unix_path"
31355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31357     new_path="$unix_path"
31358   fi
31359 
31360     # remove trailing .exe if any
31361     new_path="${new_path/%.exe/}"
31362 
31363     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31364     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31365   fi
31366 
31367   else
31368     # We're on a unix platform. Hooray! :)
31369     # First separate the path from the arguments. This will split at the first
31370     # space.
31371     complete="$CPP"
31372     path="${complete%% *}"
31373     tmp="$complete EOL"
31374     arguments="${tmp#* }"
31375 
31376     # Cannot rely on the command "which" here since it doesn't always work.
31377     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31378     if test -z "$is_absolute_path"; then
31379       # Path to executable is not absolute. Find it.
31380       IFS_save="$IFS"
31381       IFS=:
31382       for p in $PATH; do
31383         if test -f "$p/$path" && test -x "$p/$path"; then
31384           new_path="$p/$path"
31385           break
31386         fi
31387       done
31388       IFS="$IFS_save"
31389     else
31390       # This is an absolute path, we can use it without further modifications.
31391       new_path="$path"
31392     fi
31393 
31394     if test "x$new_path" = x; then
31395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31396 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31397       has_space=`$ECHO "$complete" | $GREP " "`
31398       if test "x$has_space" != x; then
31399         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31400 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31401       fi
31402       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31403     fi
31404   fi
31405 
31406   # Now join together the path and the arguments once again
31407   if test "x$arguments" != xEOL; then
31408     new_complete="$new_path ${arguments% *}"
31409   else
31410     new_complete="$new_path"
31411   fi
31412 
31413   if test "x$complete" != "x$new_complete"; then
31414     CPP="$new_complete"
31415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31416 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31417   fi
31418 
31419   ac_ext=cpp
31420 ac_cpp='$CXXCPP $CPPFLAGS'
31421 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31422 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31423 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31425 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31426 if test -z "$CXXCPP"; then
31427   if ${ac_cv_prog_CXXCPP+:} false; then :
31428   $as_echo_n "(cached) " >&6
31429 else
31430       # Double quotes because CXXCPP needs to be expanded
31431     for CXXCPP in "$CXX -E" "/lib/cpp"
31432     do
31433       ac_preproc_ok=false
31434 for ac_cxx_preproc_warn_flag in '' yes
31435 do
31436   # Use a header file that comes with gcc, so configuring glibc
31437   # with a fresh cross-compiler works.
31438   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31439   # <limits.h> exists even on freestanding compilers.
31440   # On the NeXT, cc -E runs the code through the compiler's parser,
31441   # not just through cpp. "Syntax error" is here to catch this case.
31442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31443 /* end confdefs.h.  */
31444 #ifdef __STDC__
31445 # include <limits.h>
31446 #else
31447 # include <assert.h>
31448 #endif
31449                      Syntax error
31450 _ACEOF
31451 if ac_fn_cxx_try_cpp "$LINENO"; then :
31452 
31453 else
31454   # Broken: fails on valid input.
31455 continue
31456 fi
31457 rm -f conftest.err conftest.i conftest.$ac_ext
31458 
31459   # OK, works on sane cases.  Now check whether nonexistent headers
31460   # can be detected and how.
31461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31462 /* end confdefs.h.  */
31463 #include <ac_nonexistent.h>
31464 _ACEOF
31465 if ac_fn_cxx_try_cpp "$LINENO"; then :
31466   # Broken: success on invalid input.
31467 continue
31468 else
31469   # Passes both tests.
31470 ac_preproc_ok=:
31471 break
31472 fi
31473 rm -f conftest.err conftest.i conftest.$ac_ext
31474 
31475 done
31476 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31477 rm -f conftest.i conftest.err conftest.$ac_ext
31478 if $ac_preproc_ok; then :
31479   break
31480 fi
31481 
31482     done
31483     ac_cv_prog_CXXCPP=$CXXCPP
31484 
31485 fi
31486   CXXCPP=$ac_cv_prog_CXXCPP
31487 else
31488   ac_cv_prog_CXXCPP=$CXXCPP
31489 fi
31490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31491 $as_echo "$CXXCPP" >&6; }
31492 ac_preproc_ok=false
31493 for ac_cxx_preproc_warn_flag in '' yes
31494 do
31495   # Use a header file that comes with gcc, so configuring glibc
31496   # with a fresh cross-compiler works.
31497   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31498   # <limits.h> exists even on freestanding compilers.
31499   # On the NeXT, cc -E runs the code through the compiler's parser,
31500   # not just through cpp. "Syntax error" is here to catch this case.
31501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31502 /* end confdefs.h.  */
31503 #ifdef __STDC__
31504 # include <limits.h>
31505 #else
31506 # include <assert.h>
31507 #endif
31508                      Syntax error
31509 _ACEOF
31510 if ac_fn_cxx_try_cpp "$LINENO"; then :
31511 
31512 else
31513   # Broken: fails on valid input.
31514 continue
31515 fi
31516 rm -f conftest.err conftest.i conftest.$ac_ext
31517 
31518   # OK, works on sane cases.  Now check whether nonexistent headers
31519   # can be detected and how.
31520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31521 /* end confdefs.h.  */
31522 #include <ac_nonexistent.h>
31523 _ACEOF
31524 if ac_fn_cxx_try_cpp "$LINENO"; then :
31525   # Broken: success on invalid input.
31526 continue
31527 else
31528   # Passes both tests.
31529 ac_preproc_ok=:
31530 break
31531 fi
31532 rm -f conftest.err conftest.i conftest.$ac_ext
31533 
31534 done
31535 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31536 rm -f conftest.i conftest.err conftest.$ac_ext
31537 if $ac_preproc_ok; then :
31538 
31539 else
31540   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31542 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31543 See \`config.log' for more details" "$LINENO" 5; }
31544 fi
31545 
31546 ac_ext=cpp
31547 ac_cpp='$CXXCPP $CPPFLAGS'
31548 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31549 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31550 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31551 
31552 
31553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31554 
31555   # First separate the path from the arguments. This will split at the first
31556   # space.
31557   complete="$CXXCPP"
31558   path="${complete%% *}"
31559   tmp="$complete EOL"
31560   arguments="${tmp#* }"
31561 
31562   # Input might be given as Windows format, start by converting to
31563   # unix format.
31564   new_path=`$CYGPATH -u "$path"`
31565 
31566   # Now try to locate executable using which
31567   new_path=`$WHICH "$new_path" 2> /dev/null`
31568   # bat and cmd files are not always considered executable in cygwin causing which
31569   # to not find them
31570   if test "x$new_path" = x \
31571       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31572       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31573     new_path=`$CYGPATH -u "$path"`
31574   fi
31575   if test "x$new_path" = x; then
31576     # Oops. Which didn't find the executable.
31577     # The splitting of arguments from the executable at a space might have been incorrect,
31578     # since paths with space are more likely in Windows. Give it another try with the whole
31579     # argument.
31580     path="$complete"
31581     arguments="EOL"
31582     new_path=`$CYGPATH -u "$path"`
31583     new_path=`$WHICH "$new_path" 2> /dev/null`
31584     # bat and cmd files are not always considered executable in cygwin causing which
31585     # to not find them
31586     if test "x$new_path" = x \
31587         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31588         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31589       new_path=`$CYGPATH -u "$path"`
31590     fi
31591     if test "x$new_path" = x; then
31592       # It's still not found. Now this is an unrecoverable error.
31593       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31594 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31595       has_space=`$ECHO "$complete" | $GREP " "`
31596       if test "x$has_space" != x; then
31597         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31598 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31599       fi
31600       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31601     fi
31602   fi
31603 
31604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31607   # "foo.exe" is OK but "foo" is an error.
31608   #
31609   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31610   # It is also a way to make sure we got the proper file name for the real test later on.
31611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31612   if test "x$test_shortpath" = x; then
31613     # Short path failed, file does not exist as specified.
31614     # Try adding .exe or .cmd
31615     if test -f "${new_path}.exe"; then
31616       input_to_shortpath="${new_path}.exe"
31617     elif test -f "${new_path}.cmd"; then
31618       input_to_shortpath="${new_path}.cmd"
31619     else
31620       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31621 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31622       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31623 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31624       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31625     fi
31626   else
31627     input_to_shortpath="$new_path"
31628   fi
31629 
31630   # Call helper function which possibly converts this using DOS-style short mode.
31631   # If so, the updated path is stored in $new_path.
31632   new_path="$input_to_shortpath"
31633 
31634   input_path="$input_to_shortpath"
31635   # Check if we need to convert this using DOS-style short mode. If the path
31636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31637   # take no chances and rewrite it.
31638   # Note: m4 eats our [], so we need to use [ and ] instead.
31639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31640   if test "x$has_forbidden_chars" != x; then
31641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31642     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31643     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31644     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31645       # Going to short mode and back again did indeed matter. Since short mode is
31646       # case insensitive, let's make it lowercase to improve readability.
31647       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31648       # Now convert it back to Unix-stile (cygpath)
31649       input_path=`$CYGPATH -u "$shortmode_path"`
31650       new_path="$input_path"
31651     fi
31652   fi
31653 
31654   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31655   if test "x$test_cygdrive_prefix" = x; then
31656     # As a simple fix, exclude /usr/bin since it's not a real path.
31657     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31658       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31659       # a path prefixed by /cygdrive for fixpath to work.
31660       new_path="$CYGWIN_ROOT_PATH$input_path"
31661     fi
31662   fi
31663 
31664   # remove trailing .exe if any
31665   new_path="${new_path/%.exe/}"
31666 
31667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31668 
31669   # First separate the path from the arguments. This will split at the first
31670   # space.
31671   complete="$CXXCPP"
31672   path="${complete%% *}"
31673   tmp="$complete EOL"
31674   arguments="${tmp#* }"
31675 
31676   # Input might be given as Windows format, start by converting to
31677   # unix format.
31678   new_path="$path"
31679 
31680   windows_path="$new_path"
31681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31682     unix_path=`$CYGPATH -u "$windows_path"`
31683     new_path="$unix_path"
31684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31686     new_path="$unix_path"
31687   fi
31688 
31689 
31690   # Now try to locate executable using which
31691   new_path=`$WHICH "$new_path" 2> /dev/null`
31692 
31693   if test "x$new_path" = x; then
31694     # Oops. Which didn't find the executable.
31695     # The splitting of arguments from the executable at a space might have been incorrect,
31696     # since paths with space are more likely in Windows. Give it another try with the whole
31697     # argument.
31698     path="$complete"
31699     arguments="EOL"
31700     new_path="$path"
31701 
31702   windows_path="$new_path"
31703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31704     unix_path=`$CYGPATH -u "$windows_path"`
31705     new_path="$unix_path"
31706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31708     new_path="$unix_path"
31709   fi
31710 
31711 
31712     new_path=`$WHICH "$new_path" 2> /dev/null`
31713     # bat and cmd files are not always considered executable in MSYS causing which
31714     # to not find them
31715     if test "x$new_path" = x \
31716         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31717         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31718       new_path="$path"
31719 
31720   windows_path="$new_path"
31721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31722     unix_path=`$CYGPATH -u "$windows_path"`
31723     new_path="$unix_path"
31724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31726     new_path="$unix_path"
31727   fi
31728 
31729     fi
31730 
31731     if test "x$new_path" = x; then
31732       # It's still not found. Now this is an unrecoverable error.
31733       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31734 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31735       has_space=`$ECHO "$complete" | $GREP " "`
31736       if test "x$has_space" != x; then
31737         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31738 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31739       fi
31740       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31741     fi
31742   fi
31743 
31744   # Now new_path has a complete unix path to the binary
31745   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31746     # Keep paths in /bin as-is, but remove trailing .exe if any
31747     new_path="${new_path/%.exe/}"
31748     # Do not save /bin paths to all_fixpath_prefixes!
31749   else
31750     # Not in mixed or Windows style, start by that.
31751     new_path=`cmd //c echo $new_path`
31752 
31753   input_path="$new_path"
31754   # Check if we need to convert this using DOS-style short mode. If the path
31755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31756   # take no chances and rewrite it.
31757   # Note: m4 eats our [], so we need to use [ and ] instead.
31758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31759   if test "x$has_forbidden_chars" != x; then
31760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31762   fi
31763 
31764     # Output is in $new_path
31765 
31766   windows_path="$new_path"
31767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31768     unix_path=`$CYGPATH -u "$windows_path"`
31769     new_path="$unix_path"
31770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31772     new_path="$unix_path"
31773   fi
31774 
31775     # remove trailing .exe if any
31776     new_path="${new_path/%.exe/}"
31777 
31778     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31779     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31780   fi
31781 
31782   else
31783     # We're on a unix platform. Hooray! :)
31784     # First separate the path from the arguments. This will split at the first
31785     # space.
31786     complete="$CXXCPP"
31787     path="${complete%% *}"
31788     tmp="$complete EOL"
31789     arguments="${tmp#* }"
31790 
31791     # Cannot rely on the command "which" here since it doesn't always work.
31792     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31793     if test -z "$is_absolute_path"; then
31794       # Path to executable is not absolute. Find it.
31795       IFS_save="$IFS"
31796       IFS=:
31797       for p in $PATH; do
31798         if test -f "$p/$path" && test -x "$p/$path"; then
31799           new_path="$p/$path"
31800           break
31801         fi
31802       done
31803       IFS="$IFS_save"
31804     else
31805       # This is an absolute path, we can use it without further modifications.
31806       new_path="$path"
31807     fi
31808 
31809     if test "x$new_path" = x; then
31810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31811 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31812       has_space=`$ECHO "$complete" | $GREP " "`
31813       if test "x$has_space" != x; then
31814         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31815 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31816       fi
31817       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31818     fi
31819   fi
31820 
31821   # Now join together the path and the arguments once again
31822   if test "x$arguments" != xEOL; then
31823     new_complete="$new_path ${arguments% *}"
31824   else
31825     new_complete="$new_path"
31826   fi
31827 
31828   if test "x$complete" != "x$new_complete"; then
31829     CXXCPP="$new_complete"
31830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31831 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31832   fi
31833 
31834 
31835   #
31836   # Setup the linker (LD)
31837   #
31838   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31839     # In the Microsoft toolchain we have a separate LD command "link".
31840     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31841     # a cygwin program for something completely different.
31842     # Extract the first word of "link", so it can be a program name with args.
31843 set dummy link; ac_word=$2
31844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31845 $as_echo_n "checking for $ac_word... " >&6; }
31846 if ${ac_cv_prog_LD+:} false; then :
31847   $as_echo_n "(cached) " >&6
31848 else
31849   if test -n "$LD"; then
31850   ac_cv_prog_LD="$LD" # Let the user override the test.
31851 else
31852   ac_prog_rejected=no
31853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31854 for as_dir in $PATH
31855 do
31856   IFS=$as_save_IFS
31857   test -z "$as_dir" && as_dir=.
31858     for ac_exec_ext in '' $ac_executable_extensions; do
31859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31860     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31861        ac_prog_rejected=yes
31862        continue
31863      fi
31864     ac_cv_prog_LD="link"
31865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31866     break 2
31867   fi
31868 done
31869   done
31870 IFS=$as_save_IFS
31871 
31872 if test $ac_prog_rejected = yes; then
31873   # We found a bogon in the path, so make sure we never use it.
31874   set dummy $ac_cv_prog_LD
31875   shift
31876   if test $# != 0; then
31877     # We chose a different compiler from the bogus one.
31878     # However, it has the same basename, so the bogon will be chosen
31879     # first if we set LD to just the basename; use the full file name.
31880     shift
31881     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31882   fi
31883 fi
31884 fi
31885 fi
31886 LD=$ac_cv_prog_LD
31887 if test -n "$LD"; then
31888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31889 $as_echo "$LD" >&6; }
31890 else
31891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31892 $as_echo "no" >&6; }
31893 fi
31894 
31895 
31896 
31897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31898 
31899   # First separate the path from the arguments. This will split at the first
31900   # space.
31901   complete="$LD"
31902   path="${complete%% *}"
31903   tmp="$complete EOL"
31904   arguments="${tmp#* }"
31905 
31906   # Input might be given as Windows format, start by converting to
31907   # unix format.
31908   new_path=`$CYGPATH -u "$path"`
31909 
31910   # Now try to locate executable using which
31911   new_path=`$WHICH "$new_path" 2> /dev/null`
31912   # bat and cmd files are not always considered executable in cygwin causing which
31913   # to not find them
31914   if test "x$new_path" = x \
31915       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31916       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31917     new_path=`$CYGPATH -u "$path"`
31918   fi
31919   if test "x$new_path" = x; then
31920     # Oops. Which didn't find the executable.
31921     # The splitting of arguments from the executable at a space might have been incorrect,
31922     # since paths with space are more likely in Windows. Give it another try with the whole
31923     # argument.
31924     path="$complete"
31925     arguments="EOL"
31926     new_path=`$CYGPATH -u "$path"`
31927     new_path=`$WHICH "$new_path" 2> /dev/null`
31928     # bat and cmd files are not always considered executable in cygwin causing which
31929     # to not find them
31930     if test "x$new_path" = x \
31931         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31932         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31933       new_path=`$CYGPATH -u "$path"`
31934     fi
31935     if test "x$new_path" = x; then
31936       # It's still not found. Now this is an unrecoverable error.
31937       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31938 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31939       has_space=`$ECHO "$complete" | $GREP " "`
31940       if test "x$has_space" != x; then
31941         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31942 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31943       fi
31944       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31945     fi
31946   fi
31947 
31948   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31949   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31950   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31951   # "foo.exe" is OK but "foo" is an error.
31952   #
31953   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31954   # It is also a way to make sure we got the proper file name for the real test later on.
31955   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31956   if test "x$test_shortpath" = x; then
31957     # Short path failed, file does not exist as specified.
31958     # Try adding .exe or .cmd
31959     if test -f "${new_path}.exe"; then
31960       input_to_shortpath="${new_path}.exe"
31961     elif test -f "${new_path}.cmd"; then
31962       input_to_shortpath="${new_path}.cmd"
31963     else
31964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31965 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31966       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31967 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31968       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31969     fi
31970   else
31971     input_to_shortpath="$new_path"
31972   fi
31973 
31974   # Call helper function which possibly converts this using DOS-style short mode.
31975   # If so, the updated path is stored in $new_path.
31976   new_path="$input_to_shortpath"
31977 
31978   input_path="$input_to_shortpath"
31979   # Check if we need to convert this using DOS-style short mode. If the path
31980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31981   # take no chances and rewrite it.
31982   # Note: m4 eats our [], so we need to use [ and ] instead.
31983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31984   if test "x$has_forbidden_chars" != x; then
31985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31986     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31987     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31988     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31989       # Going to short mode and back again did indeed matter. Since short mode is
31990       # case insensitive, let's make it lowercase to improve readability.
31991       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31992       # Now convert it back to Unix-stile (cygpath)
31993       input_path=`$CYGPATH -u "$shortmode_path"`
31994       new_path="$input_path"
31995     fi
31996   fi
31997 
31998   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31999   if test "x$test_cygdrive_prefix" = x; then
32000     # As a simple fix, exclude /usr/bin since it's not a real path.
32001     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32002       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32003       # a path prefixed by /cygdrive for fixpath to work.
32004       new_path="$CYGWIN_ROOT_PATH$input_path"
32005     fi
32006   fi
32007 
32008   # remove trailing .exe if any
32009   new_path="${new_path/%.exe/}"
32010 
32011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32012 
32013   # First separate the path from the arguments. This will split at the first
32014   # space.
32015   complete="$LD"
32016   path="${complete%% *}"
32017   tmp="$complete EOL"
32018   arguments="${tmp#* }"
32019 
32020   # Input might be given as Windows format, start by converting to
32021   # unix format.
32022   new_path="$path"
32023 
32024   windows_path="$new_path"
32025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32026     unix_path=`$CYGPATH -u "$windows_path"`
32027     new_path="$unix_path"
32028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32030     new_path="$unix_path"
32031   fi
32032 
32033 
32034   # Now try to locate executable using which
32035   new_path=`$WHICH "$new_path" 2> /dev/null`
32036 
32037   if test "x$new_path" = x; then
32038     # Oops. Which didn't find the executable.
32039     # The splitting of arguments from the executable at a space might have been incorrect,
32040     # since paths with space are more likely in Windows. Give it another try with the whole
32041     # argument.
32042     path="$complete"
32043     arguments="EOL"
32044     new_path="$path"
32045 
32046   windows_path="$new_path"
32047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32048     unix_path=`$CYGPATH -u "$windows_path"`
32049     new_path="$unix_path"
32050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32052     new_path="$unix_path"
32053   fi
32054 
32055 
32056     new_path=`$WHICH "$new_path" 2> /dev/null`
32057     # bat and cmd files are not always considered executable in MSYS causing which
32058     # to not find them
32059     if test "x$new_path" = x \
32060         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32061         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32062       new_path="$path"
32063 
32064   windows_path="$new_path"
32065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32066     unix_path=`$CYGPATH -u "$windows_path"`
32067     new_path="$unix_path"
32068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32070     new_path="$unix_path"
32071   fi
32072 
32073     fi
32074 
32075     if test "x$new_path" = x; then
32076       # It's still not found. Now this is an unrecoverable error.
32077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32078 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32079       has_space=`$ECHO "$complete" | $GREP " "`
32080       if test "x$has_space" != x; then
32081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32083       fi
32084       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32085     fi
32086   fi
32087 
32088   # Now new_path has a complete unix path to the binary
32089   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32090     # Keep paths in /bin as-is, but remove trailing .exe if any
32091     new_path="${new_path/%.exe/}"
32092     # Do not save /bin paths to all_fixpath_prefixes!
32093   else
32094     # Not in mixed or Windows style, start by that.
32095     new_path=`cmd //c echo $new_path`
32096 
32097   input_path="$new_path"
32098   # Check if we need to convert this using DOS-style short mode. If the path
32099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32100   # take no chances and rewrite it.
32101   # Note: m4 eats our [], so we need to use [ and ] instead.
32102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32103   if test "x$has_forbidden_chars" != x; then
32104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32105     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32106   fi
32107 
32108     # Output is in $new_path
32109 
32110   windows_path="$new_path"
32111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32112     unix_path=`$CYGPATH -u "$windows_path"`
32113     new_path="$unix_path"
32114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32116     new_path="$unix_path"
32117   fi
32118 
32119     # remove trailing .exe if any
32120     new_path="${new_path/%.exe/}"
32121 
32122     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32123     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32124   fi
32125 
32126   else
32127     # We're on a unix platform. Hooray! :)
32128     # First separate the path from the arguments. This will split at the first
32129     # space.
32130     complete="$LD"
32131     path="${complete%% *}"
32132     tmp="$complete EOL"
32133     arguments="${tmp#* }"
32134 
32135     # Cannot rely on the command "which" here since it doesn't always work.
32136     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32137     if test -z "$is_absolute_path"; then
32138       # Path to executable is not absolute. Find it.
32139       IFS_save="$IFS"
32140       IFS=:
32141       for p in $PATH; do
32142         if test -f "$p/$path" && test -x "$p/$path"; then
32143           new_path="$p/$path"
32144           break
32145         fi
32146       done
32147       IFS="$IFS_save"
32148     else
32149       # This is an absolute path, we can use it without further modifications.
32150       new_path="$path"
32151     fi
32152 
32153     if test "x$new_path" = x; then
32154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32155 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32156       has_space=`$ECHO "$complete" | $GREP " "`
32157       if test "x$has_space" != x; then
32158         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32159 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32160       fi
32161       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32162     fi
32163   fi
32164 
32165   # Now join together the path and the arguments once again
32166   if test "x$arguments" != xEOL; then
32167     new_complete="$new_path ${arguments% *}"
32168   else
32169     new_complete="$new_path"
32170   fi
32171 
32172   if test "x$complete" != "x$new_complete"; then
32173     LD="$new_complete"
32174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32175 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32176   fi
32177 
32178     # Verify that we indeed succeeded with this trick.
32179     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32180 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32181     "$LD" --version > /dev/null
32182     if test $? -eq 0 ; then
32183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32184 $as_echo "no" >&6; }
32185       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32186     else
32187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32188 $as_echo "yes" >&6; }
32189     fi
32190     LDCXX="$LD"
32191   else
32192     # All other toolchains use the compiler to link.
32193     LD="$CC"
32194     LDCXX="$CXX"
32195   fi
32196 
32197   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32198 
32199 
32200   #
32201   # Setup the assembler (AS)
32202   #
32203   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32204     # FIXME: should this really be solaris, or solstudio?
32205 
32206 
32207   # Publish this variable in the help.
32208 
32209 
32210   if test "x$AS" = x; then
32211     # The variable is not set by user, try to locate tool using the code snippet
32212     for ac_prog in as
32213 do
32214   # Extract the first word of "$ac_prog", so it can be a program name with args.
32215 set dummy $ac_prog; ac_word=$2
32216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32217 $as_echo_n "checking for $ac_word... " >&6; }
32218 if ${ac_cv_path_AS+:} false; then :
32219   $as_echo_n "(cached) " >&6
32220 else
32221   case $AS in
32222   [\\/]* | ?:[\\/]*)
32223   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32224   ;;
32225   *)
32226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32227 for as_dir in $PATH
32228 do
32229   IFS=$as_save_IFS
32230   test -z "$as_dir" && as_dir=.
32231     for ac_exec_ext in '' $ac_executable_extensions; do
32232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32233     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32235     break 2
32236   fi
32237 done
32238   done
32239 IFS=$as_save_IFS
32240 
32241   ;;
32242 esac
32243 fi
32244 AS=$ac_cv_path_AS
32245 if test -n "$AS"; then
32246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32247 $as_echo "$AS" >&6; }
32248 else
32249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32250 $as_echo "no" >&6; }
32251 fi
32252 
32253 
32254   test -n "$AS" && break
32255 done
32256 
32257   else
32258     # The variable is set, but is it from the command line or the environment?
32259 
32260     # Try to remove the string !AS! from our list.
32261     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32262     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32263       # If it failed, the variable was not from the command line. Ignore it,
32264       # but warn the user (except for BASH, which is always set by the calling BASH).
32265       if test "xAS" != xBASH; then
32266         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32267 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32268       fi
32269       # Try to locate tool using the code snippet
32270       for ac_prog in as
32271 do
32272   # Extract the first word of "$ac_prog", so it can be a program name with args.
32273 set dummy $ac_prog; ac_word=$2
32274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32275 $as_echo_n "checking for $ac_word... " >&6; }
32276 if ${ac_cv_path_AS+:} false; then :
32277   $as_echo_n "(cached) " >&6
32278 else
32279   case $AS in
32280   [\\/]* | ?:[\\/]*)
32281   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32282   ;;
32283   *)
32284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32285 for as_dir in $PATH
32286 do
32287   IFS=$as_save_IFS
32288   test -z "$as_dir" && as_dir=.
32289     for ac_exec_ext in '' $ac_executable_extensions; do
32290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32291     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32293     break 2
32294   fi
32295 done
32296   done
32297 IFS=$as_save_IFS
32298 
32299   ;;
32300 esac
32301 fi
32302 AS=$ac_cv_path_AS
32303 if test -n "$AS"; then
32304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32305 $as_echo "$AS" >&6; }
32306 else
32307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32308 $as_echo "no" >&6; }
32309 fi
32310 
32311 
32312   test -n "$AS" && break
32313 done
32314 
32315     else
32316       # If it succeeded, then it was overridden by the user. We will use it
32317       # for the tool.
32318 
32319       # First remove it from the list of overridden variables, so we can test
32320       # for unknown variables in the end.
32321       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32322 
32323       # Check if the provided tool contains a complete path.
32324       tool_specified="$AS"
32325       tool_basename="${tool_specified##*/}"
32326       if test "x$tool_basename" = "x$tool_specified"; then
32327         # A command without a complete path is provided, search $PATH.
32328         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32329 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32330         # Extract the first word of "$tool_basename", so it can be a program name with args.
32331 set dummy $tool_basename; ac_word=$2
32332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32333 $as_echo_n "checking for $ac_word... " >&6; }
32334 if ${ac_cv_path_AS+:} false; then :
32335   $as_echo_n "(cached) " >&6
32336 else
32337   case $AS in
32338   [\\/]* | ?:[\\/]*)
32339   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32340   ;;
32341   *)
32342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32343 for as_dir in $PATH
32344 do
32345   IFS=$as_save_IFS
32346   test -z "$as_dir" && as_dir=.
32347     for ac_exec_ext in '' $ac_executable_extensions; do
32348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32349     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32351     break 2
32352   fi
32353 done
32354   done
32355 IFS=$as_save_IFS
32356 
32357   ;;
32358 esac
32359 fi
32360 AS=$ac_cv_path_AS
32361 if test -n "$AS"; then
32362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32363 $as_echo "$AS" >&6; }
32364 else
32365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32366 $as_echo "no" >&6; }
32367 fi
32368 
32369 
32370         if test "x$AS" = x; then
32371           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32372         fi
32373       else
32374         # Otherwise we believe it is a complete path. Use it as it is.
32375         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32376 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32378 $as_echo_n "checking for AS... " >&6; }
32379         if test ! -x "$tool_specified"; then
32380           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32381 $as_echo "not found" >&6; }
32382           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32383         fi
32384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32385 $as_echo "$tool_specified" >&6; }
32386       fi
32387     fi
32388   fi
32389 
32390 
32391 
32392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32393 
32394   # First separate the path from the arguments. This will split at the first
32395   # space.
32396   complete="$AS"
32397   path="${complete%% *}"
32398   tmp="$complete EOL"
32399   arguments="${tmp#* }"
32400 
32401   # Input might be given as Windows format, start by converting to
32402   # unix format.
32403   new_path=`$CYGPATH -u "$path"`
32404 
32405   # Now try to locate executable using which
32406   new_path=`$WHICH "$new_path" 2> /dev/null`
32407   # bat and cmd files are not always considered executable in cygwin causing which
32408   # to not find them
32409   if test "x$new_path" = x \
32410       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32411       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32412     new_path=`$CYGPATH -u "$path"`
32413   fi
32414   if test "x$new_path" = x; then
32415     # Oops. Which didn't find the executable.
32416     # The splitting of arguments from the executable at a space might have been incorrect,
32417     # since paths with space are more likely in Windows. Give it another try with the whole
32418     # argument.
32419     path="$complete"
32420     arguments="EOL"
32421     new_path=`$CYGPATH -u "$path"`
32422     new_path=`$WHICH "$new_path" 2> /dev/null`
32423     # bat and cmd files are not always considered executable in cygwin causing which
32424     # to not find them
32425     if test "x$new_path" = x \
32426         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32427         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32428       new_path=`$CYGPATH -u "$path"`
32429     fi
32430     if test "x$new_path" = x; then
32431       # It's still not found. Now this is an unrecoverable error.
32432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32433 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32434       has_space=`$ECHO "$complete" | $GREP " "`
32435       if test "x$has_space" != x; then
32436         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32437 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32438       fi
32439       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32440     fi
32441   fi
32442 
32443   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32444   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32445   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32446   # "foo.exe" is OK but "foo" is an error.
32447   #
32448   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32449   # It is also a way to make sure we got the proper file name for the real test later on.
32450   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32451   if test "x$test_shortpath" = x; then
32452     # Short path failed, file does not exist as specified.
32453     # Try adding .exe or .cmd
32454     if test -f "${new_path}.exe"; then
32455       input_to_shortpath="${new_path}.exe"
32456     elif test -f "${new_path}.cmd"; then
32457       input_to_shortpath="${new_path}.cmd"
32458     else
32459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32460 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32461       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32462 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32463       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32464     fi
32465   else
32466     input_to_shortpath="$new_path"
32467   fi
32468 
32469   # Call helper function which possibly converts this using DOS-style short mode.
32470   # If so, the updated path is stored in $new_path.
32471   new_path="$input_to_shortpath"
32472 
32473   input_path="$input_to_shortpath"
32474   # Check if we need to convert this using DOS-style short mode. If the path
32475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32476   # take no chances and rewrite it.
32477   # Note: m4 eats our [], so we need to use [ and ] instead.
32478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32479   if test "x$has_forbidden_chars" != x; then
32480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32481     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32482     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32483     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32484       # Going to short mode and back again did indeed matter. Since short mode is
32485       # case insensitive, let's make it lowercase to improve readability.
32486       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32487       # Now convert it back to Unix-stile (cygpath)
32488       input_path=`$CYGPATH -u "$shortmode_path"`
32489       new_path="$input_path"
32490     fi
32491   fi
32492 
32493   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32494   if test "x$test_cygdrive_prefix" = x; then
32495     # As a simple fix, exclude /usr/bin since it's not a real path.
32496     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32497       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32498       # a path prefixed by /cygdrive for fixpath to work.
32499       new_path="$CYGWIN_ROOT_PATH$input_path"
32500     fi
32501   fi
32502 
32503   # remove trailing .exe if any
32504   new_path="${new_path/%.exe/}"
32505 
32506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32507 
32508   # First separate the path from the arguments. This will split at the first
32509   # space.
32510   complete="$AS"
32511   path="${complete%% *}"
32512   tmp="$complete EOL"
32513   arguments="${tmp#* }"
32514 
32515   # Input might be given as Windows format, start by converting to
32516   # unix format.
32517   new_path="$path"
32518 
32519   windows_path="$new_path"
32520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32521     unix_path=`$CYGPATH -u "$windows_path"`
32522     new_path="$unix_path"
32523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32525     new_path="$unix_path"
32526   fi
32527 
32528 
32529   # Now try to locate executable using which
32530   new_path=`$WHICH "$new_path" 2> /dev/null`
32531 
32532   if test "x$new_path" = x; then
32533     # Oops. Which didn't find the executable.
32534     # The splitting of arguments from the executable at a space might have been incorrect,
32535     # since paths with space are more likely in Windows. Give it another try with the whole
32536     # argument.
32537     path="$complete"
32538     arguments="EOL"
32539     new_path="$path"
32540 
32541   windows_path="$new_path"
32542   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32543     unix_path=`$CYGPATH -u "$windows_path"`
32544     new_path="$unix_path"
32545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32546     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32547     new_path="$unix_path"
32548   fi
32549 
32550 
32551     new_path=`$WHICH "$new_path" 2> /dev/null`
32552     # bat and cmd files are not always considered executable in MSYS causing which
32553     # to not find them
32554     if test "x$new_path" = x \
32555         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32556         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32557       new_path="$path"
32558 
32559   windows_path="$new_path"
32560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32561     unix_path=`$CYGPATH -u "$windows_path"`
32562     new_path="$unix_path"
32563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32565     new_path="$unix_path"
32566   fi
32567 
32568     fi
32569 
32570     if test "x$new_path" = x; then
32571       # It's still not found. Now this is an unrecoverable error.
32572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32573 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32574       has_space=`$ECHO "$complete" | $GREP " "`
32575       if test "x$has_space" != x; then
32576         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32577 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32578       fi
32579       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32580     fi
32581   fi
32582 
32583   # Now new_path has a complete unix path to the binary
32584   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32585     # Keep paths in /bin as-is, but remove trailing .exe if any
32586     new_path="${new_path/%.exe/}"
32587     # Do not save /bin paths to all_fixpath_prefixes!
32588   else
32589     # Not in mixed or Windows style, start by that.
32590     new_path=`cmd //c echo $new_path`
32591 
32592   input_path="$new_path"
32593   # Check if we need to convert this using DOS-style short mode. If the path
32594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32595   # take no chances and rewrite it.
32596   # Note: m4 eats our [], so we need to use [ and ] instead.
32597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32598   if test "x$has_forbidden_chars" != x; then
32599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32601   fi
32602 
32603     # Output is in $new_path
32604 
32605   windows_path="$new_path"
32606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32607     unix_path=`$CYGPATH -u "$windows_path"`
32608     new_path="$unix_path"
32609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32611     new_path="$unix_path"
32612   fi
32613 
32614     # remove trailing .exe if any
32615     new_path="${new_path/%.exe/}"
32616 
32617     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32618     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32619   fi
32620 
32621   else
32622     # We're on a unix platform. Hooray! :)
32623     # First separate the path from the arguments. This will split at the first
32624     # space.
32625     complete="$AS"
32626     path="${complete%% *}"
32627     tmp="$complete EOL"
32628     arguments="${tmp#* }"
32629 
32630     # Cannot rely on the command "which" here since it doesn't always work.
32631     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32632     if test -z "$is_absolute_path"; then
32633       # Path to executable is not absolute. Find it.
32634       IFS_save="$IFS"
32635       IFS=:
32636       for p in $PATH; do
32637         if test -f "$p/$path" && test -x "$p/$path"; then
32638           new_path="$p/$path"
32639           break
32640         fi
32641       done
32642       IFS="$IFS_save"
32643     else
32644       # This is an absolute path, we can use it without further modifications.
32645       new_path="$path"
32646     fi
32647 
32648     if test "x$new_path" = x; then
32649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32650 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32651       has_space=`$ECHO "$complete" | $GREP " "`
32652       if test "x$has_space" != x; then
32653         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32654 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32655       fi
32656       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32657     fi
32658   fi
32659 
32660   # Now join together the path and the arguments once again
32661   if test "x$arguments" != xEOL; then
32662     new_complete="$new_path ${arguments% *}"
32663   else
32664     new_complete="$new_path"
32665   fi
32666 
32667   if test "x$complete" != "x$new_complete"; then
32668     AS="$new_complete"
32669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32670 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32671   fi
32672 
32673   else
32674     # FIXME: is this correct for microsoft?
32675     AS="$CC -c"
32676   fi
32677 
32678 
32679   #
32680   # Setup the archiver (AR)
32681   #
32682   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32683     # The corresponding ar tool is lib.exe (used to create static libraries)
32684     # Extract the first word of "lib", so it can be a program name with args.
32685 set dummy lib; ac_word=$2
32686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32687 $as_echo_n "checking for $ac_word... " >&6; }
32688 if ${ac_cv_prog_AR+:} false; then :
32689   $as_echo_n "(cached) " >&6
32690 else
32691   if test -n "$AR"; then
32692   ac_cv_prog_AR="$AR" # Let the user override the test.
32693 else
32694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32695 for as_dir in $PATH
32696 do
32697   IFS=$as_save_IFS
32698   test -z "$as_dir" && as_dir=.
32699     for ac_exec_ext in '' $ac_executable_extensions; do
32700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32701     ac_cv_prog_AR="lib"
32702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32703     break 2
32704   fi
32705 done
32706   done
32707 IFS=$as_save_IFS
32708 
32709 fi
32710 fi
32711 AR=$ac_cv_prog_AR
32712 if test -n "$AR"; then
32713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32714 $as_echo "$AR" >&6; }
32715 else
32716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32717 $as_echo "no" >&6; }
32718 fi
32719 
32720 
32721   else
32722 
32723 
32724   # Publish this variable in the help.
32725 
32726 
32727   if test "x$AR" = x; then
32728     # The variable is not set by user, try to locate tool using the code snippet
32729     if test -n "$ac_tool_prefix"; then
32730   for ac_prog in ar
32731   do
32732     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32735 $as_echo_n "checking for $ac_word... " >&6; }
32736 if ${ac_cv_prog_AR+:} false; then :
32737   $as_echo_n "(cached) " >&6
32738 else
32739   if test -n "$AR"; then
32740   ac_cv_prog_AR="$AR" # Let the user override the test.
32741 else
32742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32743 for as_dir in $PATH
32744 do
32745   IFS=$as_save_IFS
32746   test -z "$as_dir" && as_dir=.
32747     for ac_exec_ext in '' $ac_executable_extensions; do
32748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32749     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32751     break 2
32752   fi
32753 done
32754   done
32755 IFS=$as_save_IFS
32756 
32757 fi
32758 fi
32759 AR=$ac_cv_prog_AR
32760 if test -n "$AR"; then
32761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32762 $as_echo "$AR" >&6; }
32763 else
32764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32765 $as_echo "no" >&6; }
32766 fi
32767 
32768 
32769     test -n "$AR" && break
32770   done
32771 fi
32772 if test -z "$AR"; then
32773   ac_ct_AR=$AR
32774   for ac_prog in ar
32775 do
32776   # Extract the first word of "$ac_prog", so it can be a program name with args.
32777 set dummy $ac_prog; ac_word=$2
32778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32779 $as_echo_n "checking for $ac_word... " >&6; }
32780 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32781   $as_echo_n "(cached) " >&6
32782 else
32783   if test -n "$ac_ct_AR"; then
32784   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32785 else
32786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32787 for as_dir in $PATH
32788 do
32789   IFS=$as_save_IFS
32790   test -z "$as_dir" && as_dir=.
32791     for ac_exec_ext in '' $ac_executable_extensions; do
32792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32793     ac_cv_prog_ac_ct_AR="$ac_prog"
32794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32795     break 2
32796   fi
32797 done
32798   done
32799 IFS=$as_save_IFS
32800 
32801 fi
32802 fi
32803 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32804 if test -n "$ac_ct_AR"; then
32805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32806 $as_echo "$ac_ct_AR" >&6; }
32807 else
32808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32809 $as_echo "no" >&6; }
32810 fi
32811 
32812 
32813   test -n "$ac_ct_AR" && break
32814 done
32815 
32816   if test "x$ac_ct_AR" = x; then
32817     AR=""
32818   else
32819     case $cross_compiling:$ac_tool_warned in
32820 yes:)
32821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32822 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32823 ac_tool_warned=yes ;;
32824 esac
32825     AR=$ac_ct_AR
32826   fi
32827 fi
32828 
32829   else
32830     # The variable is set, but is it from the command line or the environment?
32831 
32832     # Try to remove the string !AR! from our list.
32833     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32834     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32835       # If it failed, the variable was not from the command line. Ignore it,
32836       # but warn the user (except for BASH, which is always set by the calling BASH).
32837       if test "xAR" != xBASH; then
32838         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32839 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32840       fi
32841       # Try to locate tool using the code snippet
32842       if test -n "$ac_tool_prefix"; then
32843   for ac_prog in ar
32844   do
32845     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32848 $as_echo_n "checking for $ac_word... " >&6; }
32849 if ${ac_cv_prog_AR+:} false; then :
32850   $as_echo_n "(cached) " >&6
32851 else
32852   if test -n "$AR"; then
32853   ac_cv_prog_AR="$AR" # Let the user override the test.
32854 else
32855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32856 for as_dir in $PATH
32857 do
32858   IFS=$as_save_IFS
32859   test -z "$as_dir" && as_dir=.
32860     for ac_exec_ext in '' $ac_executable_extensions; do
32861   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32862     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32863     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32864     break 2
32865   fi
32866 done
32867   done
32868 IFS=$as_save_IFS
32869 
32870 fi
32871 fi
32872 AR=$ac_cv_prog_AR
32873 if test -n "$AR"; then
32874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32875 $as_echo "$AR" >&6; }
32876 else
32877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32878 $as_echo "no" >&6; }
32879 fi
32880 
32881 
32882     test -n "$AR" && break
32883   done
32884 fi
32885 if test -z "$AR"; then
32886   ac_ct_AR=$AR
32887   for ac_prog in ar
32888 do
32889   # Extract the first word of "$ac_prog", so it can be a program name with args.
32890 set dummy $ac_prog; ac_word=$2
32891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32892 $as_echo_n "checking for $ac_word... " >&6; }
32893 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32894   $as_echo_n "(cached) " >&6
32895 else
32896   if test -n "$ac_ct_AR"; then
32897   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32898 else
32899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32900 for as_dir in $PATH
32901 do
32902   IFS=$as_save_IFS
32903   test -z "$as_dir" && as_dir=.
32904     for ac_exec_ext in '' $ac_executable_extensions; do
32905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32906     ac_cv_prog_ac_ct_AR="$ac_prog"
32907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32908     break 2
32909   fi
32910 done
32911   done
32912 IFS=$as_save_IFS
32913 
32914 fi
32915 fi
32916 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32917 if test -n "$ac_ct_AR"; then
32918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32919 $as_echo "$ac_ct_AR" >&6; }
32920 else
32921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32922 $as_echo "no" >&6; }
32923 fi
32924 
32925 
32926   test -n "$ac_ct_AR" && break
32927 done
32928 
32929   if test "x$ac_ct_AR" = x; then
32930     AR=""
32931   else
32932     case $cross_compiling:$ac_tool_warned in
32933 yes:)
32934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32935 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32936 ac_tool_warned=yes ;;
32937 esac
32938     AR=$ac_ct_AR
32939   fi
32940 fi
32941 
32942     else
32943       # If it succeeded, then it was overridden by the user. We will use it
32944       # for the tool.
32945 
32946       # First remove it from the list of overridden variables, so we can test
32947       # for unknown variables in the end.
32948       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32949 
32950       # Check if the provided tool contains a complete path.
32951       tool_specified="$AR"
32952       tool_basename="${tool_specified##*/}"
32953       if test "x$tool_basename" = "x$tool_specified"; then
32954         # A command without a complete path is provided, search $PATH.
32955         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32956 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32957         # Extract the first word of "$tool_basename", so it can be a program name with args.
32958 set dummy $tool_basename; ac_word=$2
32959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32960 $as_echo_n "checking for $ac_word... " >&6; }
32961 if ${ac_cv_path_AR+:} false; then :
32962   $as_echo_n "(cached) " >&6
32963 else
32964   case $AR in
32965   [\\/]* | ?:[\\/]*)
32966   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32967   ;;
32968   *)
32969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32970 for as_dir in $PATH
32971 do
32972   IFS=$as_save_IFS
32973   test -z "$as_dir" && as_dir=.
32974     for ac_exec_ext in '' $ac_executable_extensions; do
32975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32976     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32978     break 2
32979   fi
32980 done
32981   done
32982 IFS=$as_save_IFS
32983 
32984   ;;
32985 esac
32986 fi
32987 AR=$ac_cv_path_AR
32988 if test -n "$AR"; then
32989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32990 $as_echo "$AR" >&6; }
32991 else
32992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32993 $as_echo "no" >&6; }
32994 fi
32995 
32996 
32997         if test "x$AR" = x; then
32998           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32999         fi
33000       else
33001         # Otherwise we believe it is a complete path. Use it as it is.
33002         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33003 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33005 $as_echo_n "checking for AR... " >&6; }
33006         if test ! -x "$tool_specified"; then
33007           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33008 $as_echo "not found" >&6; }
33009           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33010         fi
33011         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33012 $as_echo "$tool_specified" >&6; }
33013       fi
33014     fi
33015   fi
33016 
33017 
33018   fi
33019 
33020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33021 
33022   # First separate the path from the arguments. This will split at the first
33023   # space.
33024   complete="$AR"
33025   path="${complete%% *}"
33026   tmp="$complete EOL"
33027   arguments="${tmp#* }"
33028 
33029   # Input might be given as Windows format, start by converting to
33030   # unix format.
33031   new_path=`$CYGPATH -u "$path"`
33032 
33033   # Now try to locate executable using which
33034   new_path=`$WHICH "$new_path" 2> /dev/null`
33035   # bat and cmd files are not always considered executable in cygwin causing which
33036   # to not find them
33037   if test "x$new_path" = x \
33038       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33039       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33040     new_path=`$CYGPATH -u "$path"`
33041   fi
33042   if test "x$new_path" = x; then
33043     # Oops. Which didn't find the executable.
33044     # The splitting of arguments from the executable at a space might have been incorrect,
33045     # since paths with space are more likely in Windows. Give it another try with the whole
33046     # argument.
33047     path="$complete"
33048     arguments="EOL"
33049     new_path=`$CYGPATH -u "$path"`
33050     new_path=`$WHICH "$new_path" 2> /dev/null`
33051     # bat and cmd files are not always considered executable in cygwin causing which
33052     # to not find them
33053     if test "x$new_path" = x \
33054         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33055         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33056       new_path=`$CYGPATH -u "$path"`
33057     fi
33058     if test "x$new_path" = x; then
33059       # It's still not found. Now this is an unrecoverable error.
33060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33061 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33062       has_space=`$ECHO "$complete" | $GREP " "`
33063       if test "x$has_space" != x; then
33064         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33065 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33066       fi
33067       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33068     fi
33069   fi
33070 
33071   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33072   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33073   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33074   # "foo.exe" is OK but "foo" is an error.
33075   #
33076   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33077   # It is also a way to make sure we got the proper file name for the real test later on.
33078   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33079   if test "x$test_shortpath" = x; then
33080     # Short path failed, file does not exist as specified.
33081     # Try adding .exe or .cmd
33082     if test -f "${new_path}.exe"; then
33083       input_to_shortpath="${new_path}.exe"
33084     elif test -f "${new_path}.cmd"; then
33085       input_to_shortpath="${new_path}.cmd"
33086     else
33087       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33088 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33089       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33090 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33091       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33092     fi
33093   else
33094     input_to_shortpath="$new_path"
33095   fi
33096 
33097   # Call helper function which possibly converts this using DOS-style short mode.
33098   # If so, the updated path is stored in $new_path.
33099   new_path="$input_to_shortpath"
33100 
33101   input_path="$input_to_shortpath"
33102   # Check if we need to convert this using DOS-style short mode. If the path
33103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33104   # take no chances and rewrite it.
33105   # Note: m4 eats our [], so we need to use [ and ] instead.
33106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33107   if test "x$has_forbidden_chars" != x; then
33108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33109     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33110     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33111     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33112       # Going to short mode and back again did indeed matter. Since short mode is
33113       # case insensitive, let's make it lowercase to improve readability.
33114       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33115       # Now convert it back to Unix-stile (cygpath)
33116       input_path=`$CYGPATH -u "$shortmode_path"`
33117       new_path="$input_path"
33118     fi
33119   fi
33120 
33121   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33122   if test "x$test_cygdrive_prefix" = x; then
33123     # As a simple fix, exclude /usr/bin since it's not a real path.
33124     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33125       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33126       # a path prefixed by /cygdrive for fixpath to work.
33127       new_path="$CYGWIN_ROOT_PATH$input_path"
33128     fi
33129   fi
33130 
33131   # remove trailing .exe if any
33132   new_path="${new_path/%.exe/}"
33133 
33134   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33135 
33136   # First separate the path from the arguments. This will split at the first
33137   # space.
33138   complete="$AR"
33139   path="${complete%% *}"
33140   tmp="$complete EOL"
33141   arguments="${tmp#* }"
33142 
33143   # Input might be given as Windows format, start by converting to
33144   # unix format.
33145   new_path="$path"
33146 
33147   windows_path="$new_path"
33148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33149     unix_path=`$CYGPATH -u "$windows_path"`
33150     new_path="$unix_path"
33151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33153     new_path="$unix_path"
33154   fi
33155 
33156 
33157   # Now try to locate executable using which
33158   new_path=`$WHICH "$new_path" 2> /dev/null`
33159 
33160   if test "x$new_path" = x; then
33161     # Oops. Which didn't find the executable.
33162     # The splitting of arguments from the executable at a space might have been incorrect,
33163     # since paths with space are more likely in Windows. Give it another try with the whole
33164     # argument.
33165     path="$complete"
33166     arguments="EOL"
33167     new_path="$path"
33168 
33169   windows_path="$new_path"
33170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33171     unix_path=`$CYGPATH -u "$windows_path"`
33172     new_path="$unix_path"
33173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33175     new_path="$unix_path"
33176   fi
33177 
33178 
33179     new_path=`$WHICH "$new_path" 2> /dev/null`
33180     # bat and cmd files are not always considered executable in MSYS causing which
33181     # to not find them
33182     if test "x$new_path" = x \
33183         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33184         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33185       new_path="$path"
33186 
33187   windows_path="$new_path"
33188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33189     unix_path=`$CYGPATH -u "$windows_path"`
33190     new_path="$unix_path"
33191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33193     new_path="$unix_path"
33194   fi
33195 
33196     fi
33197 
33198     if test "x$new_path" = x; then
33199       # It's still not found. Now this is an unrecoverable error.
33200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33201 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33202       has_space=`$ECHO "$complete" | $GREP " "`
33203       if test "x$has_space" != x; then
33204         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33205 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33206       fi
33207       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33208     fi
33209   fi
33210 
33211   # Now new_path has a complete unix path to the binary
33212   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33213     # Keep paths in /bin as-is, but remove trailing .exe if any
33214     new_path="${new_path/%.exe/}"
33215     # Do not save /bin paths to all_fixpath_prefixes!
33216   else
33217     # Not in mixed or Windows style, start by that.
33218     new_path=`cmd //c echo $new_path`
33219 
33220   input_path="$new_path"
33221   # Check if we need to convert this using DOS-style short mode. If the path
33222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33223   # take no chances and rewrite it.
33224   # Note: m4 eats our [], so we need to use [ and ] instead.
33225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33226   if test "x$has_forbidden_chars" != x; then
33227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33229   fi
33230 
33231     # Output is in $new_path
33232 
33233   windows_path="$new_path"
33234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33235     unix_path=`$CYGPATH -u "$windows_path"`
33236     new_path="$unix_path"
33237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33239     new_path="$unix_path"
33240   fi
33241 
33242     # remove trailing .exe if any
33243     new_path="${new_path/%.exe/}"
33244 
33245     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33246     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33247   fi
33248 
33249   else
33250     # We're on a unix platform. Hooray! :)
33251     # First separate the path from the arguments. This will split at the first
33252     # space.
33253     complete="$AR"
33254     path="${complete%% *}"
33255     tmp="$complete EOL"
33256     arguments="${tmp#* }"
33257 
33258     # Cannot rely on the command "which" here since it doesn't always work.
33259     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33260     if test -z "$is_absolute_path"; then
33261       # Path to executable is not absolute. Find it.
33262       IFS_save="$IFS"
33263       IFS=:
33264       for p in $PATH; do
33265         if test -f "$p/$path" && test -x "$p/$path"; then
33266           new_path="$p/$path"
33267           break
33268         fi
33269       done
33270       IFS="$IFS_save"
33271     else
33272       # This is an absolute path, we can use it without further modifications.
33273       new_path="$path"
33274     fi
33275 
33276     if test "x$new_path" = x; then
33277       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33278 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33279       has_space=`$ECHO "$complete" | $GREP " "`
33280       if test "x$has_space" != x; then
33281         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33282 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33283       fi
33284       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33285     fi
33286   fi
33287 
33288   # Now join together the path and the arguments once again
33289   if test "x$arguments" != xEOL; then
33290     new_complete="$new_path ${arguments% *}"
33291   else
33292     new_complete="$new_path"
33293   fi
33294 
33295   if test "x$complete" != "x$new_complete"; then
33296     AR="$new_complete"
33297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33298 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33299   fi
33300 
33301 
33302 
33303   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33304     ac_ext=m
33305 ac_cpp='$OBJCPP $CPPFLAGS'
33306 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33307 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33308 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33309 if test -n "$ac_tool_prefix"; then
33310   for ac_prog in gcc objcc objc cc CC
33311   do
33312     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33313 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33315 $as_echo_n "checking for $ac_word... " >&6; }
33316 if ${ac_cv_prog_OBJC+:} false; then :
33317   $as_echo_n "(cached) " >&6
33318 else
33319   if test -n "$OBJC"; then
33320   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33321 else
33322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33323 for as_dir in $PATH
33324 do
33325   IFS=$as_save_IFS
33326   test -z "$as_dir" && as_dir=.
33327     for ac_exec_ext in '' $ac_executable_extensions; do
33328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33329     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33331     break 2
33332   fi
33333 done
33334   done
33335 IFS=$as_save_IFS
33336 
33337 fi
33338 fi
33339 OBJC=$ac_cv_prog_OBJC
33340 if test -n "$OBJC"; then
33341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33342 $as_echo "$OBJC" >&6; }
33343 else
33344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33345 $as_echo "no" >&6; }
33346 fi
33347 
33348 
33349     test -n "$OBJC" && break
33350   done
33351 fi
33352 if test -z "$OBJC"; then
33353   ac_ct_OBJC=$OBJC
33354   for ac_prog in gcc objcc objc cc CC
33355 do
33356   # Extract the first word of "$ac_prog", so it can be a program name with args.
33357 set dummy $ac_prog; ac_word=$2
33358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33359 $as_echo_n "checking for $ac_word... " >&6; }
33360 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33361   $as_echo_n "(cached) " >&6
33362 else
33363   if test -n "$ac_ct_OBJC"; then
33364   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33365 else
33366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33367 for as_dir in $PATH
33368 do
33369   IFS=$as_save_IFS
33370   test -z "$as_dir" && as_dir=.
33371     for ac_exec_ext in '' $ac_executable_extensions; do
33372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33373     ac_cv_prog_ac_ct_OBJC="$ac_prog"
33374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33375     break 2
33376   fi
33377 done
33378   done
33379 IFS=$as_save_IFS
33380 
33381 fi
33382 fi
33383 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33384 if test -n "$ac_ct_OBJC"; then
33385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33386 $as_echo "$ac_ct_OBJC" >&6; }
33387 else
33388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33389 $as_echo "no" >&6; }
33390 fi
33391 
33392 
33393   test -n "$ac_ct_OBJC" && break
33394 done
33395 
33396   if test "x$ac_ct_OBJC" = x; then
33397     OBJC="gcc"
33398   else
33399     case $cross_compiling:$ac_tool_warned in
33400 yes:)
33401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33402 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33403 ac_tool_warned=yes ;;
33404 esac
33405     OBJC=$ac_ct_OBJC
33406   fi
33407 fi
33408 
33409 # Provide some information about the compiler.
33410 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33411 set X $ac_compile
33412 ac_compiler=$2
33413 for ac_option in --version -v -V -qversion; do
33414   { { ac_try="$ac_compiler $ac_option >&5"
33415 case "(($ac_try" in
33416   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33417   *) ac_try_echo=$ac_try;;
33418 esac
33419 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33420 $as_echo "$ac_try_echo"; } >&5
33421   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33422   ac_status=$?
33423   if test -s conftest.err; then
33424     sed '10a\
33425 ... rest of stderr output deleted ...
33426          10q' conftest.err >conftest.er1
33427     cat conftest.er1 >&5
33428   fi
33429   rm -f conftest.er1 conftest.err
33430   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33431   test $ac_status = 0; }
33432 done
33433 
33434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33435 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33436 if ${ac_cv_objc_compiler_gnu+:} false; then :
33437   $as_echo_n "(cached) " >&6
33438 else
33439   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33440 /* end confdefs.h.  */
33441 
33442 int
33443 main ()
33444 {
33445 #ifndef __GNUC__
33446        choke me
33447 #endif
33448 
33449   ;
33450   return 0;
33451 }
33452 _ACEOF
33453 if ac_fn_objc_try_compile "$LINENO"; then :
33454   ac_compiler_gnu=yes
33455 else
33456   ac_compiler_gnu=no
33457 fi
33458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33459 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33460 
33461 fi
33462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33463 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33464 if test $ac_compiler_gnu = yes; then
33465   GOBJC=yes
33466 else
33467   GOBJC=
33468 fi
33469 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33470 ac_save_OBJCFLAGS=$OBJCFLAGS
33471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33472 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33473 if ${ac_cv_prog_objc_g+:} false; then :
33474   $as_echo_n "(cached) " >&6
33475 else
33476   ac_save_objc_werror_flag=$ac_objc_werror_flag
33477    ac_objc_werror_flag=yes
33478    ac_cv_prog_objc_g=no
33479    OBJCFLAGS="-g"
33480    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33481 /* end confdefs.h.  */
33482 
33483 int
33484 main ()
33485 {
33486 
33487   ;
33488   return 0;
33489 }
33490 _ACEOF
33491 if ac_fn_objc_try_compile "$LINENO"; then :
33492   ac_cv_prog_objc_g=yes
33493 else
33494   OBJCFLAGS=""
33495       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33496 /* end confdefs.h.  */
33497 
33498 int
33499 main ()
33500 {
33501 
33502   ;
33503   return 0;
33504 }
33505 _ACEOF
33506 if ac_fn_objc_try_compile "$LINENO"; then :
33507 
33508 else
33509   ac_objc_werror_flag=$ac_save_objc_werror_flag
33510          OBJCFLAGS="-g"
33511          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33512 /* end confdefs.h.  */
33513 
33514 int
33515 main ()
33516 {
33517 
33518   ;
33519   return 0;
33520 }
33521 _ACEOF
33522 if ac_fn_objc_try_compile "$LINENO"; then :
33523   ac_cv_prog_objc_g=yes
33524 fi
33525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33526 fi
33527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33528 fi
33529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33530    ac_objc_werror_flag=$ac_save_objc_werror_flag
33531 fi
33532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33533 $as_echo "$ac_cv_prog_objc_g" >&6; }
33534 if test "$ac_test_OBJCFLAGS" = set; then
33535   OBJCFLAGS=$ac_save_OBJCFLAGS
33536 elif test $ac_cv_prog_objc_g = yes; then
33537   if test "$GOBJC" = yes; then
33538     OBJCFLAGS="-g -O2"
33539   else
33540     OBJCFLAGS="-g"
33541   fi
33542 else
33543   if test "$GOBJC" = yes; then
33544     OBJCFLAGS="-O2"
33545   else
33546     OBJCFLAGS=
33547   fi
33548 fi
33549 ac_ext=cpp
33550 ac_cpp='$CXXCPP $CPPFLAGS'
33551 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33552 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33553 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33554 
33555 
33556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33557 
33558   # First separate the path from the arguments. This will split at the first
33559   # space.
33560   complete="$OBJC"
33561   path="${complete%% *}"
33562   tmp="$complete EOL"
33563   arguments="${tmp#* }"
33564 
33565   # Input might be given as Windows format, start by converting to
33566   # unix format.
33567   new_path=`$CYGPATH -u "$path"`
33568 
33569   # Now try to locate executable using which
33570   new_path=`$WHICH "$new_path" 2> /dev/null`
33571   # bat and cmd files are not always considered executable in cygwin causing which
33572   # to not find them
33573   if test "x$new_path" = x \
33574       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33575       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33576     new_path=`$CYGPATH -u "$path"`
33577   fi
33578   if test "x$new_path" = x; then
33579     # Oops. Which didn't find the executable.
33580     # The splitting of arguments from the executable at a space might have been incorrect,
33581     # since paths with space are more likely in Windows. Give it another try with the whole
33582     # argument.
33583     path="$complete"
33584     arguments="EOL"
33585     new_path=`$CYGPATH -u "$path"`
33586     new_path=`$WHICH "$new_path" 2> /dev/null`
33587     # bat and cmd files are not always considered executable in cygwin causing which
33588     # to not find them
33589     if test "x$new_path" = x \
33590         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33591         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33592       new_path=`$CYGPATH -u "$path"`
33593     fi
33594     if test "x$new_path" = x; then
33595       # It's still not found. Now this is an unrecoverable error.
33596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33597 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33598       has_space=`$ECHO "$complete" | $GREP " "`
33599       if test "x$has_space" != x; then
33600         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33601 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33602       fi
33603       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33604     fi
33605   fi
33606 
33607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33610   # "foo.exe" is OK but "foo" is an error.
33611   #
33612   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33613   # It is also a way to make sure we got the proper file name for the real test later on.
33614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33615   if test "x$test_shortpath" = x; then
33616     # Short path failed, file does not exist as specified.
33617     # Try adding .exe or .cmd
33618     if test -f "${new_path}.exe"; then
33619       input_to_shortpath="${new_path}.exe"
33620     elif test -f "${new_path}.cmd"; then
33621       input_to_shortpath="${new_path}.cmd"
33622     else
33623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33624 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33625       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33626 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33627       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33628     fi
33629   else
33630     input_to_shortpath="$new_path"
33631   fi
33632 
33633   # Call helper function which possibly converts this using DOS-style short mode.
33634   # If so, the updated path is stored in $new_path.
33635   new_path="$input_to_shortpath"
33636 
33637   input_path="$input_to_shortpath"
33638   # Check if we need to convert this using DOS-style short mode. If the path
33639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33640   # take no chances and rewrite it.
33641   # Note: m4 eats our [], so we need to use [ and ] instead.
33642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33643   if test "x$has_forbidden_chars" != x; then
33644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33648       # Going to short mode and back again did indeed matter. Since short mode is
33649       # case insensitive, let's make it lowercase to improve readability.
33650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33651       # Now convert it back to Unix-stile (cygpath)
33652       input_path=`$CYGPATH -u "$shortmode_path"`
33653       new_path="$input_path"
33654     fi
33655   fi
33656 
33657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33658   if test "x$test_cygdrive_prefix" = x; then
33659     # As a simple fix, exclude /usr/bin since it's not a real path.
33660     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33662       # a path prefixed by /cygdrive for fixpath to work.
33663       new_path="$CYGWIN_ROOT_PATH$input_path"
33664     fi
33665   fi
33666 
33667   # remove trailing .exe if any
33668   new_path="${new_path/%.exe/}"
33669 
33670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33671 
33672   # First separate the path from the arguments. This will split at the first
33673   # space.
33674   complete="$OBJC"
33675   path="${complete%% *}"
33676   tmp="$complete EOL"
33677   arguments="${tmp#* }"
33678 
33679   # Input might be given as Windows format, start by converting to
33680   # unix format.
33681   new_path="$path"
33682 
33683   windows_path="$new_path"
33684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33685     unix_path=`$CYGPATH -u "$windows_path"`
33686     new_path="$unix_path"
33687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33689     new_path="$unix_path"
33690   fi
33691 
33692 
33693   # Now try to locate executable using which
33694   new_path=`$WHICH "$new_path" 2> /dev/null`
33695 
33696   if test "x$new_path" = x; then
33697     # Oops. Which didn't find the executable.
33698     # The splitting of arguments from the executable at a space might have been incorrect,
33699     # since paths with space are more likely in Windows. Give it another try with the whole
33700     # argument.
33701     path="$complete"
33702     arguments="EOL"
33703     new_path="$path"
33704 
33705   windows_path="$new_path"
33706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33707     unix_path=`$CYGPATH -u "$windows_path"`
33708     new_path="$unix_path"
33709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33711     new_path="$unix_path"
33712   fi
33713 
33714 
33715     new_path=`$WHICH "$new_path" 2> /dev/null`
33716     # bat and cmd files are not always considered executable in MSYS causing which
33717     # to not find them
33718     if test "x$new_path" = x \
33719         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33720         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33721       new_path="$path"
33722 
33723   windows_path="$new_path"
33724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33725     unix_path=`$CYGPATH -u "$windows_path"`
33726     new_path="$unix_path"
33727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33729     new_path="$unix_path"
33730   fi
33731 
33732     fi
33733 
33734     if test "x$new_path" = x; then
33735       # It's still not found. Now this is an unrecoverable error.
33736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33737 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33738       has_space=`$ECHO "$complete" | $GREP " "`
33739       if test "x$has_space" != x; then
33740         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33741 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33742       fi
33743       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33744     fi
33745   fi
33746 
33747   # Now new_path has a complete unix path to the binary
33748   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33749     # Keep paths in /bin as-is, but remove trailing .exe if any
33750     new_path="${new_path/%.exe/}"
33751     # Do not save /bin paths to all_fixpath_prefixes!
33752   else
33753     # Not in mixed or Windows style, start by that.
33754     new_path=`cmd //c echo $new_path`
33755 
33756   input_path="$new_path"
33757   # Check if we need to convert this using DOS-style short mode. If the path
33758   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33759   # take no chances and rewrite it.
33760   # Note: m4 eats our [], so we need to use [ and ] instead.
33761   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33762   if test "x$has_forbidden_chars" != x; then
33763     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33764     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33765   fi
33766 
33767     # Output is in $new_path
33768 
33769   windows_path="$new_path"
33770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33771     unix_path=`$CYGPATH -u "$windows_path"`
33772     new_path="$unix_path"
33773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33775     new_path="$unix_path"
33776   fi
33777 
33778     # remove trailing .exe if any
33779     new_path="${new_path/%.exe/}"
33780 
33781     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33782     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33783   fi
33784 
33785   else
33786     # We're on a unix platform. Hooray! :)
33787     # First separate the path from the arguments. This will split at the first
33788     # space.
33789     complete="$OBJC"
33790     path="${complete%% *}"
33791     tmp="$complete EOL"
33792     arguments="${tmp#* }"
33793 
33794     # Cannot rely on the command "which" here since it doesn't always work.
33795     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33796     if test -z "$is_absolute_path"; then
33797       # Path to executable is not absolute. Find it.
33798       IFS_save="$IFS"
33799       IFS=:
33800       for p in $PATH; do
33801         if test -f "$p/$path" && test -x "$p/$path"; then
33802           new_path="$p/$path"
33803           break
33804         fi
33805       done
33806       IFS="$IFS_save"
33807     else
33808       # This is an absolute path, we can use it without further modifications.
33809       new_path="$path"
33810     fi
33811 
33812     if test "x$new_path" = x; then
33813       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33814 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33815       has_space=`$ECHO "$complete" | $GREP " "`
33816       if test "x$has_space" != x; then
33817         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33818 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33819       fi
33820       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33821     fi
33822   fi
33823 
33824   # Now join together the path and the arguments once again
33825   if test "x$arguments" != xEOL; then
33826     new_complete="$new_path ${arguments% *}"
33827   else
33828     new_complete="$new_path"
33829   fi
33830 
33831   if test "x$complete" != "x$new_complete"; then
33832     OBJC="$new_complete"
33833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33834 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33835   fi
33836 
33837 
33838 
33839   # Publish this variable in the help.
33840 
33841 
33842   if test "x$LIPO" = x; then
33843     # The variable is not set by user, try to locate tool using the code snippet
33844     for ac_prog in lipo
33845 do
33846   # Extract the first word of "$ac_prog", so it can be a program name with args.
33847 set dummy $ac_prog; ac_word=$2
33848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33849 $as_echo_n "checking for $ac_word... " >&6; }
33850 if ${ac_cv_path_LIPO+:} false; then :
33851   $as_echo_n "(cached) " >&6
33852 else
33853   case $LIPO in
33854   [\\/]* | ?:[\\/]*)
33855   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33856   ;;
33857   *)
33858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33859 for as_dir in $PATH
33860 do
33861   IFS=$as_save_IFS
33862   test -z "$as_dir" && as_dir=.
33863     for ac_exec_ext in '' $ac_executable_extensions; do
33864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33865     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33867     break 2
33868   fi
33869 done
33870   done
33871 IFS=$as_save_IFS
33872 
33873   ;;
33874 esac
33875 fi
33876 LIPO=$ac_cv_path_LIPO
33877 if test -n "$LIPO"; then
33878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33879 $as_echo "$LIPO" >&6; }
33880 else
33881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33882 $as_echo "no" >&6; }
33883 fi
33884 
33885 
33886   test -n "$LIPO" && break
33887 done
33888 
33889   else
33890     # The variable is set, but is it from the command line or the environment?
33891 
33892     # Try to remove the string !LIPO! from our list.
33893     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33894     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33895       # If it failed, the variable was not from the command line. Ignore it,
33896       # but warn the user (except for BASH, which is always set by the calling BASH).
33897       if test "xLIPO" != xBASH; then
33898         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33899 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33900       fi
33901       # Try to locate tool using the code snippet
33902       for ac_prog in lipo
33903 do
33904   # Extract the first word of "$ac_prog", so it can be a program name with args.
33905 set dummy $ac_prog; ac_word=$2
33906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33907 $as_echo_n "checking for $ac_word... " >&6; }
33908 if ${ac_cv_path_LIPO+:} false; then :
33909   $as_echo_n "(cached) " >&6
33910 else
33911   case $LIPO in
33912   [\\/]* | ?:[\\/]*)
33913   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33914   ;;
33915   *)
33916   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33917 for as_dir in $PATH
33918 do
33919   IFS=$as_save_IFS
33920   test -z "$as_dir" && as_dir=.
33921     for ac_exec_ext in '' $ac_executable_extensions; do
33922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33923     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33925     break 2
33926   fi
33927 done
33928   done
33929 IFS=$as_save_IFS
33930 
33931   ;;
33932 esac
33933 fi
33934 LIPO=$ac_cv_path_LIPO
33935 if test -n "$LIPO"; then
33936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33937 $as_echo "$LIPO" >&6; }
33938 else
33939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33940 $as_echo "no" >&6; }
33941 fi
33942 
33943 
33944   test -n "$LIPO" && break
33945 done
33946 
33947     else
33948       # If it succeeded, then it was overridden by the user. We will use it
33949       # for the tool.
33950 
33951       # First remove it from the list of overridden variables, so we can test
33952       # for unknown variables in the end.
33953       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33954 
33955       # Check if the provided tool contains a complete path.
33956       tool_specified="$LIPO"
33957       tool_basename="${tool_specified##*/}"
33958       if test "x$tool_basename" = "x$tool_specified"; then
33959         # A command without a complete path is provided, search $PATH.
33960         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33961 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33962         # Extract the first word of "$tool_basename", so it can be a program name with args.
33963 set dummy $tool_basename; ac_word=$2
33964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33965 $as_echo_n "checking for $ac_word... " >&6; }
33966 if ${ac_cv_path_LIPO+:} false; then :
33967   $as_echo_n "(cached) " >&6
33968 else
33969   case $LIPO in
33970   [\\/]* | ?:[\\/]*)
33971   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33972   ;;
33973   *)
33974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33975 for as_dir in $PATH
33976 do
33977   IFS=$as_save_IFS
33978   test -z "$as_dir" && as_dir=.
33979     for ac_exec_ext in '' $ac_executable_extensions; do
33980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33981     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33983     break 2
33984   fi
33985 done
33986   done
33987 IFS=$as_save_IFS
33988 
33989   ;;
33990 esac
33991 fi
33992 LIPO=$ac_cv_path_LIPO
33993 if test -n "$LIPO"; then
33994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33995 $as_echo "$LIPO" >&6; }
33996 else
33997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33998 $as_echo "no" >&6; }
33999 fi
34000 
34001 
34002         if test "x$LIPO" = x; then
34003           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34004         fi
34005       else
34006         # Otherwise we believe it is a complete path. Use it as it is.
34007         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34008 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34009         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34010 $as_echo_n "checking for LIPO... " >&6; }
34011         if test ! -x "$tool_specified"; then
34012           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34013 $as_echo "not found" >&6; }
34014           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34015         fi
34016         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34017 $as_echo "$tool_specified" >&6; }
34018       fi
34019     fi
34020   fi
34021 
34022 
34023 
34024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34025 
34026   # First separate the path from the arguments. This will split at the first
34027   # space.
34028   complete="$LIPO"
34029   path="${complete%% *}"
34030   tmp="$complete EOL"
34031   arguments="${tmp#* }"
34032 
34033   # Input might be given as Windows format, start by converting to
34034   # unix format.
34035   new_path=`$CYGPATH -u "$path"`
34036 
34037   # Now try to locate executable using which
34038   new_path=`$WHICH "$new_path" 2> /dev/null`
34039   # bat and cmd files are not always considered executable in cygwin causing which
34040   # to not find them
34041   if test "x$new_path" = x \
34042       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34043       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34044     new_path=`$CYGPATH -u "$path"`
34045   fi
34046   if test "x$new_path" = x; then
34047     # Oops. Which didn't find the executable.
34048     # The splitting of arguments from the executable at a space might have been incorrect,
34049     # since paths with space are more likely in Windows. Give it another try with the whole
34050     # argument.
34051     path="$complete"
34052     arguments="EOL"
34053     new_path=`$CYGPATH -u "$path"`
34054     new_path=`$WHICH "$new_path" 2> /dev/null`
34055     # bat and cmd files are not always considered executable in cygwin causing which
34056     # to not find them
34057     if test "x$new_path" = x \
34058         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34059         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34060       new_path=`$CYGPATH -u "$path"`
34061     fi
34062     if test "x$new_path" = x; then
34063       # It's still not found. Now this is an unrecoverable error.
34064       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34065 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34066       has_space=`$ECHO "$complete" | $GREP " "`
34067       if test "x$has_space" != x; then
34068         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34069 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34070       fi
34071       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34072     fi
34073   fi
34074 
34075   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34076   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34077   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34078   # "foo.exe" is OK but "foo" is an error.
34079   #
34080   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34081   # It is also a way to make sure we got the proper file name for the real test later on.
34082   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34083   if test "x$test_shortpath" = x; then
34084     # Short path failed, file does not exist as specified.
34085     # Try adding .exe or .cmd
34086     if test -f "${new_path}.exe"; then
34087       input_to_shortpath="${new_path}.exe"
34088     elif test -f "${new_path}.cmd"; then
34089       input_to_shortpath="${new_path}.cmd"
34090     else
34091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34092 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34093       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34094 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34095       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34096     fi
34097   else
34098     input_to_shortpath="$new_path"
34099   fi
34100 
34101   # Call helper function which possibly converts this using DOS-style short mode.
34102   # If so, the updated path is stored in $new_path.
34103   new_path="$input_to_shortpath"
34104 
34105   input_path="$input_to_shortpath"
34106   # Check if we need to convert this using DOS-style short mode. If the path
34107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34108   # take no chances and rewrite it.
34109   # Note: m4 eats our [], so we need to use [ and ] instead.
34110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34111   if test "x$has_forbidden_chars" != x; then
34112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34113     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34114     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34115     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34116       # Going to short mode and back again did indeed matter. Since short mode is
34117       # case insensitive, let's make it lowercase to improve readability.
34118       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34119       # Now convert it back to Unix-stile (cygpath)
34120       input_path=`$CYGPATH -u "$shortmode_path"`
34121       new_path="$input_path"
34122     fi
34123   fi
34124 
34125   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34126   if test "x$test_cygdrive_prefix" = x; then
34127     # As a simple fix, exclude /usr/bin since it's not a real path.
34128     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34129       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34130       # a path prefixed by /cygdrive for fixpath to work.
34131       new_path="$CYGWIN_ROOT_PATH$input_path"
34132     fi
34133   fi
34134 
34135   # remove trailing .exe if any
34136   new_path="${new_path/%.exe/}"
34137 
34138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34139 
34140   # First separate the path from the arguments. This will split at the first
34141   # space.
34142   complete="$LIPO"
34143   path="${complete%% *}"
34144   tmp="$complete EOL"
34145   arguments="${tmp#* }"
34146 
34147   # Input might be given as Windows format, start by converting to
34148   # unix format.
34149   new_path="$path"
34150 
34151   windows_path="$new_path"
34152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34153     unix_path=`$CYGPATH -u "$windows_path"`
34154     new_path="$unix_path"
34155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34157     new_path="$unix_path"
34158   fi
34159 
34160 
34161   # Now try to locate executable using which
34162   new_path=`$WHICH "$new_path" 2> /dev/null`
34163 
34164   if test "x$new_path" = x; then
34165     # Oops. Which didn't find the executable.
34166     # The splitting of arguments from the executable at a space might have been incorrect,
34167     # since paths with space are more likely in Windows. Give it another try with the whole
34168     # argument.
34169     path="$complete"
34170     arguments="EOL"
34171     new_path="$path"
34172 
34173   windows_path="$new_path"
34174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34175     unix_path=`$CYGPATH -u "$windows_path"`
34176     new_path="$unix_path"
34177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34179     new_path="$unix_path"
34180   fi
34181 
34182 
34183     new_path=`$WHICH "$new_path" 2> /dev/null`
34184     # bat and cmd files are not always considered executable in MSYS causing which
34185     # to not find them
34186     if test "x$new_path" = x \
34187         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34188         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34189       new_path="$path"
34190 
34191   windows_path="$new_path"
34192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34193     unix_path=`$CYGPATH -u "$windows_path"`
34194     new_path="$unix_path"
34195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34197     new_path="$unix_path"
34198   fi
34199 
34200     fi
34201 
34202     if test "x$new_path" = x; then
34203       # It's still not found. Now this is an unrecoverable error.
34204       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34205 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34206       has_space=`$ECHO "$complete" | $GREP " "`
34207       if test "x$has_space" != x; then
34208         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34209 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34210       fi
34211       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34212     fi
34213   fi
34214 
34215   # Now new_path has a complete unix path to the binary
34216   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34217     # Keep paths in /bin as-is, but remove trailing .exe if any
34218     new_path="${new_path/%.exe/}"
34219     # Do not save /bin paths to all_fixpath_prefixes!
34220   else
34221     # Not in mixed or Windows style, start by that.
34222     new_path=`cmd //c echo $new_path`
34223 
34224   input_path="$new_path"
34225   # Check if we need to convert this using DOS-style short mode. If the path
34226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34227   # take no chances and rewrite it.
34228   # Note: m4 eats our [], so we need to use [ and ] instead.
34229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34230   if test "x$has_forbidden_chars" != x; then
34231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34232     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34233   fi
34234 
34235     # Output is in $new_path
34236 
34237   windows_path="$new_path"
34238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34239     unix_path=`$CYGPATH -u "$windows_path"`
34240     new_path="$unix_path"
34241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34243     new_path="$unix_path"
34244   fi
34245 
34246     # remove trailing .exe if any
34247     new_path="${new_path/%.exe/}"
34248 
34249     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34250     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34251   fi
34252 
34253   else
34254     # We're on a unix platform. Hooray! :)
34255     # First separate the path from the arguments. This will split at the first
34256     # space.
34257     complete="$LIPO"
34258     path="${complete%% *}"
34259     tmp="$complete EOL"
34260     arguments="${tmp#* }"
34261 
34262     # Cannot rely on the command "which" here since it doesn't always work.
34263     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34264     if test -z "$is_absolute_path"; then
34265       # Path to executable is not absolute. Find it.
34266       IFS_save="$IFS"
34267       IFS=:
34268       for p in $PATH; do
34269         if test -f "$p/$path" && test -x "$p/$path"; then
34270           new_path="$p/$path"
34271           break
34272         fi
34273       done
34274       IFS="$IFS_save"
34275     else
34276       # This is an absolute path, we can use it without further modifications.
34277       new_path="$path"
34278     fi
34279 
34280     if test "x$new_path" = x; then
34281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34282 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34283       has_space=`$ECHO "$complete" | $GREP " "`
34284       if test "x$has_space" != x; then
34285         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34286 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34287       fi
34288       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34289     fi
34290   fi
34291 
34292   # Now join together the path and the arguments once again
34293   if test "x$arguments" != xEOL; then
34294     new_complete="$new_path ${arguments% *}"
34295   else
34296     new_complete="$new_path"
34297   fi
34298 
34299   if test "x$complete" != "x$new_complete"; then
34300     LIPO="$new_complete"
34301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34302 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34303   fi
34304 
34305   else
34306     OBJC=
34307   fi
34308 
34309   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34310     # Extract the first word of "mt", so it can be a program name with args.
34311 set dummy mt; ac_word=$2
34312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34313 $as_echo_n "checking for $ac_word... " >&6; }
34314 if ${ac_cv_prog_MT+:} false; then :
34315   $as_echo_n "(cached) " >&6
34316 else
34317   if test -n "$MT"; then
34318   ac_cv_prog_MT="$MT" # Let the user override the test.
34319 else
34320   ac_prog_rejected=no
34321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34322 for as_dir in $PATH
34323 do
34324   IFS=$as_save_IFS
34325   test -z "$as_dir" && as_dir=.
34326     for ac_exec_ext in '' $ac_executable_extensions; do
34327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34328     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34329        ac_prog_rejected=yes
34330        continue
34331      fi
34332     ac_cv_prog_MT="mt"
34333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34334     break 2
34335   fi
34336 done
34337   done
34338 IFS=$as_save_IFS
34339 
34340 if test $ac_prog_rejected = yes; then
34341   # We found a bogon in the path, so make sure we never use it.
34342   set dummy $ac_cv_prog_MT
34343   shift
34344   if test $# != 0; then
34345     # We chose a different compiler from the bogus one.
34346     # However, it has the same basename, so the bogon will be chosen
34347     # first if we set MT to just the basename; use the full file name.
34348     shift
34349     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34350   fi
34351 fi
34352 fi
34353 fi
34354 MT=$ac_cv_prog_MT
34355 if test -n "$MT"; then
34356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34357 $as_echo "$MT" >&6; }
34358 else
34359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34360 $as_echo "no" >&6; }
34361 fi
34362 
34363 
34364 
34365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34366 
34367   # First separate the path from the arguments. This will split at the first
34368   # space.
34369   complete="$MT"
34370   path="${complete%% *}"
34371   tmp="$complete EOL"
34372   arguments="${tmp#* }"
34373 
34374   # Input might be given as Windows format, start by converting to
34375   # unix format.
34376   new_path=`$CYGPATH -u "$path"`
34377 
34378   # Now try to locate executable using which
34379   new_path=`$WHICH "$new_path" 2> /dev/null`
34380   # bat and cmd files are not always considered executable in cygwin causing which
34381   # to not find them
34382   if test "x$new_path" = x \
34383       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34384       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34385     new_path=`$CYGPATH -u "$path"`
34386   fi
34387   if test "x$new_path" = x; then
34388     # Oops. Which didn't find the executable.
34389     # The splitting of arguments from the executable at a space might have been incorrect,
34390     # since paths with space are more likely in Windows. Give it another try with the whole
34391     # argument.
34392     path="$complete"
34393     arguments="EOL"
34394     new_path=`$CYGPATH -u "$path"`
34395     new_path=`$WHICH "$new_path" 2> /dev/null`
34396     # bat and cmd files are not always considered executable in cygwin causing which
34397     # to not find them
34398     if test "x$new_path" = x \
34399         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34400         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34401       new_path=`$CYGPATH -u "$path"`
34402     fi
34403     if test "x$new_path" = x; then
34404       # It's still not found. Now this is an unrecoverable error.
34405       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34406 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34407       has_space=`$ECHO "$complete" | $GREP " "`
34408       if test "x$has_space" != x; then
34409         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34410 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34411       fi
34412       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34413     fi
34414   fi
34415 
34416   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34417   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34418   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34419   # "foo.exe" is OK but "foo" is an error.
34420   #
34421   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34422   # It is also a way to make sure we got the proper file name for the real test later on.
34423   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34424   if test "x$test_shortpath" = x; then
34425     # Short path failed, file does not exist as specified.
34426     # Try adding .exe or .cmd
34427     if test -f "${new_path}.exe"; then
34428       input_to_shortpath="${new_path}.exe"
34429     elif test -f "${new_path}.cmd"; then
34430       input_to_shortpath="${new_path}.cmd"
34431     else
34432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34433 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34434       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34435 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34436       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34437     fi
34438   else
34439     input_to_shortpath="$new_path"
34440   fi
34441 
34442   # Call helper function which possibly converts this using DOS-style short mode.
34443   # If so, the updated path is stored in $new_path.
34444   new_path="$input_to_shortpath"
34445 
34446   input_path="$input_to_shortpath"
34447   # Check if we need to convert this using DOS-style short mode. If the path
34448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34449   # take no chances and rewrite it.
34450   # Note: m4 eats our [], so we need to use [ and ] instead.
34451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34452   if test "x$has_forbidden_chars" != x; then
34453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34454     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34455     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34456     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34457       # Going to short mode and back again did indeed matter. Since short mode is
34458       # case insensitive, let's make it lowercase to improve readability.
34459       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34460       # Now convert it back to Unix-stile (cygpath)
34461       input_path=`$CYGPATH -u "$shortmode_path"`
34462       new_path="$input_path"
34463     fi
34464   fi
34465 
34466   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34467   if test "x$test_cygdrive_prefix" = x; then
34468     # As a simple fix, exclude /usr/bin since it's not a real path.
34469     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34470       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34471       # a path prefixed by /cygdrive for fixpath to work.
34472       new_path="$CYGWIN_ROOT_PATH$input_path"
34473     fi
34474   fi
34475 
34476   # remove trailing .exe if any
34477   new_path="${new_path/%.exe/}"
34478 
34479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34480 
34481   # First separate the path from the arguments. This will split at the first
34482   # space.
34483   complete="$MT"
34484   path="${complete%% *}"
34485   tmp="$complete EOL"
34486   arguments="${tmp#* }"
34487 
34488   # Input might be given as Windows format, start by converting to
34489   # unix format.
34490   new_path="$path"
34491 
34492   windows_path="$new_path"
34493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34494     unix_path=`$CYGPATH -u "$windows_path"`
34495     new_path="$unix_path"
34496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34498     new_path="$unix_path"
34499   fi
34500 
34501 
34502   # Now try to locate executable using which
34503   new_path=`$WHICH "$new_path" 2> /dev/null`
34504 
34505   if test "x$new_path" = x; then
34506     # Oops. Which didn't find the executable.
34507     # The splitting of arguments from the executable at a space might have been incorrect,
34508     # since paths with space are more likely in Windows. Give it another try with the whole
34509     # argument.
34510     path="$complete"
34511     arguments="EOL"
34512     new_path="$path"
34513 
34514   windows_path="$new_path"
34515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34516     unix_path=`$CYGPATH -u "$windows_path"`
34517     new_path="$unix_path"
34518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34520     new_path="$unix_path"
34521   fi
34522 
34523 
34524     new_path=`$WHICH "$new_path" 2> /dev/null`
34525     # bat and cmd files are not always considered executable in MSYS causing which
34526     # to not find them
34527     if test "x$new_path" = x \
34528         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34529         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34530       new_path="$path"
34531 
34532   windows_path="$new_path"
34533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34534     unix_path=`$CYGPATH -u "$windows_path"`
34535     new_path="$unix_path"
34536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34538     new_path="$unix_path"
34539   fi
34540 
34541     fi
34542 
34543     if test "x$new_path" = x; then
34544       # It's still not found. Now this is an unrecoverable error.
34545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34546 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34547       has_space=`$ECHO "$complete" | $GREP " "`
34548       if test "x$has_space" != x; then
34549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34551       fi
34552       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34553     fi
34554   fi
34555 
34556   # Now new_path has a complete unix path to the binary
34557   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34558     # Keep paths in /bin as-is, but remove trailing .exe if any
34559     new_path="${new_path/%.exe/}"
34560     # Do not save /bin paths to all_fixpath_prefixes!
34561   else
34562     # Not in mixed or Windows style, start by that.
34563     new_path=`cmd //c echo $new_path`
34564 
34565   input_path="$new_path"
34566   # Check if we need to convert this using DOS-style short mode. If the path
34567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34568   # take no chances and rewrite it.
34569   # Note: m4 eats our [], so we need to use [ and ] instead.
34570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34571   if test "x$has_forbidden_chars" != x; then
34572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34574   fi
34575 
34576     # Output is in $new_path
34577 
34578   windows_path="$new_path"
34579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34580     unix_path=`$CYGPATH -u "$windows_path"`
34581     new_path="$unix_path"
34582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34584     new_path="$unix_path"
34585   fi
34586 
34587     # remove trailing .exe if any
34588     new_path="${new_path/%.exe/}"
34589 
34590     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34591     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34592   fi
34593 
34594   else
34595     # We're on a unix platform. Hooray! :)
34596     # First separate the path from the arguments. This will split at the first
34597     # space.
34598     complete="$MT"
34599     path="${complete%% *}"
34600     tmp="$complete EOL"
34601     arguments="${tmp#* }"
34602 
34603     # Cannot rely on the command "which" here since it doesn't always work.
34604     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34605     if test -z "$is_absolute_path"; then
34606       # Path to executable is not absolute. Find it.
34607       IFS_save="$IFS"
34608       IFS=:
34609       for p in $PATH; do
34610         if test -f "$p/$path" && test -x "$p/$path"; then
34611           new_path="$p/$path"
34612           break
34613         fi
34614       done
34615       IFS="$IFS_save"
34616     else
34617       # This is an absolute path, we can use it without further modifications.
34618       new_path="$path"
34619     fi
34620 
34621     if test "x$new_path" = x; then
34622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34623 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34624       has_space=`$ECHO "$complete" | $GREP " "`
34625       if test "x$has_space" != x; then
34626         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34627 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34628       fi
34629       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34630     fi
34631   fi
34632 
34633   # Now join together the path and the arguments once again
34634   if test "x$arguments" != xEOL; then
34635     new_complete="$new_path ${arguments% *}"
34636   else
34637     new_complete="$new_path"
34638   fi
34639 
34640   if test "x$complete" != "x$new_complete"; then
34641     MT="$new_complete"
34642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34643 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34644   fi
34645 
34646     # Setup the resource compiler (RC)
34647     # Extract the first word of "rc", so it can be a program name with args.
34648 set dummy rc; ac_word=$2
34649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34650 $as_echo_n "checking for $ac_word... " >&6; }
34651 if ${ac_cv_prog_RC+:} false; then :
34652   $as_echo_n "(cached) " >&6
34653 else
34654   if test -n "$RC"; then
34655   ac_cv_prog_RC="$RC" # Let the user override the test.
34656 else
34657   ac_prog_rejected=no
34658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34659 for as_dir in $PATH
34660 do
34661   IFS=$as_save_IFS
34662   test -z "$as_dir" && as_dir=.
34663     for ac_exec_ext in '' $ac_executable_extensions; do
34664   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34665     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34666        ac_prog_rejected=yes
34667        continue
34668      fi
34669     ac_cv_prog_RC="rc"
34670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34671     break 2
34672   fi
34673 done
34674   done
34675 IFS=$as_save_IFS
34676 
34677 if test $ac_prog_rejected = yes; then
34678   # We found a bogon in the path, so make sure we never use it.
34679   set dummy $ac_cv_prog_RC
34680   shift
34681   if test $# != 0; then
34682     # We chose a different compiler from the bogus one.
34683     # However, it has the same basename, so the bogon will be chosen
34684     # first if we set RC to just the basename; use the full file name.
34685     shift
34686     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34687   fi
34688 fi
34689 fi
34690 fi
34691 RC=$ac_cv_prog_RC
34692 if test -n "$RC"; then
34693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34694 $as_echo "$RC" >&6; }
34695 else
34696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34697 $as_echo "no" >&6; }
34698 fi
34699 
34700 
34701 
34702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34703 
34704   # First separate the path from the arguments. This will split at the first
34705   # space.
34706   complete="$RC"
34707   path="${complete%% *}"
34708   tmp="$complete EOL"
34709   arguments="${tmp#* }"
34710 
34711   # Input might be given as Windows format, start by converting to
34712   # unix format.
34713   new_path=`$CYGPATH -u "$path"`
34714 
34715   # Now try to locate executable using which
34716   new_path=`$WHICH "$new_path" 2> /dev/null`
34717   # bat and cmd files are not always considered executable in cygwin causing which
34718   # to not find them
34719   if test "x$new_path" = x \
34720       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34721       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34722     new_path=`$CYGPATH -u "$path"`
34723   fi
34724   if test "x$new_path" = x; then
34725     # Oops. Which didn't find the executable.
34726     # The splitting of arguments from the executable at a space might have been incorrect,
34727     # since paths with space are more likely in Windows. Give it another try with the whole
34728     # argument.
34729     path="$complete"
34730     arguments="EOL"
34731     new_path=`$CYGPATH -u "$path"`
34732     new_path=`$WHICH "$new_path" 2> /dev/null`
34733     # bat and cmd files are not always considered executable in cygwin causing which
34734     # to not find them
34735     if test "x$new_path" = x \
34736         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34737         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34738       new_path=`$CYGPATH -u "$path"`
34739     fi
34740     if test "x$new_path" = x; then
34741       # It's still not found. Now this is an unrecoverable error.
34742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34743 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34744       has_space=`$ECHO "$complete" | $GREP " "`
34745       if test "x$has_space" != x; then
34746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34748       fi
34749       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34750     fi
34751   fi
34752 
34753   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34754   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34755   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34756   # "foo.exe" is OK but "foo" is an error.
34757   #
34758   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34759   # It is also a way to make sure we got the proper file name for the real test later on.
34760   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34761   if test "x$test_shortpath" = x; then
34762     # Short path failed, file does not exist as specified.
34763     # Try adding .exe or .cmd
34764     if test -f "${new_path}.exe"; then
34765       input_to_shortpath="${new_path}.exe"
34766     elif test -f "${new_path}.cmd"; then
34767       input_to_shortpath="${new_path}.cmd"
34768     else
34769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34770 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34771       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34772 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34773       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34774     fi
34775   else
34776     input_to_shortpath="$new_path"
34777   fi
34778 
34779   # Call helper function which possibly converts this using DOS-style short mode.
34780   # If so, the updated path is stored in $new_path.
34781   new_path="$input_to_shortpath"
34782 
34783   input_path="$input_to_shortpath"
34784   # Check if we need to convert this using DOS-style short mode. If the path
34785   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34786   # take no chances and rewrite it.
34787   # Note: m4 eats our [], so we need to use [ and ] instead.
34788   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34789   if test "x$has_forbidden_chars" != x; then
34790     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34791     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34792     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34793     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34794       # Going to short mode and back again did indeed matter. Since short mode is
34795       # case insensitive, let's make it lowercase to improve readability.
34796       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34797       # Now convert it back to Unix-stile (cygpath)
34798       input_path=`$CYGPATH -u "$shortmode_path"`
34799       new_path="$input_path"
34800     fi
34801   fi
34802 
34803   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34804   if test "x$test_cygdrive_prefix" = x; then
34805     # As a simple fix, exclude /usr/bin since it's not a real path.
34806     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34807       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34808       # a path prefixed by /cygdrive for fixpath to work.
34809       new_path="$CYGWIN_ROOT_PATH$input_path"
34810     fi
34811   fi
34812 
34813   # remove trailing .exe if any
34814   new_path="${new_path/%.exe/}"
34815 
34816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34817 
34818   # First separate the path from the arguments. This will split at the first
34819   # space.
34820   complete="$RC"
34821   path="${complete%% *}"
34822   tmp="$complete EOL"
34823   arguments="${tmp#* }"
34824 
34825   # Input might be given as Windows format, start by converting to
34826   # unix format.
34827   new_path="$path"
34828 
34829   windows_path="$new_path"
34830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34831     unix_path=`$CYGPATH -u "$windows_path"`
34832     new_path="$unix_path"
34833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34835     new_path="$unix_path"
34836   fi
34837 
34838 
34839   # Now try to locate executable using which
34840   new_path=`$WHICH "$new_path" 2> /dev/null`
34841 
34842   if test "x$new_path" = x; then
34843     # Oops. Which didn't find the executable.
34844     # The splitting of arguments from the executable at a space might have been incorrect,
34845     # since paths with space are more likely in Windows. Give it another try with the whole
34846     # argument.
34847     path="$complete"
34848     arguments="EOL"
34849     new_path="$path"
34850 
34851   windows_path="$new_path"
34852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34853     unix_path=`$CYGPATH -u "$windows_path"`
34854     new_path="$unix_path"
34855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34857     new_path="$unix_path"
34858   fi
34859 
34860 
34861     new_path=`$WHICH "$new_path" 2> /dev/null`
34862     # bat and cmd files are not always considered executable in MSYS causing which
34863     # to not find them
34864     if test "x$new_path" = x \
34865         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34866         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34867       new_path="$path"
34868 
34869   windows_path="$new_path"
34870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34871     unix_path=`$CYGPATH -u "$windows_path"`
34872     new_path="$unix_path"
34873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34875     new_path="$unix_path"
34876   fi
34877 
34878     fi
34879 
34880     if test "x$new_path" = x; then
34881       # It's still not found. Now this is an unrecoverable error.
34882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34883 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34884       has_space=`$ECHO "$complete" | $GREP " "`
34885       if test "x$has_space" != x; then
34886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34888       fi
34889       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34890     fi
34891   fi
34892 
34893   # Now new_path has a complete unix path to the binary
34894   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34895     # Keep paths in /bin as-is, but remove trailing .exe if any
34896     new_path="${new_path/%.exe/}"
34897     # Do not save /bin paths to all_fixpath_prefixes!
34898   else
34899     # Not in mixed or Windows style, start by that.
34900     new_path=`cmd //c echo $new_path`
34901 
34902   input_path="$new_path"
34903   # Check if we need to convert this using DOS-style short mode. If the path
34904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34905   # take no chances and rewrite it.
34906   # Note: m4 eats our [], so we need to use [ and ] instead.
34907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34908   if test "x$has_forbidden_chars" != x; then
34909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34911   fi
34912 
34913     # Output is in $new_path
34914 
34915   windows_path="$new_path"
34916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34917     unix_path=`$CYGPATH -u "$windows_path"`
34918     new_path="$unix_path"
34919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34921     new_path="$unix_path"
34922   fi
34923 
34924     # remove trailing .exe if any
34925     new_path="${new_path/%.exe/}"
34926 
34927     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34928     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34929   fi
34930 
34931   else
34932     # We're on a unix platform. Hooray! :)
34933     # First separate the path from the arguments. This will split at the first
34934     # space.
34935     complete="$RC"
34936     path="${complete%% *}"
34937     tmp="$complete EOL"
34938     arguments="${tmp#* }"
34939 
34940     # Cannot rely on the command "which" here since it doesn't always work.
34941     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34942     if test -z "$is_absolute_path"; then
34943       # Path to executable is not absolute. Find it.
34944       IFS_save="$IFS"
34945       IFS=:
34946       for p in $PATH; do
34947         if test -f "$p/$path" && test -x "$p/$path"; then
34948           new_path="$p/$path"
34949           break
34950         fi
34951       done
34952       IFS="$IFS_save"
34953     else
34954       # This is an absolute path, we can use it without further modifications.
34955       new_path="$path"
34956     fi
34957 
34958     if test "x$new_path" = x; then
34959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34960 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34961       has_space=`$ECHO "$complete" | $GREP " "`
34962       if test "x$has_space" != x; then
34963         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34964 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34965       fi
34966       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34967     fi
34968   fi
34969 
34970   # Now join together the path and the arguments once again
34971   if test "x$arguments" != xEOL; then
34972     new_complete="$new_path ${arguments% *}"
34973   else
34974     new_complete="$new_path"
34975   fi
34976 
34977   if test "x$complete" != "x$new_complete"; then
34978     RC="$new_complete"
34979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34980 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34981   fi
34982 
34983     # Extract the first word of "dumpbin", so it can be a program name with args.
34984 set dummy dumpbin; ac_word=$2
34985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34986 $as_echo_n "checking for $ac_word... " >&6; }
34987 if ${ac_cv_prog_DUMPBIN+:} false; then :
34988   $as_echo_n "(cached) " >&6
34989 else
34990   if test -n "$DUMPBIN"; then
34991   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34992 else
34993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34994 for as_dir in $PATH
34995 do
34996   IFS=$as_save_IFS
34997   test -z "$as_dir" && as_dir=.
34998     for ac_exec_ext in '' $ac_executable_extensions; do
34999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35000     ac_cv_prog_DUMPBIN="dumpbin"
35001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35002     break 2
35003   fi
35004 done
35005   done
35006 IFS=$as_save_IFS
35007 
35008 fi
35009 fi
35010 DUMPBIN=$ac_cv_prog_DUMPBIN
35011 if test -n "$DUMPBIN"; then
35012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35013 $as_echo "$DUMPBIN" >&6; }
35014 else
35015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35016 $as_echo "no" >&6; }
35017 fi
35018 
35019 
35020 
35021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35022 
35023   # First separate the path from the arguments. This will split at the first
35024   # space.
35025   complete="$DUMPBIN"
35026   path="${complete%% *}"
35027   tmp="$complete EOL"
35028   arguments="${tmp#* }"
35029 
35030   # Input might be given as Windows format, start by converting to
35031   # unix format.
35032   new_path=`$CYGPATH -u "$path"`
35033 
35034   # Now try to locate executable using which
35035   new_path=`$WHICH "$new_path" 2> /dev/null`
35036   # bat and cmd files are not always considered executable in cygwin causing which
35037   # to not find them
35038   if test "x$new_path" = x \
35039       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35040       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35041     new_path=`$CYGPATH -u "$path"`
35042   fi
35043   if test "x$new_path" = x; then
35044     # Oops. Which didn't find the executable.
35045     # The splitting of arguments from the executable at a space might have been incorrect,
35046     # since paths with space are more likely in Windows. Give it another try with the whole
35047     # argument.
35048     path="$complete"
35049     arguments="EOL"
35050     new_path=`$CYGPATH -u "$path"`
35051     new_path=`$WHICH "$new_path" 2> /dev/null`
35052     # bat and cmd files are not always considered executable in cygwin causing which
35053     # to not find them
35054     if test "x$new_path" = x \
35055         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35056         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35057       new_path=`$CYGPATH -u "$path"`
35058     fi
35059     if test "x$new_path" = x; then
35060       # It's still not found. Now this is an unrecoverable error.
35061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35062 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35063       has_space=`$ECHO "$complete" | $GREP " "`
35064       if test "x$has_space" != x; then
35065         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35066 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35067       fi
35068       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35069     fi
35070   fi
35071 
35072   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35073   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35074   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35075   # "foo.exe" is OK but "foo" is an error.
35076   #
35077   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35078   # It is also a way to make sure we got the proper file name for the real test later on.
35079   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35080   if test "x$test_shortpath" = x; then
35081     # Short path failed, file does not exist as specified.
35082     # Try adding .exe or .cmd
35083     if test -f "${new_path}.exe"; then
35084       input_to_shortpath="${new_path}.exe"
35085     elif test -f "${new_path}.cmd"; then
35086       input_to_shortpath="${new_path}.cmd"
35087     else
35088       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35089 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35090       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35091 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35092       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35093     fi
35094   else
35095     input_to_shortpath="$new_path"
35096   fi
35097 
35098   # Call helper function which possibly converts this using DOS-style short mode.
35099   # If so, the updated path is stored in $new_path.
35100   new_path="$input_to_shortpath"
35101 
35102   input_path="$input_to_shortpath"
35103   # Check if we need to convert this using DOS-style short mode. If the path
35104   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35105   # take no chances and rewrite it.
35106   # Note: m4 eats our [], so we need to use [ and ] instead.
35107   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35108   if test "x$has_forbidden_chars" != x; then
35109     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35110     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35111     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35112     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35113       # Going to short mode and back again did indeed matter. Since short mode is
35114       # case insensitive, let's make it lowercase to improve readability.
35115       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35116       # Now convert it back to Unix-stile (cygpath)
35117       input_path=`$CYGPATH -u "$shortmode_path"`
35118       new_path="$input_path"
35119     fi
35120   fi
35121 
35122   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35123   if test "x$test_cygdrive_prefix" = x; then
35124     # As a simple fix, exclude /usr/bin since it's not a real path.
35125     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35126       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35127       # a path prefixed by /cygdrive for fixpath to work.
35128       new_path="$CYGWIN_ROOT_PATH$input_path"
35129     fi
35130   fi
35131 
35132   # remove trailing .exe if any
35133   new_path="${new_path/%.exe/}"
35134 
35135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35136 
35137   # First separate the path from the arguments. This will split at the first
35138   # space.
35139   complete="$DUMPBIN"
35140   path="${complete%% *}"
35141   tmp="$complete EOL"
35142   arguments="${tmp#* }"
35143 
35144   # Input might be given as Windows format, start by converting to
35145   # unix format.
35146   new_path="$path"
35147 
35148   windows_path="$new_path"
35149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35150     unix_path=`$CYGPATH -u "$windows_path"`
35151     new_path="$unix_path"
35152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35154     new_path="$unix_path"
35155   fi
35156 
35157 
35158   # Now try to locate executable using which
35159   new_path=`$WHICH "$new_path" 2> /dev/null`
35160 
35161   if test "x$new_path" = x; then
35162     # Oops. Which didn't find the executable.
35163     # The splitting of arguments from the executable at a space might have been incorrect,
35164     # since paths with space are more likely in Windows. Give it another try with the whole
35165     # argument.
35166     path="$complete"
35167     arguments="EOL"
35168     new_path="$path"
35169 
35170   windows_path="$new_path"
35171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35172     unix_path=`$CYGPATH -u "$windows_path"`
35173     new_path="$unix_path"
35174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35176     new_path="$unix_path"
35177   fi
35178 
35179 
35180     new_path=`$WHICH "$new_path" 2> /dev/null`
35181     # bat and cmd files are not always considered executable in MSYS causing which
35182     # to not find them
35183     if test "x$new_path" = x \
35184         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35185         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35186       new_path="$path"
35187 
35188   windows_path="$new_path"
35189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35190     unix_path=`$CYGPATH -u "$windows_path"`
35191     new_path="$unix_path"
35192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35194     new_path="$unix_path"
35195   fi
35196 
35197     fi
35198 
35199     if test "x$new_path" = x; then
35200       # It's still not found. Now this is an unrecoverable error.
35201       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35202 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35203       has_space=`$ECHO "$complete" | $GREP " "`
35204       if test "x$has_space" != x; then
35205         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35206 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35207       fi
35208       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35209     fi
35210   fi
35211 
35212   # Now new_path has a complete unix path to the binary
35213   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35214     # Keep paths in /bin as-is, but remove trailing .exe if any
35215     new_path="${new_path/%.exe/}"
35216     # Do not save /bin paths to all_fixpath_prefixes!
35217   else
35218     # Not in mixed or Windows style, start by that.
35219     new_path=`cmd //c echo $new_path`
35220 
35221   input_path="$new_path"
35222   # Check if we need to convert this using DOS-style short mode. If the path
35223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35224   # take no chances and rewrite it.
35225   # Note: m4 eats our [], so we need to use [ and ] instead.
35226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35227   if test "x$has_forbidden_chars" != x; then
35228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35229     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35230   fi
35231 
35232     # Output is in $new_path
35233 
35234   windows_path="$new_path"
35235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35236     unix_path=`$CYGPATH -u "$windows_path"`
35237     new_path="$unix_path"
35238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35240     new_path="$unix_path"
35241   fi
35242 
35243     # remove trailing .exe if any
35244     new_path="${new_path/%.exe/}"
35245 
35246     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35247     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35248   fi
35249 
35250   else
35251     # We're on a unix platform. Hooray! :)
35252     # First separate the path from the arguments. This will split at the first
35253     # space.
35254     complete="$DUMPBIN"
35255     path="${complete%% *}"
35256     tmp="$complete EOL"
35257     arguments="${tmp#* }"
35258 
35259     # Cannot rely on the command "which" here since it doesn't always work.
35260     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35261     if test -z "$is_absolute_path"; then
35262       # Path to executable is not absolute. Find it.
35263       IFS_save="$IFS"
35264       IFS=:
35265       for p in $PATH; do
35266         if test -f "$p/$path" && test -x "$p/$path"; then
35267           new_path="$p/$path"
35268           break
35269         fi
35270       done
35271       IFS="$IFS_save"
35272     else
35273       # This is an absolute path, we can use it without further modifications.
35274       new_path="$path"
35275     fi
35276 
35277     if test "x$new_path" = x; then
35278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35279 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35280       has_space=`$ECHO "$complete" | $GREP " "`
35281       if test "x$has_space" != x; then
35282         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35283 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35284       fi
35285       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35286     fi
35287   fi
35288 
35289   # Now join together the path and the arguments once again
35290   if test "x$arguments" != xEOL; then
35291     new_complete="$new_path ${arguments% *}"
35292   else
35293     new_complete="$new_path"
35294   fi
35295 
35296   if test "x$complete" != "x$new_complete"; then
35297     DUMPBIN="$new_complete"
35298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35299 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35300   fi
35301 
35302     # We need to check for 'msbuild.exe' because at the place where we expect to
35303     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35304     # won't find the 'msbuild.exe' executable in that case (and the
35305     # 'ac_executable_extensions' is unusable due to performance reasons).
35306     # Notice that we intentionally don't fix up the path to MSBUILD because we
35307     # will call it in a DOS shell during freetype detection on Windows (see
35308     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35309     # Extract the first word of "msbuild.exe", so it can be a program name with args.
35310 set dummy msbuild.exe; ac_word=$2
35311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35312 $as_echo_n "checking for $ac_word... " >&6; }
35313 if ${ac_cv_prog_MSBUILD+:} false; then :
35314   $as_echo_n "(cached) " >&6
35315 else
35316   if test -n "$MSBUILD"; then
35317   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35318 else
35319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35320 for as_dir in $PATH
35321 do
35322   IFS=$as_save_IFS
35323   test -z "$as_dir" && as_dir=.
35324     for ac_exec_ext in '' $ac_executable_extensions; do
35325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35326     ac_cv_prog_MSBUILD="msbuild.exe"
35327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35328     break 2
35329   fi
35330 done
35331   done
35332 IFS=$as_save_IFS
35333 
35334 fi
35335 fi
35336 MSBUILD=$ac_cv_prog_MSBUILD
35337 if test -n "$MSBUILD"; then
35338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35339 $as_echo "$MSBUILD" >&6; }
35340 else
35341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35342 $as_echo "no" >&6; }
35343 fi
35344 
35345 
35346   fi
35347 
35348   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35349 
35350 
35351   # Publish this variable in the help.
35352 
35353 
35354   if test "x$STRIP" = x; then
35355     # The variable is not set by user, try to locate tool using the code snippet
35356     for ac_prog in strip
35357 do
35358   # Extract the first word of "$ac_prog", so it can be a program name with args.
35359 set dummy $ac_prog; ac_word=$2
35360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35361 $as_echo_n "checking for $ac_word... " >&6; }
35362 if ${ac_cv_path_STRIP+:} false; then :
35363   $as_echo_n "(cached) " >&6
35364 else
35365   case $STRIP in
35366   [\\/]* | ?:[\\/]*)
35367   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35368   ;;
35369   *)
35370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35371 for as_dir in $PATH
35372 do
35373   IFS=$as_save_IFS
35374   test -z "$as_dir" && as_dir=.
35375     for ac_exec_ext in '' $ac_executable_extensions; do
35376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35377     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35379     break 2
35380   fi
35381 done
35382   done
35383 IFS=$as_save_IFS
35384 
35385   ;;
35386 esac
35387 fi
35388 STRIP=$ac_cv_path_STRIP
35389 if test -n "$STRIP"; then
35390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35391 $as_echo "$STRIP" >&6; }
35392 else
35393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35394 $as_echo "no" >&6; }
35395 fi
35396 
35397 
35398   test -n "$STRIP" && break
35399 done
35400 
35401   else
35402     # The variable is set, but is it from the command line or the environment?
35403 
35404     # Try to remove the string !STRIP! from our list.
35405     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35406     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35407       # If it failed, the variable was not from the command line. Ignore it,
35408       # but warn the user (except for BASH, which is always set by the calling BASH).
35409       if test "xSTRIP" != xBASH; then
35410         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35411 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35412       fi
35413       # Try to locate tool using the code snippet
35414       for ac_prog in strip
35415 do
35416   # Extract the first word of "$ac_prog", so it can be a program name with args.
35417 set dummy $ac_prog; ac_word=$2
35418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35419 $as_echo_n "checking for $ac_word... " >&6; }
35420 if ${ac_cv_path_STRIP+:} false; then :
35421   $as_echo_n "(cached) " >&6
35422 else
35423   case $STRIP in
35424   [\\/]* | ?:[\\/]*)
35425   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35426   ;;
35427   *)
35428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35429 for as_dir in $PATH
35430 do
35431   IFS=$as_save_IFS
35432   test -z "$as_dir" && as_dir=.
35433     for ac_exec_ext in '' $ac_executable_extensions; do
35434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35435     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35437     break 2
35438   fi
35439 done
35440   done
35441 IFS=$as_save_IFS
35442 
35443   ;;
35444 esac
35445 fi
35446 STRIP=$ac_cv_path_STRIP
35447 if test -n "$STRIP"; then
35448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35449 $as_echo "$STRIP" >&6; }
35450 else
35451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35452 $as_echo "no" >&6; }
35453 fi
35454 
35455 
35456   test -n "$STRIP" && break
35457 done
35458 
35459     else
35460       # If it succeeded, then it was overridden by the user. We will use it
35461       # for the tool.
35462 
35463       # First remove it from the list of overridden variables, so we can test
35464       # for unknown variables in the end.
35465       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35466 
35467       # Check if the provided tool contains a complete path.
35468       tool_specified="$STRIP"
35469       tool_basename="${tool_specified##*/}"
35470       if test "x$tool_basename" = "x$tool_specified"; then
35471         # A command without a complete path is provided, search $PATH.
35472         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35473 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35474         # Extract the first word of "$tool_basename", so it can be a program name with args.
35475 set dummy $tool_basename; ac_word=$2
35476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35477 $as_echo_n "checking for $ac_word... " >&6; }
35478 if ${ac_cv_path_STRIP+:} false; then :
35479   $as_echo_n "(cached) " >&6
35480 else
35481   case $STRIP in
35482   [\\/]* | ?:[\\/]*)
35483   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35484   ;;
35485   *)
35486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35487 for as_dir in $PATH
35488 do
35489   IFS=$as_save_IFS
35490   test -z "$as_dir" && as_dir=.
35491     for ac_exec_ext in '' $ac_executable_extensions; do
35492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35493     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35495     break 2
35496   fi
35497 done
35498   done
35499 IFS=$as_save_IFS
35500 
35501   ;;
35502 esac
35503 fi
35504 STRIP=$ac_cv_path_STRIP
35505 if test -n "$STRIP"; then
35506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35507 $as_echo "$STRIP" >&6; }
35508 else
35509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35510 $as_echo "no" >&6; }
35511 fi
35512 
35513 
35514         if test "x$STRIP" = x; then
35515           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35516         fi
35517       else
35518         # Otherwise we believe it is a complete path. Use it as it is.
35519         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35520 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35522 $as_echo_n "checking for STRIP... " >&6; }
35523         if test ! -x "$tool_specified"; then
35524           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35525 $as_echo "not found" >&6; }
35526           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35527         fi
35528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35529 $as_echo "$tool_specified" >&6; }
35530       fi
35531     fi
35532   fi
35533 
35534 
35535 
35536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35537 
35538   # First separate the path from the arguments. This will split at the first
35539   # space.
35540   complete="$STRIP"
35541   path="${complete%% *}"
35542   tmp="$complete EOL"
35543   arguments="${tmp#* }"
35544 
35545   # Input might be given as Windows format, start by converting to
35546   # unix format.
35547   new_path=`$CYGPATH -u "$path"`
35548 
35549   # Now try to locate executable using which
35550   new_path=`$WHICH "$new_path" 2> /dev/null`
35551   # bat and cmd files are not always considered executable in cygwin causing which
35552   # to not find them
35553   if test "x$new_path" = x \
35554       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35555       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35556     new_path=`$CYGPATH -u "$path"`
35557   fi
35558   if test "x$new_path" = x; then
35559     # Oops. Which didn't find the executable.
35560     # The splitting of arguments from the executable at a space might have been incorrect,
35561     # since paths with space are more likely in Windows. Give it another try with the whole
35562     # argument.
35563     path="$complete"
35564     arguments="EOL"
35565     new_path=`$CYGPATH -u "$path"`
35566     new_path=`$WHICH "$new_path" 2> /dev/null`
35567     # bat and cmd files are not always considered executable in cygwin causing which
35568     # to not find them
35569     if test "x$new_path" = x \
35570         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35571         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35572       new_path=`$CYGPATH -u "$path"`
35573     fi
35574     if test "x$new_path" = x; then
35575       # It's still not found. Now this is an unrecoverable error.
35576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35577 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35578       has_space=`$ECHO "$complete" | $GREP " "`
35579       if test "x$has_space" != x; then
35580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35582       fi
35583       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35584     fi
35585   fi
35586 
35587   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35588   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35589   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35590   # "foo.exe" is OK but "foo" is an error.
35591   #
35592   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35593   # It is also a way to make sure we got the proper file name for the real test later on.
35594   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35595   if test "x$test_shortpath" = x; then
35596     # Short path failed, file does not exist as specified.
35597     # Try adding .exe or .cmd
35598     if test -f "${new_path}.exe"; then
35599       input_to_shortpath="${new_path}.exe"
35600     elif test -f "${new_path}.cmd"; then
35601       input_to_shortpath="${new_path}.cmd"
35602     else
35603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35604 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35605       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35606 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35607       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35608     fi
35609   else
35610     input_to_shortpath="$new_path"
35611   fi
35612 
35613   # Call helper function which possibly converts this using DOS-style short mode.
35614   # If so, the updated path is stored in $new_path.
35615   new_path="$input_to_shortpath"
35616 
35617   input_path="$input_to_shortpath"
35618   # Check if we need to convert this using DOS-style short mode. If the path
35619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35620   # take no chances and rewrite it.
35621   # Note: m4 eats our [], so we need to use [ and ] instead.
35622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35623   if test "x$has_forbidden_chars" != x; then
35624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35625     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35626     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35627     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35628       # Going to short mode and back again did indeed matter. Since short mode is
35629       # case insensitive, let's make it lowercase to improve readability.
35630       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35631       # Now convert it back to Unix-stile (cygpath)
35632       input_path=`$CYGPATH -u "$shortmode_path"`
35633       new_path="$input_path"
35634     fi
35635   fi
35636 
35637   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35638   if test "x$test_cygdrive_prefix" = x; then
35639     # As a simple fix, exclude /usr/bin since it's not a real path.
35640     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35641       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35642       # a path prefixed by /cygdrive for fixpath to work.
35643       new_path="$CYGWIN_ROOT_PATH$input_path"
35644     fi
35645   fi
35646 
35647   # remove trailing .exe if any
35648   new_path="${new_path/%.exe/}"
35649 
35650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35651 
35652   # First separate the path from the arguments. This will split at the first
35653   # space.
35654   complete="$STRIP"
35655   path="${complete%% *}"
35656   tmp="$complete EOL"
35657   arguments="${tmp#* }"
35658 
35659   # Input might be given as Windows format, start by converting to
35660   # unix format.
35661   new_path="$path"
35662 
35663   windows_path="$new_path"
35664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665     unix_path=`$CYGPATH -u "$windows_path"`
35666     new_path="$unix_path"
35667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669     new_path="$unix_path"
35670   fi
35671 
35672 
35673   # Now try to locate executable using which
35674   new_path=`$WHICH "$new_path" 2> /dev/null`
35675 
35676   if test "x$new_path" = x; then
35677     # Oops. Which didn't find the executable.
35678     # The splitting of arguments from the executable at a space might have been incorrect,
35679     # since paths with space are more likely in Windows. Give it another try with the whole
35680     # argument.
35681     path="$complete"
35682     arguments="EOL"
35683     new_path="$path"
35684 
35685   windows_path="$new_path"
35686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35687     unix_path=`$CYGPATH -u "$windows_path"`
35688     new_path="$unix_path"
35689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35691     new_path="$unix_path"
35692   fi
35693 
35694 
35695     new_path=`$WHICH "$new_path" 2> /dev/null`
35696     # bat and cmd files are not always considered executable in MSYS causing which
35697     # to not find them
35698     if test "x$new_path" = x \
35699         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35700         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35701       new_path="$path"
35702 
35703   windows_path="$new_path"
35704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35705     unix_path=`$CYGPATH -u "$windows_path"`
35706     new_path="$unix_path"
35707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35709     new_path="$unix_path"
35710   fi
35711 
35712     fi
35713 
35714     if test "x$new_path" = x; then
35715       # It's still not found. Now this is an unrecoverable error.
35716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35717 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35718       has_space=`$ECHO "$complete" | $GREP " "`
35719       if test "x$has_space" != x; then
35720         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35721 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35722       fi
35723       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35724     fi
35725   fi
35726 
35727   # Now new_path has a complete unix path to the binary
35728   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35729     # Keep paths in /bin as-is, but remove trailing .exe if any
35730     new_path="${new_path/%.exe/}"
35731     # Do not save /bin paths to all_fixpath_prefixes!
35732   else
35733     # Not in mixed or Windows style, start by that.
35734     new_path=`cmd //c echo $new_path`
35735 
35736   input_path="$new_path"
35737   # Check if we need to convert this using DOS-style short mode. If the path
35738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35739   # take no chances and rewrite it.
35740   # Note: m4 eats our [], so we need to use [ and ] instead.
35741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35742   if test "x$has_forbidden_chars" != x; then
35743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35744     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35745   fi
35746 
35747     # Output is in $new_path
35748 
35749   windows_path="$new_path"
35750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35751     unix_path=`$CYGPATH -u "$windows_path"`
35752     new_path="$unix_path"
35753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35755     new_path="$unix_path"
35756   fi
35757 
35758     # remove trailing .exe if any
35759     new_path="${new_path/%.exe/}"
35760 
35761     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35762     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35763   fi
35764 
35765   else
35766     # We're on a unix platform. Hooray! :)
35767     # First separate the path from the arguments. This will split at the first
35768     # space.
35769     complete="$STRIP"
35770     path="${complete%% *}"
35771     tmp="$complete EOL"
35772     arguments="${tmp#* }"
35773 
35774     # Cannot rely on the command "which" here since it doesn't always work.
35775     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35776     if test -z "$is_absolute_path"; then
35777       # Path to executable is not absolute. Find it.
35778       IFS_save="$IFS"
35779       IFS=:
35780       for p in $PATH; do
35781         if test -f "$p/$path" && test -x "$p/$path"; then
35782           new_path="$p/$path"
35783           break
35784         fi
35785       done
35786       IFS="$IFS_save"
35787     else
35788       # This is an absolute path, we can use it without further modifications.
35789       new_path="$path"
35790     fi
35791 
35792     if test "x$new_path" = x; then
35793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35794 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35795       has_space=`$ECHO "$complete" | $GREP " "`
35796       if test "x$has_space" != x; then
35797         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35798 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35799       fi
35800       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35801     fi
35802   fi
35803 
35804   # Now join together the path and the arguments once again
35805   if test "x$arguments" != xEOL; then
35806     new_complete="$new_path ${arguments% *}"
35807   else
35808     new_complete="$new_path"
35809   fi
35810 
35811   if test "x$complete" != "x$new_complete"; then
35812     STRIP="$new_complete"
35813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35814 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35815   fi
35816 
35817 
35818 
35819   # Publish this variable in the help.
35820 
35821 
35822   if test "x$NM" = x; then
35823     # The variable is not set by user, try to locate tool using the code snippet
35824     for ac_prog in nm
35825 do
35826   # Extract the first word of "$ac_prog", so it can be a program name with args.
35827 set dummy $ac_prog; ac_word=$2
35828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35829 $as_echo_n "checking for $ac_word... " >&6; }
35830 if ${ac_cv_path_NM+:} false; then :
35831   $as_echo_n "(cached) " >&6
35832 else
35833   case $NM in
35834   [\\/]* | ?:[\\/]*)
35835   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35836   ;;
35837   *)
35838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35839 for as_dir in $PATH
35840 do
35841   IFS=$as_save_IFS
35842   test -z "$as_dir" && as_dir=.
35843     for ac_exec_ext in '' $ac_executable_extensions; do
35844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35845     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35847     break 2
35848   fi
35849 done
35850   done
35851 IFS=$as_save_IFS
35852 
35853   ;;
35854 esac
35855 fi
35856 NM=$ac_cv_path_NM
35857 if test -n "$NM"; then
35858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35859 $as_echo "$NM" >&6; }
35860 else
35861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35862 $as_echo "no" >&6; }
35863 fi
35864 
35865 
35866   test -n "$NM" && break
35867 done
35868 
35869   else
35870     # The variable is set, but is it from the command line or the environment?
35871 
35872     # Try to remove the string !NM! from our list.
35873     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35874     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35875       # If it failed, the variable was not from the command line. Ignore it,
35876       # but warn the user (except for BASH, which is always set by the calling BASH).
35877       if test "xNM" != xBASH; then
35878         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35879 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35880       fi
35881       # Try to locate tool using the code snippet
35882       for ac_prog in nm
35883 do
35884   # Extract the first word of "$ac_prog", so it can be a program name with args.
35885 set dummy $ac_prog; ac_word=$2
35886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35887 $as_echo_n "checking for $ac_word... " >&6; }
35888 if ${ac_cv_path_NM+:} false; then :
35889   $as_echo_n "(cached) " >&6
35890 else
35891   case $NM in
35892   [\\/]* | ?:[\\/]*)
35893   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35894   ;;
35895   *)
35896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35897 for as_dir in $PATH
35898 do
35899   IFS=$as_save_IFS
35900   test -z "$as_dir" && as_dir=.
35901     for ac_exec_ext in '' $ac_executable_extensions; do
35902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35903     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35905     break 2
35906   fi
35907 done
35908   done
35909 IFS=$as_save_IFS
35910 
35911   ;;
35912 esac
35913 fi
35914 NM=$ac_cv_path_NM
35915 if test -n "$NM"; then
35916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35917 $as_echo "$NM" >&6; }
35918 else
35919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35920 $as_echo "no" >&6; }
35921 fi
35922 
35923 
35924   test -n "$NM" && break
35925 done
35926 
35927     else
35928       # If it succeeded, then it was overridden by the user. We will use it
35929       # for the tool.
35930 
35931       # First remove it from the list of overridden variables, so we can test
35932       # for unknown variables in the end.
35933       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35934 
35935       # Check if the provided tool contains a complete path.
35936       tool_specified="$NM"
35937       tool_basename="${tool_specified##*/}"
35938       if test "x$tool_basename" = "x$tool_specified"; then
35939         # A command without a complete path is provided, search $PATH.
35940         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35941 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35942         # Extract the first word of "$tool_basename", so it can be a program name with args.
35943 set dummy $tool_basename; ac_word=$2
35944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35945 $as_echo_n "checking for $ac_word... " >&6; }
35946 if ${ac_cv_path_NM+:} false; then :
35947   $as_echo_n "(cached) " >&6
35948 else
35949   case $NM in
35950   [\\/]* | ?:[\\/]*)
35951   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35952   ;;
35953   *)
35954   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35955 for as_dir in $PATH
35956 do
35957   IFS=$as_save_IFS
35958   test -z "$as_dir" && as_dir=.
35959     for ac_exec_ext in '' $ac_executable_extensions; do
35960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35961     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35963     break 2
35964   fi
35965 done
35966   done
35967 IFS=$as_save_IFS
35968 
35969   ;;
35970 esac
35971 fi
35972 NM=$ac_cv_path_NM
35973 if test -n "$NM"; then
35974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35975 $as_echo "$NM" >&6; }
35976 else
35977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35978 $as_echo "no" >&6; }
35979 fi
35980 
35981 
35982         if test "x$NM" = x; then
35983           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35984         fi
35985       else
35986         # Otherwise we believe it is a complete path. Use it as it is.
35987         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35988 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35990 $as_echo_n "checking for NM... " >&6; }
35991         if test ! -x "$tool_specified"; then
35992           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35993 $as_echo "not found" >&6; }
35994           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35995         fi
35996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35997 $as_echo "$tool_specified" >&6; }
35998       fi
35999     fi
36000   fi
36001 
36002 
36003 
36004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36005 
36006   # First separate the path from the arguments. This will split at the first
36007   # space.
36008   complete="$NM"
36009   path="${complete%% *}"
36010   tmp="$complete EOL"
36011   arguments="${tmp#* }"
36012 
36013   # Input might be given as Windows format, start by converting to
36014   # unix format.
36015   new_path=`$CYGPATH -u "$path"`
36016 
36017   # Now try to locate executable using which
36018   new_path=`$WHICH "$new_path" 2> /dev/null`
36019   # bat and cmd files are not always considered executable in cygwin causing which
36020   # to not find them
36021   if test "x$new_path" = x \
36022       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36023       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36024     new_path=`$CYGPATH -u "$path"`
36025   fi
36026   if test "x$new_path" = x; then
36027     # Oops. Which didn't find the executable.
36028     # The splitting of arguments from the executable at a space might have been incorrect,
36029     # since paths with space are more likely in Windows. Give it another try with the whole
36030     # argument.
36031     path="$complete"
36032     arguments="EOL"
36033     new_path=`$CYGPATH -u "$path"`
36034     new_path=`$WHICH "$new_path" 2> /dev/null`
36035     # bat and cmd files are not always considered executable in cygwin causing which
36036     # to not find them
36037     if test "x$new_path" = x \
36038         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36039         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36040       new_path=`$CYGPATH -u "$path"`
36041     fi
36042     if test "x$new_path" = x; then
36043       # It's still not found. Now this is an unrecoverable error.
36044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36045 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36046       has_space=`$ECHO "$complete" | $GREP " "`
36047       if test "x$has_space" != x; then
36048         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36049 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36050       fi
36051       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36052     fi
36053   fi
36054 
36055   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36056   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36057   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36058   # "foo.exe" is OK but "foo" is an error.
36059   #
36060   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36061   # It is also a way to make sure we got the proper file name for the real test later on.
36062   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36063   if test "x$test_shortpath" = x; then
36064     # Short path failed, file does not exist as specified.
36065     # Try adding .exe or .cmd
36066     if test -f "${new_path}.exe"; then
36067       input_to_shortpath="${new_path}.exe"
36068     elif test -f "${new_path}.cmd"; then
36069       input_to_shortpath="${new_path}.cmd"
36070     else
36071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36072 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36073       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36074 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36075       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36076     fi
36077   else
36078     input_to_shortpath="$new_path"
36079   fi
36080 
36081   # Call helper function which possibly converts this using DOS-style short mode.
36082   # If so, the updated path is stored in $new_path.
36083   new_path="$input_to_shortpath"
36084 
36085   input_path="$input_to_shortpath"
36086   # Check if we need to convert this using DOS-style short mode. If the path
36087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36088   # take no chances and rewrite it.
36089   # Note: m4 eats our [], so we need to use [ and ] instead.
36090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36091   if test "x$has_forbidden_chars" != x; then
36092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36096       # Going to short mode and back again did indeed matter. Since short mode is
36097       # case insensitive, let's make it lowercase to improve readability.
36098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36099       # Now convert it back to Unix-stile (cygpath)
36100       input_path=`$CYGPATH -u "$shortmode_path"`
36101       new_path="$input_path"
36102     fi
36103   fi
36104 
36105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36106   if test "x$test_cygdrive_prefix" = x; then
36107     # As a simple fix, exclude /usr/bin since it's not a real path.
36108     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36110       # a path prefixed by /cygdrive for fixpath to work.
36111       new_path="$CYGWIN_ROOT_PATH$input_path"
36112     fi
36113   fi
36114 
36115   # remove trailing .exe if any
36116   new_path="${new_path/%.exe/}"
36117 
36118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36119 
36120   # First separate the path from the arguments. This will split at the first
36121   # space.
36122   complete="$NM"
36123   path="${complete%% *}"
36124   tmp="$complete EOL"
36125   arguments="${tmp#* }"
36126 
36127   # Input might be given as Windows format, start by converting to
36128   # unix format.
36129   new_path="$path"
36130 
36131   windows_path="$new_path"
36132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36133     unix_path=`$CYGPATH -u "$windows_path"`
36134     new_path="$unix_path"
36135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36137     new_path="$unix_path"
36138   fi
36139 
36140 
36141   # Now try to locate executable using which
36142   new_path=`$WHICH "$new_path" 2> /dev/null`
36143 
36144   if test "x$new_path" = x; then
36145     # Oops. Which didn't find the executable.
36146     # The splitting of arguments from the executable at a space might have been incorrect,
36147     # since paths with space are more likely in Windows. Give it another try with the whole
36148     # argument.
36149     path="$complete"
36150     arguments="EOL"
36151     new_path="$path"
36152 
36153   windows_path="$new_path"
36154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36155     unix_path=`$CYGPATH -u "$windows_path"`
36156     new_path="$unix_path"
36157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36159     new_path="$unix_path"
36160   fi
36161 
36162 
36163     new_path=`$WHICH "$new_path" 2> /dev/null`
36164     # bat and cmd files are not always considered executable in MSYS causing which
36165     # to not find them
36166     if test "x$new_path" = x \
36167         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36168         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36169       new_path="$path"
36170 
36171   windows_path="$new_path"
36172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36173     unix_path=`$CYGPATH -u "$windows_path"`
36174     new_path="$unix_path"
36175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36177     new_path="$unix_path"
36178   fi
36179 
36180     fi
36181 
36182     if test "x$new_path" = x; then
36183       # It's still not found. Now this is an unrecoverable error.
36184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36185 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36186       has_space=`$ECHO "$complete" | $GREP " "`
36187       if test "x$has_space" != x; then
36188         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36189 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36190       fi
36191       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36192     fi
36193   fi
36194 
36195   # Now new_path has a complete unix path to the binary
36196   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36197     # Keep paths in /bin as-is, but remove trailing .exe if any
36198     new_path="${new_path/%.exe/}"
36199     # Do not save /bin paths to all_fixpath_prefixes!
36200   else
36201     # Not in mixed or Windows style, start by that.
36202     new_path=`cmd //c echo $new_path`
36203 
36204   input_path="$new_path"
36205   # Check if we need to convert this using DOS-style short mode. If the path
36206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36207   # take no chances and rewrite it.
36208   # Note: m4 eats our [], so we need to use [ and ] instead.
36209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36210   if test "x$has_forbidden_chars" != x; then
36211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36213   fi
36214 
36215     # Output is in $new_path
36216 
36217   windows_path="$new_path"
36218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36219     unix_path=`$CYGPATH -u "$windows_path"`
36220     new_path="$unix_path"
36221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36223     new_path="$unix_path"
36224   fi
36225 
36226     # remove trailing .exe if any
36227     new_path="${new_path/%.exe/}"
36228 
36229     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36230     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36231   fi
36232 
36233   else
36234     # We're on a unix platform. Hooray! :)
36235     # First separate the path from the arguments. This will split at the first
36236     # space.
36237     complete="$NM"
36238     path="${complete%% *}"
36239     tmp="$complete EOL"
36240     arguments="${tmp#* }"
36241 
36242     # Cannot rely on the command "which" here since it doesn't always work.
36243     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36244     if test -z "$is_absolute_path"; then
36245       # Path to executable is not absolute. Find it.
36246       IFS_save="$IFS"
36247       IFS=:
36248       for p in $PATH; do
36249         if test -f "$p/$path" && test -x "$p/$path"; then
36250           new_path="$p/$path"
36251           break
36252         fi
36253       done
36254       IFS="$IFS_save"
36255     else
36256       # This is an absolute path, we can use it without further modifications.
36257       new_path="$path"
36258     fi
36259 
36260     if test "x$new_path" = x; then
36261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36262 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36263       has_space=`$ECHO "$complete" | $GREP " "`
36264       if test "x$has_space" != x; then
36265         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36266 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36267       fi
36268       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36269     fi
36270   fi
36271 
36272   # Now join together the path and the arguments once again
36273   if test "x$arguments" != xEOL; then
36274     new_complete="$new_path ${arguments% *}"
36275   else
36276     new_complete="$new_path"
36277   fi
36278 
36279   if test "x$complete" != "x$new_complete"; then
36280     NM="$new_complete"
36281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36282 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36283   fi
36284 
36285 
36286 
36287   # Publish this variable in the help.
36288 
36289 
36290   if test "x$GNM" = x; then
36291     # The variable is not set by user, try to locate tool using the code snippet
36292     for ac_prog in gnm
36293 do
36294   # Extract the first word of "$ac_prog", so it can be a program name with args.
36295 set dummy $ac_prog; ac_word=$2
36296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36297 $as_echo_n "checking for $ac_word... " >&6; }
36298 if ${ac_cv_path_GNM+:} false; then :
36299   $as_echo_n "(cached) " >&6
36300 else
36301   case $GNM in
36302   [\\/]* | ?:[\\/]*)
36303   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36304   ;;
36305   *)
36306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36307 for as_dir in $PATH
36308 do
36309   IFS=$as_save_IFS
36310   test -z "$as_dir" && as_dir=.
36311     for ac_exec_ext in '' $ac_executable_extensions; do
36312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36313     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36315     break 2
36316   fi
36317 done
36318   done
36319 IFS=$as_save_IFS
36320 
36321   ;;
36322 esac
36323 fi
36324 GNM=$ac_cv_path_GNM
36325 if test -n "$GNM"; then
36326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36327 $as_echo "$GNM" >&6; }
36328 else
36329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36330 $as_echo "no" >&6; }
36331 fi
36332 
36333 
36334   test -n "$GNM" && break
36335 done
36336 
36337   else
36338     # The variable is set, but is it from the command line or the environment?
36339 
36340     # Try to remove the string !GNM! from our list.
36341     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36342     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36343       # If it failed, the variable was not from the command line. Ignore it,
36344       # but warn the user (except for BASH, which is always set by the calling BASH).
36345       if test "xGNM" != xBASH; then
36346         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36347 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36348       fi
36349       # Try to locate tool using the code snippet
36350       for ac_prog in gnm
36351 do
36352   # Extract the first word of "$ac_prog", so it can be a program name with args.
36353 set dummy $ac_prog; ac_word=$2
36354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36355 $as_echo_n "checking for $ac_word... " >&6; }
36356 if ${ac_cv_path_GNM+:} false; then :
36357   $as_echo_n "(cached) " >&6
36358 else
36359   case $GNM in
36360   [\\/]* | ?:[\\/]*)
36361   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36362   ;;
36363   *)
36364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36365 for as_dir in $PATH
36366 do
36367   IFS=$as_save_IFS
36368   test -z "$as_dir" && as_dir=.
36369     for ac_exec_ext in '' $ac_executable_extensions; do
36370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36371     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36373     break 2
36374   fi
36375 done
36376   done
36377 IFS=$as_save_IFS
36378 
36379   ;;
36380 esac
36381 fi
36382 GNM=$ac_cv_path_GNM
36383 if test -n "$GNM"; then
36384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36385 $as_echo "$GNM" >&6; }
36386 else
36387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36388 $as_echo "no" >&6; }
36389 fi
36390 
36391 
36392   test -n "$GNM" && break
36393 done
36394 
36395     else
36396       # If it succeeded, then it was overridden by the user. We will use it
36397       # for the tool.
36398 
36399       # First remove it from the list of overridden variables, so we can test
36400       # for unknown variables in the end.
36401       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36402 
36403       # Check if the provided tool contains a complete path.
36404       tool_specified="$GNM"
36405       tool_basename="${tool_specified##*/}"
36406       if test "x$tool_basename" = "x$tool_specified"; then
36407         # A command without a complete path is provided, search $PATH.
36408         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36409 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36410         # Extract the first word of "$tool_basename", so it can be a program name with args.
36411 set dummy $tool_basename; ac_word=$2
36412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36413 $as_echo_n "checking for $ac_word... " >&6; }
36414 if ${ac_cv_path_GNM+:} false; then :
36415   $as_echo_n "(cached) " >&6
36416 else
36417   case $GNM in
36418   [\\/]* | ?:[\\/]*)
36419   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36420   ;;
36421   *)
36422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36423 for as_dir in $PATH
36424 do
36425   IFS=$as_save_IFS
36426   test -z "$as_dir" && as_dir=.
36427     for ac_exec_ext in '' $ac_executable_extensions; do
36428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36429     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36431     break 2
36432   fi
36433 done
36434   done
36435 IFS=$as_save_IFS
36436 
36437   ;;
36438 esac
36439 fi
36440 GNM=$ac_cv_path_GNM
36441 if test -n "$GNM"; then
36442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36443 $as_echo "$GNM" >&6; }
36444 else
36445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36446 $as_echo "no" >&6; }
36447 fi
36448 
36449 
36450         if test "x$GNM" = x; then
36451           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36452         fi
36453       else
36454         # Otherwise we believe it is a complete path. Use it as it is.
36455         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36456 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36457         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36458 $as_echo_n "checking for GNM... " >&6; }
36459         if test ! -x "$tool_specified"; then
36460           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36461 $as_echo "not found" >&6; }
36462           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36463         fi
36464         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36465 $as_echo "$tool_specified" >&6; }
36466       fi
36467     fi
36468   fi
36469 
36470 
36471 
36472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36473 
36474   # First separate the path from the arguments. This will split at the first
36475   # space.
36476   complete="$GNM"
36477   path="${complete%% *}"
36478   tmp="$complete EOL"
36479   arguments="${tmp#* }"
36480 
36481   # Input might be given as Windows format, start by converting to
36482   # unix format.
36483   new_path=`$CYGPATH -u "$path"`
36484 
36485   # Now try to locate executable using which
36486   new_path=`$WHICH "$new_path" 2> /dev/null`
36487   # bat and cmd files are not always considered executable in cygwin causing which
36488   # to not find them
36489   if test "x$new_path" = x \
36490       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36491       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36492     new_path=`$CYGPATH -u "$path"`
36493   fi
36494   if test "x$new_path" = x; then
36495     # Oops. Which didn't find the executable.
36496     # The splitting of arguments from the executable at a space might have been incorrect,
36497     # since paths with space are more likely in Windows. Give it another try with the whole
36498     # argument.
36499     path="$complete"
36500     arguments="EOL"
36501     new_path=`$CYGPATH -u "$path"`
36502     new_path=`$WHICH "$new_path" 2> /dev/null`
36503     # bat and cmd files are not always considered executable in cygwin causing which
36504     # to not find them
36505     if test "x$new_path" = x \
36506         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36507         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36508       new_path=`$CYGPATH -u "$path"`
36509     fi
36510     if test "x$new_path" = x; then
36511       # It's still not found. Now this is an unrecoverable error.
36512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36513 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36514       has_space=`$ECHO "$complete" | $GREP " "`
36515       if test "x$has_space" != x; then
36516         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36517 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36518       fi
36519       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36520     fi
36521   fi
36522 
36523   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36524   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36525   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36526   # "foo.exe" is OK but "foo" is an error.
36527   #
36528   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36529   # It is also a way to make sure we got the proper file name for the real test later on.
36530   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36531   if test "x$test_shortpath" = x; then
36532     # Short path failed, file does not exist as specified.
36533     # Try adding .exe or .cmd
36534     if test -f "${new_path}.exe"; then
36535       input_to_shortpath="${new_path}.exe"
36536     elif test -f "${new_path}.cmd"; then
36537       input_to_shortpath="${new_path}.cmd"
36538     else
36539       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36540 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36541       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36542 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36543       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36544     fi
36545   else
36546     input_to_shortpath="$new_path"
36547   fi
36548 
36549   # Call helper function which possibly converts this using DOS-style short mode.
36550   # If so, the updated path is stored in $new_path.
36551   new_path="$input_to_shortpath"
36552 
36553   input_path="$input_to_shortpath"
36554   # Check if we need to convert this using DOS-style short mode. If the path
36555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36556   # take no chances and rewrite it.
36557   # Note: m4 eats our [], so we need to use [ and ] instead.
36558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36559   if test "x$has_forbidden_chars" != x; then
36560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36561     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36562     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36563     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36564       # Going to short mode and back again did indeed matter. Since short mode is
36565       # case insensitive, let's make it lowercase to improve readability.
36566       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36567       # Now convert it back to Unix-stile (cygpath)
36568       input_path=`$CYGPATH -u "$shortmode_path"`
36569       new_path="$input_path"
36570     fi
36571   fi
36572 
36573   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36574   if test "x$test_cygdrive_prefix" = x; then
36575     # As a simple fix, exclude /usr/bin since it's not a real path.
36576     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36577       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36578       # a path prefixed by /cygdrive for fixpath to work.
36579       new_path="$CYGWIN_ROOT_PATH$input_path"
36580     fi
36581   fi
36582 
36583   # remove trailing .exe if any
36584   new_path="${new_path/%.exe/}"
36585 
36586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36587 
36588   # First separate the path from the arguments. This will split at the first
36589   # space.
36590   complete="$GNM"
36591   path="${complete%% *}"
36592   tmp="$complete EOL"
36593   arguments="${tmp#* }"
36594 
36595   # Input might be given as Windows format, start by converting to
36596   # unix format.
36597   new_path="$path"
36598 
36599   windows_path="$new_path"
36600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36601     unix_path=`$CYGPATH -u "$windows_path"`
36602     new_path="$unix_path"
36603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36605     new_path="$unix_path"
36606   fi
36607 
36608 
36609   # Now try to locate executable using which
36610   new_path=`$WHICH "$new_path" 2> /dev/null`
36611 
36612   if test "x$new_path" = x; then
36613     # Oops. Which didn't find the executable.
36614     # The splitting of arguments from the executable at a space might have been incorrect,
36615     # since paths with space are more likely in Windows. Give it another try with the whole
36616     # argument.
36617     path="$complete"
36618     arguments="EOL"
36619     new_path="$path"
36620 
36621   windows_path="$new_path"
36622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36623     unix_path=`$CYGPATH -u "$windows_path"`
36624     new_path="$unix_path"
36625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36626     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36627     new_path="$unix_path"
36628   fi
36629 
36630 
36631     new_path=`$WHICH "$new_path" 2> /dev/null`
36632     # bat and cmd files are not always considered executable in MSYS causing which
36633     # to not find them
36634     if test "x$new_path" = x \
36635         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36636         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36637       new_path="$path"
36638 
36639   windows_path="$new_path"
36640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36641     unix_path=`$CYGPATH -u "$windows_path"`
36642     new_path="$unix_path"
36643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36645     new_path="$unix_path"
36646   fi
36647 
36648     fi
36649 
36650     if test "x$new_path" = x; then
36651       # It's still not found. Now this is an unrecoverable error.
36652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36653 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36654       has_space=`$ECHO "$complete" | $GREP " "`
36655       if test "x$has_space" != x; then
36656         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36657 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36658       fi
36659       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36660     fi
36661   fi
36662 
36663   # Now new_path has a complete unix path to the binary
36664   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36665     # Keep paths in /bin as-is, but remove trailing .exe if any
36666     new_path="${new_path/%.exe/}"
36667     # Do not save /bin paths to all_fixpath_prefixes!
36668   else
36669     # Not in mixed or Windows style, start by that.
36670     new_path=`cmd //c echo $new_path`
36671 
36672   input_path="$new_path"
36673   # Check if we need to convert this using DOS-style short mode. If the path
36674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36675   # take no chances and rewrite it.
36676   # Note: m4 eats our [], so we need to use [ and ] instead.
36677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36678   if test "x$has_forbidden_chars" != x; then
36679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36681   fi
36682 
36683     # Output is in $new_path
36684 
36685   windows_path="$new_path"
36686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36687     unix_path=`$CYGPATH -u "$windows_path"`
36688     new_path="$unix_path"
36689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36691     new_path="$unix_path"
36692   fi
36693 
36694     # remove trailing .exe if any
36695     new_path="${new_path/%.exe/}"
36696 
36697     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36698     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36699   fi
36700 
36701   else
36702     # We're on a unix platform. Hooray! :)
36703     # First separate the path from the arguments. This will split at the first
36704     # space.
36705     complete="$GNM"
36706     path="${complete%% *}"
36707     tmp="$complete EOL"
36708     arguments="${tmp#* }"
36709 
36710     # Cannot rely on the command "which" here since it doesn't always work.
36711     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36712     if test -z "$is_absolute_path"; then
36713       # Path to executable is not absolute. Find it.
36714       IFS_save="$IFS"
36715       IFS=:
36716       for p in $PATH; do
36717         if test -f "$p/$path" && test -x "$p/$path"; then
36718           new_path="$p/$path"
36719           break
36720         fi
36721       done
36722       IFS="$IFS_save"
36723     else
36724       # This is an absolute path, we can use it without further modifications.
36725       new_path="$path"
36726     fi
36727 
36728     if test "x$new_path" = x; then
36729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36730 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36731       has_space=`$ECHO "$complete" | $GREP " "`
36732       if test "x$has_space" != x; then
36733         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36734 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36735       fi
36736       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36737     fi
36738   fi
36739 
36740   # Now join together the path and the arguments once again
36741   if test "x$arguments" != xEOL; then
36742     new_complete="$new_path ${arguments% *}"
36743   else
36744     new_complete="$new_path"
36745   fi
36746 
36747   if test "x$complete" != "x$new_complete"; then
36748     GNM="$new_complete"
36749     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36750 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36751   fi
36752 
36753 
36754 
36755 
36756   # Publish this variable in the help.
36757 
36758 
36759   if test "x$MCS" = x; then
36760     # The variable is not set by user, try to locate tool using the code snippet
36761     for ac_prog in mcs
36762 do
36763   # Extract the first word of "$ac_prog", so it can be a program name with args.
36764 set dummy $ac_prog; ac_word=$2
36765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36766 $as_echo_n "checking for $ac_word... " >&6; }
36767 if ${ac_cv_path_MCS+:} false; then :
36768   $as_echo_n "(cached) " >&6
36769 else
36770   case $MCS in
36771   [\\/]* | ?:[\\/]*)
36772   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36773   ;;
36774   *)
36775   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36776 for as_dir in $PATH
36777 do
36778   IFS=$as_save_IFS
36779   test -z "$as_dir" && as_dir=.
36780     for ac_exec_ext in '' $ac_executable_extensions; do
36781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36782     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36784     break 2
36785   fi
36786 done
36787   done
36788 IFS=$as_save_IFS
36789 
36790   ;;
36791 esac
36792 fi
36793 MCS=$ac_cv_path_MCS
36794 if test -n "$MCS"; then
36795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36796 $as_echo "$MCS" >&6; }
36797 else
36798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36799 $as_echo "no" >&6; }
36800 fi
36801 
36802 
36803   test -n "$MCS" && break
36804 done
36805 
36806   else
36807     # The variable is set, but is it from the command line or the environment?
36808 
36809     # Try to remove the string !MCS! from our list.
36810     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36811     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36812       # If it failed, the variable was not from the command line. Ignore it,
36813       # but warn the user (except for BASH, which is always set by the calling BASH).
36814       if test "xMCS" != xBASH; then
36815         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36816 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36817       fi
36818       # Try to locate tool using the code snippet
36819       for ac_prog in mcs
36820 do
36821   # Extract the first word of "$ac_prog", so it can be a program name with args.
36822 set dummy $ac_prog; ac_word=$2
36823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36824 $as_echo_n "checking for $ac_word... " >&6; }
36825 if ${ac_cv_path_MCS+:} false; then :
36826   $as_echo_n "(cached) " >&6
36827 else
36828   case $MCS in
36829   [\\/]* | ?:[\\/]*)
36830   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36831   ;;
36832   *)
36833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36834 for as_dir in $PATH
36835 do
36836   IFS=$as_save_IFS
36837   test -z "$as_dir" && as_dir=.
36838     for ac_exec_ext in '' $ac_executable_extensions; do
36839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36840     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36842     break 2
36843   fi
36844 done
36845   done
36846 IFS=$as_save_IFS
36847 
36848   ;;
36849 esac
36850 fi
36851 MCS=$ac_cv_path_MCS
36852 if test -n "$MCS"; then
36853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36854 $as_echo "$MCS" >&6; }
36855 else
36856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36857 $as_echo "no" >&6; }
36858 fi
36859 
36860 
36861   test -n "$MCS" && break
36862 done
36863 
36864     else
36865       # If it succeeded, then it was overridden by the user. We will use it
36866       # for the tool.
36867 
36868       # First remove it from the list of overridden variables, so we can test
36869       # for unknown variables in the end.
36870       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36871 
36872       # Check if the provided tool contains a complete path.
36873       tool_specified="$MCS"
36874       tool_basename="${tool_specified##*/}"
36875       if test "x$tool_basename" = "x$tool_specified"; then
36876         # A command without a complete path is provided, search $PATH.
36877         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36878 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36879         # Extract the first word of "$tool_basename", so it can be a program name with args.
36880 set dummy $tool_basename; ac_word=$2
36881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36882 $as_echo_n "checking for $ac_word... " >&6; }
36883 if ${ac_cv_path_MCS+:} false; then :
36884   $as_echo_n "(cached) " >&6
36885 else
36886   case $MCS in
36887   [\\/]* | ?:[\\/]*)
36888   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36889   ;;
36890   *)
36891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36892 for as_dir in $PATH
36893 do
36894   IFS=$as_save_IFS
36895   test -z "$as_dir" && as_dir=.
36896     for ac_exec_ext in '' $ac_executable_extensions; do
36897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36898     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36900     break 2
36901   fi
36902 done
36903   done
36904 IFS=$as_save_IFS
36905 
36906   ;;
36907 esac
36908 fi
36909 MCS=$ac_cv_path_MCS
36910 if test -n "$MCS"; then
36911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36912 $as_echo "$MCS" >&6; }
36913 else
36914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36915 $as_echo "no" >&6; }
36916 fi
36917 
36918 
36919         if test "x$MCS" = x; then
36920           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36921         fi
36922       else
36923         # Otherwise we believe it is a complete path. Use it as it is.
36924         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36925 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36927 $as_echo_n "checking for MCS... " >&6; }
36928         if test ! -x "$tool_specified"; then
36929           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36930 $as_echo "not found" >&6; }
36931           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36932         fi
36933         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36934 $as_echo "$tool_specified" >&6; }
36935       fi
36936     fi
36937   fi
36938 
36939 
36940 
36941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36942 
36943   # First separate the path from the arguments. This will split at the first
36944   # space.
36945   complete="$MCS"
36946   path="${complete%% *}"
36947   tmp="$complete EOL"
36948   arguments="${tmp#* }"
36949 
36950   # Input might be given as Windows format, start by converting to
36951   # unix format.
36952   new_path=`$CYGPATH -u "$path"`
36953 
36954   # Now try to locate executable using which
36955   new_path=`$WHICH "$new_path" 2> /dev/null`
36956   # bat and cmd files are not always considered executable in cygwin causing which
36957   # to not find them
36958   if test "x$new_path" = x \
36959       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36960       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36961     new_path=`$CYGPATH -u "$path"`
36962   fi
36963   if test "x$new_path" = x; then
36964     # Oops. Which didn't find the executable.
36965     # The splitting of arguments from the executable at a space might have been incorrect,
36966     # since paths with space are more likely in Windows. Give it another try with the whole
36967     # argument.
36968     path="$complete"
36969     arguments="EOL"
36970     new_path=`$CYGPATH -u "$path"`
36971     new_path=`$WHICH "$new_path" 2> /dev/null`
36972     # bat and cmd files are not always considered executable in cygwin causing which
36973     # to not find them
36974     if test "x$new_path" = x \
36975         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36976         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36977       new_path=`$CYGPATH -u "$path"`
36978     fi
36979     if test "x$new_path" = x; then
36980       # It's still not found. Now this is an unrecoverable error.
36981       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36982 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36983       has_space=`$ECHO "$complete" | $GREP " "`
36984       if test "x$has_space" != x; then
36985         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36986 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36987       fi
36988       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36989     fi
36990   fi
36991 
36992   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36993   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36994   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36995   # "foo.exe" is OK but "foo" is an error.
36996   #
36997   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36998   # It is also a way to make sure we got the proper file name for the real test later on.
36999   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37000   if test "x$test_shortpath" = x; then
37001     # Short path failed, file does not exist as specified.
37002     # Try adding .exe or .cmd
37003     if test -f "${new_path}.exe"; then
37004       input_to_shortpath="${new_path}.exe"
37005     elif test -f "${new_path}.cmd"; then
37006       input_to_shortpath="${new_path}.cmd"
37007     else
37008       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
37009 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
37010       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37011 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37012       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37013     fi
37014   else
37015     input_to_shortpath="$new_path"
37016   fi
37017 
37018   # Call helper function which possibly converts this using DOS-style short mode.
37019   # If so, the updated path is stored in $new_path.
37020   new_path="$input_to_shortpath"
37021 
37022   input_path="$input_to_shortpath"
37023   # Check if we need to convert this using DOS-style short mode. If the path
37024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37025   # take no chances and rewrite it.
37026   # Note: m4 eats our [], so we need to use [ and ] instead.
37027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37028   if test "x$has_forbidden_chars" != x; then
37029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37030     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37031     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37032     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37033       # Going to short mode and back again did indeed matter. Since short mode is
37034       # case insensitive, let's make it lowercase to improve readability.
37035       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37036       # Now convert it back to Unix-stile (cygpath)
37037       input_path=`$CYGPATH -u "$shortmode_path"`
37038       new_path="$input_path"
37039     fi
37040   fi
37041 
37042   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37043   if test "x$test_cygdrive_prefix" = x; then
37044     # As a simple fix, exclude /usr/bin since it's not a real path.
37045     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37046       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37047       # a path prefixed by /cygdrive for fixpath to work.
37048       new_path="$CYGWIN_ROOT_PATH$input_path"
37049     fi
37050   fi
37051 
37052   # remove trailing .exe if any
37053   new_path="${new_path/%.exe/}"
37054 
37055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37056 
37057   # First separate the path from the arguments. This will split at the first
37058   # space.
37059   complete="$MCS"
37060   path="${complete%% *}"
37061   tmp="$complete EOL"
37062   arguments="${tmp#* }"
37063 
37064   # Input might be given as Windows format, start by converting to
37065   # unix format.
37066   new_path="$path"
37067 
37068   windows_path="$new_path"
37069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37070     unix_path=`$CYGPATH -u "$windows_path"`
37071     new_path="$unix_path"
37072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37074     new_path="$unix_path"
37075   fi
37076 
37077 
37078   # Now try to locate executable using which
37079   new_path=`$WHICH "$new_path" 2> /dev/null`
37080 
37081   if test "x$new_path" = x; then
37082     # Oops. Which didn't find the executable.
37083     # The splitting of arguments from the executable at a space might have been incorrect,
37084     # since paths with space are more likely in Windows. Give it another try with the whole
37085     # argument.
37086     path="$complete"
37087     arguments="EOL"
37088     new_path="$path"
37089 
37090   windows_path="$new_path"
37091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37092     unix_path=`$CYGPATH -u "$windows_path"`
37093     new_path="$unix_path"
37094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37096     new_path="$unix_path"
37097   fi
37098 
37099 
37100     new_path=`$WHICH "$new_path" 2> /dev/null`
37101     # bat and cmd files are not always considered executable in MSYS causing which
37102     # to not find them
37103     if test "x$new_path" = x \
37104         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37105         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37106       new_path="$path"
37107 
37108   windows_path="$new_path"
37109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37110     unix_path=`$CYGPATH -u "$windows_path"`
37111     new_path="$unix_path"
37112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37114     new_path="$unix_path"
37115   fi
37116 
37117     fi
37118 
37119     if test "x$new_path" = x; then
37120       # It's still not found. Now this is an unrecoverable error.
37121       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37122 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37123       has_space=`$ECHO "$complete" | $GREP " "`
37124       if test "x$has_space" != x; then
37125         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37126 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37127       fi
37128       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37129     fi
37130   fi
37131 
37132   # Now new_path has a complete unix path to the binary
37133   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37134     # Keep paths in /bin as-is, but remove trailing .exe if any
37135     new_path="${new_path/%.exe/}"
37136     # Do not save /bin paths to all_fixpath_prefixes!
37137   else
37138     # Not in mixed or Windows style, start by that.
37139     new_path=`cmd //c echo $new_path`
37140 
37141   input_path="$new_path"
37142   # Check if we need to convert this using DOS-style short mode. If the path
37143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37144   # take no chances and rewrite it.
37145   # Note: m4 eats our [], so we need to use [ and ] instead.
37146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37147   if test "x$has_forbidden_chars" != x; then
37148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37149     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37150   fi
37151 
37152     # Output is in $new_path
37153 
37154   windows_path="$new_path"
37155   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37156     unix_path=`$CYGPATH -u "$windows_path"`
37157     new_path="$unix_path"
37158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37159     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37160     new_path="$unix_path"
37161   fi
37162 
37163     # remove trailing .exe if any
37164     new_path="${new_path/%.exe/}"
37165 
37166     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37167     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37168   fi
37169 
37170   else
37171     # We're on a unix platform. Hooray! :)
37172     # First separate the path from the arguments. This will split at the first
37173     # space.
37174     complete="$MCS"
37175     path="${complete%% *}"
37176     tmp="$complete EOL"
37177     arguments="${tmp#* }"
37178 
37179     # Cannot rely on the command "which" here since it doesn't always work.
37180     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37181     if test -z "$is_absolute_path"; then
37182       # Path to executable is not absolute. Find it.
37183       IFS_save="$IFS"
37184       IFS=:
37185       for p in $PATH; do
37186         if test -f "$p/$path" && test -x "$p/$path"; then
37187           new_path="$p/$path"
37188           break
37189         fi
37190       done
37191       IFS="$IFS_save"
37192     else
37193       # This is an absolute path, we can use it without further modifications.
37194       new_path="$path"
37195     fi
37196 
37197     if test "x$new_path" = x; then
37198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37199 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37200       has_space=`$ECHO "$complete" | $GREP " "`
37201       if test "x$has_space" != x; then
37202         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37203 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37204       fi
37205       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37206     fi
37207   fi
37208 
37209   # Now join together the path and the arguments once again
37210   if test "x$arguments" != xEOL; then
37211     new_complete="$new_path ${arguments% *}"
37212   else
37213     new_complete="$new_path"
37214   fi
37215 
37216   if test "x$complete" != "x$new_complete"; then
37217     MCS="$new_complete"
37218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
37219 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
37220   fi
37221 
37222   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
37223     # FIXME: we should unify this with the solaris case above.
37224 
37225 
37226   # Publish this variable in the help.
37227 
37228 
37229   if test "x$STRIP" = x; then
37230     # The variable is not set by user, try to locate tool using the code snippet
37231     if test -n "$ac_tool_prefix"; then
37232   for ac_prog in strip
37233   do
37234     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37235 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37237 $as_echo_n "checking for $ac_word... " >&6; }
37238 if ${ac_cv_prog_STRIP+:} false; then :
37239   $as_echo_n "(cached) " >&6
37240 else
37241   if test -n "$STRIP"; then
37242   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37243 else
37244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37245 for as_dir in $PATH
37246 do
37247   IFS=$as_save_IFS
37248   test -z "$as_dir" && as_dir=.
37249     for ac_exec_ext in '' $ac_executable_extensions; do
37250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37251     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37253     break 2
37254   fi
37255 done
37256   done
37257 IFS=$as_save_IFS
37258 
37259 fi
37260 fi
37261 STRIP=$ac_cv_prog_STRIP
37262 if test -n "$STRIP"; then
37263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37264 $as_echo "$STRIP" >&6; }
37265 else
37266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37267 $as_echo "no" >&6; }
37268 fi
37269 
37270 
37271     test -n "$STRIP" && break
37272   done
37273 fi
37274 if test -z "$STRIP"; then
37275   ac_ct_STRIP=$STRIP
37276   for ac_prog in strip
37277 do
37278   # Extract the first word of "$ac_prog", so it can be a program name with args.
37279 set dummy $ac_prog; ac_word=$2
37280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37281 $as_echo_n "checking for $ac_word... " >&6; }
37282 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37283   $as_echo_n "(cached) " >&6
37284 else
37285   if test -n "$ac_ct_STRIP"; then
37286   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37287 else
37288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37289 for as_dir in $PATH
37290 do
37291   IFS=$as_save_IFS
37292   test -z "$as_dir" && as_dir=.
37293     for ac_exec_ext in '' $ac_executable_extensions; do
37294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37295     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37297     break 2
37298   fi
37299 done
37300   done
37301 IFS=$as_save_IFS
37302 
37303 fi
37304 fi
37305 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37306 if test -n "$ac_ct_STRIP"; then
37307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37308 $as_echo "$ac_ct_STRIP" >&6; }
37309 else
37310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37311 $as_echo "no" >&6; }
37312 fi
37313 
37314 
37315   test -n "$ac_ct_STRIP" && break
37316 done
37317 
37318   if test "x$ac_ct_STRIP" = x; then
37319     STRIP=""
37320   else
37321     case $cross_compiling:$ac_tool_warned in
37322 yes:)
37323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37324 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37325 ac_tool_warned=yes ;;
37326 esac
37327     STRIP=$ac_ct_STRIP
37328   fi
37329 fi
37330 
37331   else
37332     # The variable is set, but is it from the command line or the environment?
37333 
37334     # Try to remove the string !STRIP! from our list.
37335     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37336     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37337       # If it failed, the variable was not from the command line. Ignore it,
37338       # but warn the user (except for BASH, which is always set by the calling BASH).
37339       if test "xSTRIP" != xBASH; then
37340         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37341 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37342       fi
37343       # Try to locate tool using the code snippet
37344       if test -n "$ac_tool_prefix"; then
37345   for ac_prog in strip
37346   do
37347     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37348 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37350 $as_echo_n "checking for $ac_word... " >&6; }
37351 if ${ac_cv_prog_STRIP+:} false; then :
37352   $as_echo_n "(cached) " >&6
37353 else
37354   if test -n "$STRIP"; then
37355   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37356 else
37357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37358 for as_dir in $PATH
37359 do
37360   IFS=$as_save_IFS
37361   test -z "$as_dir" && as_dir=.
37362     for ac_exec_ext in '' $ac_executable_extensions; do
37363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37364     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37366     break 2
37367   fi
37368 done
37369   done
37370 IFS=$as_save_IFS
37371 
37372 fi
37373 fi
37374 STRIP=$ac_cv_prog_STRIP
37375 if test -n "$STRIP"; then
37376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37377 $as_echo "$STRIP" >&6; }
37378 else
37379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37380 $as_echo "no" >&6; }
37381 fi
37382 
37383 
37384     test -n "$STRIP" && break
37385   done
37386 fi
37387 if test -z "$STRIP"; then
37388   ac_ct_STRIP=$STRIP
37389   for ac_prog in strip
37390 do
37391   # Extract the first word of "$ac_prog", so it can be a program name with args.
37392 set dummy $ac_prog; ac_word=$2
37393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37394 $as_echo_n "checking for $ac_word... " >&6; }
37395 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37396   $as_echo_n "(cached) " >&6
37397 else
37398   if test -n "$ac_ct_STRIP"; then
37399   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37400 else
37401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37402 for as_dir in $PATH
37403 do
37404   IFS=$as_save_IFS
37405   test -z "$as_dir" && as_dir=.
37406     for ac_exec_ext in '' $ac_executable_extensions; do
37407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37408     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37410     break 2
37411   fi
37412 done
37413   done
37414 IFS=$as_save_IFS
37415 
37416 fi
37417 fi
37418 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37419 if test -n "$ac_ct_STRIP"; then
37420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37421 $as_echo "$ac_ct_STRIP" >&6; }
37422 else
37423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37424 $as_echo "no" >&6; }
37425 fi
37426 
37427 
37428   test -n "$ac_ct_STRIP" && break
37429 done
37430 
37431   if test "x$ac_ct_STRIP" = x; then
37432     STRIP=""
37433   else
37434     case $cross_compiling:$ac_tool_warned in
37435 yes:)
37436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37437 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37438 ac_tool_warned=yes ;;
37439 esac
37440     STRIP=$ac_ct_STRIP
37441   fi
37442 fi
37443 
37444     else
37445       # If it succeeded, then it was overridden by the user. We will use it
37446       # for the tool.
37447 
37448       # First remove it from the list of overridden variables, so we can test
37449       # for unknown variables in the end.
37450       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37451 
37452       # Check if the provided tool contains a complete path.
37453       tool_specified="$STRIP"
37454       tool_basename="${tool_specified##*/}"
37455       if test "x$tool_basename" = "x$tool_specified"; then
37456         # A command without a complete path is provided, search $PATH.
37457         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37458 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37459         # Extract the first word of "$tool_basename", so it can be a program name with args.
37460 set dummy $tool_basename; ac_word=$2
37461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37462 $as_echo_n "checking for $ac_word... " >&6; }
37463 if ${ac_cv_path_STRIP+:} false; then :
37464   $as_echo_n "(cached) " >&6
37465 else
37466   case $STRIP in
37467   [\\/]* | ?:[\\/]*)
37468   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37469   ;;
37470   *)
37471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37472 for as_dir in $PATH
37473 do
37474   IFS=$as_save_IFS
37475   test -z "$as_dir" && as_dir=.
37476     for ac_exec_ext in '' $ac_executable_extensions; do
37477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37478     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37480     break 2
37481   fi
37482 done
37483   done
37484 IFS=$as_save_IFS
37485 
37486   ;;
37487 esac
37488 fi
37489 STRIP=$ac_cv_path_STRIP
37490 if test -n "$STRIP"; then
37491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37492 $as_echo "$STRIP" >&6; }
37493 else
37494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37495 $as_echo "no" >&6; }
37496 fi
37497 
37498 
37499         if test "x$STRIP" = x; then
37500           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37501         fi
37502       else
37503         # Otherwise we believe it is a complete path. Use it as it is.
37504         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37505 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37507 $as_echo_n "checking for STRIP... " >&6; }
37508         if test ! -x "$tool_specified"; then
37509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37510 $as_echo "not found" >&6; }
37511           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37512         fi
37513         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37514 $as_echo "$tool_specified" >&6; }
37515       fi
37516     fi
37517   fi
37518 
37519 
37520 
37521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37522 
37523   # First separate the path from the arguments. This will split at the first
37524   # space.
37525   complete="$STRIP"
37526   path="${complete%% *}"
37527   tmp="$complete EOL"
37528   arguments="${tmp#* }"
37529 
37530   # Input might be given as Windows format, start by converting to
37531   # unix format.
37532   new_path=`$CYGPATH -u "$path"`
37533 
37534   # Now try to locate executable using which
37535   new_path=`$WHICH "$new_path" 2> /dev/null`
37536   # bat and cmd files are not always considered executable in cygwin causing which
37537   # to not find them
37538   if test "x$new_path" = x \
37539       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37540       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37541     new_path=`$CYGPATH -u "$path"`
37542   fi
37543   if test "x$new_path" = x; then
37544     # Oops. Which didn't find the executable.
37545     # The splitting of arguments from the executable at a space might have been incorrect,
37546     # since paths with space are more likely in Windows. Give it another try with the whole
37547     # argument.
37548     path="$complete"
37549     arguments="EOL"
37550     new_path=`$CYGPATH -u "$path"`
37551     new_path=`$WHICH "$new_path" 2> /dev/null`
37552     # bat and cmd files are not always considered executable in cygwin causing which
37553     # to not find them
37554     if test "x$new_path" = x \
37555         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37556         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37557       new_path=`$CYGPATH -u "$path"`
37558     fi
37559     if test "x$new_path" = x; then
37560       # It's still not found. Now this is an unrecoverable error.
37561       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37562 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37563       has_space=`$ECHO "$complete" | $GREP " "`
37564       if test "x$has_space" != x; then
37565         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37566 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37567       fi
37568       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37569     fi
37570   fi
37571 
37572   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37573   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37574   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37575   # "foo.exe" is OK but "foo" is an error.
37576   #
37577   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37578   # It is also a way to make sure we got the proper file name for the real test later on.
37579   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37580   if test "x$test_shortpath" = x; then
37581     # Short path failed, file does not exist as specified.
37582     # Try adding .exe or .cmd
37583     if test -f "${new_path}.exe"; then
37584       input_to_shortpath="${new_path}.exe"
37585     elif test -f "${new_path}.cmd"; then
37586       input_to_shortpath="${new_path}.cmd"
37587     else
37588       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37589 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37590       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37591 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37592       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37593     fi
37594   else
37595     input_to_shortpath="$new_path"
37596   fi
37597 
37598   # Call helper function which possibly converts this using DOS-style short mode.
37599   # If so, the updated path is stored in $new_path.
37600   new_path="$input_to_shortpath"
37601 
37602   input_path="$input_to_shortpath"
37603   # Check if we need to convert this using DOS-style short mode. If the path
37604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37605   # take no chances and rewrite it.
37606   # Note: m4 eats our [], so we need to use [ and ] instead.
37607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37608   if test "x$has_forbidden_chars" != x; then
37609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37613       # Going to short mode and back again did indeed matter. Since short mode is
37614       # case insensitive, let's make it lowercase to improve readability.
37615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37616       # Now convert it back to Unix-stile (cygpath)
37617       input_path=`$CYGPATH -u "$shortmode_path"`
37618       new_path="$input_path"
37619     fi
37620   fi
37621 
37622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37623   if test "x$test_cygdrive_prefix" = x; then
37624     # As a simple fix, exclude /usr/bin since it's not a real path.
37625     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37627       # a path prefixed by /cygdrive for fixpath to work.
37628       new_path="$CYGWIN_ROOT_PATH$input_path"
37629     fi
37630   fi
37631 
37632   # remove trailing .exe if any
37633   new_path="${new_path/%.exe/}"
37634 
37635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37636 
37637   # First separate the path from the arguments. This will split at the first
37638   # space.
37639   complete="$STRIP"
37640   path="${complete%% *}"
37641   tmp="$complete EOL"
37642   arguments="${tmp#* }"
37643 
37644   # Input might be given as Windows format, start by converting to
37645   # unix format.
37646   new_path="$path"
37647 
37648   windows_path="$new_path"
37649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37650     unix_path=`$CYGPATH -u "$windows_path"`
37651     new_path="$unix_path"
37652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37654     new_path="$unix_path"
37655   fi
37656 
37657 
37658   # Now try to locate executable using which
37659   new_path=`$WHICH "$new_path" 2> /dev/null`
37660 
37661   if test "x$new_path" = x; then
37662     # Oops. Which didn't find the executable.
37663     # The splitting of arguments from the executable at a space might have been incorrect,
37664     # since paths with space are more likely in Windows. Give it another try with the whole
37665     # argument.
37666     path="$complete"
37667     arguments="EOL"
37668     new_path="$path"
37669 
37670   windows_path="$new_path"
37671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37672     unix_path=`$CYGPATH -u "$windows_path"`
37673     new_path="$unix_path"
37674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37676     new_path="$unix_path"
37677   fi
37678 
37679 
37680     new_path=`$WHICH "$new_path" 2> /dev/null`
37681     # bat and cmd files are not always considered executable in MSYS causing which
37682     # to not find them
37683     if test "x$new_path" = x \
37684         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37685         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37686       new_path="$path"
37687 
37688   windows_path="$new_path"
37689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37690     unix_path=`$CYGPATH -u "$windows_path"`
37691     new_path="$unix_path"
37692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37694     new_path="$unix_path"
37695   fi
37696 
37697     fi
37698 
37699     if test "x$new_path" = x; then
37700       # It's still not found. Now this is an unrecoverable error.
37701       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37702 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37703       has_space=`$ECHO "$complete" | $GREP " "`
37704       if test "x$has_space" != x; then
37705         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37706 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37707       fi
37708       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37709     fi
37710   fi
37711 
37712   # Now new_path has a complete unix path to the binary
37713   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37714     # Keep paths in /bin as-is, but remove trailing .exe if any
37715     new_path="${new_path/%.exe/}"
37716     # Do not save /bin paths to all_fixpath_prefixes!
37717   else
37718     # Not in mixed or Windows style, start by that.
37719     new_path=`cmd //c echo $new_path`
37720 
37721   input_path="$new_path"
37722   # Check if we need to convert this using DOS-style short mode. If the path
37723   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37724   # take no chances and rewrite it.
37725   # Note: m4 eats our [], so we need to use [ and ] instead.
37726   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37727   if test "x$has_forbidden_chars" != x; then
37728     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37729     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37730   fi
37731 
37732     # Output is in $new_path
37733 
37734   windows_path="$new_path"
37735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37736     unix_path=`$CYGPATH -u "$windows_path"`
37737     new_path="$unix_path"
37738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37740     new_path="$unix_path"
37741   fi
37742 
37743     # remove trailing .exe if any
37744     new_path="${new_path/%.exe/}"
37745 
37746     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37747     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37748   fi
37749 
37750   else
37751     # We're on a unix platform. Hooray! :)
37752     # First separate the path from the arguments. This will split at the first
37753     # space.
37754     complete="$STRIP"
37755     path="${complete%% *}"
37756     tmp="$complete EOL"
37757     arguments="${tmp#* }"
37758 
37759     # Cannot rely on the command "which" here since it doesn't always work.
37760     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37761     if test -z "$is_absolute_path"; then
37762       # Path to executable is not absolute. Find it.
37763       IFS_save="$IFS"
37764       IFS=:
37765       for p in $PATH; do
37766         if test -f "$p/$path" && test -x "$p/$path"; then
37767           new_path="$p/$path"
37768           break
37769         fi
37770       done
37771       IFS="$IFS_save"
37772     else
37773       # This is an absolute path, we can use it without further modifications.
37774       new_path="$path"
37775     fi
37776 
37777     if test "x$new_path" = x; then
37778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37779 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37780       has_space=`$ECHO "$complete" | $GREP " "`
37781       if test "x$has_space" != x; then
37782         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37783 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37784       fi
37785       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37786     fi
37787   fi
37788 
37789   # Now join together the path and the arguments once again
37790   if test "x$arguments" != xEOL; then
37791     new_complete="$new_path ${arguments% *}"
37792   else
37793     new_complete="$new_path"
37794   fi
37795 
37796   if test "x$complete" != "x$new_complete"; then
37797     STRIP="$new_complete"
37798     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37799 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37800   fi
37801 
37802 
37803 
37804   # Publish this variable in the help.
37805 
37806 
37807   if test "x$NM" = x; then
37808     # The variable is not set by user, try to locate tool using the code snippet
37809     if test -n "$ac_tool_prefix"; then
37810   for ac_prog in nm
37811   do
37812     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37813 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37815 $as_echo_n "checking for $ac_word... " >&6; }
37816 if ${ac_cv_prog_NM+:} false; then :
37817   $as_echo_n "(cached) " >&6
37818 else
37819   if test -n "$NM"; then
37820   ac_cv_prog_NM="$NM" # Let the user override the test.
37821 else
37822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37823 for as_dir in $PATH
37824 do
37825   IFS=$as_save_IFS
37826   test -z "$as_dir" && as_dir=.
37827     for ac_exec_ext in '' $ac_executable_extensions; do
37828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37829     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37831     break 2
37832   fi
37833 done
37834   done
37835 IFS=$as_save_IFS
37836 
37837 fi
37838 fi
37839 NM=$ac_cv_prog_NM
37840 if test -n "$NM"; then
37841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37842 $as_echo "$NM" >&6; }
37843 else
37844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37845 $as_echo "no" >&6; }
37846 fi
37847 
37848 
37849     test -n "$NM" && break
37850   done
37851 fi
37852 if test -z "$NM"; then
37853   ac_ct_NM=$NM
37854   for ac_prog in nm
37855 do
37856   # Extract the first word of "$ac_prog", so it can be a program name with args.
37857 set dummy $ac_prog; ac_word=$2
37858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37859 $as_echo_n "checking for $ac_word... " >&6; }
37860 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37861   $as_echo_n "(cached) " >&6
37862 else
37863   if test -n "$ac_ct_NM"; then
37864   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37865 else
37866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37867 for as_dir in $PATH
37868 do
37869   IFS=$as_save_IFS
37870   test -z "$as_dir" && as_dir=.
37871     for ac_exec_ext in '' $ac_executable_extensions; do
37872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37873     ac_cv_prog_ac_ct_NM="$ac_prog"
37874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37875     break 2
37876   fi
37877 done
37878   done
37879 IFS=$as_save_IFS
37880 
37881 fi
37882 fi
37883 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37884 if test -n "$ac_ct_NM"; then
37885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37886 $as_echo "$ac_ct_NM" >&6; }
37887 else
37888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37889 $as_echo "no" >&6; }
37890 fi
37891 
37892 
37893   test -n "$ac_ct_NM" && break
37894 done
37895 
37896   if test "x$ac_ct_NM" = x; then
37897     NM=""
37898   else
37899     case $cross_compiling:$ac_tool_warned in
37900 yes:)
37901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37903 ac_tool_warned=yes ;;
37904 esac
37905     NM=$ac_ct_NM
37906   fi
37907 fi
37908 
37909   else
37910     # The variable is set, but is it from the command line or the environment?
37911 
37912     # Try to remove the string !NM! from our list.
37913     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37914     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37915       # If it failed, the variable was not from the command line. Ignore it,
37916       # but warn the user (except for BASH, which is always set by the calling BASH).
37917       if test "xNM" != xBASH; then
37918         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37919 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37920       fi
37921       # Try to locate tool using the code snippet
37922       if test -n "$ac_tool_prefix"; then
37923   for ac_prog in nm
37924   do
37925     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37926 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37928 $as_echo_n "checking for $ac_word... " >&6; }
37929 if ${ac_cv_prog_NM+:} false; then :
37930   $as_echo_n "(cached) " >&6
37931 else
37932   if test -n "$NM"; then
37933   ac_cv_prog_NM="$NM" # Let the user override the test.
37934 else
37935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37936 for as_dir in $PATH
37937 do
37938   IFS=$as_save_IFS
37939   test -z "$as_dir" && as_dir=.
37940     for ac_exec_ext in '' $ac_executable_extensions; do
37941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37942     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37944     break 2
37945   fi
37946 done
37947   done
37948 IFS=$as_save_IFS
37949 
37950 fi
37951 fi
37952 NM=$ac_cv_prog_NM
37953 if test -n "$NM"; then
37954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37955 $as_echo "$NM" >&6; }
37956 else
37957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37958 $as_echo "no" >&6; }
37959 fi
37960 
37961 
37962     test -n "$NM" && break
37963   done
37964 fi
37965 if test -z "$NM"; then
37966   ac_ct_NM=$NM
37967   for ac_prog in nm
37968 do
37969   # Extract the first word of "$ac_prog", so it can be a program name with args.
37970 set dummy $ac_prog; ac_word=$2
37971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37972 $as_echo_n "checking for $ac_word... " >&6; }
37973 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37974   $as_echo_n "(cached) " >&6
37975 else
37976   if test -n "$ac_ct_NM"; then
37977   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37978 else
37979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37980 for as_dir in $PATH
37981 do
37982   IFS=$as_save_IFS
37983   test -z "$as_dir" && as_dir=.
37984     for ac_exec_ext in '' $ac_executable_extensions; do
37985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37986     ac_cv_prog_ac_ct_NM="$ac_prog"
37987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37988     break 2
37989   fi
37990 done
37991   done
37992 IFS=$as_save_IFS
37993 
37994 fi
37995 fi
37996 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37997 if test -n "$ac_ct_NM"; then
37998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37999 $as_echo "$ac_ct_NM" >&6; }
38000 else
38001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38002 $as_echo "no" >&6; }
38003 fi
38004 
38005 
38006   test -n "$ac_ct_NM" && break
38007 done
38008 
38009   if test "x$ac_ct_NM" = x; then
38010     NM=""
38011   else
38012     case $cross_compiling:$ac_tool_warned in
38013 yes:)
38014 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38015 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38016 ac_tool_warned=yes ;;
38017 esac
38018     NM=$ac_ct_NM
38019   fi
38020 fi
38021 
38022     else
38023       # If it succeeded, then it was overridden by the user. We will use it
38024       # for the tool.
38025 
38026       # First remove it from the list of overridden variables, so we can test
38027       # for unknown variables in the end.
38028       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38029 
38030       # Check if the provided tool contains a complete path.
38031       tool_specified="$NM"
38032       tool_basename="${tool_specified##*/}"
38033       if test "x$tool_basename" = "x$tool_specified"; then
38034         # A command without a complete path is provided, search $PATH.
38035         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38036 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38037         # Extract the first word of "$tool_basename", so it can be a program name with args.
38038 set dummy $tool_basename; ac_word=$2
38039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38040 $as_echo_n "checking for $ac_word... " >&6; }
38041 if ${ac_cv_path_NM+:} false; then :
38042   $as_echo_n "(cached) " >&6
38043 else
38044   case $NM in
38045   [\\/]* | ?:[\\/]*)
38046   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38047   ;;
38048   *)
38049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38050 for as_dir in $PATH
38051 do
38052   IFS=$as_save_IFS
38053   test -z "$as_dir" && as_dir=.
38054     for ac_exec_ext in '' $ac_executable_extensions; do
38055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38056     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38058     break 2
38059   fi
38060 done
38061   done
38062 IFS=$as_save_IFS
38063 
38064   ;;
38065 esac
38066 fi
38067 NM=$ac_cv_path_NM
38068 if test -n "$NM"; then
38069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38070 $as_echo "$NM" >&6; }
38071 else
38072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38073 $as_echo "no" >&6; }
38074 fi
38075 
38076 
38077         if test "x$NM" = x; then
38078           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38079         fi
38080       else
38081         # Otherwise we believe it is a complete path. Use it as it is.
38082         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38083 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38084         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38085 $as_echo_n "checking for NM... " >&6; }
38086         if test ! -x "$tool_specified"; then
38087           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38088 $as_echo "not found" >&6; }
38089           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38090         fi
38091         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38092 $as_echo "$tool_specified" >&6; }
38093       fi
38094     fi
38095   fi
38096 
38097 
38098 
38099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38100 
38101   # First separate the path from the arguments. This will split at the first
38102   # space.
38103   complete="$NM"
38104   path="${complete%% *}"
38105   tmp="$complete EOL"
38106   arguments="${tmp#* }"
38107 
38108   # Input might be given as Windows format, start by converting to
38109   # unix format.
38110   new_path=`$CYGPATH -u "$path"`
38111 
38112   # Now try to locate executable using which
38113   new_path=`$WHICH "$new_path" 2> /dev/null`
38114   # bat and cmd files are not always considered executable in cygwin causing which
38115   # to not find them
38116   if test "x$new_path" = x \
38117       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38118       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38119     new_path=`$CYGPATH -u "$path"`
38120   fi
38121   if test "x$new_path" = x; then
38122     # Oops. Which didn't find the executable.
38123     # The splitting of arguments from the executable at a space might have been incorrect,
38124     # since paths with space are more likely in Windows. Give it another try with the whole
38125     # argument.
38126     path="$complete"
38127     arguments="EOL"
38128     new_path=`$CYGPATH -u "$path"`
38129     new_path=`$WHICH "$new_path" 2> /dev/null`
38130     # bat and cmd files are not always considered executable in cygwin causing which
38131     # to not find them
38132     if test "x$new_path" = x \
38133         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38134         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38135       new_path=`$CYGPATH -u "$path"`
38136     fi
38137     if test "x$new_path" = x; then
38138       # It's still not found. Now this is an unrecoverable error.
38139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38140 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38141       has_space=`$ECHO "$complete" | $GREP " "`
38142       if test "x$has_space" != x; then
38143         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38144 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38145       fi
38146       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38147     fi
38148   fi
38149 
38150   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38151   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38152   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38153   # "foo.exe" is OK but "foo" is an error.
38154   #
38155   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38156   # It is also a way to make sure we got the proper file name for the real test later on.
38157   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38158   if test "x$test_shortpath" = x; then
38159     # Short path failed, file does not exist as specified.
38160     # Try adding .exe or .cmd
38161     if test -f "${new_path}.exe"; then
38162       input_to_shortpath="${new_path}.exe"
38163     elif test -f "${new_path}.cmd"; then
38164       input_to_shortpath="${new_path}.cmd"
38165     else
38166       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38167 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38168       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38169 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38170       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38171     fi
38172   else
38173     input_to_shortpath="$new_path"
38174   fi
38175 
38176   # Call helper function which possibly converts this using DOS-style short mode.
38177   # If so, the updated path is stored in $new_path.
38178   new_path="$input_to_shortpath"
38179 
38180   input_path="$input_to_shortpath"
38181   # Check if we need to convert this using DOS-style short mode. If the path
38182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38183   # take no chances and rewrite it.
38184   # Note: m4 eats our [], so we need to use [ and ] instead.
38185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38186   if test "x$has_forbidden_chars" != x; then
38187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38191       # Going to short mode and back again did indeed matter. Since short mode is
38192       # case insensitive, let's make it lowercase to improve readability.
38193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38194       # Now convert it back to Unix-stile (cygpath)
38195       input_path=`$CYGPATH -u "$shortmode_path"`
38196       new_path="$input_path"
38197     fi
38198   fi
38199 
38200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38201   if test "x$test_cygdrive_prefix" = x; then
38202     # As a simple fix, exclude /usr/bin since it's not a real path.
38203     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38205       # a path prefixed by /cygdrive for fixpath to work.
38206       new_path="$CYGWIN_ROOT_PATH$input_path"
38207     fi
38208   fi
38209 
38210   # remove trailing .exe if any
38211   new_path="${new_path/%.exe/}"
38212 
38213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38214 
38215   # First separate the path from the arguments. This will split at the first
38216   # space.
38217   complete="$NM"
38218   path="${complete%% *}"
38219   tmp="$complete EOL"
38220   arguments="${tmp#* }"
38221 
38222   # Input might be given as Windows format, start by converting to
38223   # unix format.
38224   new_path="$path"
38225 
38226   windows_path="$new_path"
38227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38228     unix_path=`$CYGPATH -u "$windows_path"`
38229     new_path="$unix_path"
38230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38232     new_path="$unix_path"
38233   fi
38234 
38235 
38236   # Now try to locate executable using which
38237   new_path=`$WHICH "$new_path" 2> /dev/null`
38238 
38239   if test "x$new_path" = x; then
38240     # Oops. Which didn't find the executable.
38241     # The splitting of arguments from the executable at a space might have been incorrect,
38242     # since paths with space are more likely in Windows. Give it another try with the whole
38243     # argument.
38244     path="$complete"
38245     arguments="EOL"
38246     new_path="$path"
38247 
38248   windows_path="$new_path"
38249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38250     unix_path=`$CYGPATH -u "$windows_path"`
38251     new_path="$unix_path"
38252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38254     new_path="$unix_path"
38255   fi
38256 
38257 
38258     new_path=`$WHICH "$new_path" 2> /dev/null`
38259     # bat and cmd files are not always considered executable in MSYS causing which
38260     # to not find them
38261     if test "x$new_path" = x \
38262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38264       new_path="$path"
38265 
38266   windows_path="$new_path"
38267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38268     unix_path=`$CYGPATH -u "$windows_path"`
38269     new_path="$unix_path"
38270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38272     new_path="$unix_path"
38273   fi
38274 
38275     fi
38276 
38277     if test "x$new_path" = x; then
38278       # It's still not found. Now this is an unrecoverable error.
38279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38280 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38281       has_space=`$ECHO "$complete" | $GREP " "`
38282       if test "x$has_space" != x; then
38283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38285       fi
38286       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38287     fi
38288   fi
38289 
38290   # Now new_path has a complete unix path to the binary
38291   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38292     # Keep paths in /bin as-is, but remove trailing .exe if any
38293     new_path="${new_path/%.exe/}"
38294     # Do not save /bin paths to all_fixpath_prefixes!
38295   else
38296     # Not in mixed or Windows style, start by that.
38297     new_path=`cmd //c echo $new_path`
38298 
38299   input_path="$new_path"
38300   # Check if we need to convert this using DOS-style short mode. If the path
38301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38302   # take no chances and rewrite it.
38303   # Note: m4 eats our [], so we need to use [ and ] instead.
38304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38305   if test "x$has_forbidden_chars" != x; then
38306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38307     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38308   fi
38309 
38310     # Output is in $new_path
38311 
38312   windows_path="$new_path"
38313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38314     unix_path=`$CYGPATH -u "$windows_path"`
38315     new_path="$unix_path"
38316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38318     new_path="$unix_path"
38319   fi
38320 
38321     # remove trailing .exe if any
38322     new_path="${new_path/%.exe/}"
38323 
38324     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38325     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38326   fi
38327 
38328   else
38329     # We're on a unix platform. Hooray! :)
38330     # First separate the path from the arguments. This will split at the first
38331     # space.
38332     complete="$NM"
38333     path="${complete%% *}"
38334     tmp="$complete EOL"
38335     arguments="${tmp#* }"
38336 
38337     # Cannot rely on the command "which" here since it doesn't always work.
38338     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38339     if test -z "$is_absolute_path"; then
38340       # Path to executable is not absolute. Find it.
38341       IFS_save="$IFS"
38342       IFS=:
38343       for p in $PATH; do
38344         if test -f "$p/$path" && test -x "$p/$path"; then
38345           new_path="$p/$path"
38346           break
38347         fi
38348       done
38349       IFS="$IFS_save"
38350     else
38351       # This is an absolute path, we can use it without further modifications.
38352       new_path="$path"
38353     fi
38354 
38355     if test "x$new_path" = x; then
38356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38357 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38358       has_space=`$ECHO "$complete" | $GREP " "`
38359       if test "x$has_space" != x; then
38360         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38361 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38362       fi
38363       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38364     fi
38365   fi
38366 
38367   # Now join together the path and the arguments once again
38368   if test "x$arguments" != xEOL; then
38369     new_complete="$new_path ${arguments% *}"
38370   else
38371     new_complete="$new_path"
38372   fi
38373 
38374   if test "x$complete" != "x$new_complete"; then
38375     NM="$new_complete"
38376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38377 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38378   fi
38379 
38380     GNM="$NM"
38381 
38382   fi
38383 
38384   # objcopy is used for moving debug symbols to separate files when
38385   # full debug symbols are enabled.
38386   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38387 
38388 
38389   # Publish this variable in the help.
38390 
38391 
38392   if test "x$OBJCOPY" = x; then
38393     # The variable is not set by user, try to locate tool using the code snippet
38394     if test -n "$ac_tool_prefix"; then
38395   for ac_prog in gobjcopy objcopy
38396   do
38397     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38398 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38400 $as_echo_n "checking for $ac_word... " >&6; }
38401 if ${ac_cv_prog_OBJCOPY+:} false; then :
38402   $as_echo_n "(cached) " >&6
38403 else
38404   if test -n "$OBJCOPY"; then
38405   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38406 else
38407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38408 for as_dir in $PATH
38409 do
38410   IFS=$as_save_IFS
38411   test -z "$as_dir" && as_dir=.
38412     for ac_exec_ext in '' $ac_executable_extensions; do
38413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38414     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38416     break 2
38417   fi
38418 done
38419   done
38420 IFS=$as_save_IFS
38421 
38422 fi
38423 fi
38424 OBJCOPY=$ac_cv_prog_OBJCOPY
38425 if test -n "$OBJCOPY"; then
38426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38427 $as_echo "$OBJCOPY" >&6; }
38428 else
38429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38430 $as_echo "no" >&6; }
38431 fi
38432 
38433 
38434     test -n "$OBJCOPY" && break
38435   done
38436 fi
38437 if test -z "$OBJCOPY"; then
38438   ac_ct_OBJCOPY=$OBJCOPY
38439   for ac_prog in gobjcopy objcopy
38440 do
38441   # Extract the first word of "$ac_prog", so it can be a program name with args.
38442 set dummy $ac_prog; ac_word=$2
38443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38444 $as_echo_n "checking for $ac_word... " >&6; }
38445 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38446   $as_echo_n "(cached) " >&6
38447 else
38448   if test -n "$ac_ct_OBJCOPY"; then
38449   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38450 else
38451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38452 for as_dir in $PATH
38453 do
38454   IFS=$as_save_IFS
38455   test -z "$as_dir" && as_dir=.
38456     for ac_exec_ext in '' $ac_executable_extensions; do
38457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38458     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38460     break 2
38461   fi
38462 done
38463   done
38464 IFS=$as_save_IFS
38465 
38466 fi
38467 fi
38468 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38469 if test -n "$ac_ct_OBJCOPY"; then
38470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38471 $as_echo "$ac_ct_OBJCOPY" >&6; }
38472 else
38473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38474 $as_echo "no" >&6; }
38475 fi
38476 
38477 
38478   test -n "$ac_ct_OBJCOPY" && break
38479 done
38480 
38481   if test "x$ac_ct_OBJCOPY" = x; then
38482     OBJCOPY=""
38483   else
38484     case $cross_compiling:$ac_tool_warned in
38485 yes:)
38486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38487 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38488 ac_tool_warned=yes ;;
38489 esac
38490     OBJCOPY=$ac_ct_OBJCOPY
38491   fi
38492 fi
38493 
38494   else
38495     # The variable is set, but is it from the command line or the environment?
38496 
38497     # Try to remove the string !OBJCOPY! from our list.
38498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38500       # If it failed, the variable was not from the command line. Ignore it,
38501       # but warn the user (except for BASH, which is always set by the calling BASH).
38502       if test "xOBJCOPY" != xBASH; then
38503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38504 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38505       fi
38506       # Try to locate tool using the code snippet
38507       if test -n "$ac_tool_prefix"; then
38508   for ac_prog in gobjcopy objcopy
38509   do
38510     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38511 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38513 $as_echo_n "checking for $ac_word... " >&6; }
38514 if ${ac_cv_prog_OBJCOPY+:} false; then :
38515   $as_echo_n "(cached) " >&6
38516 else
38517   if test -n "$OBJCOPY"; then
38518   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38519 else
38520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38521 for as_dir in $PATH
38522 do
38523   IFS=$as_save_IFS
38524   test -z "$as_dir" && as_dir=.
38525     for ac_exec_ext in '' $ac_executable_extensions; do
38526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38527     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38529     break 2
38530   fi
38531 done
38532   done
38533 IFS=$as_save_IFS
38534 
38535 fi
38536 fi
38537 OBJCOPY=$ac_cv_prog_OBJCOPY
38538 if test -n "$OBJCOPY"; then
38539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38540 $as_echo "$OBJCOPY" >&6; }
38541 else
38542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38543 $as_echo "no" >&6; }
38544 fi
38545 
38546 
38547     test -n "$OBJCOPY" && break
38548   done
38549 fi
38550 if test -z "$OBJCOPY"; then
38551   ac_ct_OBJCOPY=$OBJCOPY
38552   for ac_prog in gobjcopy objcopy
38553 do
38554   # Extract the first word of "$ac_prog", so it can be a program name with args.
38555 set dummy $ac_prog; ac_word=$2
38556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38557 $as_echo_n "checking for $ac_word... " >&6; }
38558 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38559   $as_echo_n "(cached) " >&6
38560 else
38561   if test -n "$ac_ct_OBJCOPY"; then
38562   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38563 else
38564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38565 for as_dir in $PATH
38566 do
38567   IFS=$as_save_IFS
38568   test -z "$as_dir" && as_dir=.
38569     for ac_exec_ext in '' $ac_executable_extensions; do
38570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38571     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38573     break 2
38574   fi
38575 done
38576   done
38577 IFS=$as_save_IFS
38578 
38579 fi
38580 fi
38581 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38582 if test -n "$ac_ct_OBJCOPY"; then
38583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38584 $as_echo "$ac_ct_OBJCOPY" >&6; }
38585 else
38586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38587 $as_echo "no" >&6; }
38588 fi
38589 
38590 
38591   test -n "$ac_ct_OBJCOPY" && break
38592 done
38593 
38594   if test "x$ac_ct_OBJCOPY" = x; then
38595     OBJCOPY=""
38596   else
38597     case $cross_compiling:$ac_tool_warned in
38598 yes:)
38599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38600 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38601 ac_tool_warned=yes ;;
38602 esac
38603     OBJCOPY=$ac_ct_OBJCOPY
38604   fi
38605 fi
38606 
38607     else
38608       # If it succeeded, then it was overridden by the user. We will use it
38609       # for the tool.
38610 
38611       # First remove it from the list of overridden variables, so we can test
38612       # for unknown variables in the end.
38613       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38614 
38615       # Check if the provided tool contains a complete path.
38616       tool_specified="$OBJCOPY"
38617       tool_basename="${tool_specified##*/}"
38618       if test "x$tool_basename" = "x$tool_specified"; then
38619         # A command without a complete path is provided, search $PATH.
38620         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38621 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38622         # Extract the first word of "$tool_basename", so it can be a program name with args.
38623 set dummy $tool_basename; ac_word=$2
38624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38625 $as_echo_n "checking for $ac_word... " >&6; }
38626 if ${ac_cv_path_OBJCOPY+:} false; then :
38627   $as_echo_n "(cached) " >&6
38628 else
38629   case $OBJCOPY in
38630   [\\/]* | ?:[\\/]*)
38631   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38632   ;;
38633   *)
38634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38635 for as_dir in $PATH
38636 do
38637   IFS=$as_save_IFS
38638   test -z "$as_dir" && as_dir=.
38639     for ac_exec_ext in '' $ac_executable_extensions; do
38640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38641     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38643     break 2
38644   fi
38645 done
38646   done
38647 IFS=$as_save_IFS
38648 
38649   ;;
38650 esac
38651 fi
38652 OBJCOPY=$ac_cv_path_OBJCOPY
38653 if test -n "$OBJCOPY"; then
38654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38655 $as_echo "$OBJCOPY" >&6; }
38656 else
38657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38658 $as_echo "no" >&6; }
38659 fi
38660 
38661 
38662         if test "x$OBJCOPY" = x; then
38663           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38664         fi
38665       else
38666         # Otherwise we believe it is a complete path. Use it as it is.
38667         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38668 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38669         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38670 $as_echo_n "checking for OBJCOPY... " >&6; }
38671         if test ! -x "$tool_specified"; then
38672           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38673 $as_echo "not found" >&6; }
38674           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38675         fi
38676         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38677 $as_echo "$tool_specified" >&6; }
38678       fi
38679     fi
38680   fi
38681 
38682 
38683     # Only call fixup if objcopy was found.
38684     if test -n "$OBJCOPY"; then
38685 
38686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38687 
38688   # First separate the path from the arguments. This will split at the first
38689   # space.
38690   complete="$OBJCOPY"
38691   path="${complete%% *}"
38692   tmp="$complete EOL"
38693   arguments="${tmp#* }"
38694 
38695   # Input might be given as Windows format, start by converting to
38696   # unix format.
38697   new_path=`$CYGPATH -u "$path"`
38698 
38699   # Now try to locate executable using which
38700   new_path=`$WHICH "$new_path" 2> /dev/null`
38701   # bat and cmd files are not always considered executable in cygwin causing which
38702   # to not find them
38703   if test "x$new_path" = x \
38704       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38705       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38706     new_path=`$CYGPATH -u "$path"`
38707   fi
38708   if test "x$new_path" = x; then
38709     # Oops. Which didn't find the executable.
38710     # The splitting of arguments from the executable at a space might have been incorrect,
38711     # since paths with space are more likely in Windows. Give it another try with the whole
38712     # argument.
38713     path="$complete"
38714     arguments="EOL"
38715     new_path=`$CYGPATH -u "$path"`
38716     new_path=`$WHICH "$new_path" 2> /dev/null`
38717     # bat and cmd files are not always considered executable in cygwin causing which
38718     # to not find them
38719     if test "x$new_path" = x \
38720         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38721         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38722       new_path=`$CYGPATH -u "$path"`
38723     fi
38724     if test "x$new_path" = x; then
38725       # It's still not found. Now this is an unrecoverable error.
38726       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38727 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38728       has_space=`$ECHO "$complete" | $GREP " "`
38729       if test "x$has_space" != x; then
38730         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38731 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38732       fi
38733       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38734     fi
38735   fi
38736 
38737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38740   # "foo.exe" is OK but "foo" is an error.
38741   #
38742   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38743   # It is also a way to make sure we got the proper file name for the real test later on.
38744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38745   if test "x$test_shortpath" = x; then
38746     # Short path failed, file does not exist as specified.
38747     # Try adding .exe or .cmd
38748     if test -f "${new_path}.exe"; then
38749       input_to_shortpath="${new_path}.exe"
38750     elif test -f "${new_path}.cmd"; then
38751       input_to_shortpath="${new_path}.cmd"
38752     else
38753       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38754 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38755       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38756 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38757       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38758     fi
38759   else
38760     input_to_shortpath="$new_path"
38761   fi
38762 
38763   # Call helper function which possibly converts this using DOS-style short mode.
38764   # If so, the updated path is stored in $new_path.
38765   new_path="$input_to_shortpath"
38766 
38767   input_path="$input_to_shortpath"
38768   # Check if we need to convert this using DOS-style short mode. If the path
38769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38770   # take no chances and rewrite it.
38771   # Note: m4 eats our [], so we need to use [ and ] instead.
38772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38773   if test "x$has_forbidden_chars" != x; then
38774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38778       # Going to short mode and back again did indeed matter. Since short mode is
38779       # case insensitive, let's make it lowercase to improve readability.
38780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38781       # Now convert it back to Unix-stile (cygpath)
38782       input_path=`$CYGPATH -u "$shortmode_path"`
38783       new_path="$input_path"
38784     fi
38785   fi
38786 
38787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38788   if test "x$test_cygdrive_prefix" = x; then
38789     # As a simple fix, exclude /usr/bin since it's not a real path.
38790     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38792       # a path prefixed by /cygdrive for fixpath to work.
38793       new_path="$CYGWIN_ROOT_PATH$input_path"
38794     fi
38795   fi
38796 
38797   # remove trailing .exe if any
38798   new_path="${new_path/%.exe/}"
38799 
38800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38801 
38802   # First separate the path from the arguments. This will split at the first
38803   # space.
38804   complete="$OBJCOPY"
38805   path="${complete%% *}"
38806   tmp="$complete EOL"
38807   arguments="${tmp#* }"
38808 
38809   # Input might be given as Windows format, start by converting to
38810   # unix format.
38811   new_path="$path"
38812 
38813   windows_path="$new_path"
38814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38815     unix_path=`$CYGPATH -u "$windows_path"`
38816     new_path="$unix_path"
38817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38819     new_path="$unix_path"
38820   fi
38821 
38822 
38823   # Now try to locate executable using which
38824   new_path=`$WHICH "$new_path" 2> /dev/null`
38825 
38826   if test "x$new_path" = x; then
38827     # Oops. Which didn't find the executable.
38828     # The splitting of arguments from the executable at a space might have been incorrect,
38829     # since paths with space are more likely in Windows. Give it another try with the whole
38830     # argument.
38831     path="$complete"
38832     arguments="EOL"
38833     new_path="$path"
38834 
38835   windows_path="$new_path"
38836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38837     unix_path=`$CYGPATH -u "$windows_path"`
38838     new_path="$unix_path"
38839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38841     new_path="$unix_path"
38842   fi
38843 
38844 
38845     new_path=`$WHICH "$new_path" 2> /dev/null`
38846     # bat and cmd files are not always considered executable in MSYS causing which
38847     # to not find them
38848     if test "x$new_path" = x \
38849         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38850         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38851       new_path="$path"
38852 
38853   windows_path="$new_path"
38854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38855     unix_path=`$CYGPATH -u "$windows_path"`
38856     new_path="$unix_path"
38857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38859     new_path="$unix_path"
38860   fi
38861 
38862     fi
38863 
38864     if test "x$new_path" = x; then
38865       # It's still not found. Now this is an unrecoverable error.
38866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38867 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38868       has_space=`$ECHO "$complete" | $GREP " "`
38869       if test "x$has_space" != x; then
38870         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38872       fi
38873       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38874     fi
38875   fi
38876 
38877   # Now new_path has a complete unix path to the binary
38878   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38879     # Keep paths in /bin as-is, but remove trailing .exe if any
38880     new_path="${new_path/%.exe/}"
38881     # Do not save /bin paths to all_fixpath_prefixes!
38882   else
38883     # Not in mixed or Windows style, start by that.
38884     new_path=`cmd //c echo $new_path`
38885 
38886   input_path="$new_path"
38887   # Check if we need to convert this using DOS-style short mode. If the path
38888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38889   # take no chances and rewrite it.
38890   # Note: m4 eats our [], so we need to use [ and ] instead.
38891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38892   if test "x$has_forbidden_chars" != x; then
38893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38894     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38895   fi
38896 
38897     # Output is in $new_path
38898 
38899   windows_path="$new_path"
38900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38901     unix_path=`$CYGPATH -u "$windows_path"`
38902     new_path="$unix_path"
38903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38905     new_path="$unix_path"
38906   fi
38907 
38908     # remove trailing .exe if any
38909     new_path="${new_path/%.exe/}"
38910 
38911     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38912     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38913   fi
38914 
38915   else
38916     # We're on a unix platform. Hooray! :)
38917     # First separate the path from the arguments. This will split at the first
38918     # space.
38919     complete="$OBJCOPY"
38920     path="${complete%% *}"
38921     tmp="$complete EOL"
38922     arguments="${tmp#* }"
38923 
38924     # Cannot rely on the command "which" here since it doesn't always work.
38925     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38926     if test -z "$is_absolute_path"; then
38927       # Path to executable is not absolute. Find it.
38928       IFS_save="$IFS"
38929       IFS=:
38930       for p in $PATH; do
38931         if test -f "$p/$path" && test -x "$p/$path"; then
38932           new_path="$p/$path"
38933           break
38934         fi
38935       done
38936       IFS="$IFS_save"
38937     else
38938       # This is an absolute path, we can use it without further modifications.
38939       new_path="$path"
38940     fi
38941 
38942     if test "x$new_path" = x; then
38943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38944 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38945       has_space=`$ECHO "$complete" | $GREP " "`
38946       if test "x$has_space" != x; then
38947         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38948 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38949       fi
38950       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38951     fi
38952   fi
38953 
38954   # Now join together the path and the arguments once again
38955   if test "x$arguments" != xEOL; then
38956     new_complete="$new_path ${arguments% *}"
38957   else
38958     new_complete="$new_path"
38959   fi
38960 
38961   if test "x$complete" != "x$new_complete"; then
38962     OBJCOPY="$new_complete"
38963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38964 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38965   fi
38966 
38967     fi
38968   fi
38969 
38970 
38971 
38972   # Publish this variable in the help.
38973 
38974 
38975   if test "x$OBJDUMP" = x; then
38976     # The variable is not set by user, try to locate tool using the code snippet
38977     if test -n "$ac_tool_prefix"; then
38978   for ac_prog in gobjdump objdump
38979   do
38980     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38981 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38983 $as_echo_n "checking for $ac_word... " >&6; }
38984 if ${ac_cv_prog_OBJDUMP+:} false; then :
38985   $as_echo_n "(cached) " >&6
38986 else
38987   if test -n "$OBJDUMP"; then
38988   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38989 else
38990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38991 for as_dir in $PATH
38992 do
38993   IFS=$as_save_IFS
38994   test -z "$as_dir" && as_dir=.
38995     for ac_exec_ext in '' $ac_executable_extensions; do
38996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38997     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38999     break 2
39000   fi
39001 done
39002   done
39003 IFS=$as_save_IFS
39004 
39005 fi
39006 fi
39007 OBJDUMP=$ac_cv_prog_OBJDUMP
39008 if test -n "$OBJDUMP"; then
39009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39010 $as_echo "$OBJDUMP" >&6; }
39011 else
39012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39013 $as_echo "no" >&6; }
39014 fi
39015 
39016 
39017     test -n "$OBJDUMP" && break
39018   done
39019 fi
39020 if test -z "$OBJDUMP"; then
39021   ac_ct_OBJDUMP=$OBJDUMP
39022   for ac_prog in gobjdump objdump
39023 do
39024   # Extract the first word of "$ac_prog", so it can be a program name with args.
39025 set dummy $ac_prog; ac_word=$2
39026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39027 $as_echo_n "checking for $ac_word... " >&6; }
39028 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39029   $as_echo_n "(cached) " >&6
39030 else
39031   if test -n "$ac_ct_OBJDUMP"; then
39032   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39033 else
39034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39035 for as_dir in $PATH
39036 do
39037   IFS=$as_save_IFS
39038   test -z "$as_dir" && as_dir=.
39039     for ac_exec_ext in '' $ac_executable_extensions; do
39040   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39041     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39042     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39043     break 2
39044   fi
39045 done
39046   done
39047 IFS=$as_save_IFS
39048 
39049 fi
39050 fi
39051 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39052 if test -n "$ac_ct_OBJDUMP"; then
39053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39054 $as_echo "$ac_ct_OBJDUMP" >&6; }
39055 else
39056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39057 $as_echo "no" >&6; }
39058 fi
39059 
39060 
39061   test -n "$ac_ct_OBJDUMP" && break
39062 done
39063 
39064   if test "x$ac_ct_OBJDUMP" = x; then
39065     OBJDUMP=""
39066   else
39067     case $cross_compiling:$ac_tool_warned in
39068 yes:)
39069 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39070 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39071 ac_tool_warned=yes ;;
39072 esac
39073     OBJDUMP=$ac_ct_OBJDUMP
39074   fi
39075 fi
39076 
39077   else
39078     # The variable is set, but is it from the command line or the environment?
39079 
39080     # Try to remove the string !OBJDUMP! from our list.
39081     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
39082     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39083       # If it failed, the variable was not from the command line. Ignore it,
39084       # but warn the user (except for BASH, which is always set by the calling BASH).
39085       if test "xOBJDUMP" != xBASH; then
39086         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
39087 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
39088       fi
39089       # Try to locate tool using the code snippet
39090       if test -n "$ac_tool_prefix"; then
39091   for ac_prog in gobjdump objdump
39092   do
39093     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39094 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39096 $as_echo_n "checking for $ac_word... " >&6; }
39097 if ${ac_cv_prog_OBJDUMP+:} false; then :
39098   $as_echo_n "(cached) " >&6
39099 else
39100   if test -n "$OBJDUMP"; then
39101   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39102 else
39103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39104 for as_dir in $PATH
39105 do
39106   IFS=$as_save_IFS
39107   test -z "$as_dir" && as_dir=.
39108     for ac_exec_ext in '' $ac_executable_extensions; do
39109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39110     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39112     break 2
39113   fi
39114 done
39115   done
39116 IFS=$as_save_IFS
39117 
39118 fi
39119 fi
39120 OBJDUMP=$ac_cv_prog_OBJDUMP
39121 if test -n "$OBJDUMP"; then
39122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39123 $as_echo "$OBJDUMP" >&6; }
39124 else
39125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39126 $as_echo "no" >&6; }
39127 fi
39128 
39129 
39130     test -n "$OBJDUMP" && break
39131   done
39132 fi
39133 if test -z "$OBJDUMP"; then
39134   ac_ct_OBJDUMP=$OBJDUMP
39135   for ac_prog in gobjdump objdump
39136 do
39137   # Extract the first word of "$ac_prog", so it can be a program name with args.
39138 set dummy $ac_prog; ac_word=$2
39139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39140 $as_echo_n "checking for $ac_word... " >&6; }
39141 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39142   $as_echo_n "(cached) " >&6
39143 else
39144   if test -n "$ac_ct_OBJDUMP"; then
39145   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39146 else
39147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39148 for as_dir in $PATH
39149 do
39150   IFS=$as_save_IFS
39151   test -z "$as_dir" && as_dir=.
39152     for ac_exec_ext in '' $ac_executable_extensions; do
39153   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39154     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39156     break 2
39157   fi
39158 done
39159   done
39160 IFS=$as_save_IFS
39161 
39162 fi
39163 fi
39164 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39165 if test -n "$ac_ct_OBJDUMP"; then
39166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39167 $as_echo "$ac_ct_OBJDUMP" >&6; }
39168 else
39169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39170 $as_echo "no" >&6; }
39171 fi
39172 
39173 
39174   test -n "$ac_ct_OBJDUMP" && break
39175 done
39176 
39177   if test "x$ac_ct_OBJDUMP" = x; then
39178     OBJDUMP=""
39179   else
39180     case $cross_compiling:$ac_tool_warned in
39181 yes:)
39182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39183 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39184 ac_tool_warned=yes ;;
39185 esac
39186     OBJDUMP=$ac_ct_OBJDUMP
39187   fi
39188 fi
39189 
39190     else
39191       # If it succeeded, then it was overridden by the user. We will use it
39192       # for the tool.
39193 
39194       # First remove it from the list of overridden variables, so we can test
39195       # for unknown variables in the end.
39196       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39197 
39198       # Check if the provided tool contains a complete path.
39199       tool_specified="$OBJDUMP"
39200       tool_basename="${tool_specified##*/}"
39201       if test "x$tool_basename" = "x$tool_specified"; then
39202         # A command without a complete path is provided, search $PATH.
39203         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
39204 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
39205         # Extract the first word of "$tool_basename", so it can be a program name with args.
39206 set dummy $tool_basename; ac_word=$2
39207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39208 $as_echo_n "checking for $ac_word... " >&6; }
39209 if ${ac_cv_path_OBJDUMP+:} false; then :
39210   $as_echo_n "(cached) " >&6
39211 else
39212   case $OBJDUMP in
39213   [\\/]* | ?:[\\/]*)
39214   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
39215   ;;
39216   *)
39217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39218 for as_dir in $PATH
39219 do
39220   IFS=$as_save_IFS
39221   test -z "$as_dir" && as_dir=.
39222     for ac_exec_ext in '' $ac_executable_extensions; do
39223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39224     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39226     break 2
39227   fi
39228 done
39229   done
39230 IFS=$as_save_IFS
39231 
39232   ;;
39233 esac
39234 fi
39235 OBJDUMP=$ac_cv_path_OBJDUMP
39236 if test -n "$OBJDUMP"; then
39237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39238 $as_echo "$OBJDUMP" >&6; }
39239 else
39240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39241 $as_echo "no" >&6; }
39242 fi
39243 
39244 
39245         if test "x$OBJDUMP" = x; then
39246           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39247         fi
39248       else
39249         # Otherwise we believe it is a complete path. Use it as it is.
39250         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39251 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39253 $as_echo_n "checking for OBJDUMP... " >&6; }
39254         if test ! -x "$tool_specified"; then
39255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39256 $as_echo "not found" >&6; }
39257           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39258         fi
39259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39260 $as_echo "$tool_specified" >&6; }
39261       fi
39262     fi
39263   fi
39264 
39265 
39266   if test "x$OBJDUMP" != x; then
39267     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39268     # bails if argument is missing.
39269 
39270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39271 
39272   # First separate the path from the arguments. This will split at the first
39273   # space.
39274   complete="$OBJDUMP"
39275   path="${complete%% *}"
39276   tmp="$complete EOL"
39277   arguments="${tmp#* }"
39278 
39279   # Input might be given as Windows format, start by converting to
39280   # unix format.
39281   new_path=`$CYGPATH -u "$path"`
39282 
39283   # Now try to locate executable using which
39284   new_path=`$WHICH "$new_path" 2> /dev/null`
39285   # bat and cmd files are not always considered executable in cygwin causing which
39286   # to not find them
39287   if test "x$new_path" = x \
39288       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39289       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39290     new_path=`$CYGPATH -u "$path"`
39291   fi
39292   if test "x$new_path" = x; then
39293     # Oops. Which didn't find the executable.
39294     # The splitting of arguments from the executable at a space might have been incorrect,
39295     # since paths with space are more likely in Windows. Give it another try with the whole
39296     # argument.
39297     path="$complete"
39298     arguments="EOL"
39299     new_path=`$CYGPATH -u "$path"`
39300     new_path=`$WHICH "$new_path" 2> /dev/null`
39301     # bat and cmd files are not always considered executable in cygwin causing which
39302     # to not find them
39303     if test "x$new_path" = x \
39304         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39305         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39306       new_path=`$CYGPATH -u "$path"`
39307     fi
39308     if test "x$new_path" = x; then
39309       # It's still not found. Now this is an unrecoverable error.
39310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39311 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39312       has_space=`$ECHO "$complete" | $GREP " "`
39313       if test "x$has_space" != x; then
39314         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39315 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39316       fi
39317       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39318     fi
39319   fi
39320 
39321   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39322   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39323   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39324   # "foo.exe" is OK but "foo" is an error.
39325   #
39326   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39327   # It is also a way to make sure we got the proper file name for the real test later on.
39328   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39329   if test "x$test_shortpath" = x; then
39330     # Short path failed, file does not exist as specified.
39331     # Try adding .exe or .cmd
39332     if test -f "${new_path}.exe"; then
39333       input_to_shortpath="${new_path}.exe"
39334     elif test -f "${new_path}.cmd"; then
39335       input_to_shortpath="${new_path}.cmd"
39336     else
39337       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39338 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39339       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39340 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39341       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39342     fi
39343   else
39344     input_to_shortpath="$new_path"
39345   fi
39346 
39347   # Call helper function which possibly converts this using DOS-style short mode.
39348   # If so, the updated path is stored in $new_path.
39349   new_path="$input_to_shortpath"
39350 
39351   input_path="$input_to_shortpath"
39352   # Check if we need to convert this using DOS-style short mode. If the path
39353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39354   # take no chances and rewrite it.
39355   # Note: m4 eats our [], so we need to use [ and ] instead.
39356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39357   if test "x$has_forbidden_chars" != x; then
39358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39359     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39360     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39361     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39362       # Going to short mode and back again did indeed matter. Since short mode is
39363       # case insensitive, let's make it lowercase to improve readability.
39364       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39365       # Now convert it back to Unix-stile (cygpath)
39366       input_path=`$CYGPATH -u "$shortmode_path"`
39367       new_path="$input_path"
39368     fi
39369   fi
39370 
39371   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39372   if test "x$test_cygdrive_prefix" = x; then
39373     # As a simple fix, exclude /usr/bin since it's not a real path.
39374     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39375       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39376       # a path prefixed by /cygdrive for fixpath to work.
39377       new_path="$CYGWIN_ROOT_PATH$input_path"
39378     fi
39379   fi
39380 
39381   # remove trailing .exe if any
39382   new_path="${new_path/%.exe/}"
39383 
39384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39385 
39386   # First separate the path from the arguments. This will split at the first
39387   # space.
39388   complete="$OBJDUMP"
39389   path="${complete%% *}"
39390   tmp="$complete EOL"
39391   arguments="${tmp#* }"
39392 
39393   # Input might be given as Windows format, start by converting to
39394   # unix format.
39395   new_path="$path"
39396 
39397   windows_path="$new_path"
39398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399     unix_path=`$CYGPATH -u "$windows_path"`
39400     new_path="$unix_path"
39401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403     new_path="$unix_path"
39404   fi
39405 
39406 
39407   # Now try to locate executable using which
39408   new_path=`$WHICH "$new_path" 2> /dev/null`
39409 
39410   if test "x$new_path" = x; then
39411     # Oops. Which didn't find the executable.
39412     # The splitting of arguments from the executable at a space might have been incorrect,
39413     # since paths with space are more likely in Windows. Give it another try with the whole
39414     # argument.
39415     path="$complete"
39416     arguments="EOL"
39417     new_path="$path"
39418 
39419   windows_path="$new_path"
39420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39421     unix_path=`$CYGPATH -u "$windows_path"`
39422     new_path="$unix_path"
39423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39425     new_path="$unix_path"
39426   fi
39427 
39428 
39429     new_path=`$WHICH "$new_path" 2> /dev/null`
39430     # bat and cmd files are not always considered executable in MSYS causing which
39431     # to not find them
39432     if test "x$new_path" = x \
39433         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39434         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39435       new_path="$path"
39436 
39437   windows_path="$new_path"
39438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39439     unix_path=`$CYGPATH -u "$windows_path"`
39440     new_path="$unix_path"
39441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39443     new_path="$unix_path"
39444   fi
39445 
39446     fi
39447 
39448     if test "x$new_path" = x; then
39449       # It's still not found. Now this is an unrecoverable error.
39450       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39451 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39452       has_space=`$ECHO "$complete" | $GREP " "`
39453       if test "x$has_space" != x; then
39454         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39455 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39456       fi
39457       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39458     fi
39459   fi
39460 
39461   # Now new_path has a complete unix path to the binary
39462   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39463     # Keep paths in /bin as-is, but remove trailing .exe if any
39464     new_path="${new_path/%.exe/}"
39465     # Do not save /bin paths to all_fixpath_prefixes!
39466   else
39467     # Not in mixed or Windows style, start by that.
39468     new_path=`cmd //c echo $new_path`
39469 
39470   input_path="$new_path"
39471   # Check if we need to convert this using DOS-style short mode. If the path
39472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39473   # take no chances and rewrite it.
39474   # Note: m4 eats our [], so we need to use [ and ] instead.
39475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39476   if test "x$has_forbidden_chars" != x; then
39477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39478     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39479   fi
39480 
39481     # Output is in $new_path
39482 
39483   windows_path="$new_path"
39484   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39485     unix_path=`$CYGPATH -u "$windows_path"`
39486     new_path="$unix_path"
39487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39488     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39489     new_path="$unix_path"
39490   fi
39491 
39492     # remove trailing .exe if any
39493     new_path="${new_path/%.exe/}"
39494 
39495     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39496     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39497   fi
39498 
39499   else
39500     # We're on a unix platform. Hooray! :)
39501     # First separate the path from the arguments. This will split at the first
39502     # space.
39503     complete="$OBJDUMP"
39504     path="${complete%% *}"
39505     tmp="$complete EOL"
39506     arguments="${tmp#* }"
39507 
39508     # Cannot rely on the command "which" here since it doesn't always work.
39509     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39510     if test -z "$is_absolute_path"; then
39511       # Path to executable is not absolute. Find it.
39512       IFS_save="$IFS"
39513       IFS=:
39514       for p in $PATH; do
39515         if test -f "$p/$path" && test -x "$p/$path"; then
39516           new_path="$p/$path"
39517           break
39518         fi
39519       done
39520       IFS="$IFS_save"
39521     else
39522       # This is an absolute path, we can use it without further modifications.
39523       new_path="$path"
39524     fi
39525 
39526     if test "x$new_path" = x; then
39527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39528 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39529       has_space=`$ECHO "$complete" | $GREP " "`
39530       if test "x$has_space" != x; then
39531         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39532 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39533       fi
39534       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39535     fi
39536   fi
39537 
39538   # Now join together the path and the arguments once again
39539   if test "x$arguments" != xEOL; then
39540     new_complete="$new_path ${arguments% *}"
39541   else
39542     new_complete="$new_path"
39543   fi
39544 
39545   if test "x$complete" != "x$new_complete"; then
39546     OBJDUMP="$new_complete"
39547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39548 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39549   fi
39550 
39551   fi
39552 
39553 
39554   # Restore old path.
39555   PATH="$OLD_PATH"
39556 
39557   # Restore the flags to the user specified values.
39558   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39559   CFLAGS="$ORG_CFLAGS"
39560   CXXFLAGS="$ORG_CXXFLAGS"
39561   OBJCFLAGS="$ORG_OBJCFLAGS"
39562 
39563 
39564 # Finally do some processing after the detection phase
39565 
39566   if test "x$COMPILE_TYPE" = "xcross"; then
39567     # Now we need to find a C/C++ compiler that can build executables for the
39568     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39569     # used once. Also, we need to do this without adding a tools dir to the
39570     # path, otherwise we might pick up cross-compilers which don't use standard
39571     # naming.
39572 
39573     # FIXME: we should list the discovered compilers as an exclude pattern!
39574     # If we do that, we can do this detection before POST_DETECTION, and still
39575     # find the build compilers in the tools dir, if needed.
39576 
39577 
39578   # Publish this variable in the help.
39579 
39580 
39581   if test "x$BUILD_CC" = x; then
39582     # The variable is not set by user, try to locate tool using the code snippet
39583     for ac_prog in cl cc gcc
39584 do
39585   # Extract the first word of "$ac_prog", so it can be a program name with args.
39586 set dummy $ac_prog; ac_word=$2
39587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39588 $as_echo_n "checking for $ac_word... " >&6; }
39589 if ${ac_cv_path_BUILD_CC+:} false; then :
39590   $as_echo_n "(cached) " >&6
39591 else
39592   case $BUILD_CC in
39593   [\\/]* | ?:[\\/]*)
39594   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39595   ;;
39596   *)
39597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39598 for as_dir in $PATH
39599 do
39600   IFS=$as_save_IFS
39601   test -z "$as_dir" && as_dir=.
39602     for ac_exec_ext in '' $ac_executable_extensions; do
39603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39604     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39606     break 2
39607   fi
39608 done
39609   done
39610 IFS=$as_save_IFS
39611 
39612   ;;
39613 esac
39614 fi
39615 BUILD_CC=$ac_cv_path_BUILD_CC
39616 if test -n "$BUILD_CC"; then
39617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39618 $as_echo "$BUILD_CC" >&6; }
39619 else
39620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39621 $as_echo "no" >&6; }
39622 fi
39623 
39624 
39625   test -n "$BUILD_CC" && break
39626 done
39627 
39628   else
39629     # The variable is set, but is it from the command line or the environment?
39630 
39631     # Try to remove the string !BUILD_CC! from our list.
39632     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39633     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39634       # If it failed, the variable was not from the command line. Ignore it,
39635       # but warn the user (except for BASH, which is always set by the calling BASH).
39636       if test "xBUILD_CC" != xBASH; then
39637         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39638 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39639       fi
39640       # Try to locate tool using the code snippet
39641       for ac_prog in cl cc gcc
39642 do
39643   # Extract the first word of "$ac_prog", so it can be a program name with args.
39644 set dummy $ac_prog; ac_word=$2
39645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39646 $as_echo_n "checking for $ac_word... " >&6; }
39647 if ${ac_cv_path_BUILD_CC+:} false; then :
39648   $as_echo_n "(cached) " >&6
39649 else
39650   case $BUILD_CC in
39651   [\\/]* | ?:[\\/]*)
39652   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39653   ;;
39654   *)
39655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39656 for as_dir in $PATH
39657 do
39658   IFS=$as_save_IFS
39659   test -z "$as_dir" && as_dir=.
39660     for ac_exec_ext in '' $ac_executable_extensions; do
39661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39662     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39664     break 2
39665   fi
39666 done
39667   done
39668 IFS=$as_save_IFS
39669 
39670   ;;
39671 esac
39672 fi
39673 BUILD_CC=$ac_cv_path_BUILD_CC
39674 if test -n "$BUILD_CC"; then
39675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39676 $as_echo "$BUILD_CC" >&6; }
39677 else
39678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39679 $as_echo "no" >&6; }
39680 fi
39681 
39682 
39683   test -n "$BUILD_CC" && break
39684 done
39685 
39686     else
39687       # If it succeeded, then it was overridden by the user. We will use it
39688       # for the tool.
39689 
39690       # First remove it from the list of overridden variables, so we can test
39691       # for unknown variables in the end.
39692       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39693 
39694       # Check if the provided tool contains a complete path.
39695       tool_specified="$BUILD_CC"
39696       tool_basename="${tool_specified##*/}"
39697       if test "x$tool_basename" = "x$tool_specified"; then
39698         # A command without a complete path is provided, search $PATH.
39699         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39700 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39701         # Extract the first word of "$tool_basename", so it can be a program name with args.
39702 set dummy $tool_basename; ac_word=$2
39703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39704 $as_echo_n "checking for $ac_word... " >&6; }
39705 if ${ac_cv_path_BUILD_CC+:} false; then :
39706   $as_echo_n "(cached) " >&6
39707 else
39708   case $BUILD_CC in
39709   [\\/]* | ?:[\\/]*)
39710   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39711   ;;
39712   *)
39713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39714 for as_dir in $PATH
39715 do
39716   IFS=$as_save_IFS
39717   test -z "$as_dir" && as_dir=.
39718     for ac_exec_ext in '' $ac_executable_extensions; do
39719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39720     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39722     break 2
39723   fi
39724 done
39725   done
39726 IFS=$as_save_IFS
39727 
39728   ;;
39729 esac
39730 fi
39731 BUILD_CC=$ac_cv_path_BUILD_CC
39732 if test -n "$BUILD_CC"; then
39733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39734 $as_echo "$BUILD_CC" >&6; }
39735 else
39736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39737 $as_echo "no" >&6; }
39738 fi
39739 
39740 
39741         if test "x$BUILD_CC" = x; then
39742           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39743         fi
39744       else
39745         # Otherwise we believe it is a complete path. Use it as it is.
39746         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39747 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39748         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39749 $as_echo_n "checking for BUILD_CC... " >&6; }
39750         if test ! -x "$tool_specified"; then
39751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39752 $as_echo "not found" >&6; }
39753           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39754         fi
39755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39756 $as_echo "$tool_specified" >&6; }
39757       fi
39758     fi
39759   fi
39760 
39761 
39762 
39763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39764 
39765   # First separate the path from the arguments. This will split at the first
39766   # space.
39767   complete="$BUILD_CC"
39768   path="${complete%% *}"
39769   tmp="$complete EOL"
39770   arguments="${tmp#* }"
39771 
39772   # Input might be given as Windows format, start by converting to
39773   # unix format.
39774   new_path=`$CYGPATH -u "$path"`
39775 
39776   # Now try to locate executable using which
39777   new_path=`$WHICH "$new_path" 2> /dev/null`
39778   # bat and cmd files are not always considered executable in cygwin causing which
39779   # to not find them
39780   if test "x$new_path" = x \
39781       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39782       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39783     new_path=`$CYGPATH -u "$path"`
39784   fi
39785   if test "x$new_path" = x; then
39786     # Oops. Which didn't find the executable.
39787     # The splitting of arguments from the executable at a space might have been incorrect,
39788     # since paths with space are more likely in Windows. Give it another try with the whole
39789     # argument.
39790     path="$complete"
39791     arguments="EOL"
39792     new_path=`$CYGPATH -u "$path"`
39793     new_path=`$WHICH "$new_path" 2> /dev/null`
39794     # bat and cmd files are not always considered executable in cygwin causing which
39795     # to not find them
39796     if test "x$new_path" = x \
39797         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39798         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39799       new_path=`$CYGPATH -u "$path"`
39800     fi
39801     if test "x$new_path" = x; then
39802       # It's still not found. Now this is an unrecoverable error.
39803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39804 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39805       has_space=`$ECHO "$complete" | $GREP " "`
39806       if test "x$has_space" != x; then
39807         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39808 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39809       fi
39810       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39811     fi
39812   fi
39813 
39814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39817   # "foo.exe" is OK but "foo" is an error.
39818   #
39819   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39820   # It is also a way to make sure we got the proper file name for the real test later on.
39821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39822   if test "x$test_shortpath" = x; then
39823     # Short path failed, file does not exist as specified.
39824     # Try adding .exe or .cmd
39825     if test -f "${new_path}.exe"; then
39826       input_to_shortpath="${new_path}.exe"
39827     elif test -f "${new_path}.cmd"; then
39828       input_to_shortpath="${new_path}.cmd"
39829     else
39830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39831 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39832       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39833 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39834       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39835     fi
39836   else
39837     input_to_shortpath="$new_path"
39838   fi
39839 
39840   # Call helper function which possibly converts this using DOS-style short mode.
39841   # If so, the updated path is stored in $new_path.
39842   new_path="$input_to_shortpath"
39843 
39844   input_path="$input_to_shortpath"
39845   # Check if we need to convert this using DOS-style short mode. If the path
39846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39847   # take no chances and rewrite it.
39848   # Note: m4 eats our [], so we need to use [ and ] instead.
39849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39850   if test "x$has_forbidden_chars" != x; then
39851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39855       # Going to short mode and back again did indeed matter. Since short mode is
39856       # case insensitive, let's make it lowercase to improve readability.
39857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39858       # Now convert it back to Unix-stile (cygpath)
39859       input_path=`$CYGPATH -u "$shortmode_path"`
39860       new_path="$input_path"
39861     fi
39862   fi
39863 
39864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39865   if test "x$test_cygdrive_prefix" = x; then
39866     # As a simple fix, exclude /usr/bin since it's not a real path.
39867     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39869       # a path prefixed by /cygdrive for fixpath to work.
39870       new_path="$CYGWIN_ROOT_PATH$input_path"
39871     fi
39872   fi
39873 
39874   # remove trailing .exe if any
39875   new_path="${new_path/%.exe/}"
39876 
39877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39878 
39879   # First separate the path from the arguments. This will split at the first
39880   # space.
39881   complete="$BUILD_CC"
39882   path="${complete%% *}"
39883   tmp="$complete EOL"
39884   arguments="${tmp#* }"
39885 
39886   # Input might be given as Windows format, start by converting to
39887   # unix format.
39888   new_path="$path"
39889 
39890   windows_path="$new_path"
39891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39892     unix_path=`$CYGPATH -u "$windows_path"`
39893     new_path="$unix_path"
39894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39896     new_path="$unix_path"
39897   fi
39898 
39899 
39900   # Now try to locate executable using which
39901   new_path=`$WHICH "$new_path" 2> /dev/null`
39902 
39903   if test "x$new_path" = x; then
39904     # Oops. Which didn't find the executable.
39905     # The splitting of arguments from the executable at a space might have been incorrect,
39906     # since paths with space are more likely in Windows. Give it another try with the whole
39907     # argument.
39908     path="$complete"
39909     arguments="EOL"
39910     new_path="$path"
39911 
39912   windows_path="$new_path"
39913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39914     unix_path=`$CYGPATH -u "$windows_path"`
39915     new_path="$unix_path"
39916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39918     new_path="$unix_path"
39919   fi
39920 
39921 
39922     new_path=`$WHICH "$new_path" 2> /dev/null`
39923     # bat and cmd files are not always considered executable in MSYS causing which
39924     # to not find them
39925     if test "x$new_path" = x \
39926         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39927         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39928       new_path="$path"
39929 
39930   windows_path="$new_path"
39931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39932     unix_path=`$CYGPATH -u "$windows_path"`
39933     new_path="$unix_path"
39934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39936     new_path="$unix_path"
39937   fi
39938 
39939     fi
39940 
39941     if test "x$new_path" = x; then
39942       # It's still not found. Now this is an unrecoverable error.
39943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39944 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39945       has_space=`$ECHO "$complete" | $GREP " "`
39946       if test "x$has_space" != x; then
39947         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39948 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39949       fi
39950       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39951     fi
39952   fi
39953 
39954   # Now new_path has a complete unix path to the binary
39955   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39956     # Keep paths in /bin as-is, but remove trailing .exe if any
39957     new_path="${new_path/%.exe/}"
39958     # Do not save /bin paths to all_fixpath_prefixes!
39959   else
39960     # Not in mixed or Windows style, start by that.
39961     new_path=`cmd //c echo $new_path`
39962 
39963   input_path="$new_path"
39964   # Check if we need to convert this using DOS-style short mode. If the path
39965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39966   # take no chances and rewrite it.
39967   # Note: m4 eats our [], so we need to use [ and ] instead.
39968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39969   if test "x$has_forbidden_chars" != x; then
39970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39972   fi
39973 
39974     # Output is in $new_path
39975 
39976   windows_path="$new_path"
39977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978     unix_path=`$CYGPATH -u "$windows_path"`
39979     new_path="$unix_path"
39980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982     new_path="$unix_path"
39983   fi
39984 
39985     # remove trailing .exe if any
39986     new_path="${new_path/%.exe/}"
39987 
39988     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39989     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39990   fi
39991 
39992   else
39993     # We're on a unix platform. Hooray! :)
39994     # First separate the path from the arguments. This will split at the first
39995     # space.
39996     complete="$BUILD_CC"
39997     path="${complete%% *}"
39998     tmp="$complete EOL"
39999     arguments="${tmp#* }"
40000 
40001     # Cannot rely on the command "which" here since it doesn't always work.
40002     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40003     if test -z "$is_absolute_path"; then
40004       # Path to executable is not absolute. Find it.
40005       IFS_save="$IFS"
40006       IFS=:
40007       for p in $PATH; do
40008         if test -f "$p/$path" && test -x "$p/$path"; then
40009           new_path="$p/$path"
40010           break
40011         fi
40012       done
40013       IFS="$IFS_save"
40014     else
40015       # This is an absolute path, we can use it without further modifications.
40016       new_path="$path"
40017     fi
40018 
40019     if test "x$new_path" = x; then
40020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
40021 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
40022       has_space=`$ECHO "$complete" | $GREP " "`
40023       if test "x$has_space" != x; then
40024         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40025 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40026       fi
40027       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
40028     fi
40029   fi
40030 
40031   # Now join together the path and the arguments once again
40032   if test "x$arguments" != xEOL; then
40033     new_complete="$new_path ${arguments% *}"
40034   else
40035     new_complete="$new_path"
40036   fi
40037 
40038   if test "x$complete" != "x$new_complete"; then
40039     BUILD_CC="$new_complete"
40040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
40041 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
40042   fi
40043 
40044 
40045 
40046   # Publish this variable in the help.
40047 
40048 
40049   if test "x$BUILD_CXX" = x; then
40050     # The variable is not set by user, try to locate tool using the code snippet
40051     for ac_prog in cl CC g++
40052 do
40053   # Extract the first word of "$ac_prog", so it can be a program name with args.
40054 set dummy $ac_prog; ac_word=$2
40055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40056 $as_echo_n "checking for $ac_word... " >&6; }
40057 if ${ac_cv_path_BUILD_CXX+:} false; then :
40058   $as_echo_n "(cached) " >&6
40059 else
40060   case $BUILD_CXX in
40061   [\\/]* | ?:[\\/]*)
40062   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40063   ;;
40064   *)
40065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40066 for as_dir in $PATH
40067 do
40068   IFS=$as_save_IFS
40069   test -z "$as_dir" && as_dir=.
40070     for ac_exec_ext in '' $ac_executable_extensions; do
40071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40072     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40074     break 2
40075   fi
40076 done
40077   done
40078 IFS=$as_save_IFS
40079 
40080   ;;
40081 esac
40082 fi
40083 BUILD_CXX=$ac_cv_path_BUILD_CXX
40084 if test -n "$BUILD_CXX"; then
40085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40086 $as_echo "$BUILD_CXX" >&6; }
40087 else
40088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40089 $as_echo "no" >&6; }
40090 fi
40091 
40092 
40093   test -n "$BUILD_CXX" && break
40094 done
40095 
40096   else
40097     # The variable is set, but is it from the command line or the environment?
40098 
40099     # Try to remove the string !BUILD_CXX! from our list.
40100     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
40101     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40102       # If it failed, the variable was not from the command line. Ignore it,
40103       # but warn the user (except for BASH, which is always set by the calling BASH).
40104       if test "xBUILD_CXX" != xBASH; then
40105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
40106 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
40107       fi
40108       # Try to locate tool using the code snippet
40109       for ac_prog in cl CC g++
40110 do
40111   # Extract the first word of "$ac_prog", so it can be a program name with args.
40112 set dummy $ac_prog; ac_word=$2
40113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40114 $as_echo_n "checking for $ac_word... " >&6; }
40115 if ${ac_cv_path_BUILD_CXX+:} false; then :
40116   $as_echo_n "(cached) " >&6
40117 else
40118   case $BUILD_CXX in
40119   [\\/]* | ?:[\\/]*)
40120   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40121   ;;
40122   *)
40123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40124 for as_dir in $PATH
40125 do
40126   IFS=$as_save_IFS
40127   test -z "$as_dir" && as_dir=.
40128     for ac_exec_ext in '' $ac_executable_extensions; do
40129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40130     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40132     break 2
40133   fi
40134 done
40135   done
40136 IFS=$as_save_IFS
40137 
40138   ;;
40139 esac
40140 fi
40141 BUILD_CXX=$ac_cv_path_BUILD_CXX
40142 if test -n "$BUILD_CXX"; then
40143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40144 $as_echo "$BUILD_CXX" >&6; }
40145 else
40146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40147 $as_echo "no" >&6; }
40148 fi
40149 
40150 
40151   test -n "$BUILD_CXX" && break
40152 done
40153 
40154     else
40155       # If it succeeded, then it was overridden by the user. We will use it
40156       # for the tool.
40157 
40158       # First remove it from the list of overridden variables, so we can test
40159       # for unknown variables in the end.
40160       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40161 
40162       # Check if the provided tool contains a complete path.
40163       tool_specified="$BUILD_CXX"
40164       tool_basename="${tool_specified##*/}"
40165       if test "x$tool_basename" = "x$tool_specified"; then
40166         # A command without a complete path is provided, search $PATH.
40167         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
40168 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
40169         # Extract the first word of "$tool_basename", so it can be a program name with args.
40170 set dummy $tool_basename; ac_word=$2
40171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40172 $as_echo_n "checking for $ac_word... " >&6; }
40173 if ${ac_cv_path_BUILD_CXX+:} false; then :
40174   $as_echo_n "(cached) " >&6
40175 else
40176   case $BUILD_CXX in
40177   [\\/]* | ?:[\\/]*)
40178   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
40179   ;;
40180   *)
40181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40182 for as_dir in $PATH
40183 do
40184   IFS=$as_save_IFS
40185   test -z "$as_dir" && as_dir=.
40186     for ac_exec_ext in '' $ac_executable_extensions; do
40187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40188     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
40189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40190     break 2
40191   fi
40192 done
40193   done
40194 IFS=$as_save_IFS
40195 
40196   ;;
40197 esac
40198 fi
40199 BUILD_CXX=$ac_cv_path_BUILD_CXX
40200 if test -n "$BUILD_CXX"; then
40201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
40202 $as_echo "$BUILD_CXX" >&6; }
40203 else
40204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40205 $as_echo "no" >&6; }
40206 fi
40207 
40208 
40209         if test "x$BUILD_CXX" = x; then
40210           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40211         fi
40212       else
40213         # Otherwise we believe it is a complete path. Use it as it is.
40214         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
40215 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40217 $as_echo_n "checking for BUILD_CXX... " >&6; }
40218         if test ! -x "$tool_specified"; then
40219           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40220 $as_echo "not found" >&6; }
40221           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40222         fi
40223         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40224 $as_echo "$tool_specified" >&6; }
40225       fi
40226     fi
40227   fi
40228 
40229 
40230 
40231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40232 
40233   # First separate the path from the arguments. This will split at the first
40234   # space.
40235   complete="$BUILD_CXX"
40236   path="${complete%% *}"
40237   tmp="$complete EOL"
40238   arguments="${tmp#* }"
40239 
40240   # Input might be given as Windows format, start by converting to
40241   # unix format.
40242   new_path=`$CYGPATH -u "$path"`
40243 
40244   # Now try to locate executable using which
40245   new_path=`$WHICH "$new_path" 2> /dev/null`
40246   # bat and cmd files are not always considered executable in cygwin causing which
40247   # to not find them
40248   if test "x$new_path" = x \
40249       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40250       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40251     new_path=`$CYGPATH -u "$path"`
40252   fi
40253   if test "x$new_path" = x; then
40254     # Oops. Which didn't find the executable.
40255     # The splitting of arguments from the executable at a space might have been incorrect,
40256     # since paths with space are more likely in Windows. Give it another try with the whole
40257     # argument.
40258     path="$complete"
40259     arguments="EOL"
40260     new_path=`$CYGPATH -u "$path"`
40261     new_path=`$WHICH "$new_path" 2> /dev/null`
40262     # bat and cmd files are not always considered executable in cygwin causing which
40263     # to not find them
40264     if test "x$new_path" = x \
40265         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40266         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40267       new_path=`$CYGPATH -u "$path"`
40268     fi
40269     if test "x$new_path" = x; then
40270       # It's still not found. Now this is an unrecoverable error.
40271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40272 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40273       has_space=`$ECHO "$complete" | $GREP " "`
40274       if test "x$has_space" != x; then
40275         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40276 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40277       fi
40278       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40279     fi
40280   fi
40281 
40282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40285   # "foo.exe" is OK but "foo" is an error.
40286   #
40287   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40288   # It is also a way to make sure we got the proper file name for the real test later on.
40289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40290   if test "x$test_shortpath" = x; then
40291     # Short path failed, file does not exist as specified.
40292     # Try adding .exe or .cmd
40293     if test -f "${new_path}.exe"; then
40294       input_to_shortpath="${new_path}.exe"
40295     elif test -f "${new_path}.cmd"; then
40296       input_to_shortpath="${new_path}.cmd"
40297     else
40298       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40299 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40300       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40301 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40302       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40303     fi
40304   else
40305     input_to_shortpath="$new_path"
40306   fi
40307 
40308   # Call helper function which possibly converts this using DOS-style short mode.
40309   # If so, the updated path is stored in $new_path.
40310   new_path="$input_to_shortpath"
40311 
40312   input_path="$input_to_shortpath"
40313   # Check if we need to convert this using DOS-style short mode. If the path
40314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40315   # take no chances and rewrite it.
40316   # Note: m4 eats our [], so we need to use [ and ] instead.
40317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40318   if test "x$has_forbidden_chars" != x; then
40319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40323       # Going to short mode and back again did indeed matter. Since short mode is
40324       # case insensitive, let's make it lowercase to improve readability.
40325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40326       # Now convert it back to Unix-stile (cygpath)
40327       input_path=`$CYGPATH -u "$shortmode_path"`
40328       new_path="$input_path"
40329     fi
40330   fi
40331 
40332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40333   if test "x$test_cygdrive_prefix" = x; then
40334     # As a simple fix, exclude /usr/bin since it's not a real path.
40335     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40337       # a path prefixed by /cygdrive for fixpath to work.
40338       new_path="$CYGWIN_ROOT_PATH$input_path"
40339     fi
40340   fi
40341 
40342   # remove trailing .exe if any
40343   new_path="${new_path/%.exe/}"
40344 
40345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40346 
40347   # First separate the path from the arguments. This will split at the first
40348   # space.
40349   complete="$BUILD_CXX"
40350   path="${complete%% *}"
40351   tmp="$complete EOL"
40352   arguments="${tmp#* }"
40353 
40354   # Input might be given as Windows format, start by converting to
40355   # unix format.
40356   new_path="$path"
40357 
40358   windows_path="$new_path"
40359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360     unix_path=`$CYGPATH -u "$windows_path"`
40361     new_path="$unix_path"
40362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40364     new_path="$unix_path"
40365   fi
40366 
40367 
40368   # Now try to locate executable using which
40369   new_path=`$WHICH "$new_path" 2> /dev/null`
40370 
40371   if test "x$new_path" = x; then
40372     # Oops. Which didn't find the executable.
40373     # The splitting of arguments from the executable at a space might have been incorrect,
40374     # since paths with space are more likely in Windows. Give it another try with the whole
40375     # argument.
40376     path="$complete"
40377     arguments="EOL"
40378     new_path="$path"
40379 
40380   windows_path="$new_path"
40381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40382     unix_path=`$CYGPATH -u "$windows_path"`
40383     new_path="$unix_path"
40384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40386     new_path="$unix_path"
40387   fi
40388 
40389 
40390     new_path=`$WHICH "$new_path" 2> /dev/null`
40391     # bat and cmd files are not always considered executable in MSYS causing which
40392     # to not find them
40393     if test "x$new_path" = x \
40394         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40395         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40396       new_path="$path"
40397 
40398   windows_path="$new_path"
40399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40400     unix_path=`$CYGPATH -u "$windows_path"`
40401     new_path="$unix_path"
40402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40404     new_path="$unix_path"
40405   fi
40406 
40407     fi
40408 
40409     if test "x$new_path" = x; then
40410       # It's still not found. Now this is an unrecoverable error.
40411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40412 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40413       has_space=`$ECHO "$complete" | $GREP " "`
40414       if test "x$has_space" != x; then
40415         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40417       fi
40418       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40419     fi
40420   fi
40421 
40422   # Now new_path has a complete unix path to the binary
40423   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40424     # Keep paths in /bin as-is, but remove trailing .exe if any
40425     new_path="${new_path/%.exe/}"
40426     # Do not save /bin paths to all_fixpath_prefixes!
40427   else
40428     # Not in mixed or Windows style, start by that.
40429     new_path=`cmd //c echo $new_path`
40430 
40431   input_path="$new_path"
40432   # Check if we need to convert this using DOS-style short mode. If the path
40433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40434   # take no chances and rewrite it.
40435   # Note: m4 eats our [], so we need to use [ and ] instead.
40436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40437   if test "x$has_forbidden_chars" != x; then
40438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40439     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40440   fi
40441 
40442     # Output is in $new_path
40443 
40444   windows_path="$new_path"
40445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40446     unix_path=`$CYGPATH -u "$windows_path"`
40447     new_path="$unix_path"
40448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40450     new_path="$unix_path"
40451   fi
40452 
40453     # remove trailing .exe if any
40454     new_path="${new_path/%.exe/}"
40455 
40456     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40457     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40458   fi
40459 
40460   else
40461     # We're on a unix platform. Hooray! :)
40462     # First separate the path from the arguments. This will split at the first
40463     # space.
40464     complete="$BUILD_CXX"
40465     path="${complete%% *}"
40466     tmp="$complete EOL"
40467     arguments="${tmp#* }"
40468 
40469     # Cannot rely on the command "which" here since it doesn't always work.
40470     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40471     if test -z "$is_absolute_path"; then
40472       # Path to executable is not absolute. Find it.
40473       IFS_save="$IFS"
40474       IFS=:
40475       for p in $PATH; do
40476         if test -f "$p/$path" && test -x "$p/$path"; then
40477           new_path="$p/$path"
40478           break
40479         fi
40480       done
40481       IFS="$IFS_save"
40482     else
40483       # This is an absolute path, we can use it without further modifications.
40484       new_path="$path"
40485     fi
40486 
40487     if test "x$new_path" = x; then
40488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40489 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40490       has_space=`$ECHO "$complete" | $GREP " "`
40491       if test "x$has_space" != x; then
40492         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40493 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40494       fi
40495       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40496     fi
40497   fi
40498 
40499   # Now join together the path and the arguments once again
40500   if test "x$arguments" != xEOL; then
40501     new_complete="$new_path ${arguments% *}"
40502   else
40503     new_complete="$new_path"
40504   fi
40505 
40506   if test "x$complete" != "x$new_complete"; then
40507     BUILD_CXX="$new_complete"
40508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40509 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40510   fi
40511 
40512 
40513 
40514   # Publish this variable in the help.
40515 
40516 
40517   if test "x$BUILD_LD" = x; then
40518     # The variable is not set by user, try to locate tool using the code snippet
40519     for ac_prog in ld
40520 do
40521   # Extract the first word of "$ac_prog", so it can be a program name with args.
40522 set dummy $ac_prog; ac_word=$2
40523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40524 $as_echo_n "checking for $ac_word... " >&6; }
40525 if ${ac_cv_path_BUILD_LD+:} false; then :
40526   $as_echo_n "(cached) " >&6
40527 else
40528   case $BUILD_LD in
40529   [\\/]* | ?:[\\/]*)
40530   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40531   ;;
40532   *)
40533   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40534 for as_dir in $PATH
40535 do
40536   IFS=$as_save_IFS
40537   test -z "$as_dir" && as_dir=.
40538     for ac_exec_ext in '' $ac_executable_extensions; do
40539   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40540     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40541     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40542     break 2
40543   fi
40544 done
40545   done
40546 IFS=$as_save_IFS
40547 
40548   ;;
40549 esac
40550 fi
40551 BUILD_LD=$ac_cv_path_BUILD_LD
40552 if test -n "$BUILD_LD"; then
40553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40554 $as_echo "$BUILD_LD" >&6; }
40555 else
40556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40557 $as_echo "no" >&6; }
40558 fi
40559 
40560 
40561   test -n "$BUILD_LD" && break
40562 done
40563 
40564   else
40565     # The variable is set, but is it from the command line or the environment?
40566 
40567     # Try to remove the string !BUILD_LD! from our list.
40568     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40569     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40570       # If it failed, the variable was not from the command line. Ignore it,
40571       # but warn the user (except for BASH, which is always set by the calling BASH).
40572       if test "xBUILD_LD" != xBASH; then
40573         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40574 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40575       fi
40576       # Try to locate tool using the code snippet
40577       for ac_prog in ld
40578 do
40579   # Extract the first word of "$ac_prog", so it can be a program name with args.
40580 set dummy $ac_prog; ac_word=$2
40581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40582 $as_echo_n "checking for $ac_word... " >&6; }
40583 if ${ac_cv_path_BUILD_LD+:} false; then :
40584   $as_echo_n "(cached) " >&6
40585 else
40586   case $BUILD_LD in
40587   [\\/]* | ?:[\\/]*)
40588   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40589   ;;
40590   *)
40591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40592 for as_dir in $PATH
40593 do
40594   IFS=$as_save_IFS
40595   test -z "$as_dir" && as_dir=.
40596     for ac_exec_ext in '' $ac_executable_extensions; do
40597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40598     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40600     break 2
40601   fi
40602 done
40603   done
40604 IFS=$as_save_IFS
40605 
40606   ;;
40607 esac
40608 fi
40609 BUILD_LD=$ac_cv_path_BUILD_LD
40610 if test -n "$BUILD_LD"; then
40611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40612 $as_echo "$BUILD_LD" >&6; }
40613 else
40614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40615 $as_echo "no" >&6; }
40616 fi
40617 
40618 
40619   test -n "$BUILD_LD" && break
40620 done
40621 
40622     else
40623       # If it succeeded, then it was overridden by the user. We will use it
40624       # for the tool.
40625 
40626       # First remove it from the list of overridden variables, so we can test
40627       # for unknown variables in the end.
40628       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40629 
40630       # Check if the provided tool contains a complete path.
40631       tool_specified="$BUILD_LD"
40632       tool_basename="${tool_specified##*/}"
40633       if test "x$tool_basename" = "x$tool_specified"; then
40634         # A command without a complete path is provided, search $PATH.
40635         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40636 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40637         # Extract the first word of "$tool_basename", so it can be a program name with args.
40638 set dummy $tool_basename; ac_word=$2
40639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40640 $as_echo_n "checking for $ac_word... " >&6; }
40641 if ${ac_cv_path_BUILD_LD+:} false; then :
40642   $as_echo_n "(cached) " >&6
40643 else
40644   case $BUILD_LD in
40645   [\\/]* | ?:[\\/]*)
40646   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40647   ;;
40648   *)
40649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40650 for as_dir in $PATH
40651 do
40652   IFS=$as_save_IFS
40653   test -z "$as_dir" && as_dir=.
40654     for ac_exec_ext in '' $ac_executable_extensions; do
40655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40656     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40658     break 2
40659   fi
40660 done
40661   done
40662 IFS=$as_save_IFS
40663 
40664   ;;
40665 esac
40666 fi
40667 BUILD_LD=$ac_cv_path_BUILD_LD
40668 if test -n "$BUILD_LD"; then
40669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40670 $as_echo "$BUILD_LD" >&6; }
40671 else
40672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40673 $as_echo "no" >&6; }
40674 fi
40675 
40676 
40677         if test "x$BUILD_LD" = x; then
40678           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40679         fi
40680       else
40681         # Otherwise we believe it is a complete path. Use it as it is.
40682         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40683 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40684         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40685 $as_echo_n "checking for BUILD_LD... " >&6; }
40686         if test ! -x "$tool_specified"; then
40687           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40688 $as_echo "not found" >&6; }
40689           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40690         fi
40691         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40692 $as_echo "$tool_specified" >&6; }
40693       fi
40694     fi
40695   fi
40696 
40697 
40698 
40699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40700 
40701   # First separate the path from the arguments. This will split at the first
40702   # space.
40703   complete="$BUILD_LD"
40704   path="${complete%% *}"
40705   tmp="$complete EOL"
40706   arguments="${tmp#* }"
40707 
40708   # Input might be given as Windows format, start by converting to
40709   # unix format.
40710   new_path=`$CYGPATH -u "$path"`
40711 
40712   # Now try to locate executable using which
40713   new_path=`$WHICH "$new_path" 2> /dev/null`
40714   # bat and cmd files are not always considered executable in cygwin causing which
40715   # to not find them
40716   if test "x$new_path" = x \
40717       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40718       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40719     new_path=`$CYGPATH -u "$path"`
40720   fi
40721   if test "x$new_path" = x; then
40722     # Oops. Which didn't find the executable.
40723     # The splitting of arguments from the executable at a space might have been incorrect,
40724     # since paths with space are more likely in Windows. Give it another try with the whole
40725     # argument.
40726     path="$complete"
40727     arguments="EOL"
40728     new_path=`$CYGPATH -u "$path"`
40729     new_path=`$WHICH "$new_path" 2> /dev/null`
40730     # bat and cmd files are not always considered executable in cygwin causing which
40731     # to not find them
40732     if test "x$new_path" = x \
40733         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40734         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40735       new_path=`$CYGPATH -u "$path"`
40736     fi
40737     if test "x$new_path" = x; then
40738       # It's still not found. Now this is an unrecoverable error.
40739       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40740 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40741       has_space=`$ECHO "$complete" | $GREP " "`
40742       if test "x$has_space" != x; then
40743         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40744 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40745       fi
40746       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40747     fi
40748   fi
40749 
40750   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40751   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40752   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40753   # "foo.exe" is OK but "foo" is an error.
40754   #
40755   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40756   # It is also a way to make sure we got the proper file name for the real test later on.
40757   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40758   if test "x$test_shortpath" = x; then
40759     # Short path failed, file does not exist as specified.
40760     # Try adding .exe or .cmd
40761     if test -f "${new_path}.exe"; then
40762       input_to_shortpath="${new_path}.exe"
40763     elif test -f "${new_path}.cmd"; then
40764       input_to_shortpath="${new_path}.cmd"
40765     else
40766       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40767 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40768       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40769 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40770       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40771     fi
40772   else
40773     input_to_shortpath="$new_path"
40774   fi
40775 
40776   # Call helper function which possibly converts this using DOS-style short mode.
40777   # If so, the updated path is stored in $new_path.
40778   new_path="$input_to_shortpath"
40779 
40780   input_path="$input_to_shortpath"
40781   # Check if we need to convert this using DOS-style short mode. If the path
40782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40783   # take no chances and rewrite it.
40784   # Note: m4 eats our [], so we need to use [ and ] instead.
40785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40786   if test "x$has_forbidden_chars" != x; then
40787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40791       # Going to short mode and back again did indeed matter. Since short mode is
40792       # case insensitive, let's make it lowercase to improve readability.
40793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40794       # Now convert it back to Unix-stile (cygpath)
40795       input_path=`$CYGPATH -u "$shortmode_path"`
40796       new_path="$input_path"
40797     fi
40798   fi
40799 
40800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40801   if test "x$test_cygdrive_prefix" = x; then
40802     # As a simple fix, exclude /usr/bin since it's not a real path.
40803     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40805       # a path prefixed by /cygdrive for fixpath to work.
40806       new_path="$CYGWIN_ROOT_PATH$input_path"
40807     fi
40808   fi
40809 
40810   # remove trailing .exe if any
40811   new_path="${new_path/%.exe/}"
40812 
40813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40814 
40815   # First separate the path from the arguments. This will split at the first
40816   # space.
40817   complete="$BUILD_LD"
40818   path="${complete%% *}"
40819   tmp="$complete EOL"
40820   arguments="${tmp#* }"
40821 
40822   # Input might be given as Windows format, start by converting to
40823   # unix format.
40824   new_path="$path"
40825 
40826   windows_path="$new_path"
40827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40828     unix_path=`$CYGPATH -u "$windows_path"`
40829     new_path="$unix_path"
40830   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40831     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40832     new_path="$unix_path"
40833   fi
40834 
40835 
40836   # Now try to locate executable using which
40837   new_path=`$WHICH "$new_path" 2> /dev/null`
40838 
40839   if test "x$new_path" = x; then
40840     # Oops. Which didn't find the executable.
40841     # The splitting of arguments from the executable at a space might have been incorrect,
40842     # since paths with space are more likely in Windows. Give it another try with the whole
40843     # argument.
40844     path="$complete"
40845     arguments="EOL"
40846     new_path="$path"
40847 
40848   windows_path="$new_path"
40849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850     unix_path=`$CYGPATH -u "$windows_path"`
40851     new_path="$unix_path"
40852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40854     new_path="$unix_path"
40855   fi
40856 
40857 
40858     new_path=`$WHICH "$new_path" 2> /dev/null`
40859     # bat and cmd files are not always considered executable in MSYS causing which
40860     # to not find them
40861     if test "x$new_path" = x \
40862         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40863         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40864       new_path="$path"
40865 
40866   windows_path="$new_path"
40867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40868     unix_path=`$CYGPATH -u "$windows_path"`
40869     new_path="$unix_path"
40870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40872     new_path="$unix_path"
40873   fi
40874 
40875     fi
40876 
40877     if test "x$new_path" = x; then
40878       # It's still not found. Now this is an unrecoverable error.
40879       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40880 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40881       has_space=`$ECHO "$complete" | $GREP " "`
40882       if test "x$has_space" != x; then
40883         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40884 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40885       fi
40886       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40887     fi
40888   fi
40889 
40890   # Now new_path has a complete unix path to the binary
40891   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40892     # Keep paths in /bin as-is, but remove trailing .exe if any
40893     new_path="${new_path/%.exe/}"
40894     # Do not save /bin paths to all_fixpath_prefixes!
40895   else
40896     # Not in mixed or Windows style, start by that.
40897     new_path=`cmd //c echo $new_path`
40898 
40899   input_path="$new_path"
40900   # Check if we need to convert this using DOS-style short mode. If the path
40901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40902   # take no chances and rewrite it.
40903   # Note: m4 eats our [], so we need to use [ and ] instead.
40904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40905   if test "x$has_forbidden_chars" != x; then
40906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40908   fi
40909 
40910     # Output is in $new_path
40911 
40912   windows_path="$new_path"
40913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40914     unix_path=`$CYGPATH -u "$windows_path"`
40915     new_path="$unix_path"
40916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40918     new_path="$unix_path"
40919   fi
40920 
40921     # remove trailing .exe if any
40922     new_path="${new_path/%.exe/}"
40923 
40924     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40925     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40926   fi
40927 
40928   else
40929     # We're on a unix platform. Hooray! :)
40930     # First separate the path from the arguments. This will split at the first
40931     # space.
40932     complete="$BUILD_LD"
40933     path="${complete%% *}"
40934     tmp="$complete EOL"
40935     arguments="${tmp#* }"
40936 
40937     # Cannot rely on the command "which" here since it doesn't always work.
40938     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40939     if test -z "$is_absolute_path"; then
40940       # Path to executable is not absolute. Find it.
40941       IFS_save="$IFS"
40942       IFS=:
40943       for p in $PATH; do
40944         if test -f "$p/$path" && test -x "$p/$path"; then
40945           new_path="$p/$path"
40946           break
40947         fi
40948       done
40949       IFS="$IFS_save"
40950     else
40951       # This is an absolute path, we can use it without further modifications.
40952       new_path="$path"
40953     fi
40954 
40955     if test "x$new_path" = x; then
40956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40957 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40958       has_space=`$ECHO "$complete" | $GREP " "`
40959       if test "x$has_space" != x; then
40960         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40961 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40962       fi
40963       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40964     fi
40965   fi
40966 
40967   # Now join together the path and the arguments once again
40968   if test "x$arguments" != xEOL; then
40969     new_complete="$new_path ${arguments% *}"
40970   else
40971     new_complete="$new_path"
40972   fi
40973 
40974   if test "x$complete" != "x$new_complete"; then
40975     BUILD_LD="$new_complete"
40976     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40977 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40978   fi
40979 
40980   else
40981     # If we are not cross compiling, use the normal target compilers for
40982     # building the build platform executables.
40983     BUILD_CC="$CC"
40984     BUILD_CXX="$CXX"
40985     BUILD_LD="$LD"
40986   fi
40987 
40988 
40989 
40990 
40991 
40992 
40993   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40994     # For hotspot, we need these in Windows mixed path,
40995     # so rewrite them all. Need added .exe suffix.
40996     HOTSPOT_CXX="$CXX.exe"
40997     HOTSPOT_LD="$LD.exe"
40998     HOTSPOT_MT="$MT.exe"
40999     HOTSPOT_RC="$RC.exe"
41000 
41001   unix_path="$HOTSPOT_CXX"
41002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41003     windows_path=`$CYGPATH -m "$unix_path"`
41004     HOTSPOT_CXX="$windows_path"
41005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41006     windows_path=`cmd //c echo $unix_path`
41007     HOTSPOT_CXX="$windows_path"
41008   fi
41009 
41010 
41011   unix_path="$HOTSPOT_LD"
41012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41013     windows_path=`$CYGPATH -m "$unix_path"`
41014     HOTSPOT_LD="$windows_path"
41015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41016     windows_path=`cmd //c echo $unix_path`
41017     HOTSPOT_LD="$windows_path"
41018   fi
41019 
41020 
41021   unix_path="$HOTSPOT_MT"
41022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41023     windows_path=`$CYGPATH -m "$unix_path"`
41024     HOTSPOT_MT="$windows_path"
41025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41026     windows_path=`cmd //c echo $unix_path`
41027     HOTSPOT_MT="$windows_path"
41028   fi
41029 
41030 
41031   unix_path="$HOTSPOT_RC"
41032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41033     windows_path=`$CYGPATH -m "$unix_path"`
41034     HOTSPOT_RC="$windows_path"
41035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41036     windows_path=`cmd //c echo $unix_path`
41037     HOTSPOT_RC="$windows_path"
41038   fi
41039 
41040 
41041 
41042   else
41043     HOTSPOT_CXX="$CXX"
41044     HOTSPOT_LD="$LD"
41045   fi
41046 
41047 
41048 
41049   if test  "x$TOOLCHAIN_TYPE" = xclang; then
41050     USE_CLANG=true
41051   fi
41052 
41053 
41054   # LDEXE is the linker to use, when creating executables. Not really used.
41055   # FIXME: These should just be removed!
41056   LDEXE="$LD"
41057   LDEXECXX="$LDCXX"
41058 
41059 
41060 
41061 
41062 
41063 
41064   # The package path is used only on macosx?
41065   # FIXME: clean this up, and/or move it elsewhere.
41066   PACKAGE_PATH=/opt/local
41067 
41068 
41069   # Check for extra potential brokenness.
41070   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41071     # On Windows, double-check that we got the right compiler.
41072     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
41073     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
41074     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
41075       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
41076         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
41077       fi
41078     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
41079       if test "x$COMPILER_CPU_TEST" != "xx64"; then
41080         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
41081       fi
41082     fi
41083   fi
41084 
41085   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41086     # If this is a --hash-style=gnu system, use --hash-style=both, why?
41087     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
41088     # This is later checked when setting flags.
41089 
41090     # "-Og" suppported for GCC 4.8 and later
41091     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
41092 
41093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
41094 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
41095   supports=yes
41096 
41097   saved_cflags="$CFLAGS"
41098   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
41099   ac_ext=c
41100 ac_cpp='$CPP $CPPFLAGS'
41101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41104 
41105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41106 /* end confdefs.h.  */
41107 int i;
41108 _ACEOF
41109 if ac_fn_c_try_compile "$LINENO"; then :
41110 
41111 else
41112   supports=no
41113 fi
41114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41115   ac_ext=cpp
41116 ac_cpp='$CXXCPP $CPPFLAGS'
41117 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41118 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41119 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41120 
41121   CFLAGS="$saved_cflags"
41122 
41123   saved_cxxflags="$CXXFLAGS"
41124   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
41125   ac_ext=cpp
41126 ac_cpp='$CXXCPP $CPPFLAGS'
41127 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41128 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41129 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41130 
41131   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41132 /* end confdefs.h.  */
41133 int i;
41134 _ACEOF
41135 if ac_fn_cxx_try_compile "$LINENO"; then :
41136 
41137 else
41138   supports=no
41139 fi
41140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41141   ac_ext=cpp
41142 ac_cpp='$CXXCPP $CPPFLAGS'
41143 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41144 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41145 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41146 
41147   CXXFLAGS="$saved_cxxflags"
41148 
41149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41150 $as_echo "$supports" >&6; }
41151   if test "x$supports" = "xyes" ; then
41152     HAS_CFLAG_OPTIMIZE_DEBUG=true
41153   else
41154     HAS_CFLAG_OPTIMIZE_DEBUG=false
41155   fi
41156 
41157 
41158     # "-z relro" supported in GNU binutils 2.17 and later
41159     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
41160 
41161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
41162 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
41163   supports=yes
41164 
41165   saved_ldflags="$LDFLAGS"
41166   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
41167   ac_ext=c
41168 ac_cpp='$CPP $CPPFLAGS'
41169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41172 
41173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41174 /* end confdefs.h.  */
41175 
41176 int
41177 main ()
41178 {
41179 
41180   ;
41181   return 0;
41182 }
41183 _ACEOF
41184 if ac_fn_c_try_link "$LINENO"; then :
41185 
41186 else
41187   supports=no
41188 fi
41189 rm -f core conftest.err conftest.$ac_objext \
41190     conftest$ac_exeext conftest.$ac_ext
41191   ac_ext=cpp
41192 ac_cpp='$CXXCPP $CPPFLAGS'
41193 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41194 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41195 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41196 
41197   LDFLAGS="$saved_ldflags"
41198 
41199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41200 $as_echo "$supports" >&6; }
41201   if test "x$supports" = "xyes" ; then
41202     HAS_LINKER_RELRO=true
41203   else
41204     HAS_LINKER_RELRO=false
41205   fi
41206 
41207 
41208     # "-z now" supported in GNU binutils 2.11 and later
41209     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
41210 
41211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
41212 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
41213   supports=yes
41214 
41215   saved_ldflags="$LDFLAGS"
41216   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41217   ac_ext=c
41218 ac_cpp='$CPP $CPPFLAGS'
41219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41222 
41223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41224 /* end confdefs.h.  */
41225 
41226 int
41227 main ()
41228 {
41229 
41230   ;
41231   return 0;
41232 }
41233 _ACEOF
41234 if ac_fn_c_try_link "$LINENO"; then :
41235 
41236 else
41237   supports=no
41238 fi
41239 rm -f core conftest.err conftest.$ac_objext \
41240     conftest$ac_exeext conftest.$ac_ext
41241   ac_ext=cpp
41242 ac_cpp='$CXXCPP $CPPFLAGS'
41243 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41244 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41245 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41246 
41247   LDFLAGS="$saved_ldflags"
41248 
41249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41250 $as_echo "$supports" >&6; }
41251   if test "x$supports" = "xyes" ; then
41252     HAS_LINKER_NOW=true
41253   else
41254     HAS_LINKER_NOW=false
41255   fi
41256 
41257   fi
41258 
41259   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41260   # in executable.'
41261   USING_BROKEN_SUSE_LD=no
41262   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41264 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41265     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41266     $ECHO "int main() { }" > main.c
41267     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41268       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41269 $as_echo "no" >&6; }
41270       USING_BROKEN_SUSE_LD=no
41271     else
41272       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41273 $as_echo "yes" >&6; }
41274       USING_BROKEN_SUSE_LD=yes
41275     fi
41276     rm -rf version-script.map main.c a.out
41277   fi
41278 
41279 
41280 
41281 # Setup the JTReg Regression Test Harness.
41282 
41283 
41284 # Check whether --with-jtreg was given.
41285 if test "${with_jtreg+set}" = set; then :
41286   withval=$with_jtreg;
41287 else
41288   with_jtreg=no
41289 fi
41290 
41291 
41292   if test "x$with_jtreg" = xno; then
41293     # jtreg disabled
41294     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41295 $as_echo_n "checking for jtreg... " >&6; }
41296     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297 $as_echo "no" >&6; }
41298   else
41299     if test "x$with_jtreg" != xyes; then
41300       # with path specified.
41301       JT_HOME="$with_jtreg"
41302     fi
41303 
41304     if test "x$JT_HOME" != x; then
41305       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41306 $as_echo_n "checking for jtreg... " >&6; }
41307 
41308       # use JT_HOME enviroment var.
41309 
41310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41311 
41312   # Input might be given as Windows format, start by converting to
41313   # unix format.
41314   path="$JT_HOME"
41315   new_path=`$CYGPATH -u "$path"`
41316 
41317   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41318   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41319   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41320   # "foo.exe" is OK but "foo" is an error.
41321   #
41322   # This test is therefore slightly more accurate than "test -f" to check for file precense.
41323   # It is also a way to make sure we got the proper file name for the real test later on.
41324   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41325   if test "x$test_shortpath" = x; then
41326     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41327 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41328     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41329   fi
41330 
41331   # Call helper function which possibly converts this using DOS-style short mode.
41332   # If so, the updated path is stored in $new_path.
41333 
41334   input_path="$new_path"
41335   # Check if we need to convert this using DOS-style short mode. If the path
41336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41337   # take no chances and rewrite it.
41338   # Note: m4 eats our [], so we need to use [ and ] instead.
41339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41340   if test "x$has_forbidden_chars" != x; then
41341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41345       # Going to short mode and back again did indeed matter. Since short mode is
41346       # case insensitive, let's make it lowercase to improve readability.
41347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41348       # Now convert it back to Unix-stile (cygpath)
41349       input_path=`$CYGPATH -u "$shortmode_path"`
41350       new_path="$input_path"
41351     fi
41352   fi
41353 
41354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41355   if test "x$test_cygdrive_prefix" = x; then
41356     # As a simple fix, exclude /usr/bin since it's not a real path.
41357     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41359       # a path prefixed by /cygdrive for fixpath to work.
41360       new_path="$CYGWIN_ROOT_PATH$input_path"
41361     fi
41362   fi
41363 
41364 
41365   if test "x$path" != "x$new_path"; then
41366     JT_HOME="$new_path"
41367     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41368 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41369   fi
41370 
41371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41372 
41373   path="$JT_HOME"
41374   has_colon=`$ECHO $path | $GREP ^.:`
41375   new_path="$path"
41376   if test "x$has_colon" = x; then
41377     # Not in mixed or Windows style, start by that.
41378     new_path=`cmd //c echo $path`
41379   fi
41380 
41381 
41382   input_path="$new_path"
41383   # Check if we need to convert this using DOS-style short mode. If the path
41384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41385   # take no chances and rewrite it.
41386   # Note: m4 eats our [], so we need to use [ and ] instead.
41387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41388   if test "x$has_forbidden_chars" != x; then
41389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41390     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41391   fi
41392 
41393 
41394   windows_path="$new_path"
41395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41396     unix_path=`$CYGPATH -u "$windows_path"`
41397     new_path="$unix_path"
41398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41400     new_path="$unix_path"
41401   fi
41402 
41403   if test "x$path" != "x$new_path"; then
41404     JT_HOME="$new_path"
41405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41406 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41407   fi
41408 
41409   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41410   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41411 
41412   else
41413     # We're on a unix platform. Hooray! :)
41414     path="$JT_HOME"
41415     has_space=`$ECHO "$path" | $GREP " "`
41416     if test "x$has_space" != x; then
41417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41418 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41419       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41420     fi
41421 
41422     # Use eval to expand a potential ~
41423     eval path="$path"
41424     if test ! -f "$path" && test ! -d "$path"; then
41425       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41426     fi
41427 
41428     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41429   fi
41430 
41431 
41432       # jtreg win32 script works for everybody
41433       JTREGEXE="$JT_HOME/win32/bin/jtreg"
41434 
41435       if test ! -f "$JTREGEXE"; then
41436         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41437       fi
41438 
41439       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41440 $as_echo "$JTREGEXE" >&6; }
41441     else
41442       # try to find jtreg on path
41443 
41444 
41445 
41446   # Publish this variable in the help.
41447 
41448 
41449   if test "x$JTREGEXE" = x; then
41450     # The variable is not set by user, try to locate tool using the code snippet
41451     for ac_prog in jtreg
41452 do
41453   # Extract the first word of "$ac_prog", so it can be a program name with args.
41454 set dummy $ac_prog; ac_word=$2
41455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41456 $as_echo_n "checking for $ac_word... " >&6; }
41457 if ${ac_cv_path_JTREGEXE+:} false; then :
41458   $as_echo_n "(cached) " >&6
41459 else
41460   case $JTREGEXE in
41461   [\\/]* | ?:[\\/]*)
41462   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41463   ;;
41464   *)
41465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41466 for as_dir in $PATH
41467 do
41468   IFS=$as_save_IFS
41469   test -z "$as_dir" && as_dir=.
41470     for ac_exec_ext in '' $ac_executable_extensions; do
41471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41472     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41474     break 2
41475   fi
41476 done
41477   done
41478 IFS=$as_save_IFS
41479 
41480   ;;
41481 esac
41482 fi
41483 JTREGEXE=$ac_cv_path_JTREGEXE
41484 if test -n "$JTREGEXE"; then
41485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41486 $as_echo "$JTREGEXE" >&6; }
41487 else
41488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41489 $as_echo "no" >&6; }
41490 fi
41491 
41492 
41493   test -n "$JTREGEXE" && break
41494 done
41495 
41496   else
41497     # The variable is set, but is it from the command line or the environment?
41498 
41499     # Try to remove the string !JTREGEXE! from our list.
41500     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41501     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41502       # If it failed, the variable was not from the command line. Ignore it,
41503       # but warn the user (except for BASH, which is always set by the calling BASH).
41504       if test "xJTREGEXE" != xBASH; then
41505         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41506 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41507       fi
41508       # Try to locate tool using the code snippet
41509       for ac_prog in jtreg
41510 do
41511   # Extract the first word of "$ac_prog", so it can be a program name with args.
41512 set dummy $ac_prog; ac_word=$2
41513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41514 $as_echo_n "checking for $ac_word... " >&6; }
41515 if ${ac_cv_path_JTREGEXE+:} false; then :
41516   $as_echo_n "(cached) " >&6
41517 else
41518   case $JTREGEXE in
41519   [\\/]* | ?:[\\/]*)
41520   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41521   ;;
41522   *)
41523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41524 for as_dir in $PATH
41525 do
41526   IFS=$as_save_IFS
41527   test -z "$as_dir" && as_dir=.
41528     for ac_exec_ext in '' $ac_executable_extensions; do
41529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41530     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41532     break 2
41533   fi
41534 done
41535   done
41536 IFS=$as_save_IFS
41537 
41538   ;;
41539 esac
41540 fi
41541 JTREGEXE=$ac_cv_path_JTREGEXE
41542 if test -n "$JTREGEXE"; then
41543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41544 $as_echo "$JTREGEXE" >&6; }
41545 else
41546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41547 $as_echo "no" >&6; }
41548 fi
41549 
41550 
41551   test -n "$JTREGEXE" && break
41552 done
41553 
41554     else
41555       # If it succeeded, then it was overridden by the user. We will use it
41556       # for the tool.
41557 
41558       # First remove it from the list of overridden variables, so we can test
41559       # for unknown variables in the end.
41560       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41561 
41562       # Check if the provided tool contains a complete path.
41563       tool_specified="$JTREGEXE"
41564       tool_basename="${tool_specified##*/}"
41565       if test "x$tool_basename" = "x$tool_specified"; then
41566         # A command without a complete path is provided, search $PATH.
41567         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41568 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41569         # Extract the first word of "$tool_basename", so it can be a program name with args.
41570 set dummy $tool_basename; ac_word=$2
41571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41572 $as_echo_n "checking for $ac_word... " >&6; }
41573 if ${ac_cv_path_JTREGEXE+:} false; then :
41574   $as_echo_n "(cached) " >&6
41575 else
41576   case $JTREGEXE in
41577   [\\/]* | ?:[\\/]*)
41578   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41579   ;;
41580   *)
41581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41582 for as_dir in $PATH
41583 do
41584   IFS=$as_save_IFS
41585   test -z "$as_dir" && as_dir=.
41586     for ac_exec_ext in '' $ac_executable_extensions; do
41587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41588     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41590     break 2
41591   fi
41592 done
41593   done
41594 IFS=$as_save_IFS
41595 
41596   ;;
41597 esac
41598 fi
41599 JTREGEXE=$ac_cv_path_JTREGEXE
41600 if test -n "$JTREGEXE"; then
41601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41602 $as_echo "$JTREGEXE" >&6; }
41603 else
41604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41605 $as_echo "no" >&6; }
41606 fi
41607 
41608 
41609         if test "x$JTREGEXE" = x; then
41610           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41611         fi
41612       else
41613         # Otherwise we believe it is a complete path. Use it as it is.
41614         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41615 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41617 $as_echo_n "checking for JTREGEXE... " >&6; }
41618         if test ! -x "$tool_specified"; then
41619           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41620 $as_echo "not found" >&6; }
41621           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41622         fi
41623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41624 $as_echo "$tool_specified" >&6; }
41625       fi
41626     fi
41627   fi
41628 
41629 
41630 
41631   if test "x$JTREGEXE" = x; then
41632     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41633   fi
41634 
41635 
41636       JT_HOME="`$DIRNAME $JTREGEXE`"
41637     fi
41638   fi
41639 
41640 
41641 
41642 
41643 
41644 
41645   # Option used to tell the compiler whether to create 32- or 64-bit executables
41646   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41647     COMPILER_TARGET_BITS_FLAG="-q"
41648   else
41649     COMPILER_TARGET_BITS_FLAG="-m"
41650   fi
41651 
41652 
41653   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41654   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41655     ARFLAGS="-r"
41656   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41657     ARFLAGS="-X64"
41658   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41659     # lib.exe is used as AR to create static libraries.
41660     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41661   else
41662     ARFLAGS=""
41663   fi
41664 
41665 
41666   ## Setup strip.
41667   # FIXME: should this really be per platform, or should it be per toolchain type?
41668   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41669   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41670   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41671     STRIPFLAGS="-g"
41672   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41673     STRIPFLAGS="-x"
41674   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41675     STRIPFLAGS="-S"
41676   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41677     STRIPFLAGS="-X32_64"
41678   fi
41679 
41680   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41681     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41682   fi
41683 
41684 
41685   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41686     # FIXME: break out into MCSFLAGS
41687     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41688   fi
41689 
41690 
41691   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41692     CC_OUT_OPTION=-Fo
41693     EXE_OUT_OPTION=-out:
41694     LD_OUT_OPTION=-out:
41695     AR_OUT_OPTION=-out:
41696   else
41697     # The option used to specify the target .o,.a or .so file.
41698     # When compiling, how to specify the to be created object file.
41699     CC_OUT_OPTION='-o$(SPACE)'
41700     # When linking, how to specify the to be created executable.
41701     EXE_OUT_OPTION='-o$(SPACE)'
41702     # When linking, how to specify the to be created dynamically linkable library.
41703     LD_OUT_OPTION='-o$(SPACE)'
41704     # When archiving, how to specify the to be create static archive for object files.
41705     AR_OUT_OPTION='rcs$(SPACE)'
41706   fi
41707 
41708 
41709 
41710 
41711 
41712   # On Windows, we need to set RC flags.
41713   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41714     RC_FLAGS="-nologo -l0x409"
41715     if test "x$VARIANT" = xOPT; then
41716       RC_FLAGS="$RC_FLAGS -DNDEBUG"
41717     fi
41718 
41719     # The version variables used to create RC_FLAGS may be overridden
41720     # in a custom configure script, or possibly the command line.
41721     # Let those variables be expanded at make time in spec.gmk.
41722     # The \$ are escaped to the shell, and the $(...) variables
41723     # are evaluated by make.
41724     RC_FLAGS="$RC_FLAGS \
41725         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41726         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41727         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41728         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41729         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41730         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41731         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41732   fi
41733 
41734 
41735   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41736     # silence copyright notice and other headers.
41737     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41738   fi
41739 
41740   if test "x$SYSROOT" != "x"; then
41741     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41742       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41743         # Solaris Studio does not have a concept of sysroot. Instead we must
41744         # make sure the default include and lib dirs are appended to each
41745         # compile and link command line.
41746         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41747         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41748             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41749             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41750       fi
41751     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41752       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41753       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41754       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41755     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41756       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41757       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41758     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41759       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41760       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41761     fi
41762     # Propagate the sysroot args to hotspot
41763     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41764     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41765     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41766   fi
41767 
41768   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41769   # set this here so it doesn't have to be peppered throughout the forest
41770   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41771     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41772     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41773   fi
41774 
41775 
41776 
41777 
41778 
41779 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41780 
41781 # Now we can test some aspects on the target using configure macros.
41782 
41783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41784 $as_echo_n "checking for ANSI C header files... " >&6; }
41785 if ${ac_cv_header_stdc+:} false; then :
41786   $as_echo_n "(cached) " >&6
41787 else
41788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41789 /* end confdefs.h.  */
41790 #include <stdlib.h>
41791 #include <stdarg.h>
41792 #include <string.h>
41793 #include <float.h>
41794 
41795 int
41796 main ()
41797 {
41798 
41799   ;
41800   return 0;
41801 }
41802 _ACEOF
41803 if ac_fn_cxx_try_compile "$LINENO"; then :
41804   ac_cv_header_stdc=yes
41805 else
41806   ac_cv_header_stdc=no
41807 fi
41808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41809 
41810 if test $ac_cv_header_stdc = yes; then
41811   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41813 /* end confdefs.h.  */
41814 #include <string.h>
41815 
41816 _ACEOF
41817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41818   $EGREP "memchr" >/dev/null 2>&1; then :
41819 
41820 else
41821   ac_cv_header_stdc=no
41822 fi
41823 rm -f conftest*
41824 
41825 fi
41826 
41827 if test $ac_cv_header_stdc = yes; then
41828   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41830 /* end confdefs.h.  */
41831 #include <stdlib.h>
41832 
41833 _ACEOF
41834 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41835   $EGREP "free" >/dev/null 2>&1; then :
41836 
41837 else
41838   ac_cv_header_stdc=no
41839 fi
41840 rm -f conftest*
41841 
41842 fi
41843 
41844 if test $ac_cv_header_stdc = yes; then
41845   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41846   if test "$cross_compiling" = yes; then :
41847   :
41848 else
41849   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41850 /* end confdefs.h.  */
41851 #include <ctype.h>
41852 #include <stdlib.h>
41853 #if ((' ' & 0x0FF) == 0x020)
41854 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41855 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41856 #else
41857 # define ISLOWER(c) \
41858                    (('a' <= (c) && (c) <= 'i') \
41859                      || ('j' <= (c) && (c) <= 'r') \
41860                      || ('s' <= (c) && (c) <= 'z'))
41861 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41862 #endif
41863 
41864 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41865 int
41866 main ()
41867 {
41868   int i;
41869   for (i = 0; i < 256; i++)
41870     if (XOR (islower (i), ISLOWER (i))
41871         || toupper (i) != TOUPPER (i))
41872       return 2;
41873   return 0;
41874 }
41875 _ACEOF
41876 if ac_fn_cxx_try_run "$LINENO"; then :
41877 
41878 else
41879   ac_cv_header_stdc=no
41880 fi
41881 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41882   conftest.$ac_objext conftest.beam conftest.$ac_ext
41883 fi
41884 
41885 fi
41886 fi
41887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41888 $as_echo "$ac_cv_header_stdc" >&6; }
41889 if test $ac_cv_header_stdc = yes; then
41890 
41891 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41892 
41893 fi
41894 
41895 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41896 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41897                   inttypes.h stdint.h unistd.h
41898 do :
41899   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41900 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41901 "
41902 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41903   cat >>confdefs.h <<_ACEOF
41904 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41905 _ACEOF
41906 
41907 fi
41908 
41909 done
41910 
41911 
41912 
41913   ###############################################################################
41914   #
41915   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41916   # (The JVM can use 32 or 64 bit Java pointers but that decision
41917   # is made at runtime.)
41918   #
41919 
41920   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41921     # Always specify -m flag on Solaris
41922     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41923 
41924   # When we add flags to the "official" CFLAGS etc, we need to
41925   # keep track of these additions in ADDED_CFLAGS etc. These
41926   # will later be checked to make sure only controlled additions
41927   # have been made to CFLAGS etc.
41928   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41929   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41930   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41931 
41932   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41933   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41934   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41935 
41936   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41937   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41938   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41939 
41940   elif test "x$COMPILE_TYPE" = xreduced; then
41941     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41942       # Specify -m if running reduced on unix platforms
41943 
41944   # When we add flags to the "official" CFLAGS etc, we need to
41945   # keep track of these additions in ADDED_CFLAGS etc. These
41946   # will later be checked to make sure only controlled additions
41947   # have been made to CFLAGS etc.
41948   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41949   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41950   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41951 
41952   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41953   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41954   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41955 
41956   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41957   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41958   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41959 
41960     fi
41961   fi
41962 
41963   # Make compilation sanity check
41964   for ac_header in stdio.h
41965 do :
41966   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41967 if test "x$ac_cv_header_stdio_h" = xyes; then :
41968   cat >>confdefs.h <<_ACEOF
41969 #define HAVE_STDIO_H 1
41970 _ACEOF
41971 
41972 else
41973 
41974     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41975 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41976     if test "x$COMPILE_TYPE" = xreduced; then
41977       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41978 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41979     elif test "x$COMPILE_TYPE" = xcross; then
41980       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41981 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41982     fi
41983     as_fn_error $? "Cannot continue." "$LINENO" 5
41984 
41985 fi
41986 
41987 done
41988 
41989 
41990   # The cast to long int works around a bug in the HP C Compiler
41991 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41992 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41993 # This bug is HP SR number 8606223364.
41994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41995 $as_echo_n "checking size of int *... " >&6; }
41996 if ${ac_cv_sizeof_int_p+:} false; then :
41997   $as_echo_n "(cached) " >&6
41998 else
41999   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42000 
42001 else
42002   if test "$ac_cv_type_int_p" = yes; then
42003      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42004 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42005 as_fn_error 77 "cannot compute sizeof (int *)
42006 See \`config.log' for more details" "$LINENO" 5; }
42007    else
42008      ac_cv_sizeof_int_p=0
42009    fi
42010 fi
42011 
42012 fi
42013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42014 $as_echo "$ac_cv_sizeof_int_p" >&6; }
42015 
42016 
42017 
42018 cat >>confdefs.h <<_ACEOF
42019 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
42020 _ACEOF
42021 
42022 
42023 
42024   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
42025   if test "x$ac_cv_sizeof_int_p" = x; then
42026     # The test failed, lets stick to the assumed value.
42027     { $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
42028 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
42029   else
42030     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42031 
42032     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42033       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
42034       # Let's try to implicitely set the compilers target architecture and retry the test
42035       { $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
42036 $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;}
42037       { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
42038 $as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
42039 
42040   # When we add flags to the "official" CFLAGS etc, we need to
42041   # keep track of these additions in ADDED_CFLAGS etc. These
42042   # will later be checked to make sure only controlled additions
42043   # have been made to CFLAGS etc.
42044   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42045   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42046   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42047 
42048   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
42049   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
42050   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
42051 
42052   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
42053   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
42054   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
42055 
42056 
42057       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
42058       unset ac_cv_sizeof_int_p
42059       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
42060       cat >>confdefs.h <<_ACEOF
42061 #undef SIZEOF_INT_P
42062 _ACEOF
42063 
42064       # The cast to long int works around a bug in the HP C Compiler
42065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
42066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
42067 # This bug is HP SR number 8606223364.
42068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
42069 $as_echo_n "checking size of int *... " >&6; }
42070 if ${ac_cv_sizeof_int_p+:} false; then :
42071   $as_echo_n "(cached) " >&6
42072 else
42073   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
42074 
42075 else
42076   if test "$ac_cv_type_int_p" = yes; then
42077      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42078 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
42079 as_fn_error 77 "cannot compute sizeof (int *)
42080 See \`config.log' for more details" "$LINENO" 5; }
42081    else
42082      ac_cv_sizeof_int_p=0
42083    fi
42084 fi
42085 
42086 fi
42087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
42088 $as_echo "$ac_cv_sizeof_int_p" >&6; }
42089 
42090 
42091 
42092 cat >>confdefs.h <<_ACEOF
42093 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
42094 _ACEOF
42095 
42096 
42097 
42098       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
42099 
42100       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
42101         as_fn_error $? "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)" "$LINENO" 5
42102       fi
42103     fi
42104   fi
42105 
42106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
42107 $as_echo_n "checking for target address size... " >&6; }
42108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
42109 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
42110 
42111 
42112   ###############################################################################
42113   #
42114   # Is the target little of big endian?
42115   #
42116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42117 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42118 if ${ac_cv_c_bigendian+:} false; then :
42119   $as_echo_n "(cached) " >&6
42120 else
42121   ac_cv_c_bigendian=unknown
42122     # See if we're dealing with a universal compiler.
42123     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42124 /* end confdefs.h.  */
42125 #ifndef __APPLE_CC__
42126                not a universal capable compiler
42127              #endif
42128              typedef int dummy;
42129 
42130 _ACEOF
42131 if ac_fn_cxx_try_compile "$LINENO"; then :
42132 
42133         # Check for potential -arch flags.  It is not universal unless
42134         # there are at least two -arch flags with different values.
42135         ac_arch=
42136         ac_prev=
42137         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42138          if test -n "$ac_prev"; then
42139            case $ac_word in
42140              i?86 | x86_64 | ppc | ppc64)
42141                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42142                  ac_arch=$ac_word
42143                else
42144                  ac_cv_c_bigendian=universal
42145                  break
42146                fi
42147                ;;
42148            esac
42149            ac_prev=
42150          elif test "x$ac_word" = "x-arch"; then
42151            ac_prev=arch
42152          fi
42153        done
42154 fi
42155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42156     if test $ac_cv_c_bigendian = unknown; then
42157       # See if sys/param.h defines the BYTE_ORDER macro.
42158       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42159 /* end confdefs.h.  */
42160 #include <sys/types.h>
42161              #include <sys/param.h>
42162 
42163 int
42164 main ()
42165 {
42166 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42167                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42168                      && LITTLE_ENDIAN)
42169               bogus endian macros
42170              #endif
42171 
42172   ;
42173   return 0;
42174 }
42175 _ACEOF
42176 if ac_fn_cxx_try_compile "$LINENO"; then :
42177   # It does; now see whether it defined to BIG_ENDIAN or not.
42178          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42179 /* end confdefs.h.  */
42180 #include <sys/types.h>
42181                 #include <sys/param.h>
42182 
42183 int
42184 main ()
42185 {
42186 #if BYTE_ORDER != BIG_ENDIAN
42187                  not big endian
42188                 #endif
42189 
42190   ;
42191   return 0;
42192 }
42193 _ACEOF
42194 if ac_fn_cxx_try_compile "$LINENO"; then :
42195   ac_cv_c_bigendian=yes
42196 else
42197   ac_cv_c_bigendian=no
42198 fi
42199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42200 fi
42201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42202     fi
42203     if test $ac_cv_c_bigendian = unknown; then
42204       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42205       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42206 /* end confdefs.h.  */
42207 #include <limits.h>
42208 
42209 int
42210 main ()
42211 {
42212 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42213               bogus endian macros
42214              #endif
42215 
42216   ;
42217   return 0;
42218 }
42219 _ACEOF
42220 if ac_fn_cxx_try_compile "$LINENO"; then :
42221   # It does; now see whether it defined to _BIG_ENDIAN or not.
42222          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42223 /* end confdefs.h.  */
42224 #include <limits.h>
42225 
42226 int
42227 main ()
42228 {
42229 #ifndef _BIG_ENDIAN
42230                  not big endian
42231                 #endif
42232 
42233   ;
42234   return 0;
42235 }
42236 _ACEOF
42237 if ac_fn_cxx_try_compile "$LINENO"; then :
42238   ac_cv_c_bigendian=yes
42239 else
42240   ac_cv_c_bigendian=no
42241 fi
42242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42243 fi
42244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42245     fi
42246     if test $ac_cv_c_bigendian = unknown; then
42247       # Compile a test program.
42248       if test "$cross_compiling" = yes; then :
42249   # Try to guess by grepping values from an object file.
42250          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42251 /* end confdefs.h.  */
42252 short int ascii_mm[] =
42253                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42254                 short int ascii_ii[] =
42255                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42256                 int use_ascii (int i) {
42257                   return ascii_mm[i] + ascii_ii[i];
42258                 }
42259                 short int ebcdic_ii[] =
42260                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42261                 short int ebcdic_mm[] =
42262                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42263                 int use_ebcdic (int i) {
42264                   return ebcdic_mm[i] + ebcdic_ii[i];
42265                 }
42266                 extern int foo;
42267 
42268 int
42269 main ()
42270 {
42271 return use_ascii (foo) == use_ebcdic (foo);
42272   ;
42273   return 0;
42274 }
42275 _ACEOF
42276 if ac_fn_cxx_try_compile "$LINENO"; then :
42277   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42278               ac_cv_c_bigendian=yes
42279             fi
42280             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42281               if test "$ac_cv_c_bigendian" = unknown; then
42282                 ac_cv_c_bigendian=no
42283               else
42284                 # finding both strings is unlikely to happen, but who knows?
42285                 ac_cv_c_bigendian=unknown
42286               fi
42287             fi
42288 fi
42289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42290 else
42291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42292 /* end confdefs.h.  */
42293 $ac_includes_default
42294 int
42295 main ()
42296 {
42297 
42298              /* Are we little or big endian?  From Harbison&Steele.  */
42299              union
42300              {
42301                long int l;
42302                char c[sizeof (long int)];
42303              } u;
42304              u.l = 1;
42305              return u.c[sizeof (long int) - 1] == 1;
42306 
42307   ;
42308   return 0;
42309 }
42310 _ACEOF
42311 if ac_fn_cxx_try_run "$LINENO"; then :
42312   ac_cv_c_bigendian=no
42313 else
42314   ac_cv_c_bigendian=yes
42315 fi
42316 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42317   conftest.$ac_objext conftest.beam conftest.$ac_ext
42318 fi
42319 
42320     fi
42321 fi
42322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42323 $as_echo "$ac_cv_c_bigendian" >&6; }
42324  case $ac_cv_c_bigendian in #(
42325    yes)
42326      ENDIAN="big";; #(
42327    no)
42328      ENDIAN="little" ;; #(
42329    universal)
42330      ENDIAN="universal_endianness"
42331      ;; #(
42332    *)
42333      ENDIAN="unknown" ;;
42334  esac
42335 
42336 
42337   if test "x$ENDIAN" = xuniversal_endianness; then
42338     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42339   fi
42340   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42341     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
42342   fi
42343 
42344 
42345 # Configure flags for the tools
42346 
42347   ###############################################################################
42348   #
42349   # How to compile shared libraries.
42350   #
42351 
42352   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42353     PICFLAG="-fPIC"
42354     C_FLAG_REORDER=''
42355     CXX_FLAG_REORDER=''
42356 
42357     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42358       # Linking is different on MacOSX
42359       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42360       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42361       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42362       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42363       SET_SHARED_LIBRARY_MAPFILE=''
42364     else
42365       # Default works for linux, might work on other platforms as well.
42366       SHARED_LIBRARY_FLAGS='-shared'
42367       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42368       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42369       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42370       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42371     fi
42372   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42373     PICFLAG=''
42374     C_FLAG_REORDER=''
42375     CXX_FLAG_REORDER=''
42376 
42377     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42378       # Linking is different on MacOSX
42379       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42380       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42381       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42382       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42383       SET_SHARED_LIBRARY_MAPFILE=''
42384     else
42385       # Default works for linux, might work on other platforms as well.
42386       SHARED_LIBRARY_FLAGS='-shared'
42387       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42388       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42389       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42390       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42391     fi
42392   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42393     PICFLAG="-KPIC"
42394     C_FLAG_REORDER='-xF'
42395     CXX_FLAG_REORDER='-xF'
42396     SHARED_LIBRARY_FLAGS="-G"
42397     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42398     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42399     SET_SHARED_LIBRARY_NAME=''
42400     SET_SHARED_LIBRARY_MAPFILE='-M$1'
42401   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42402     PICFLAG="-qpic=large"
42403     C_FLAG_REORDER=''
42404     CXX_FLAG_REORDER=''
42405     SHARED_LIBRARY_FLAGS="-qmkshrobj"
42406     SET_EXECUTABLE_ORIGIN=""
42407     SET_SHARED_LIBRARY_ORIGIN=''
42408     SET_SHARED_LIBRARY_NAME=''
42409     SET_SHARED_LIBRARY_MAPFILE=''
42410   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42411     PICFLAG=""
42412     C_FLAG_REORDER=''
42413     CXX_FLAG_REORDER=''
42414     SHARED_LIBRARY_FLAGS="-LD"
42415     SET_EXECUTABLE_ORIGIN=''
42416     SET_SHARED_LIBRARY_ORIGIN=''
42417     SET_SHARED_LIBRARY_NAME=''
42418     SET_SHARED_LIBRARY_MAPFILE=''
42419   fi
42420 
42421 
42422 
42423 
42424 
42425 
42426 
42427 
42428 
42429   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42430     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42431     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42432     CFLAGS_JDKLIB_EXTRA='-xstrconst'
42433   fi
42434   # The (cross) compiler is now configured, we can now test capabilities
42435   # of the target platform.
42436 
42437 
42438 
42439   ###############################################################################
42440   #
42441   # Setup the opt flags for different compilers
42442   # and different operating systems.
42443   #
42444 
42445   # FIXME: this was indirectly the old default, but just inherited.
42446   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42447   #   C_FLAG_DEPS="-MMD -MF"
42448   # fi
42449 
42450   # Generate make dependency files
42451   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42452     C_FLAG_DEPS="-MMD -MF"
42453   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42454     C_FLAG_DEPS="-MMD -MF"
42455   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42456     C_FLAG_DEPS="-xMMD -xMF"
42457   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42458     C_FLAG_DEPS="-qmakedep=gcc -MF"
42459   fi
42460   CXX_FLAG_DEPS="$C_FLAG_DEPS"
42461 
42462 
42463 
42464   # Debug symbols
42465   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42466     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42467       # reduce from default "-g2" option to save space
42468       CFLAGS_DEBUG_SYMBOLS="-g1"
42469       CXXFLAGS_DEBUG_SYMBOLS="-g1"
42470     else
42471       CFLAGS_DEBUG_SYMBOLS="-g"
42472       CXXFLAGS_DEBUG_SYMBOLS="-g"
42473     fi
42474   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42475     CFLAGS_DEBUG_SYMBOLS="-g"
42476     CXXFLAGS_DEBUG_SYMBOLS="-g"
42477   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42478     CFLAGS_DEBUG_SYMBOLS="-g -xs"
42479     # FIXME: likely a bug, this disables debug symbols rather than enables them
42480     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42481   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42482     CFLAGS_DEBUG_SYMBOLS="-g"
42483     CXXFLAGS_DEBUG_SYMBOLS="-g"
42484   fi
42485 
42486 
42487 
42488   # bounds, memory and behavior checking options
42489   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42490     case $DEBUG_LEVEL in
42491     release )
42492       # no adjustment
42493       ;;
42494     fastdebug )
42495       # no adjustment
42496       ;;
42497     slowdebug )
42498       # Add runtime stack smashing and undefined behavior checks
42499       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42500       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42501       ;;
42502     esac
42503   fi
42504 
42505 
42506 
42507   # Optimization levels
42508   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42509     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42510 
42511     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42512       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42513       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42514       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42515       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42516       C_O_FLAG_DEBUG="-xregs=no%frameptr"
42517       C_O_FLAG_NONE="-xregs=no%frameptr"
42518       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42519       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42520       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42521       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42522       CXX_O_FLAG_NONE="-xregs=no%frameptr"
42523       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42524         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42525         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42526       fi
42527     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42528       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42529       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42530       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42531       C_O_FLAG_DEBUG=""
42532       C_O_FLAG_NONE=""
42533       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42534       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42535       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42536       C_O_FLAG_DEBUG=""
42537       CXX_O_FLAG_NONE=""
42538     fi
42539   else
42540     # The remaining toolchains share opt flags between CC and CXX;
42541     # setup for C and duplicate afterwards.
42542     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42543       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42544         # On MacOSX we optimize for size, something
42545         # we should do for all platforms?
42546         C_O_FLAG_HIGHEST="-Os"
42547         C_O_FLAG_HI="-Os"
42548         C_O_FLAG_NORM="-Os"
42549       else
42550         C_O_FLAG_HIGHEST="-O3"
42551         C_O_FLAG_HI="-O3"
42552         C_O_FLAG_NORM="-O2"
42553       fi
42554       C_O_FLAG_DEBUG="-O0"
42555       C_O_FLAG_NONE="-O0"
42556     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42557       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42558         # On MacOSX we optimize for size, something
42559         # we should do for all platforms?
42560         C_O_FLAG_HIGHEST="-Os"
42561         C_O_FLAG_HI="-Os"
42562         C_O_FLAG_NORM="-Os"
42563       else
42564         C_O_FLAG_HIGHEST="-O3"
42565         C_O_FLAG_HI="-O3"
42566         C_O_FLAG_NORM="-O2"
42567       fi
42568       C_O_FLAG_DEBUG="-O0"
42569       C_O_FLAG_NONE="-O0"
42570     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42571       C_O_FLAG_HIGHEST="-O3"
42572       C_O_FLAG_HI="-O3 -qstrict"
42573       C_O_FLAG_NORM="-O2"
42574       C_O_FLAG_DEBUG="-qnoopt"
42575       C_O_FLAG_NONE="-qnoop"
42576     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42577       C_O_FLAG_HIGHEST="-O2"
42578       C_O_FLAG_HI="-O1"
42579       C_O_FLAG_NORM="-O1"
42580       C_O_FLAG_DEBUG="-Od"
42581       C_O_FLAG_NONE="-Od"
42582     fi
42583     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42584     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42585     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42586     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42587     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42588   fi
42589 
42590   # Adjust optimization flags according to debug level.
42591   case $DEBUG_LEVEL in
42592     release )
42593       # no adjustment
42594       ;;
42595     fastdebug )
42596       # Not quite so much optimization
42597       C_O_FLAG_HI="$C_O_FLAG_NORM"
42598       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42599       ;;
42600     slowdebug )
42601       # Disable optimization
42602       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42603       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42604       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42605       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42606       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42607       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42608       ;;
42609   esac
42610 
42611 
42612 
42613 
42614 
42615 
42616 
42617 
42618 
42619 
42620 
42621 
42622 
42623   # Special extras...
42624   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42625     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42626       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42627       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42628     fi
42629   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42630     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42631     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42632     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42633   fi
42634 
42635   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42636     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42637 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42638   fi
42639 
42640   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42641     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42642 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42643   fi
42644 
42645   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42646     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42647 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42648   fi
42649 
42650 
42651 # Check whether --with-extra-cflags was given.
42652 if test "${with_extra_cflags+set}" = set; then :
42653   withval=$with_extra_cflags;
42654 fi
42655 
42656 
42657 
42658 # Check whether --with-extra-cxxflags was given.
42659 if test "${with_extra_cxxflags+set}" = set; then :
42660   withval=$with_extra_cxxflags;
42661 fi
42662 
42663 
42664 
42665 # Check whether --with-extra-ldflags was given.
42666 if test "${with_extra_ldflags+set}" = set; then :
42667   withval=$with_extra_ldflags;
42668 fi
42669 
42670 
42671   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42672   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42673   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42674 
42675   # Hotspot needs these set in their legacy form
42676   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42677   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42678   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42679 
42680 
42681 
42682 
42683 
42684   ###############################################################################
42685   #
42686   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42687   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42688   #
42689 
42690   # Setup compiler/platform specific flags into
42691   #    CFLAGS_JDK    - C Compiler flags
42692   #    CXXFLAGS_JDK  - C++ Compiler flags
42693   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42694   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42695     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42696         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42697     case $OPENJDK_TARGET_CPU_ARCH in
42698       arm )
42699         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42700         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42701         ;;
42702       ppc )
42703         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42704         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42705         ;;
42706       * )
42707         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42708         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42709         ;;
42710     esac
42711   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42712     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42713     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42714       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42715       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42716     fi
42717 
42718     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42719     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42720   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42721     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42722     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42723   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42724     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42725         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42726         -DWIN32_LEAN_AND_MEAN \
42727         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42728         -DWIN32 -DIAL"
42729     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42730       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42731     else
42732       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42733     fi
42734     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42735     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42736     # studio.
42737     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42738       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42739           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42740     fi
42741   fi
42742 
42743   ###############################################################################
42744 
42745   # Adjust flags according to debug level.
42746   case $DEBUG_LEVEL in
42747     fastdebug | slowdebug )
42748       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42749       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42750       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42751       ;;
42752     release )
42753       ;;
42754     * )
42755       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42756       ;;
42757   esac
42758 
42759   # Setup LP64
42760   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42761 
42762   # Set some common defines. These works for all compilers, but assume
42763   # -D is universally accepted.
42764 
42765   # Setup endianness
42766   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42767     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42768     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42769     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42770     #   Note: -Dmacro         is the same as    #define macro 1
42771     #         -Dmacro=        is the same as    #define macro
42772     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42773       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42774     else
42775       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42776     fi
42777   else
42778     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42779     # are defined in the system?
42780     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42781       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42782     else
42783       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42784     fi
42785   fi
42786 
42787   # Setup target OS define. Use OS target name but in upper case.
42788   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42789   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42790 
42791   # Setup target CPU
42792   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42793 
42794   # Setup debug/release defines
42795   if test "x$DEBUG_LEVEL" = xrelease; then
42796     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42797     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42798       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42799     fi
42800   else
42801     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42802   fi
42803 
42804   # Setup release name
42805   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42806 
42807 
42808   # Set some additional per-OS defines.
42809   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42810     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42811   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42812     # FIXME: PPC64 should not be here.
42813     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42814   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42815     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42816   fi
42817 
42818   # Additional macosx handling
42819   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42820     # Setting these parameters makes it an error to link to macosx APIs that are
42821     # newer than the given OS version and makes the linked binaries compatible
42822     # even if built on a newer version of the OS.
42823     # The expected format is X.Y.Z
42824     MACOSX_VERSION_MIN=10.7.0
42825 
42826 
42827     # The macro takes the version with no dots, ex: 1070
42828     # Let the flags variables get resolved in make for easier override on make
42829     # command line.
42830     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42831     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42832   fi
42833 
42834   # Setup some hard coded includes
42835   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42836       -I${JDK_TOPDIR}/src/java.base/share/native/include \
42837       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42838       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42839 
42840   # The shared libraries are compiled using the picflag.
42841   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42842   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42843 
42844   # Executable flags
42845   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42846   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42847 
42848 
42849 
42850 
42851 
42852 
42853   # Setup LDFLAGS et al.
42854   #
42855 
42856   # Now this is odd. The JDK native libraries have to link against libjvm.so
42857   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42858   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42859   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42860   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42861   # libraries will link to whatever is in memory. Yuck.
42862   #
42863   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42864   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42865     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42866     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42867       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42868     fi
42869     # TODO: make -debug optional "--disable-full-debug-symbols"
42870     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42871   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42872     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42873     # We have previously set HAS_GNU_HASH if this is the case
42874     if test -n "$HAS_GNU_HASH"; then
42875       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42876     fi
42877     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42878       # And since we now know that the linker is gnu, then add -z defs, to forbid
42879       # undefined symbols in object files.
42880       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42881       case $DEBUG_LEVEL in
42882         release )
42883           # tell linker to optimize libraries.
42884           # Should this be supplied to the OSS linker as well?
42885           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42886           ;;
42887         slowdebug )
42888           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42889             # do relocations at load
42890             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42891             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42892           fi
42893           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42894             # mark relocations read only
42895             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42896             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42897           fi
42898           ;;
42899         fastdebug )
42900           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42901             # mark relocations read only
42902             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42903             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42904           fi
42905           ;;
42906         * )
42907           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42908           ;;
42909         esac
42910     fi
42911   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42912     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42913     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42914   fi
42915 
42916   # Customize LDFLAGS for executables
42917 
42918   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42919 
42920   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42921     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42922       LDFLAGS_STACK_SIZE=1048576
42923     else
42924       LDFLAGS_STACK_SIZE=327680
42925     fi
42926     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42927   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42928     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42929   fi
42930 
42931   # Customize LDFLAGS for libs
42932   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42933 
42934   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42935     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42936     LDFLAGS_JDKLIB_SUFFIX=""
42937   else
42938     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42939         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42940 
42941     # On some platforms (mac) the linker warns about non existing -L dirs.
42942     # Add server first if available. Linking aginst client does not always produce the same results.
42943     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42944     # Default to server for other variants.
42945     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42946       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42947     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42948       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42949     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42950       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42951     else
42952       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42953     fi
42954 
42955     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42956     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42957       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42958     fi
42959   fi
42960 
42961 
42962 
42963 
42964 
42965 
42966 
42967 
42968   # Some Zero and Shark settings.
42969   # ZERO_ARCHFLAG tells the compiler which mode to build for
42970   case "${OPENJDK_TARGET_CPU}" in
42971     s390)
42972       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42973       ;;
42974     *)
42975       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42976   esac
42977 
42978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42979 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42980   supports=yes
42981 
42982   saved_cflags="$CFLAGS"
42983   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42984   ac_ext=c
42985 ac_cpp='$CPP $CPPFLAGS'
42986 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42987 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42988 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42989 
42990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42991 /* end confdefs.h.  */
42992 int i;
42993 _ACEOF
42994 if ac_fn_c_try_compile "$LINENO"; then :
42995 
42996 else
42997   supports=no
42998 fi
42999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43000   ac_ext=cpp
43001 ac_cpp='$CXXCPP $CPPFLAGS'
43002 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43003 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43004 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43005 
43006   CFLAGS="$saved_cflags"
43007 
43008   saved_cxxflags="$CXXFLAGS"
43009   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
43010   ac_ext=cpp
43011 ac_cpp='$CXXCPP $CPPFLAGS'
43012 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43013 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43014 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43015 
43016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43017 /* end confdefs.h.  */
43018 int i;
43019 _ACEOF
43020 if ac_fn_cxx_try_compile "$LINENO"; then :
43021 
43022 else
43023   supports=no
43024 fi
43025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43026   ac_ext=cpp
43027 ac_cpp='$CXXCPP $CPPFLAGS'
43028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43031 
43032   CXXFLAGS="$saved_cxxflags"
43033 
43034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43035 $as_echo "$supports" >&6; }
43036   if test "x$supports" = "xyes" ; then
43037     :
43038   else
43039     ZERO_ARCHFLAG=""
43040   fi
43041 
43042 
43043 
43044   # Check that the compiler supports -mX (or -qX on AIX) flags
43045   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
43046 
43047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
43048 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
43049   supports=yes
43050 
43051   saved_cflags="$CFLAGS"
43052   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43053   ac_ext=c
43054 ac_cpp='$CPP $CPPFLAGS'
43055 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43056 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43057 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43058 
43059   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43060 /* end confdefs.h.  */
43061 int i;
43062 _ACEOF
43063 if ac_fn_c_try_compile "$LINENO"; then :
43064 
43065 else
43066   supports=no
43067 fi
43068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43069   ac_ext=cpp
43070 ac_cpp='$CXXCPP $CPPFLAGS'
43071 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43072 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43073 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43074 
43075   CFLAGS="$saved_cflags"
43076 
43077   saved_cxxflags="$CXXFLAGS"
43078   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
43079   ac_ext=cpp
43080 ac_cpp='$CXXCPP $CPPFLAGS'
43081 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43082 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43083 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43084 
43085   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43086 /* end confdefs.h.  */
43087 int i;
43088 _ACEOF
43089 if ac_fn_cxx_try_compile "$LINENO"; then :
43090 
43091 else
43092   supports=no
43093 fi
43094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43095   ac_ext=cpp
43096 ac_cpp='$CXXCPP $CPPFLAGS'
43097 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43098 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43099 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43100 
43101   CXXFLAGS="$saved_cxxflags"
43102 
43103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43104 $as_echo "$supports" >&6; }
43105   if test "x$supports" = "xyes" ; then
43106     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
43107   else
43108     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
43109   fi
43110 
43111 
43112 
43113   case "${TOOLCHAIN_TYPE}" in
43114     microsoft)
43115       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
43116       ;;
43117     solstudio)
43118       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
43119       ;;
43120     gcc)
43121       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43122       ;;
43123     clang)
43124       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43125       ;;
43126   esac
43127 
43128 
43129 
43130 # Setup debug symbols (need objcopy from the toolchain for that)
43131 
43132   #
43133   # ENABLE_DEBUG_SYMBOLS
43134   # This must be done after the toolchain is setup, since we're looking at objcopy.
43135   #
43136   # Check whether --enable-debug-symbols was given.
43137 if test "${enable_debug_symbols+set}" = set; then :
43138   enableval=$enable_debug_symbols;
43139 fi
43140 
43141 
43142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43143 $as_echo_n "checking if we should generate debug symbols... " >&6; }
43144 
43145   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43146     # explicit enabling of enable-debug-symbols and can't find objcopy
43147     #   this is an error
43148     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43149   fi
43150 
43151   if test "x$enable_debug_symbols" = "xyes"; then
43152     ENABLE_DEBUG_SYMBOLS=true
43153   elif test "x$enable_debug_symbols" = "xno"; then
43154     ENABLE_DEBUG_SYMBOLS=false
43155   else
43156     # Default is on if objcopy is found
43157     if test "x$OBJCOPY" != x; then
43158       ENABLE_DEBUG_SYMBOLS=true
43159     # MacOS X and Windows don't use objcopy but default is on for those OSes
43160     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43161       ENABLE_DEBUG_SYMBOLS=true
43162     else
43163       ENABLE_DEBUG_SYMBOLS=false
43164     fi
43165   fi
43166 
43167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43168 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43169 
43170   #
43171   # ZIP_DEBUGINFO_FILES
43172   #
43173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43174 $as_echo_n "checking if we should zip debug-info files... " >&6; }
43175   # Check whether --enable-zip-debug-info was given.
43176 if test "${enable_zip_debug_info+set}" = set; then :
43177   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43178 else
43179   enable_zip_debug_info="yes"
43180 fi
43181 
43182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43183 $as_echo "${enable_zip_debug_info}" >&6; }
43184 
43185   if test "x${enable_zip_debug_info}" = "xno"; then
43186     ZIP_DEBUGINFO_FILES=false
43187   else
43188     ZIP_DEBUGINFO_FILES=true
43189   fi
43190 
43191 
43192 
43193 
43194 
43195 ###############################################################################
43196 #
43197 # Check dependencies for external and internal libraries.
43198 #
43199 ###############################################################################
43200 
43201 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43202 
43203   # When using cygwin or msys, we need a wrapper binary that renames
43204   # /cygdrive/c/ arguments into c:/ arguments and peeks into
43205   # @files and rewrites these too! This wrapper binary is
43206   # called fixpath.
43207   FIXPATH=
43208   if test "x$OPENJDK_BUILD_OS" = xwindows; then
43209     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43210 $as_echo_n "checking if fixpath can be created... " >&6; }
43211     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43212     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43213     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43214       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43215       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43216       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43217       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43218     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43219       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43220       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43221 
43222       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43223       # @ was chosen as separator to minimize risk of other tools messing around with it
43224       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43225       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43226 
43227       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43228     fi
43229     rm -f $OUTPUT_ROOT/fixpath*
43230     cd $OUTPUT_ROOT
43231     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43232     cd $CURDIR
43233 
43234     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43235       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43236 $as_echo "no" >&6; }
43237       cat $OUTPUT_ROOT/fixpath1.log
43238       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43239     fi
43240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43241 $as_echo "yes" >&6; }
43242     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43243 $as_echo_n "checking if fixpath.exe works... " >&6; }
43244     cd $OUTPUT_ROOT
43245     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43246     cd $CURDIR
43247     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43248       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43249 $as_echo "no" >&6; }
43250       cat $OUTPUT_ROOT/fixpath2.log
43251       as_fn_error $? "fixpath did not work!" "$LINENO" 5
43252     fi
43253     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43254 $as_echo "yes" >&6; }
43255     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43256   fi
43257 
43258 
43259 
43260 
43261 
43262 
43263   ###############################################################################
43264   #
43265   # OS specific settings that we never will need to probe.
43266   #
43267   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43269 $as_echo_n "checking what is not needed on Linux?... " >&6; }
43270     PULSE_NOT_NEEDED=yes
43271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43272 $as_echo "pulse" >&6; }
43273   fi
43274 
43275   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43277 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
43278     ALSA_NOT_NEEDED=yes
43279     PULSE_NOT_NEEDED=yes
43280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43281 $as_echo "alsa pulse" >&6; }
43282   fi
43283 
43284   if test "x$OPENJDK_TARGET_OS" = xaix; then
43285     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43286 $as_echo_n "checking what is not needed on AIX?... " >&6; }
43287     ALSA_NOT_NEEDED=yes
43288     PULSE_NOT_NEEDED=yes
43289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43290 $as_echo "alsa pulse" >&6; }
43291   fi
43292 
43293 
43294   if test "x$OPENJDK_TARGET_OS" = xwindows; then
43295     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43296 $as_echo_n "checking what is not needed on Windows?... " >&6; }
43297     CUPS_NOT_NEEDED=yes
43298     ALSA_NOT_NEEDED=yes
43299     PULSE_NOT_NEEDED=yes
43300     X11_NOT_NEEDED=yes
43301     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43302 $as_echo "alsa cups pulse x11" >&6; }
43303   fi
43304 
43305   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43307 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43308     ALSA_NOT_NEEDED=yes
43309     PULSE_NOT_NEEDED=yes
43310     X11_NOT_NEEDED=yes
43311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43312 $as_echo "alsa pulse x11" >&6; }
43313   fi
43314 
43315   if test "x$OPENJDK_TARGET_OS" = xbsd; then
43316     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43317 $as_echo_n "checking what is not needed on bsd?... " >&6; }
43318     ALSA_NOT_NEEDED=yes
43319     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43320 $as_echo "alsa" >&6; }
43321   fi
43322 
43323   if test "x$OPENJDK" = "xfalse"; then
43324     FREETYPE_NOT_NEEDED=yes
43325   fi
43326 
43327   if test "x$SUPPORT_HEADFUL" = xno; then
43328     X11_NOT_NEEDED=yes
43329   fi
43330 
43331 
43332 
43333   ###############################################################################
43334   #
43335   # Check for X Windows
43336   #
43337 
43338   if test "x$X11_NOT_NEEDED" = xyes; then
43339     if test "x${with_x}" != x; then
43340       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43341 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43342     fi
43343     X_CFLAGS=
43344     X_LIBS=
43345   else
43346     # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43347     # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43348     # --x-libraries for the sysroot, if that seems to be correct.
43349     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43350       if test "x$SYSROOT" != "x"; then
43351         if test "x$x_includes" = xNONE; then
43352           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43353             x_includes="$SYSROOT/usr/X11R6/include"
43354           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43355             x_includes="$SYSROOT/usr/include"
43356           fi
43357         fi
43358         if test "x$x_libraries" = xNONE; then
43359           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43360             x_libraries="$SYSROOT/usr/X11R6/lib"
43361           elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43362             x_libraries="$SYSROOT/usr/lib64"
43363           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43364             x_libraries="$SYSROOT/usr/lib"
43365           fi
43366         fi
43367       fi
43368     fi
43369 
43370     # Now let autoconf do it's magic
43371     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43372 $as_echo_n "checking for X... " >&6; }
43373 
43374 
43375 # Check whether --with-x was given.
43376 if test "${with_x+set}" = set; then :
43377   withval=$with_x;
43378 fi
43379 
43380 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43381 if test "x$with_x" = xno; then
43382   # The user explicitly disabled X.
43383   have_x=disabled
43384 else
43385   case $x_includes,$x_libraries in #(
43386     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43387     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43388   $as_echo_n "(cached) " >&6
43389 else
43390   # One or both of the vars are not set, and there is no cached value.
43391 ac_x_includes=no ac_x_libraries=no
43392 rm -f -r conftest.dir
43393 if mkdir conftest.dir; then
43394   cd conftest.dir
43395   cat >Imakefile <<'_ACEOF'
43396 incroot:
43397         @echo incroot='${INCROOT}'
43398 usrlibdir:
43399         @echo usrlibdir='${USRLIBDIR}'
43400 libdir:
43401         @echo libdir='${LIBDIR}'
43402 _ACEOF
43403   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43404     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43405     for ac_var in incroot usrlibdir libdir; do
43406       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43407     done
43408     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43409     for ac_extension in a so sl dylib la dll; do
43410       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43411          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43412         ac_im_usrlibdir=$ac_im_libdir; break
43413       fi
43414     done
43415     # Screen out bogus values from the imake configuration.  They are
43416     # bogus both because they are the default anyway, and because
43417     # using them would break gcc on systems where it needs fixed includes.
43418     case $ac_im_incroot in
43419         /usr/include) ac_x_includes= ;;
43420         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43421     esac
43422     case $ac_im_usrlibdir in
43423         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43424         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43425     esac
43426   fi
43427   cd ..
43428   rm -f -r conftest.dir
43429 fi
43430 
43431 # Standard set of common directories for X headers.
43432 # Check X11 before X11Rn because it is often a symlink to the current release.
43433 ac_x_header_dirs='
43434 /usr/X11/include
43435 /usr/X11R7/include
43436 /usr/X11R6/include
43437 /usr/X11R5/include
43438 /usr/X11R4/include
43439 
43440 /usr/include/X11
43441 /usr/include/X11R7
43442 /usr/include/X11R6
43443 /usr/include/X11R5
43444 /usr/include/X11R4
43445 
43446 /usr/local/X11/include
43447 /usr/local/X11R7/include
43448 /usr/local/X11R6/include
43449 /usr/local/X11R5/include
43450 /usr/local/X11R4/include
43451 
43452 /usr/local/include/X11
43453 /usr/local/include/X11R7
43454 /usr/local/include/X11R6
43455 /usr/local/include/X11R5
43456 /usr/local/include/X11R4
43457 
43458 /usr/X386/include
43459 /usr/x386/include
43460 /usr/XFree86/include/X11
43461 
43462 /usr/include
43463 /usr/local/include
43464 /usr/unsupported/include
43465 /usr/athena/include
43466 /usr/local/x11r5/include
43467 /usr/lpp/Xamples/include
43468 
43469 /usr/openwin/include
43470 /usr/openwin/share/include'
43471 
43472 if test "$ac_x_includes" = no; then
43473   # Guess where to find include files, by looking for Xlib.h.
43474   # First, try using that file with no special directory specified.
43475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43476 /* end confdefs.h.  */
43477 #include <X11/Xlib.h>
43478 _ACEOF
43479 if ac_fn_cxx_try_cpp "$LINENO"; then :
43480   # We can compile using X headers with no special include directory.
43481 ac_x_includes=
43482 else
43483   for ac_dir in $ac_x_header_dirs; do
43484   if test -r "$ac_dir/X11/Xlib.h"; then
43485     ac_x_includes=$ac_dir
43486     break
43487   fi
43488 done
43489 fi
43490 rm -f conftest.err conftest.i conftest.$ac_ext
43491 fi # $ac_x_includes = no
43492 
43493 if test "$ac_x_libraries" = no; then
43494   # Check for the libraries.
43495   # See if we find them without any special options.
43496   # Don't add to $LIBS permanently.
43497   ac_save_LIBS=$LIBS
43498   LIBS="-lX11 $LIBS"
43499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43500 /* end confdefs.h.  */
43501 #include <X11/Xlib.h>
43502 int
43503 main ()
43504 {
43505 XrmInitialize ()
43506   ;
43507   return 0;
43508 }
43509 _ACEOF
43510 if ac_fn_cxx_try_link "$LINENO"; then :
43511   LIBS=$ac_save_LIBS
43512 # We can link X programs with no special library path.
43513 ac_x_libraries=
43514 else
43515   LIBS=$ac_save_LIBS
43516 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43517 do
43518   # Don't even attempt the hair of trying to link an X program!
43519   for ac_extension in a so sl dylib la dll; do
43520     if test -r "$ac_dir/libX11.$ac_extension"; then
43521       ac_x_libraries=$ac_dir
43522       break 2
43523     fi
43524   done
43525 done
43526 fi
43527 rm -f core conftest.err conftest.$ac_objext \
43528     conftest$ac_exeext conftest.$ac_ext
43529 fi # $ac_x_libraries = no
43530 
43531 case $ac_x_includes,$ac_x_libraries in #(
43532   no,* | *,no | *\'*)
43533     # Didn't find X, or a directory has "'" in its name.
43534     ac_cv_have_x="have_x=no";; #(
43535   *)
43536     # Record where we found X for the cache.
43537     ac_cv_have_x="have_x=yes\
43538         ac_x_includes='$ac_x_includes'\
43539         ac_x_libraries='$ac_x_libraries'"
43540 esac
43541 fi
43542 ;; #(
43543     *) have_x=yes;;
43544   esac
43545   eval "$ac_cv_have_x"
43546 fi # $with_x != no
43547 
43548 if test "$have_x" != yes; then
43549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43550 $as_echo "$have_x" >&6; }
43551   no_x=yes
43552 else
43553   # If each of the values was on the command line, it overrides each guess.
43554   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43555   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43556   # Update the cache value to reflect the command line values.
43557   ac_cv_have_x="have_x=yes\
43558         ac_x_includes='$x_includes'\
43559         ac_x_libraries='$x_libraries'"
43560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43561 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43562 fi
43563 
43564     if test "$no_x" = yes; then
43565   # Not all programs may use this symbol, but it does not hurt to define it.
43566 
43567 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43568 
43569   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43570 else
43571   if test -n "$x_includes"; then
43572     X_CFLAGS="$X_CFLAGS -I$x_includes"
43573   fi
43574 
43575   # It would also be nice to do this for all -L options, not just this one.
43576   if test -n "$x_libraries"; then
43577     X_LIBS="$X_LIBS -L$x_libraries"
43578     # For Solaris; some versions of Sun CC require a space after -R and
43579     # others require no space.  Words are not sufficient . . . .
43580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43581 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43582     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43583     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43584     ac_cxx_werror_flag=yes
43585     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43586 /* end confdefs.h.  */
43587 
43588 int
43589 main ()
43590 {
43591 
43592   ;
43593   return 0;
43594 }
43595 _ACEOF
43596 if ac_fn_cxx_try_link "$LINENO"; then :
43597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43598 $as_echo "no" >&6; }
43599        X_LIBS="$X_LIBS -R$x_libraries"
43600 else
43601   LIBS="$ac_xsave_LIBS -R $x_libraries"
43602        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43603 /* end confdefs.h.  */
43604 
43605 int
43606 main ()
43607 {
43608 
43609   ;
43610   return 0;
43611 }
43612 _ACEOF
43613 if ac_fn_cxx_try_link "$LINENO"; then :
43614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43615 $as_echo "yes" >&6; }
43616           X_LIBS="$X_LIBS -R $x_libraries"
43617 else
43618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43619 $as_echo "neither works" >&6; }
43620 fi
43621 rm -f core conftest.err conftest.$ac_objext \
43622     conftest$ac_exeext conftest.$ac_ext
43623 fi
43624 rm -f core conftest.err conftest.$ac_objext \
43625     conftest$ac_exeext conftest.$ac_ext
43626     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43627     LIBS=$ac_xsave_LIBS
43628   fi
43629 
43630   # Check for system-dependent libraries X programs must link with.
43631   # Do this before checking for the system-independent R6 libraries
43632   # (-lICE), since we may need -lsocket or whatever for X linking.
43633 
43634   if test "$ISC" = yes; then
43635     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43636   else
43637     # Martyn Johnson says this is needed for Ultrix, if the X
43638     # libraries were built with DECnet support.  And Karl Berry says
43639     # the Alpha needs dnet_stub (dnet does not exist).
43640     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43641     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43642 /* end confdefs.h.  */
43643 
43644 /* Override any GCC internal prototype to avoid an error.
43645    Use char because int might match the return type of a GCC
43646    builtin and then its argument prototype would still apply.  */
43647 #ifdef __cplusplus
43648 extern "C"
43649 #endif
43650 char XOpenDisplay ();
43651 int
43652 main ()
43653 {
43654 return XOpenDisplay ();
43655   ;
43656   return 0;
43657 }
43658 _ACEOF
43659 if ac_fn_cxx_try_link "$LINENO"; then :
43660 
43661 else
43662   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43663 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43664 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43665   $as_echo_n "(cached) " >&6
43666 else
43667   ac_check_lib_save_LIBS=$LIBS
43668 LIBS="-ldnet  $LIBS"
43669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43670 /* end confdefs.h.  */
43671 
43672 /* Override any GCC internal prototype to avoid an error.
43673    Use char because int might match the return type of a GCC
43674    builtin and then its argument prototype would still apply.  */
43675 #ifdef __cplusplus
43676 extern "C"
43677 #endif
43678 char dnet_ntoa ();
43679 int
43680 main ()
43681 {
43682 return dnet_ntoa ();
43683   ;
43684   return 0;
43685 }
43686 _ACEOF
43687 if ac_fn_cxx_try_link "$LINENO"; then :
43688   ac_cv_lib_dnet_dnet_ntoa=yes
43689 else
43690   ac_cv_lib_dnet_dnet_ntoa=no
43691 fi
43692 rm -f core conftest.err conftest.$ac_objext \
43693     conftest$ac_exeext conftest.$ac_ext
43694 LIBS=$ac_check_lib_save_LIBS
43695 fi
43696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43697 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43698 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43699   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43700 fi
43701 
43702     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43703       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43704 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43705 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43706   $as_echo_n "(cached) " >&6
43707 else
43708   ac_check_lib_save_LIBS=$LIBS
43709 LIBS="-ldnet_stub  $LIBS"
43710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43711 /* end confdefs.h.  */
43712 
43713 /* Override any GCC internal prototype to avoid an error.
43714    Use char because int might match the return type of a GCC
43715    builtin and then its argument prototype would still apply.  */
43716 #ifdef __cplusplus
43717 extern "C"
43718 #endif
43719 char dnet_ntoa ();
43720 int
43721 main ()
43722 {
43723 return dnet_ntoa ();
43724   ;
43725   return 0;
43726 }
43727 _ACEOF
43728 if ac_fn_cxx_try_link "$LINENO"; then :
43729   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43730 else
43731   ac_cv_lib_dnet_stub_dnet_ntoa=no
43732 fi
43733 rm -f core conftest.err conftest.$ac_objext \
43734     conftest$ac_exeext conftest.$ac_ext
43735 LIBS=$ac_check_lib_save_LIBS
43736 fi
43737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43738 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43739 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43740   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43741 fi
43742 
43743     fi
43744 fi
43745 rm -f core conftest.err conftest.$ac_objext \
43746     conftest$ac_exeext conftest.$ac_ext
43747     LIBS="$ac_xsave_LIBS"
43748 
43749     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43750     # to get the SysV transport functions.
43751     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43752     # needs -lnsl.
43753     # The nsl library prevents programs from opening the X display
43754     # on Irix 5.2, according to T.E. Dickey.
43755     # The functions gethostbyname, getservbyname, and inet_addr are
43756     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43757     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43758 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43759 
43760 fi
43761 
43762     if test $ac_cv_func_gethostbyname = no; then
43763       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43764 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43765 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43766   $as_echo_n "(cached) " >&6
43767 else
43768   ac_check_lib_save_LIBS=$LIBS
43769 LIBS="-lnsl  $LIBS"
43770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43771 /* end confdefs.h.  */
43772 
43773 /* Override any GCC internal prototype to avoid an error.
43774    Use char because int might match the return type of a GCC
43775    builtin and then its argument prototype would still apply.  */
43776 #ifdef __cplusplus
43777 extern "C"
43778 #endif
43779 char gethostbyname ();
43780 int
43781 main ()
43782 {
43783 return gethostbyname ();
43784   ;
43785   return 0;
43786 }
43787 _ACEOF
43788 if ac_fn_cxx_try_link "$LINENO"; then :
43789   ac_cv_lib_nsl_gethostbyname=yes
43790 else
43791   ac_cv_lib_nsl_gethostbyname=no
43792 fi
43793 rm -f core conftest.err conftest.$ac_objext \
43794     conftest$ac_exeext conftest.$ac_ext
43795 LIBS=$ac_check_lib_save_LIBS
43796 fi
43797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43798 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43799 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43800   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43801 fi
43802 
43803       if test $ac_cv_lib_nsl_gethostbyname = no; then
43804         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43805 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43806 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43807   $as_echo_n "(cached) " >&6
43808 else
43809   ac_check_lib_save_LIBS=$LIBS
43810 LIBS="-lbsd  $LIBS"
43811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43812 /* end confdefs.h.  */
43813 
43814 /* Override any GCC internal prototype to avoid an error.
43815    Use char because int might match the return type of a GCC
43816    builtin and then its argument prototype would still apply.  */
43817 #ifdef __cplusplus
43818 extern "C"
43819 #endif
43820 char gethostbyname ();
43821 int
43822 main ()
43823 {
43824 return gethostbyname ();
43825   ;
43826   return 0;
43827 }
43828 _ACEOF
43829 if ac_fn_cxx_try_link "$LINENO"; then :
43830   ac_cv_lib_bsd_gethostbyname=yes
43831 else
43832   ac_cv_lib_bsd_gethostbyname=no
43833 fi
43834 rm -f core conftest.err conftest.$ac_objext \
43835     conftest$ac_exeext conftest.$ac_ext
43836 LIBS=$ac_check_lib_save_LIBS
43837 fi
43838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43839 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43840 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43841   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43842 fi
43843 
43844       fi
43845     fi
43846 
43847     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43848     # socket/setsockopt and other routines are undefined under SCO ODT
43849     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43850     # on later versions), says Simon Leinen: it contains gethostby*
43851     # variants that don't use the name server (or something).  -lsocket
43852     # must be given before -lnsl if both are needed.  We assume that
43853     # if connect needs -lnsl, so does gethostbyname.
43854     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43855 if test "x$ac_cv_func_connect" = xyes; then :
43856 
43857 fi
43858 
43859     if test $ac_cv_func_connect = no; then
43860       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43861 $as_echo_n "checking for connect in -lsocket... " >&6; }
43862 if ${ac_cv_lib_socket_connect+:} false; then :
43863   $as_echo_n "(cached) " >&6
43864 else
43865   ac_check_lib_save_LIBS=$LIBS
43866 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43868 /* end confdefs.h.  */
43869 
43870 /* Override any GCC internal prototype to avoid an error.
43871    Use char because int might match the return type of a GCC
43872    builtin and then its argument prototype would still apply.  */
43873 #ifdef __cplusplus
43874 extern "C"
43875 #endif
43876 char connect ();
43877 int
43878 main ()
43879 {
43880 return connect ();
43881   ;
43882   return 0;
43883 }
43884 _ACEOF
43885 if ac_fn_cxx_try_link "$LINENO"; then :
43886   ac_cv_lib_socket_connect=yes
43887 else
43888   ac_cv_lib_socket_connect=no
43889 fi
43890 rm -f core conftest.err conftest.$ac_objext \
43891     conftest$ac_exeext conftest.$ac_ext
43892 LIBS=$ac_check_lib_save_LIBS
43893 fi
43894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43895 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43896 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43897   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43898 fi
43899 
43900     fi
43901 
43902     # Guillermo Gomez says -lposix is necessary on A/UX.
43903     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43904 if test "x$ac_cv_func_remove" = xyes; then :
43905 
43906 fi
43907 
43908     if test $ac_cv_func_remove = no; then
43909       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43910 $as_echo_n "checking for remove in -lposix... " >&6; }
43911 if ${ac_cv_lib_posix_remove+:} false; then :
43912   $as_echo_n "(cached) " >&6
43913 else
43914   ac_check_lib_save_LIBS=$LIBS
43915 LIBS="-lposix  $LIBS"
43916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43917 /* end confdefs.h.  */
43918 
43919 /* Override any GCC internal prototype to avoid an error.
43920    Use char because int might match the return type of a GCC
43921    builtin and then its argument prototype would still apply.  */
43922 #ifdef __cplusplus
43923 extern "C"
43924 #endif
43925 char remove ();
43926 int
43927 main ()
43928 {
43929 return remove ();
43930   ;
43931   return 0;
43932 }
43933 _ACEOF
43934 if ac_fn_cxx_try_link "$LINENO"; then :
43935   ac_cv_lib_posix_remove=yes
43936 else
43937   ac_cv_lib_posix_remove=no
43938 fi
43939 rm -f core conftest.err conftest.$ac_objext \
43940     conftest$ac_exeext conftest.$ac_ext
43941 LIBS=$ac_check_lib_save_LIBS
43942 fi
43943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43944 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43945 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43946   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43947 fi
43948 
43949     fi
43950 
43951     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43952     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43953 if test "x$ac_cv_func_shmat" = xyes; then :
43954 
43955 fi
43956 
43957     if test $ac_cv_func_shmat = no; then
43958       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43959 $as_echo_n "checking for shmat in -lipc... " >&6; }
43960 if ${ac_cv_lib_ipc_shmat+:} false; then :
43961   $as_echo_n "(cached) " >&6
43962 else
43963   ac_check_lib_save_LIBS=$LIBS
43964 LIBS="-lipc  $LIBS"
43965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43966 /* end confdefs.h.  */
43967 
43968 /* Override any GCC internal prototype to avoid an error.
43969    Use char because int might match the return type of a GCC
43970    builtin and then its argument prototype would still apply.  */
43971 #ifdef __cplusplus
43972 extern "C"
43973 #endif
43974 char shmat ();
43975 int
43976 main ()
43977 {
43978 return shmat ();
43979   ;
43980   return 0;
43981 }
43982 _ACEOF
43983 if ac_fn_cxx_try_link "$LINENO"; then :
43984   ac_cv_lib_ipc_shmat=yes
43985 else
43986   ac_cv_lib_ipc_shmat=no
43987 fi
43988 rm -f core conftest.err conftest.$ac_objext \
43989     conftest$ac_exeext conftest.$ac_ext
43990 LIBS=$ac_check_lib_save_LIBS
43991 fi
43992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43993 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43994 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43995   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43996 fi
43997 
43998     fi
43999   fi
44000 
44001   # Check for libraries that X11R6 Xt/Xaw programs need.
44002   ac_save_LDFLAGS=$LDFLAGS
44003   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
44004   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
44005   # check for ICE first), but we must link in the order -lSM -lICE or
44006   # we get undefined symbols.  So assume we have SM if we have ICE.
44007   # These have to be linked with before -lX11, unlike the other
44008   # libraries we check for below, so use a different variable.
44009   # John Interrante, Karl Berry
44010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
44011 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
44012 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
44013   $as_echo_n "(cached) " >&6
44014 else
44015   ac_check_lib_save_LIBS=$LIBS
44016 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
44017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44018 /* end confdefs.h.  */
44019 
44020 /* Override any GCC internal prototype to avoid an error.
44021    Use char because int might match the return type of a GCC
44022    builtin and then its argument prototype would still apply.  */
44023 #ifdef __cplusplus
44024 extern "C"
44025 #endif
44026 char IceConnectionNumber ();
44027 int
44028 main ()
44029 {
44030 return IceConnectionNumber ();
44031   ;
44032   return 0;
44033 }
44034 _ACEOF
44035 if ac_fn_cxx_try_link "$LINENO"; then :
44036   ac_cv_lib_ICE_IceConnectionNumber=yes
44037 else
44038   ac_cv_lib_ICE_IceConnectionNumber=no
44039 fi
44040 rm -f core conftest.err conftest.$ac_objext \
44041     conftest$ac_exeext conftest.$ac_ext
44042 LIBS=$ac_check_lib_save_LIBS
44043 fi
44044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44045 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44046 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44047   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44048 fi
44049 
44050   LDFLAGS=$ac_save_LDFLAGS
44051 
44052 fi
44053 
44054 
44055     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44056     # this doesn't make sense so we remove it.
44057     if test "x$COMPILE_TYPE" = xcross; then
44058       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44059     fi
44060 
44061     if test "x$no_x" = xyes; then
44062 
44063   # Print a helpful message on how to acquire the necessary build dependency.
44064   # x11 is the help tag: freetype, cups, pulse, alsa etc
44065   MISSING_DEPENDENCY=x11
44066 
44067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44068     cygwin_help $MISSING_DEPENDENCY
44069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44070     msys_help $MISSING_DEPENDENCY
44071   else
44072     PKGHANDLER_COMMAND=
44073 
44074     case $PKGHANDLER in
44075       apt-get)
44076         apt_help     $MISSING_DEPENDENCY ;;
44077       yum)
44078         yum_help     $MISSING_DEPENDENCY ;;
44079       port)
44080         port_help    $MISSING_DEPENDENCY ;;
44081       pkgutil)
44082         pkgutil_help $MISSING_DEPENDENCY ;;
44083       pkgadd)
44084         pkgadd_help  $MISSING_DEPENDENCY ;;
44085     esac
44086 
44087     if test "x$PKGHANDLER_COMMAND" != x; then
44088       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44089     fi
44090   fi
44091 
44092       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44093     fi
44094 
44095     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44096       OPENWIN_HOME="/usr/openwin"
44097       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44098       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44099           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44100           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44101           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44102     fi
44103 
44104     ac_ext=c
44105 ac_cpp='$CPP $CPPFLAGS'
44106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44109 
44110     OLD_CFLAGS="$CFLAGS"
44111     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44112 
44113     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44114     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44115 do :
44116   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44117 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44118           # include <X11/Xlib.h>
44119           # include <X11/Xutil.h>
44120 
44121 
44122 "
44123 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44124   cat >>confdefs.h <<_ACEOF
44125 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44126 _ACEOF
44127  X11_HEADERS_OK=yes
44128 else
44129   X11_HEADERS_OK=no; break
44130 fi
44131 
44132 done
44133 
44134 
44135     if test "x$X11_HEADERS_OK" = xno; then
44136 
44137   # Print a helpful message on how to acquire the necessary build dependency.
44138   # x11 is the help tag: freetype, cups, pulse, alsa etc
44139   MISSING_DEPENDENCY=x11
44140 
44141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44142     cygwin_help $MISSING_DEPENDENCY
44143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44144     msys_help $MISSING_DEPENDENCY
44145   else
44146     PKGHANDLER_COMMAND=
44147 
44148     case $PKGHANDLER in
44149       apt-get)
44150         apt_help     $MISSING_DEPENDENCY ;;
44151       yum)
44152         yum_help     $MISSING_DEPENDENCY ;;
44153       port)
44154         port_help    $MISSING_DEPENDENCY ;;
44155       pkgutil)
44156         pkgutil_help $MISSING_DEPENDENCY ;;
44157       pkgadd)
44158         pkgadd_help  $MISSING_DEPENDENCY ;;
44159     esac
44160 
44161     if test "x$PKGHANDLER_COMMAND" != x; then
44162       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44163     fi
44164   fi
44165 
44166       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44167     fi
44168 
44169     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44170     # defined in libawt_xawt.
44171     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44172 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44173     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44174 /* end confdefs.h.  */
44175 #include <X11/extensions/Xrender.h>
44176 int
44177 main ()
44178 {
44179 XLinearGradient x;
44180   ;
44181   return 0;
44182 }
44183 _ACEOF
44184 if ac_fn_c_try_compile "$LINENO"; then :
44185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44186 $as_echo "yes" >&6; }
44187 else
44188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44189 $as_echo "no" >&6; }
44190          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44191 fi
44192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44193 
44194     CFLAGS="$OLD_CFLAGS"
44195     ac_ext=cpp
44196 ac_cpp='$CXXCPP $CPPFLAGS'
44197 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44198 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44199 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44200 
44201   fi # X11_NOT_NEEDED
44202 
44203 
44204 
44205 
44206 
44207 
44208   ###############################################################################
44209   #
44210   # The common unix printing system cups is used to print from java.
44211   #
44212 
44213 # Check whether --with-cups was given.
44214 if test "${with_cups+set}" = set; then :
44215   withval=$with_cups;
44216 fi
44217 
44218 
44219 # Check whether --with-cups-include was given.
44220 if test "${with_cups_include+set}" = set; then :
44221   withval=$with_cups_include;
44222 fi
44223 
44224 
44225   if test "x$CUPS_NOT_NEEDED" = xyes; then
44226     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44227       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44228 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44229     fi
44230     CUPS_CFLAGS=
44231   else
44232     CUPS_FOUND=no
44233 
44234     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44235       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44236     fi
44237 
44238     if test "x${with_cups}" != x; then
44239       CUPS_CFLAGS="-I${with_cups}/include"
44240       CUPS_FOUND=yes
44241     fi
44242     if test "x${with_cups_include}" != x; then
44243       CUPS_CFLAGS="-I${with_cups_include}"
44244       CUPS_FOUND=yes
44245     fi
44246     if test "x$CUPS_FOUND" = xno; then
44247 
44248 
44249   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44250     # Source the builddeps file again, to make sure it uses the latest variables!
44251     . $builddepsfile
44252     # Look for a target and build machine specific resource!
44253     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44254     if test "x$resource" = x; then
44255       # Ok, lets instead look for a target specific resource
44256       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44257     fi
44258     if test "x$resource" = x; then
44259       # Ok, lets instead look for a build specific resource
44260       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44261     fi
44262     if test "x$resource" = x; then
44263       # Ok, lets instead look for a generic resource
44264       # (The cups comes from M4 and not the shell, thus no need for eval here.)
44265       resource=${builddep_cups}
44266     fi
44267     if test "x$resource" != x; then
44268       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44269 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44270       # If the resource in the builddeps.conf file is an existing directory,
44271       # for example /java/linux/cups
44272       if test -d ${resource}; then
44273         depdir=${resource}
44274       else
44275 
44276   # cups is for example mymodule
44277   # $resource is for example libs/general/libmymod_1_2_3.zip
44278   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44279   # $with_builddeps_dir is for example /localhome/builddeps
44280   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44281   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44282   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44283   filename=`basename $resource`
44284   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44285   filebase=${filename%%.*}
44286   extension=${filename#*.}
44287   installdir=$with_builddeps_dir/$filebase
44288   if test ! -f $installdir/$filename.unpacked; then
44289     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44290 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44291     if test ! -d $installdir; then
44292       mkdir -p $installdir
44293     fi
44294     if test ! -d $installdir; then
44295       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44296     fi
44297     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44298     touch $tmpfile
44299     if test ! -f $tmpfile; then
44300       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44301     fi
44302 
44303   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44304   # $tmpfile is the local file name for the downloaded file.
44305   VALID_TOOL=no
44306   if test "x$BDEPS_FTP" = xwget; then
44307     VALID_TOOL=yes
44308     wget -O $tmpfile $with_builddeps_server/$resource
44309   fi
44310   if test "x$BDEPS_FTP" = xlftp; then
44311     VALID_TOOL=yes
44312     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44313   fi
44314   if test "x$BDEPS_FTP" = xftp; then
44315     VALID_TOOL=yes
44316     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44317     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44318     FTPUSERPWD=${FTPSERVER%%@*}
44319     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44320       FTPUSER=${userpwd%%:*}
44321       FTPPWD=${userpwd#*@}
44322       FTPSERVER=${FTPSERVER#*@}
44323     else
44324       FTPUSER=ftp
44325       FTPPWD=ftp
44326     fi
44327     # the "pass" command does not work on some
44328     # ftp clients (read ftp.exe) but if it works,
44329     # passive mode is better!
44330     ( \
44331         echo "user $FTPUSER $FTPPWD"        ; \
44332         echo "pass"                         ; \
44333         echo "bin"                          ; \
44334         echo "get $FTPPATH $tmpfile"              ; \
44335     ) | ftp -in $FTPSERVER
44336   fi
44337   if test "x$VALID_TOOL" != xyes; then
44338     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44339   fi
44340 
44341     mv $tmpfile $installdir/$filename
44342     if test ! -s $installdir/$filename; then
44343       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44344     fi
44345     case "$extension" in
44346       zip)  echo "Unzipping $installdir/$filename..."
44347         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44348         ;;
44349       tar.gz) echo "Untaring $installdir/$filename..."
44350         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44351         ;;
44352       tgz) echo "Untaring $installdir/$filename..."
44353         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44354         ;;
44355       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44356         ;;
44357     esac
44358   fi
44359   if test -f $installdir/$filename.unpacked; then
44360     depdir=$installdir
44361   fi
44362 
44363       fi
44364       # Source the builddeps file again, because in the previous command, the depdir
44365       # was updated to point at the current build dependency install directory.
44366       . $builddepsfile
44367       # Now extract variables from the builddeps.conf files.
44368       theroot=${builddep_cups_ROOT}
44369       thecflags=${builddep_cups_CFLAGS}
44370       thelibs=${builddep_cups_LIBS}
44371       if test "x$depdir" = x; then
44372         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44373       fi
44374       CUPS=$depdir
44375       if test "x$theroot" != x; then
44376         CUPS="$theroot"
44377       fi
44378       if test "x$thecflags" != x; then
44379         CUPS_CFLAGS="$thecflags"
44380       fi
44381       if test "x$thelibs" != x; then
44382         CUPS_LIBS="$thelibs"
44383       fi
44384       CUPS_FOUND=yes
44385 
44386     fi
44387 
44388   fi
44389 
44390     fi
44391     if test "x$CUPS_FOUND" = xno; then
44392       # Are the cups headers installed in the default /usr/include location?
44393       for ac_header in cups/cups.h cups/ppd.h
44394 do :
44395   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44396 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44397 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44398   cat >>confdefs.h <<_ACEOF
44399 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44400 _ACEOF
44401 
44402             CUPS_FOUND=yes
44403             CUPS_CFLAGS=
44404             DEFAULT_CUPS=yes
44405 
44406 
44407 fi
44408 
44409 done
44410 
44411     fi
44412     if test "x$CUPS_FOUND" = xno; then
44413       # Getting nervous now? Lets poke around for standard Solaris third-party
44414       # package installation locations.
44415       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44416 $as_echo_n "checking for cups headers... " >&6; }
44417       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44418         # An SFW package seems to be installed!
44419         CUPS_FOUND=yes
44420         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44421       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44422         # A CSW package seems to be installed!
44423         CUPS_FOUND=yes
44424         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44425       fi
44426       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44427 $as_echo "$CUPS_FOUND" >&6; }
44428     fi
44429     if test "x$CUPS_FOUND" = xno; then
44430 
44431   # Print a helpful message on how to acquire the necessary build dependency.
44432   # cups is the help tag: freetype, cups, pulse, alsa etc
44433   MISSING_DEPENDENCY=cups
44434 
44435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44436     cygwin_help $MISSING_DEPENDENCY
44437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438     msys_help $MISSING_DEPENDENCY
44439   else
44440     PKGHANDLER_COMMAND=
44441 
44442     case $PKGHANDLER in
44443       apt-get)
44444         apt_help     $MISSING_DEPENDENCY ;;
44445       yum)
44446         yum_help     $MISSING_DEPENDENCY ;;
44447       port)
44448         port_help    $MISSING_DEPENDENCY ;;
44449       pkgutil)
44450         pkgutil_help $MISSING_DEPENDENCY ;;
44451       pkgadd)
44452         pkgadd_help  $MISSING_DEPENDENCY ;;
44453     esac
44454 
44455     if test "x$PKGHANDLER_COMMAND" != x; then
44456       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44457     fi
44458   fi
44459 
44460       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44461     fi
44462   fi
44463 
44464 
44465 
44466 
44467 
44468 
44469   ###############################################################################
44470   #
44471   # The ubiquitous freetype library is used to render fonts.
44472   #
44473 
44474 # Check whether --with-freetype was given.
44475 if test "${with_freetype+set}" = set; then :
44476   withval=$with_freetype;
44477 fi
44478 
44479 
44480 # Check whether --with-freetype-include was given.
44481 if test "${with_freetype_include+set}" = set; then :
44482   withval=$with_freetype_include;
44483 fi
44484 
44485 
44486 # Check whether --with-freetype-lib was given.
44487 if test "${with_freetype_lib+set}" = set; then :
44488   withval=$with_freetype_lib;
44489 fi
44490 
44491 
44492 # Check whether --with-freetype-src was given.
44493 if test "${with_freetype_src+set}" = set; then :
44494   withval=$with_freetype_src;
44495 fi
44496 
44497   # Check whether --enable-freetype-bundling was given.
44498 if test "${enable_freetype_bundling+set}" = set; then :
44499   enableval=$enable_freetype_bundling;
44500 fi
44501 
44502 
44503   # Need to specify explicitly since it needs to be overridden on some versions of macosx
44504   FREETYPE_BASE_NAME=freetype
44505   FREETYPE_CFLAGS=
44506   FREETYPE_LIBS=
44507   FREETYPE_BUNDLE_LIB_PATH=
44508 
44509   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44510     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44511       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44512 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44513     fi
44514     if test "x$enable_freetype_bundling" != x; then
44515       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44516 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44517     fi
44518   else
44519     # freetype is needed to build; go get it!
44520 
44521     BUNDLE_FREETYPE="$enable_freetype_bundling"
44522 
44523     if  test "x$with_freetype_src" != x; then
44524       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44525         # Try to build freetype if --with-freetype-src was given on Windows
44526 
44527   FREETYPE_SRC_PATH="$with_freetype_src"
44528   BUILD_FREETYPE=yes
44529 
44530   # Check if the freetype sources are acessible..
44531   if ! test -d $FREETYPE_SRC_PATH; then
44532     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44533 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44534     BUILD_FREETYPE=no
44535   fi
44536   # ..and contain a vc2010 project file
44537   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44538   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44539     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44540 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44541     BUILD_FREETYPE=no
44542   fi
44543   # Now check if configure found a version of 'msbuild.exe'
44544   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44545     { $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
44546 $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;}
44547     BUILD_FREETYPE=no
44548   fi
44549 
44550   # Ready to go..
44551   if test "x$BUILD_FREETYPE" = xyes; then
44552 
44553     # msbuild requires trailing slashes for output directories
44554     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44555     freetype_lib_path_unix="$freetype_lib_path"
44556     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44557 
44558   unix_path="$vcxproj_path"
44559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44560     windows_path=`$CYGPATH -m "$unix_path"`
44561     vcxproj_path="$windows_path"
44562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44563     windows_path=`cmd //c echo $unix_path`
44564     vcxproj_path="$windows_path"
44565   fi
44566 
44567 
44568   unix_path="$freetype_lib_path"
44569   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44570     windows_path=`$CYGPATH -m "$unix_path"`
44571     freetype_lib_path="$windows_path"
44572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44573     windows_path=`cmd //c echo $unix_path`
44574     freetype_lib_path="$windows_path"
44575   fi
44576 
44577 
44578   unix_path="$freetype_obj_path"
44579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44580     windows_path=`$CYGPATH -m "$unix_path"`
44581     freetype_obj_path="$windows_path"
44582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44583     windows_path=`cmd //c echo $unix_path`
44584     freetype_obj_path="$windows_path"
44585   fi
44586 
44587     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44588       freetype_platform=x64
44589     else
44590       freetype_platform=win32
44591     fi
44592 
44593     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44594     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44595     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44596     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44597     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44598 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44599 
44600     # First we try to build the freetype.dll
44601     $ECHO -e "@echo off\n"\
44602              "$MSBUILD $vcxproj_path "\
44603                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44604                        "/p:Configuration=\"Release Multithreaded\" "\
44605                        "/p:Platform=$freetype_platform "\
44606                        "/p:ConfigurationType=DynamicLibrary "\
44607                        "/p:TargetName=freetype "\
44608                        "/p:OutDir=\"$freetype_lib_path\" "\
44609                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44610     cmd /c freetype.bat
44611 
44612     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44613       # If that succeeds we also build freetype.lib
44614       $ECHO -e "@echo off\n"\
44615                "$MSBUILD $vcxproj_path "\
44616                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44617                          "/p:Configuration=\"Release Multithreaded\" "\
44618                          "/p:Platform=$freetype_platform "\
44619                          "/p:ConfigurationType=StaticLibrary "\
44620                          "/p:TargetName=freetype "\
44621                          "/p:OutDir=\"$freetype_lib_path\" "\
44622                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44623       cmd /c freetype.bat
44624 
44625       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44626         # Once we build both, lib and dll, set freetype lib and include path appropriately
44627         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44628         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44629         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44630 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44631       else
44632         BUILD_FREETYPE=no
44633       fi
44634     else
44635       BUILD_FREETYPE=no
44636     fi
44637   fi
44638 
44639         if test "x$BUILD_FREETYPE" = xyes; then
44640           # Okay, we built it. Check that it works.
44641 
44642   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44643   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44644   METHOD="--with-freetype-src"
44645 
44646   # Let's start with an optimistic view of the world :-)
44647   FOUND_FREETYPE=yes
44648 
44649   # First look for the canonical freetype main include file ft2build.h.
44650   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44651     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44652     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44653     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44654       # Fail.
44655       FOUND_FREETYPE=no
44656     fi
44657   fi
44658 
44659   if test "x$FOUND_FREETYPE" = xyes; then
44660     # Include file found, let's continue the sanity check.
44661     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44662 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44663 
44664     # Reset to default value
44665     FREETYPE_BASE_NAME=freetype
44666     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44667     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44668       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44669           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44670         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44671         # for the .6 version explicitly.
44672         FREETYPE_BASE_NAME=freetype.6
44673         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44674         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44675 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44676       else
44677         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44678 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44679         FOUND_FREETYPE=no
44680       fi
44681     else
44682       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44683         # On Windows, we will need both .lib and .dll file.
44684         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44685           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44686 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44687           FOUND_FREETYPE=no
44688         fi
44689       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44690           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44691         # Found lib in isa dir, use that instead.
44692         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44693         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44694 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44695       fi
44696     fi
44697   fi
44698 
44699   if test "x$FOUND_FREETYPE" = xyes; then
44700 
44701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44702 
44703   # Input might be given as Windows format, start by converting to
44704   # unix format.
44705   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44706   new_path=`$CYGPATH -u "$path"`
44707 
44708   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44709   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44710   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44711   # "foo.exe" is OK but "foo" is an error.
44712   #
44713   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44714   # It is also a way to make sure we got the proper file name for the real test later on.
44715   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44716   if test "x$test_shortpath" = x; then
44717     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44718 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44719     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44720   fi
44721 
44722   # Call helper function which possibly converts this using DOS-style short mode.
44723   # If so, the updated path is stored in $new_path.
44724 
44725   input_path="$new_path"
44726   # Check if we need to convert this using DOS-style short mode. If the path
44727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44728   # take no chances and rewrite it.
44729   # Note: m4 eats our [], so we need to use [ and ] instead.
44730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44731   if test "x$has_forbidden_chars" != x; then
44732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44733     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44734     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44735     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44736       # Going to short mode and back again did indeed matter. Since short mode is
44737       # case insensitive, let's make it lowercase to improve readability.
44738       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44739       # Now convert it back to Unix-stile (cygpath)
44740       input_path=`$CYGPATH -u "$shortmode_path"`
44741       new_path="$input_path"
44742     fi
44743   fi
44744 
44745   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44746   if test "x$test_cygdrive_prefix" = x; then
44747     # As a simple fix, exclude /usr/bin since it's not a real path.
44748     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44749       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44750       # a path prefixed by /cygdrive for fixpath to work.
44751       new_path="$CYGWIN_ROOT_PATH$input_path"
44752     fi
44753   fi
44754 
44755 
44756   if test "x$path" != "x$new_path"; then
44757     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44758     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44759 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44760   fi
44761 
44762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44763 
44764   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44765   has_colon=`$ECHO $path | $GREP ^.:`
44766   new_path="$path"
44767   if test "x$has_colon" = x; then
44768     # Not in mixed or Windows style, start by that.
44769     new_path=`cmd //c echo $path`
44770   fi
44771 
44772 
44773   input_path="$new_path"
44774   # Check if we need to convert this using DOS-style short mode. If the path
44775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44776   # take no chances and rewrite it.
44777   # Note: m4 eats our [], so we need to use [ and ] instead.
44778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44779   if test "x$has_forbidden_chars" != x; then
44780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44781     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44782   fi
44783 
44784 
44785   windows_path="$new_path"
44786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44787     unix_path=`$CYGPATH -u "$windows_path"`
44788     new_path="$unix_path"
44789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44791     new_path="$unix_path"
44792   fi
44793 
44794   if test "x$path" != "x$new_path"; then
44795     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44796     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44797 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44798   fi
44799 
44800   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44801   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44802 
44803   else
44804     # We're on a unix platform. Hooray! :)
44805     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44806     has_space=`$ECHO "$path" | $GREP " "`
44807     if test "x$has_space" != x; then
44808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44809 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44810       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44811     fi
44812 
44813     # Use eval to expand a potential ~
44814     eval path="$path"
44815     if test ! -f "$path" && test ! -d "$path"; then
44816       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44817     fi
44818 
44819     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44820   fi
44821 
44822 
44823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44824 
44825   # Input might be given as Windows format, start by converting to
44826   # unix format.
44827   path="$POTENTIAL_FREETYPE_LIB_PATH"
44828   new_path=`$CYGPATH -u "$path"`
44829 
44830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44833   # "foo.exe" is OK but "foo" is an error.
44834   #
44835   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44836   # It is also a way to make sure we got the proper file name for the real test later on.
44837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44838   if test "x$test_shortpath" = x; then
44839     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44840 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44841     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44842   fi
44843 
44844   # Call helper function which possibly converts this using DOS-style short mode.
44845   # If so, the updated path is stored in $new_path.
44846 
44847   input_path="$new_path"
44848   # Check if we need to convert this using DOS-style short mode. If the path
44849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44850   # take no chances and rewrite it.
44851   # Note: m4 eats our [], so we need to use [ and ] instead.
44852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44853   if test "x$has_forbidden_chars" != x; then
44854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44858       # Going to short mode and back again did indeed matter. Since short mode is
44859       # case insensitive, let's make it lowercase to improve readability.
44860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44861       # Now convert it back to Unix-stile (cygpath)
44862       input_path=`$CYGPATH -u "$shortmode_path"`
44863       new_path="$input_path"
44864     fi
44865   fi
44866 
44867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44868   if test "x$test_cygdrive_prefix" = x; then
44869     # As a simple fix, exclude /usr/bin since it's not a real path.
44870     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44872       # a path prefixed by /cygdrive for fixpath to work.
44873       new_path="$CYGWIN_ROOT_PATH$input_path"
44874     fi
44875   fi
44876 
44877 
44878   if test "x$path" != "x$new_path"; then
44879     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44881 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44882   fi
44883 
44884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44885 
44886   path="$POTENTIAL_FREETYPE_LIB_PATH"
44887   has_colon=`$ECHO $path | $GREP ^.:`
44888   new_path="$path"
44889   if test "x$has_colon" = x; then
44890     # Not in mixed or Windows style, start by that.
44891     new_path=`cmd //c echo $path`
44892   fi
44893 
44894 
44895   input_path="$new_path"
44896   # Check if we need to convert this using DOS-style short mode. If the path
44897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44898   # take no chances and rewrite it.
44899   # Note: m4 eats our [], so we need to use [ and ] instead.
44900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44901   if test "x$has_forbidden_chars" != x; then
44902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44904   fi
44905 
44906 
44907   windows_path="$new_path"
44908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44909     unix_path=`$CYGPATH -u "$windows_path"`
44910     new_path="$unix_path"
44911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44913     new_path="$unix_path"
44914   fi
44915 
44916   if test "x$path" != "x$new_path"; then
44917     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44919 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44920   fi
44921 
44922   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44923   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44924 
44925   else
44926     # We're on a unix platform. Hooray! :)
44927     path="$POTENTIAL_FREETYPE_LIB_PATH"
44928     has_space=`$ECHO "$path" | $GREP " "`
44929     if test "x$has_space" != x; then
44930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44931 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44932       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44933     fi
44934 
44935     # Use eval to expand a potential ~
44936     eval path="$path"
44937     if test ! -f "$path" && test ! -d "$path"; then
44938       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44939     fi
44940 
44941     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44942   fi
44943 
44944 
44945     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44946     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44947 $as_echo_n "checking for freetype includes... " >&6; }
44948     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44949 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44950     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44952 $as_echo_n "checking for freetype libraries... " >&6; }
44953     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44954 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44955   fi
44956 
44957           if test "x$FOUND_FREETYPE" != xyes; then
44958             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44959           fi
44960         else
44961           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44962 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44963           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44964         fi
44965       else
44966         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44967 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44968       fi
44969     fi
44970 
44971     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44972       # User has specified settings
44973 
44974       if test "x$BUNDLE_FREETYPE" = x; then
44975         # If not specified, default is to bundle freetype
44976         BUNDLE_FREETYPE=yes
44977       fi
44978 
44979       if test "x$with_freetype" != x; then
44980         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44981         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44982       fi
44983 
44984       # Allow --with-freetype-lib and --with-freetype-include to override
44985       if test "x$with_freetype_include" != x; then
44986         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44987       fi
44988       if test "x$with_freetype_lib" != x; then
44989         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44990       fi
44991 
44992       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44993         # Okay, we got it. Check that it works.
44994 
44995   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44996   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44997   METHOD="--with-freetype"
44998 
44999   # Let's start with an optimistic view of the world :-)
45000   FOUND_FREETYPE=yes
45001 
45002   # First look for the canonical freetype main include file ft2build.h.
45003   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45004     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45005     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45006     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45007       # Fail.
45008       FOUND_FREETYPE=no
45009     fi
45010   fi
45011 
45012   if test "x$FOUND_FREETYPE" = xyes; then
45013     # Include file found, let's continue the sanity check.
45014     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45015 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45016 
45017     # Reset to default value
45018     FREETYPE_BASE_NAME=freetype
45019     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45020     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45021       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45022           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45023         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45024         # for the .6 version explicitly.
45025         FREETYPE_BASE_NAME=freetype.6
45026         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45027         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45028 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45029       else
45030         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45031 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45032         FOUND_FREETYPE=no
45033       fi
45034     else
45035       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45036         # On Windows, we will need both .lib and .dll file.
45037         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45038           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45039 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45040           FOUND_FREETYPE=no
45041         fi
45042       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45043           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45044         # Found lib in isa dir, use that instead.
45045         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45046         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45047 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45048       fi
45049     fi
45050   fi
45051 
45052   if test "x$FOUND_FREETYPE" = xyes; then
45053 
45054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45055 
45056   # Input might be given as Windows format, start by converting to
45057   # unix format.
45058   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45059   new_path=`$CYGPATH -u "$path"`
45060 
45061   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45062   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45063   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45064   # "foo.exe" is OK but "foo" is an error.
45065   #
45066   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45067   # It is also a way to make sure we got the proper file name for the real test later on.
45068   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45069   if test "x$test_shortpath" = x; then
45070     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45072     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45073   fi
45074 
45075   # Call helper function which possibly converts this using DOS-style short mode.
45076   # If so, the updated path is stored in $new_path.
45077 
45078   input_path="$new_path"
45079   # Check if we need to convert this using DOS-style short mode. If the path
45080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45081   # take no chances and rewrite it.
45082   # Note: m4 eats our [], so we need to use [ and ] instead.
45083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45084   if test "x$has_forbidden_chars" != x; then
45085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45086     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45087     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45088     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45089       # Going to short mode and back again did indeed matter. Since short mode is
45090       # case insensitive, let's make it lowercase to improve readability.
45091       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45092       # Now convert it back to Unix-stile (cygpath)
45093       input_path=`$CYGPATH -u "$shortmode_path"`
45094       new_path="$input_path"
45095     fi
45096   fi
45097 
45098   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45099   if test "x$test_cygdrive_prefix" = x; then
45100     # As a simple fix, exclude /usr/bin since it's not a real path.
45101     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45102       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45103       # a path prefixed by /cygdrive for fixpath to work.
45104       new_path="$CYGWIN_ROOT_PATH$input_path"
45105     fi
45106   fi
45107 
45108 
45109   if test "x$path" != "x$new_path"; then
45110     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45112 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45113   fi
45114 
45115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45116 
45117   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45118   has_colon=`$ECHO $path | $GREP ^.:`
45119   new_path="$path"
45120   if test "x$has_colon" = x; then
45121     # Not in mixed or Windows style, start by that.
45122     new_path=`cmd //c echo $path`
45123   fi
45124 
45125 
45126   input_path="$new_path"
45127   # Check if we need to convert this using DOS-style short mode. If the path
45128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45129   # take no chances and rewrite it.
45130   # Note: m4 eats our [], so we need to use [ and ] instead.
45131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45132   if test "x$has_forbidden_chars" != x; then
45133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45134     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45135   fi
45136 
45137 
45138   windows_path="$new_path"
45139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45140     unix_path=`$CYGPATH -u "$windows_path"`
45141     new_path="$unix_path"
45142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45144     new_path="$unix_path"
45145   fi
45146 
45147   if test "x$path" != "x$new_path"; then
45148     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45150 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45151   fi
45152 
45153   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45154   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45155 
45156   else
45157     # We're on a unix platform. Hooray! :)
45158     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45159     has_space=`$ECHO "$path" | $GREP " "`
45160     if test "x$has_space" != x; then
45161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45162 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45163       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45164     fi
45165 
45166     # Use eval to expand a potential ~
45167     eval path="$path"
45168     if test ! -f "$path" && test ! -d "$path"; then
45169       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45170     fi
45171 
45172     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45173   fi
45174 
45175 
45176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45177 
45178   # Input might be given as Windows format, start by converting to
45179   # unix format.
45180   path="$POTENTIAL_FREETYPE_LIB_PATH"
45181   new_path=`$CYGPATH -u "$path"`
45182 
45183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45186   # "foo.exe" is OK but "foo" is an error.
45187   #
45188   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45189   # It is also a way to make sure we got the proper file name for the real test later on.
45190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45191   if test "x$test_shortpath" = x; then
45192     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45193 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45194     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45195   fi
45196 
45197   # Call helper function which possibly converts this using DOS-style short mode.
45198   # If so, the updated path is stored in $new_path.
45199 
45200   input_path="$new_path"
45201   # Check if we need to convert this using DOS-style short mode. If the path
45202   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45203   # take no chances and rewrite it.
45204   # Note: m4 eats our [], so we need to use [ and ] instead.
45205   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45206   if test "x$has_forbidden_chars" != x; then
45207     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45208     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45209     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45210     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45211       # Going to short mode and back again did indeed matter. Since short mode is
45212       # case insensitive, let's make it lowercase to improve readability.
45213       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45214       # Now convert it back to Unix-stile (cygpath)
45215       input_path=`$CYGPATH -u "$shortmode_path"`
45216       new_path="$input_path"
45217     fi
45218   fi
45219 
45220   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45221   if test "x$test_cygdrive_prefix" = x; then
45222     # As a simple fix, exclude /usr/bin since it's not a real path.
45223     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45224       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45225       # a path prefixed by /cygdrive for fixpath to work.
45226       new_path="$CYGWIN_ROOT_PATH$input_path"
45227     fi
45228   fi
45229 
45230 
45231   if test "x$path" != "x$new_path"; then
45232     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45234 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45235   fi
45236 
45237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45238 
45239   path="$POTENTIAL_FREETYPE_LIB_PATH"
45240   has_colon=`$ECHO $path | $GREP ^.:`
45241   new_path="$path"
45242   if test "x$has_colon" = x; then
45243     # Not in mixed or Windows style, start by that.
45244     new_path=`cmd //c echo $path`
45245   fi
45246 
45247 
45248   input_path="$new_path"
45249   # Check if we need to convert this using DOS-style short mode. If the path
45250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45251   # take no chances and rewrite it.
45252   # Note: m4 eats our [], so we need to use [ and ] instead.
45253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45254   if test "x$has_forbidden_chars" != x; then
45255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45256     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45257   fi
45258 
45259 
45260   windows_path="$new_path"
45261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45262     unix_path=`$CYGPATH -u "$windows_path"`
45263     new_path="$unix_path"
45264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45266     new_path="$unix_path"
45267   fi
45268 
45269   if test "x$path" != "x$new_path"; then
45270     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45272 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45273   fi
45274 
45275   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45276   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45277 
45278   else
45279     # We're on a unix platform. Hooray! :)
45280     path="$POTENTIAL_FREETYPE_LIB_PATH"
45281     has_space=`$ECHO "$path" | $GREP " "`
45282     if test "x$has_space" != x; then
45283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45284 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45285       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45286     fi
45287 
45288     # Use eval to expand a potential ~
45289     eval path="$path"
45290     if test ! -f "$path" && test ! -d "$path"; then
45291       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45292     fi
45293 
45294     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45295   fi
45296 
45297 
45298     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45300 $as_echo_n "checking for freetype includes... " >&6; }
45301     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45302 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45303     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45304     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45305 $as_echo_n "checking for freetype libraries... " >&6; }
45306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45307 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45308   fi
45309 
45310         if test "x$FOUND_FREETYPE" != xyes; then
45311           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45312         fi
45313       else
45314         # User specified only one of lib or include. This is an error.
45315         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45316           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45317 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45318           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45319         else
45320           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45321 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45322           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45323         fi
45324       fi
45325     else
45326       # User did not specify settings, but we need freetype. Try to locate it.
45327 
45328       if test "x$BUNDLE_FREETYPE" = x; then
45329         # If not specified, default is to bundle freetype only on windows
45330         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45331           BUNDLE_FREETYPE=yes
45332         else
45333           BUNDLE_FREETYPE=no
45334         fi
45335       fi
45336 
45337       if test "x$FOUND_FREETYPE" != xyes; then
45338         # Check builddeps
45339 
45340 
45341   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45342     # Source the builddeps file again, to make sure it uses the latest variables!
45343     . $builddepsfile
45344     # Look for a target and build machine specific resource!
45345     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45346     if test "x$resource" = x; then
45347       # Ok, lets instead look for a target specific resource
45348       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45349     fi
45350     if test "x$resource" = x; then
45351       # Ok, lets instead look for a build specific resource
45352       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45353     fi
45354     if test "x$resource" = x; then
45355       # Ok, lets instead look for a generic resource
45356       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45357       resource=${builddep_freetype2}
45358     fi
45359     if test "x$resource" != x; then
45360       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45361 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45362       # If the resource in the builddeps.conf file is an existing directory,
45363       # for example /java/linux/cups
45364       if test -d ${resource}; then
45365         depdir=${resource}
45366       else
45367 
45368   # freetype2 is for example mymodule
45369   # $resource is for example libs/general/libmymod_1_2_3.zip
45370   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45371   # $with_builddeps_dir is for example /localhome/builddeps
45372   # depdir is the name of the variable into which we store the depdir, eg MYMOD
45373   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45374   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45375   filename=`basename $resource`
45376   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45377   filebase=${filename%%.*}
45378   extension=${filename#*.}
45379   installdir=$with_builddeps_dir/$filebase
45380   if test ! -f $installdir/$filename.unpacked; then
45381     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45382 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45383     if test ! -d $installdir; then
45384       mkdir -p $installdir
45385     fi
45386     if test ! -d $installdir; then
45387       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45388     fi
45389     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45390     touch $tmpfile
45391     if test ! -f $tmpfile; then
45392       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45393     fi
45394 
45395   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45396   # $tmpfile is the local file name for the downloaded file.
45397   VALID_TOOL=no
45398   if test "x$BDEPS_FTP" = xwget; then
45399     VALID_TOOL=yes
45400     wget -O $tmpfile $with_builddeps_server/$resource
45401   fi
45402   if test "x$BDEPS_FTP" = xlftp; then
45403     VALID_TOOL=yes
45404     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45405   fi
45406   if test "x$BDEPS_FTP" = xftp; then
45407     VALID_TOOL=yes
45408     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45409     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45410     FTPUSERPWD=${FTPSERVER%%@*}
45411     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45412       FTPUSER=${userpwd%%:*}
45413       FTPPWD=${userpwd#*@}
45414       FTPSERVER=${FTPSERVER#*@}
45415     else
45416       FTPUSER=ftp
45417       FTPPWD=ftp
45418     fi
45419     # the "pass" command does not work on some
45420     # ftp clients (read ftp.exe) but if it works,
45421     # passive mode is better!
45422     ( \
45423         echo "user $FTPUSER $FTPPWD"        ; \
45424         echo "pass"                         ; \
45425         echo "bin"                          ; \
45426         echo "get $FTPPATH $tmpfile"              ; \
45427     ) | ftp -in $FTPSERVER
45428   fi
45429   if test "x$VALID_TOOL" != xyes; then
45430     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45431   fi
45432 
45433     mv $tmpfile $installdir/$filename
45434     if test ! -s $installdir/$filename; then
45435       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45436     fi
45437     case "$extension" in
45438       zip)  echo "Unzipping $installdir/$filename..."
45439         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45440         ;;
45441       tar.gz) echo "Untaring $installdir/$filename..."
45442         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45443         ;;
45444       tgz) echo "Untaring $installdir/$filename..."
45445         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45446         ;;
45447       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45448         ;;
45449     esac
45450   fi
45451   if test -f $installdir/$filename.unpacked; then
45452     depdir=$installdir
45453   fi
45454 
45455       fi
45456       # Source the builddeps file again, because in the previous command, the depdir
45457       # was updated to point at the current build dependency install directory.
45458       . $builddepsfile
45459       # Now extract variables from the builddeps.conf files.
45460       theroot=${builddep_freetype2_ROOT}
45461       thecflags=${builddep_freetype2_CFLAGS}
45462       thelibs=${builddep_freetype2_LIBS}
45463       if test "x$depdir" = x; then
45464         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45465       fi
45466       FREETYPE=$depdir
45467       if test "x$theroot" != x; then
45468         FREETYPE="$theroot"
45469       fi
45470       if test "x$thecflags" != x; then
45471         FREETYPE_CFLAGS="$thecflags"
45472       fi
45473       if test "x$thelibs" != x; then
45474         FREETYPE_LIBS="$thelibs"
45475       fi
45476       FOUND_FREETYPE=yes
45477       else FOUND_FREETYPE=no
45478 
45479     fi
45480     else FOUND_FREETYPE=no
45481 
45482   fi
45483 
45484         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45485         if test "x$FOUND_FREETYPE" = xyes; then
45486           if test "x$BUNDLE_FREETYPE" = xyes; then
45487             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45488 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45489             FOUND_FREETYPE=no
45490           else
45491             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45492 $as_echo_n "checking for freetype... " >&6; }
45493             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45494 $as_echo "yes (using builddeps)" >&6; }
45495           fi
45496         fi
45497       fi
45498 
45499       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45500       if test "x$SYSROOT" = x; then
45501         if test "x$FOUND_FREETYPE" != xyes; then
45502           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45503           if test "x$PKG_CONFIG" != x; then
45504 
45505 pkg_failed=no
45506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45507 $as_echo_n "checking for FREETYPE... " >&6; }
45508 
45509 if test -n "$FREETYPE_CFLAGS"; then
45510     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45511  elif test -n "$PKG_CONFIG"; then
45512     if test -n "$PKG_CONFIG" && \
45513     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45514   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45515   ac_status=$?
45516   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45517   test $ac_status = 0; }; then
45518   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45519 else
45520   pkg_failed=yes
45521 fi
45522  else
45523     pkg_failed=untried
45524 fi
45525 if test -n "$FREETYPE_LIBS"; then
45526     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45527  elif test -n "$PKG_CONFIG"; then
45528     if test -n "$PKG_CONFIG" && \
45529     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45530   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45531   ac_status=$?
45532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45533   test $ac_status = 0; }; then
45534   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45535 else
45536   pkg_failed=yes
45537 fi
45538  else
45539     pkg_failed=untried
45540 fi
45541 
45542 
45543 
45544 if test $pkg_failed = yes; then
45545 
45546 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45547         _pkg_short_errors_supported=yes
45548 else
45549         _pkg_short_errors_supported=no
45550 fi
45551         if test $_pkg_short_errors_supported = yes; then
45552                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45553         else
45554                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45555         fi
45556         # Put the nasty error message in config.log where it belongs
45557         echo "$FREETYPE_PKG_ERRORS" >&5
45558 
45559         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45560 $as_echo "no" >&6; }
45561                 FOUND_FREETYPE=no
45562 elif test $pkg_failed = untried; then
45563         FOUND_FREETYPE=no
45564 else
45565         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45566         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45567         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45568 $as_echo "yes" >&6; }
45569         FOUND_FREETYPE=yes
45570 fi
45571             if test "x$FOUND_FREETYPE" = xyes; then
45572               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45573               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45574               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45575               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45576                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45577               fi
45578               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45579               if test "x$BUNDLE_FREETYPE" = xyes; then
45580                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45581 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45582                 FOUND_FREETYPE=no
45583               else
45584                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45585 $as_echo_n "checking for freetype... " >&6; }
45586                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45587 $as_echo "yes (using pkg-config)" >&6; }
45588               fi
45589             fi
45590           fi
45591         fi
45592       fi
45593 
45594       if test "x$FOUND_FREETYPE" != xyes; then
45595         # Check in well-known locations
45596         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45597           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45598 
45599   windows_path="$FREETYPE_BASE_DIR"
45600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45601     unix_path=`$CYGPATH -u "$windows_path"`
45602     FREETYPE_BASE_DIR="$unix_path"
45603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45605     FREETYPE_BASE_DIR="$unix_path"
45606   fi
45607 
45608 
45609   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45610   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45611   METHOD="well-known location"
45612 
45613   # Let's start with an optimistic view of the world :-)
45614   FOUND_FREETYPE=yes
45615 
45616   # First look for the canonical freetype main include file ft2build.h.
45617   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45618     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45619     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45620     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45621       # Fail.
45622       FOUND_FREETYPE=no
45623     fi
45624   fi
45625 
45626   if test "x$FOUND_FREETYPE" = xyes; then
45627     # Include file found, let's continue the sanity check.
45628     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45629 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45630 
45631     # Reset to default value
45632     FREETYPE_BASE_NAME=freetype
45633     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45634     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45635       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45636           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45637         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45638         # for the .6 version explicitly.
45639         FREETYPE_BASE_NAME=freetype.6
45640         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45641         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45642 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45643       else
45644         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45645 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45646         FOUND_FREETYPE=no
45647       fi
45648     else
45649       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45650         # On Windows, we will need both .lib and .dll file.
45651         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45652           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45653 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45654           FOUND_FREETYPE=no
45655         fi
45656       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45657           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45658         # Found lib in isa dir, use that instead.
45659         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45660         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45661 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45662       fi
45663     fi
45664   fi
45665 
45666   if test "x$FOUND_FREETYPE" = xyes; then
45667 
45668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45669 
45670   # Input might be given as Windows format, start by converting to
45671   # unix format.
45672   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45673   new_path=`$CYGPATH -u "$path"`
45674 
45675   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45676   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45677   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45678   # "foo.exe" is OK but "foo" is an error.
45679   #
45680   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45681   # It is also a way to make sure we got the proper file name for the real test later on.
45682   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45683   if test "x$test_shortpath" = x; then
45684     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45685 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45686     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45687   fi
45688 
45689   # Call helper function which possibly converts this using DOS-style short mode.
45690   # If so, the updated path is stored in $new_path.
45691 
45692   input_path="$new_path"
45693   # Check if we need to convert this using DOS-style short mode. If the path
45694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45695   # take no chances and rewrite it.
45696   # Note: m4 eats our [], so we need to use [ and ] instead.
45697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45698   if test "x$has_forbidden_chars" != x; then
45699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45700     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45701     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45702     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45703       # Going to short mode and back again did indeed matter. Since short mode is
45704       # case insensitive, let's make it lowercase to improve readability.
45705       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45706       # Now convert it back to Unix-stile (cygpath)
45707       input_path=`$CYGPATH -u "$shortmode_path"`
45708       new_path="$input_path"
45709     fi
45710   fi
45711 
45712   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45713   if test "x$test_cygdrive_prefix" = x; then
45714     # As a simple fix, exclude /usr/bin since it's not a real path.
45715     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45716       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45717       # a path prefixed by /cygdrive for fixpath to work.
45718       new_path="$CYGWIN_ROOT_PATH$input_path"
45719     fi
45720   fi
45721 
45722 
45723   if test "x$path" != "x$new_path"; then
45724     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45726 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45727   fi
45728 
45729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45730 
45731   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45732   has_colon=`$ECHO $path | $GREP ^.:`
45733   new_path="$path"
45734   if test "x$has_colon" = x; then
45735     # Not in mixed or Windows style, start by that.
45736     new_path=`cmd //c echo $path`
45737   fi
45738 
45739 
45740   input_path="$new_path"
45741   # Check if we need to convert this using DOS-style short mode. If the path
45742   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45743   # take no chances and rewrite it.
45744   # Note: m4 eats our [], so we need to use [ and ] instead.
45745   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45746   if test "x$has_forbidden_chars" != x; then
45747     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45748     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45749   fi
45750 
45751 
45752   windows_path="$new_path"
45753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45754     unix_path=`$CYGPATH -u "$windows_path"`
45755     new_path="$unix_path"
45756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45758     new_path="$unix_path"
45759   fi
45760 
45761   if test "x$path" != "x$new_path"; then
45762     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45763     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45764 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45765   fi
45766 
45767   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45768   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45769 
45770   else
45771     # We're on a unix platform. Hooray! :)
45772     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45773     has_space=`$ECHO "$path" | $GREP " "`
45774     if test "x$has_space" != x; then
45775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45776 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45777       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45778     fi
45779 
45780     # Use eval to expand a potential ~
45781     eval path="$path"
45782     if test ! -f "$path" && test ! -d "$path"; then
45783       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45784     fi
45785 
45786     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45787   fi
45788 
45789 
45790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45791 
45792   # Input might be given as Windows format, start by converting to
45793   # unix format.
45794   path="$POTENTIAL_FREETYPE_LIB_PATH"
45795   new_path=`$CYGPATH -u "$path"`
45796 
45797   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45798   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45799   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45800   # "foo.exe" is OK but "foo" is an error.
45801   #
45802   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45803   # It is also a way to make sure we got the proper file name for the real test later on.
45804   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45805   if test "x$test_shortpath" = x; then
45806     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45807 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45808     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45809   fi
45810 
45811   # Call helper function which possibly converts this using DOS-style short mode.
45812   # If so, the updated path is stored in $new_path.
45813 
45814   input_path="$new_path"
45815   # Check if we need to convert this using DOS-style short mode. If the path
45816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45817   # take no chances and rewrite it.
45818   # Note: m4 eats our [], so we need to use [ and ] instead.
45819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45820   if test "x$has_forbidden_chars" != x; then
45821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45825       # Going to short mode and back again did indeed matter. Since short mode is
45826       # case insensitive, let's make it lowercase to improve readability.
45827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45828       # Now convert it back to Unix-stile (cygpath)
45829       input_path=`$CYGPATH -u "$shortmode_path"`
45830       new_path="$input_path"
45831     fi
45832   fi
45833 
45834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45835   if test "x$test_cygdrive_prefix" = x; then
45836     # As a simple fix, exclude /usr/bin since it's not a real path.
45837     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45839       # a path prefixed by /cygdrive for fixpath to work.
45840       new_path="$CYGWIN_ROOT_PATH$input_path"
45841     fi
45842   fi
45843 
45844 
45845   if test "x$path" != "x$new_path"; then
45846     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45848 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45849   fi
45850 
45851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45852 
45853   path="$POTENTIAL_FREETYPE_LIB_PATH"
45854   has_colon=`$ECHO $path | $GREP ^.:`
45855   new_path="$path"
45856   if test "x$has_colon" = x; then
45857     # Not in mixed or Windows style, start by that.
45858     new_path=`cmd //c echo $path`
45859   fi
45860 
45861 
45862   input_path="$new_path"
45863   # Check if we need to convert this using DOS-style short mode. If the path
45864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45865   # take no chances and rewrite it.
45866   # Note: m4 eats our [], so we need to use [ and ] instead.
45867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45868   if test "x$has_forbidden_chars" != x; then
45869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45871   fi
45872 
45873 
45874   windows_path="$new_path"
45875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45876     unix_path=`$CYGPATH -u "$windows_path"`
45877     new_path="$unix_path"
45878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45880     new_path="$unix_path"
45881   fi
45882 
45883   if test "x$path" != "x$new_path"; then
45884     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45886 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45887   fi
45888 
45889   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45890   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45891 
45892   else
45893     # We're on a unix platform. Hooray! :)
45894     path="$POTENTIAL_FREETYPE_LIB_PATH"
45895     has_space=`$ECHO "$path" | $GREP " "`
45896     if test "x$has_space" != x; then
45897       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45898 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45899       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45900     fi
45901 
45902     # Use eval to expand a potential ~
45903     eval path="$path"
45904     if test ! -f "$path" && test ! -d "$path"; then
45905       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45906     fi
45907 
45908     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45909   fi
45910 
45911 
45912     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45914 $as_echo_n "checking for freetype includes... " >&6; }
45915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45916 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45917     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45918     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45919 $as_echo_n "checking for freetype libraries... " >&6; }
45920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45921 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45922   fi
45923 
45924           if test "x$FOUND_FREETYPE" != xyes; then
45925             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45926 
45927   windows_path="$FREETYPE_BASE_DIR"
45928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45929     unix_path=`$CYGPATH -u "$windows_path"`
45930     FREETYPE_BASE_DIR="$unix_path"
45931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45933     FREETYPE_BASE_DIR="$unix_path"
45934   fi
45935 
45936 
45937   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45938   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45939   METHOD="well-known location"
45940 
45941   # Let's start with an optimistic view of the world :-)
45942   FOUND_FREETYPE=yes
45943 
45944   # First look for the canonical freetype main include file ft2build.h.
45945   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45946     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45947     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45948     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45949       # Fail.
45950       FOUND_FREETYPE=no
45951     fi
45952   fi
45953 
45954   if test "x$FOUND_FREETYPE" = xyes; then
45955     # Include file found, let's continue the sanity check.
45956     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45957 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45958 
45959     # Reset to default value
45960     FREETYPE_BASE_NAME=freetype
45961     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45962     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45963       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45964           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45965         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45966         # for the .6 version explicitly.
45967         FREETYPE_BASE_NAME=freetype.6
45968         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45969         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45970 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45971       else
45972         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45973 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45974         FOUND_FREETYPE=no
45975       fi
45976     else
45977       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45978         # On Windows, we will need both .lib and .dll file.
45979         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45980           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45981 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45982           FOUND_FREETYPE=no
45983         fi
45984       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45985           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45986         # Found lib in isa dir, use that instead.
45987         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45988         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45989 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45990       fi
45991     fi
45992   fi
45993 
45994   if test "x$FOUND_FREETYPE" = xyes; then
45995 
45996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45997 
45998   # Input might be given as Windows format, start by converting to
45999   # unix format.
46000   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46001   new_path=`$CYGPATH -u "$path"`
46002 
46003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46006   # "foo.exe" is OK but "foo" is an error.
46007   #
46008   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46009   # It is also a way to make sure we got the proper file name for the real test later on.
46010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46011   if test "x$test_shortpath" = x; then
46012     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46013 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46014     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46015   fi
46016 
46017   # Call helper function which possibly converts this using DOS-style short mode.
46018   # If so, the updated path is stored in $new_path.
46019 
46020   input_path="$new_path"
46021   # Check if we need to convert this using DOS-style short mode. If the path
46022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46023   # take no chances and rewrite it.
46024   # Note: m4 eats our [], so we need to use [ and ] instead.
46025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46026   if test "x$has_forbidden_chars" != x; then
46027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46028     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46029     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46030     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46031       # Going to short mode and back again did indeed matter. Since short mode is
46032       # case insensitive, let's make it lowercase to improve readability.
46033       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46034       # Now convert it back to Unix-stile (cygpath)
46035       input_path=`$CYGPATH -u "$shortmode_path"`
46036       new_path="$input_path"
46037     fi
46038   fi
46039 
46040   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46041   if test "x$test_cygdrive_prefix" = x; then
46042     # As a simple fix, exclude /usr/bin since it's not a real path.
46043     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46044       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46045       # a path prefixed by /cygdrive for fixpath to work.
46046       new_path="$CYGWIN_ROOT_PATH$input_path"
46047     fi
46048   fi
46049 
46050 
46051   if test "x$path" != "x$new_path"; then
46052     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46054 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46055   fi
46056 
46057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46058 
46059   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46060   has_colon=`$ECHO $path | $GREP ^.:`
46061   new_path="$path"
46062   if test "x$has_colon" = x; then
46063     # Not in mixed or Windows style, start by that.
46064     new_path=`cmd //c echo $path`
46065   fi
46066 
46067 
46068   input_path="$new_path"
46069   # Check if we need to convert this using DOS-style short mode. If the path
46070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46071   # take no chances and rewrite it.
46072   # Note: m4 eats our [], so we need to use [ and ] instead.
46073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46074   if test "x$has_forbidden_chars" != x; then
46075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46076     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46077   fi
46078 
46079 
46080   windows_path="$new_path"
46081   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46082     unix_path=`$CYGPATH -u "$windows_path"`
46083     new_path="$unix_path"
46084   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46085     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46086     new_path="$unix_path"
46087   fi
46088 
46089   if test "x$path" != "x$new_path"; then
46090     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46092 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46093   fi
46094 
46095   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46096   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46097 
46098   else
46099     # We're on a unix platform. Hooray! :)
46100     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46101     has_space=`$ECHO "$path" | $GREP " "`
46102     if test "x$has_space" != x; then
46103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46104 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46105       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46106     fi
46107 
46108     # Use eval to expand a potential ~
46109     eval path="$path"
46110     if test ! -f "$path" && test ! -d "$path"; then
46111       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46112     fi
46113 
46114     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46115   fi
46116 
46117 
46118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46119 
46120   # Input might be given as Windows format, start by converting to
46121   # unix format.
46122   path="$POTENTIAL_FREETYPE_LIB_PATH"
46123   new_path=`$CYGPATH -u "$path"`
46124 
46125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46128   # "foo.exe" is OK but "foo" is an error.
46129   #
46130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46131   # It is also a way to make sure we got the proper file name for the real test later on.
46132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46133   if test "x$test_shortpath" = x; then
46134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46135 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46136     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46137   fi
46138 
46139   # Call helper function which possibly converts this using DOS-style short mode.
46140   # If so, the updated path is stored in $new_path.
46141 
46142   input_path="$new_path"
46143   # Check if we need to convert this using DOS-style short mode. If the path
46144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46145   # take no chances and rewrite it.
46146   # Note: m4 eats our [], so we need to use [ and ] instead.
46147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46148   if test "x$has_forbidden_chars" != x; then
46149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46153       # Going to short mode and back again did indeed matter. Since short mode is
46154       # case insensitive, let's make it lowercase to improve readability.
46155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46156       # Now convert it back to Unix-stile (cygpath)
46157       input_path=`$CYGPATH -u "$shortmode_path"`
46158       new_path="$input_path"
46159     fi
46160   fi
46161 
46162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46163   if test "x$test_cygdrive_prefix" = x; then
46164     # As a simple fix, exclude /usr/bin since it's not a real path.
46165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46167       # a path prefixed by /cygdrive for fixpath to work.
46168       new_path="$CYGWIN_ROOT_PATH$input_path"
46169     fi
46170   fi
46171 
46172 
46173   if test "x$path" != "x$new_path"; then
46174     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46176 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46177   fi
46178 
46179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46180 
46181   path="$POTENTIAL_FREETYPE_LIB_PATH"
46182   has_colon=`$ECHO $path | $GREP ^.:`
46183   new_path="$path"
46184   if test "x$has_colon" = x; then
46185     # Not in mixed or Windows style, start by that.
46186     new_path=`cmd //c echo $path`
46187   fi
46188 
46189 
46190   input_path="$new_path"
46191   # Check if we need to convert this using DOS-style short mode. If the path
46192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46193   # take no chances and rewrite it.
46194   # Note: m4 eats our [], so we need to use [ and ] instead.
46195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46196   if test "x$has_forbidden_chars" != x; then
46197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46199   fi
46200 
46201 
46202   windows_path="$new_path"
46203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46204     unix_path=`$CYGPATH -u "$windows_path"`
46205     new_path="$unix_path"
46206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46208     new_path="$unix_path"
46209   fi
46210 
46211   if test "x$path" != "x$new_path"; then
46212     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46214 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46215   fi
46216 
46217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46219 
46220   else
46221     # We're on a unix platform. Hooray! :)
46222     path="$POTENTIAL_FREETYPE_LIB_PATH"
46223     has_space=`$ECHO "$path" | $GREP " "`
46224     if test "x$has_space" != x; then
46225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46226 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46227       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46228     fi
46229 
46230     # Use eval to expand a potential ~
46231     eval path="$path"
46232     if test ! -f "$path" && test ! -d "$path"; then
46233       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46234     fi
46235 
46236     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46237   fi
46238 
46239 
46240     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46242 $as_echo_n "checking for freetype includes... " >&6; }
46243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46244 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46245     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46247 $as_echo_n "checking for freetype libraries... " >&6; }
46248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46249 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46250   fi
46251 
46252           fi
46253         else
46254           FREETYPE_BASE_DIR="$SYSROOT/usr"
46255 
46256   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46257   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46258   METHOD="well-known location"
46259 
46260   # Let's start with an optimistic view of the world :-)
46261   FOUND_FREETYPE=yes
46262 
46263   # First look for the canonical freetype main include file ft2build.h.
46264   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46265     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46266     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46267     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46268       # Fail.
46269       FOUND_FREETYPE=no
46270     fi
46271   fi
46272 
46273   if test "x$FOUND_FREETYPE" = xyes; then
46274     # Include file found, let's continue the sanity check.
46275     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46276 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46277 
46278     # Reset to default value
46279     FREETYPE_BASE_NAME=freetype
46280     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46281     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46282       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46283           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46284         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46285         # for the .6 version explicitly.
46286         FREETYPE_BASE_NAME=freetype.6
46287         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46288         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46289 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46290       else
46291         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46292 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46293         FOUND_FREETYPE=no
46294       fi
46295     else
46296       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46297         # On Windows, we will need both .lib and .dll file.
46298         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46299           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46300 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46301           FOUND_FREETYPE=no
46302         fi
46303       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46304           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46305         # Found lib in isa dir, use that instead.
46306         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46307         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46308 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46309       fi
46310     fi
46311   fi
46312 
46313   if test "x$FOUND_FREETYPE" = xyes; then
46314 
46315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46316 
46317   # Input might be given as Windows format, start by converting to
46318   # unix format.
46319   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46320   new_path=`$CYGPATH -u "$path"`
46321 
46322   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46323   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46324   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46325   # "foo.exe" is OK but "foo" is an error.
46326   #
46327   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46328   # It is also a way to make sure we got the proper file name for the real test later on.
46329   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46330   if test "x$test_shortpath" = x; then
46331     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46332 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46333     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46334   fi
46335 
46336   # Call helper function which possibly converts this using DOS-style short mode.
46337   # If so, the updated path is stored in $new_path.
46338 
46339   input_path="$new_path"
46340   # Check if we need to convert this using DOS-style short mode. If the path
46341   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46342   # take no chances and rewrite it.
46343   # Note: m4 eats our [], so we need to use [ and ] instead.
46344   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46345   if test "x$has_forbidden_chars" != x; then
46346     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46347     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46348     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46349     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46350       # Going to short mode and back again did indeed matter. Since short mode is
46351       # case insensitive, let's make it lowercase to improve readability.
46352       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46353       # Now convert it back to Unix-stile (cygpath)
46354       input_path=`$CYGPATH -u "$shortmode_path"`
46355       new_path="$input_path"
46356     fi
46357   fi
46358 
46359   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46360   if test "x$test_cygdrive_prefix" = x; then
46361     # As a simple fix, exclude /usr/bin since it's not a real path.
46362     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46363       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46364       # a path prefixed by /cygdrive for fixpath to work.
46365       new_path="$CYGWIN_ROOT_PATH$input_path"
46366     fi
46367   fi
46368 
46369 
46370   if test "x$path" != "x$new_path"; then
46371     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46373 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46374   fi
46375 
46376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46377 
46378   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46379   has_colon=`$ECHO $path | $GREP ^.:`
46380   new_path="$path"
46381   if test "x$has_colon" = x; then
46382     # Not in mixed or Windows style, start by that.
46383     new_path=`cmd //c echo $path`
46384   fi
46385 
46386 
46387   input_path="$new_path"
46388   # Check if we need to convert this using DOS-style short mode. If the path
46389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46390   # take no chances and rewrite it.
46391   # Note: m4 eats our [], so we need to use [ and ] instead.
46392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46393   if test "x$has_forbidden_chars" != x; then
46394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46396   fi
46397 
46398 
46399   windows_path="$new_path"
46400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46401     unix_path=`$CYGPATH -u "$windows_path"`
46402     new_path="$unix_path"
46403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46405     new_path="$unix_path"
46406   fi
46407 
46408   if test "x$path" != "x$new_path"; then
46409     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46411 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46412   fi
46413 
46414   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46415   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46416 
46417   else
46418     # We're on a unix platform. Hooray! :)
46419     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46420     has_space=`$ECHO "$path" | $GREP " "`
46421     if test "x$has_space" != x; then
46422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46423 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46424       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46425     fi
46426 
46427     # Use eval to expand a potential ~
46428     eval path="$path"
46429     if test ! -f "$path" && test ! -d "$path"; then
46430       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46431     fi
46432 
46433     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46434   fi
46435 
46436 
46437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46438 
46439   # Input might be given as Windows format, start by converting to
46440   # unix format.
46441   path="$POTENTIAL_FREETYPE_LIB_PATH"
46442   new_path=`$CYGPATH -u "$path"`
46443 
46444   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46445   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46446   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46447   # "foo.exe" is OK but "foo" is an error.
46448   #
46449   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46450   # It is also a way to make sure we got the proper file name for the real test later on.
46451   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46452   if test "x$test_shortpath" = x; then
46453     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46454 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46455     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46456   fi
46457 
46458   # Call helper function which possibly converts this using DOS-style short mode.
46459   # If so, the updated path is stored in $new_path.
46460 
46461   input_path="$new_path"
46462   # Check if we need to convert this using DOS-style short mode. If the path
46463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46464   # take no chances and rewrite it.
46465   # Note: m4 eats our [], so we need to use [ and ] instead.
46466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46467   if test "x$has_forbidden_chars" != x; then
46468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46469     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46470     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46471     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46472       # Going to short mode and back again did indeed matter. Since short mode is
46473       # case insensitive, let's make it lowercase to improve readability.
46474       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46475       # Now convert it back to Unix-stile (cygpath)
46476       input_path=`$CYGPATH -u "$shortmode_path"`
46477       new_path="$input_path"
46478     fi
46479   fi
46480 
46481   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46482   if test "x$test_cygdrive_prefix" = x; then
46483     # As a simple fix, exclude /usr/bin since it's not a real path.
46484     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46485       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46486       # a path prefixed by /cygdrive for fixpath to work.
46487       new_path="$CYGWIN_ROOT_PATH$input_path"
46488     fi
46489   fi
46490 
46491 
46492   if test "x$path" != "x$new_path"; then
46493     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46494     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46495 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46496   fi
46497 
46498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46499 
46500   path="$POTENTIAL_FREETYPE_LIB_PATH"
46501   has_colon=`$ECHO $path | $GREP ^.:`
46502   new_path="$path"
46503   if test "x$has_colon" = x; then
46504     # Not in mixed or Windows style, start by that.
46505     new_path=`cmd //c echo $path`
46506   fi
46507 
46508 
46509   input_path="$new_path"
46510   # Check if we need to convert this using DOS-style short mode. If the path
46511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46512   # take no chances and rewrite it.
46513   # Note: m4 eats our [], so we need to use [ and ] instead.
46514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46515   if test "x$has_forbidden_chars" != x; then
46516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46517     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46518   fi
46519 
46520 
46521   windows_path="$new_path"
46522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46523     unix_path=`$CYGPATH -u "$windows_path"`
46524     new_path="$unix_path"
46525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46526     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46527     new_path="$unix_path"
46528   fi
46529 
46530   if test "x$path" != "x$new_path"; then
46531     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46532     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46533 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46534   fi
46535 
46536   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46537   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46538 
46539   else
46540     # We're on a unix platform. Hooray! :)
46541     path="$POTENTIAL_FREETYPE_LIB_PATH"
46542     has_space=`$ECHO "$path" | $GREP " "`
46543     if test "x$has_space" != x; then
46544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46545 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46546       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46547     fi
46548 
46549     # Use eval to expand a potential ~
46550     eval path="$path"
46551     if test ! -f "$path" && test ! -d "$path"; then
46552       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46553     fi
46554 
46555     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46556   fi
46557 
46558 
46559     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46561 $as_echo_n "checking for freetype includes... " >&6; }
46562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46563 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46564     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46565     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46566 $as_echo_n "checking for freetype libraries... " >&6; }
46567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46568 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46569   fi
46570 
46571 
46572           if test "x$FOUND_FREETYPE" != xyes; then
46573             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46574 
46575   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46576   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46577   METHOD="well-known location"
46578 
46579   # Let's start with an optimistic view of the world :-)
46580   FOUND_FREETYPE=yes
46581 
46582   # First look for the canonical freetype main include file ft2build.h.
46583   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46584     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46585     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46586     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46587       # Fail.
46588       FOUND_FREETYPE=no
46589     fi
46590   fi
46591 
46592   if test "x$FOUND_FREETYPE" = xyes; then
46593     # Include file found, let's continue the sanity check.
46594     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46595 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46596 
46597     # Reset to default value
46598     FREETYPE_BASE_NAME=freetype
46599     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46600     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46601       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46602           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46603         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46604         # for the .6 version explicitly.
46605         FREETYPE_BASE_NAME=freetype.6
46606         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46607         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46608 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46609       else
46610         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46611 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46612         FOUND_FREETYPE=no
46613       fi
46614     else
46615       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46616         # On Windows, we will need both .lib and .dll file.
46617         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46618           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46619 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46620           FOUND_FREETYPE=no
46621         fi
46622       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46623           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46624         # Found lib in isa dir, use that instead.
46625         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46626         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46627 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46628       fi
46629     fi
46630   fi
46631 
46632   if test "x$FOUND_FREETYPE" = xyes; then
46633 
46634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46635 
46636   # Input might be given as Windows format, start by converting to
46637   # unix format.
46638   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46639   new_path=`$CYGPATH -u "$path"`
46640 
46641   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46642   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46643   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46644   # "foo.exe" is OK but "foo" is an error.
46645   #
46646   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46647   # It is also a way to make sure we got the proper file name for the real test later on.
46648   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46649   if test "x$test_shortpath" = x; then
46650     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46651 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46652     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46653   fi
46654 
46655   # Call helper function which possibly converts this using DOS-style short mode.
46656   # If so, the updated path is stored in $new_path.
46657 
46658   input_path="$new_path"
46659   # Check if we need to convert this using DOS-style short mode. If the path
46660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46661   # take no chances and rewrite it.
46662   # Note: m4 eats our [], so we need to use [ and ] instead.
46663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46664   if test "x$has_forbidden_chars" != x; then
46665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46666     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46667     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46668     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46669       # Going to short mode and back again did indeed matter. Since short mode is
46670       # case insensitive, let's make it lowercase to improve readability.
46671       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46672       # Now convert it back to Unix-stile (cygpath)
46673       input_path=`$CYGPATH -u "$shortmode_path"`
46674       new_path="$input_path"
46675     fi
46676   fi
46677 
46678   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46679   if test "x$test_cygdrive_prefix" = x; then
46680     # As a simple fix, exclude /usr/bin since it's not a real path.
46681     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46682       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46683       # a path prefixed by /cygdrive for fixpath to work.
46684       new_path="$CYGWIN_ROOT_PATH$input_path"
46685     fi
46686   fi
46687 
46688 
46689   if test "x$path" != "x$new_path"; then
46690     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46691     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46692 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46693   fi
46694 
46695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46696 
46697   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46698   has_colon=`$ECHO $path | $GREP ^.:`
46699   new_path="$path"
46700   if test "x$has_colon" = x; then
46701     # Not in mixed or Windows style, start by that.
46702     new_path=`cmd //c echo $path`
46703   fi
46704 
46705 
46706   input_path="$new_path"
46707   # Check if we need to convert this using DOS-style short mode. If the path
46708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46709   # take no chances and rewrite it.
46710   # Note: m4 eats our [], so we need to use [ and ] instead.
46711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46712   if test "x$has_forbidden_chars" != x; then
46713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46714     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46715   fi
46716 
46717 
46718   windows_path="$new_path"
46719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46720     unix_path=`$CYGPATH -u "$windows_path"`
46721     new_path="$unix_path"
46722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46724     new_path="$unix_path"
46725   fi
46726 
46727   if test "x$path" != "x$new_path"; then
46728     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46729     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46730 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46731   fi
46732 
46733   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46734   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46735 
46736   else
46737     # We're on a unix platform. Hooray! :)
46738     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46739     has_space=`$ECHO "$path" | $GREP " "`
46740     if test "x$has_space" != x; then
46741       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46742 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46743       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46744     fi
46745 
46746     # Use eval to expand a potential ~
46747     eval path="$path"
46748     if test ! -f "$path" && test ! -d "$path"; then
46749       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46750     fi
46751 
46752     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46753   fi
46754 
46755 
46756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46757 
46758   # Input might be given as Windows format, start by converting to
46759   # unix format.
46760   path="$POTENTIAL_FREETYPE_LIB_PATH"
46761   new_path=`$CYGPATH -u "$path"`
46762 
46763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46766   # "foo.exe" is OK but "foo" is an error.
46767   #
46768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46769   # It is also a way to make sure we got the proper file name for the real test later on.
46770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46771   if test "x$test_shortpath" = x; then
46772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46773 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46774     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46775   fi
46776 
46777   # Call helper function which possibly converts this using DOS-style short mode.
46778   # If so, the updated path is stored in $new_path.
46779 
46780   input_path="$new_path"
46781   # Check if we need to convert this using DOS-style short mode. If the path
46782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46783   # take no chances and rewrite it.
46784   # Note: m4 eats our [], so we need to use [ and ] instead.
46785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46786   if test "x$has_forbidden_chars" != x; then
46787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46791       # Going to short mode and back again did indeed matter. Since short mode is
46792       # case insensitive, let's make it lowercase to improve readability.
46793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46794       # Now convert it back to Unix-stile (cygpath)
46795       input_path=`$CYGPATH -u "$shortmode_path"`
46796       new_path="$input_path"
46797     fi
46798   fi
46799 
46800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46801   if test "x$test_cygdrive_prefix" = x; then
46802     # As a simple fix, exclude /usr/bin since it's not a real path.
46803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46805       # a path prefixed by /cygdrive for fixpath to work.
46806       new_path="$CYGWIN_ROOT_PATH$input_path"
46807     fi
46808   fi
46809 
46810 
46811   if test "x$path" != "x$new_path"; then
46812     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46814 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46815   fi
46816 
46817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46818 
46819   path="$POTENTIAL_FREETYPE_LIB_PATH"
46820   has_colon=`$ECHO $path | $GREP ^.:`
46821   new_path="$path"
46822   if test "x$has_colon" = x; then
46823     # Not in mixed or Windows style, start by that.
46824     new_path=`cmd //c echo $path`
46825   fi
46826 
46827 
46828   input_path="$new_path"
46829   # Check if we need to convert this using DOS-style short mode. If the path
46830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46831   # take no chances and rewrite it.
46832   # Note: m4 eats our [], so we need to use [ and ] instead.
46833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46834   if test "x$has_forbidden_chars" != x; then
46835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46837   fi
46838 
46839 
46840   windows_path="$new_path"
46841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46842     unix_path=`$CYGPATH -u "$windows_path"`
46843     new_path="$unix_path"
46844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46846     new_path="$unix_path"
46847   fi
46848 
46849   if test "x$path" != "x$new_path"; then
46850     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46852 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46853   fi
46854 
46855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46857 
46858   else
46859     # We're on a unix platform. Hooray! :)
46860     path="$POTENTIAL_FREETYPE_LIB_PATH"
46861     has_space=`$ECHO "$path" | $GREP " "`
46862     if test "x$has_space" != x; then
46863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46864 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46865       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46866     fi
46867 
46868     # Use eval to expand a potential ~
46869     eval path="$path"
46870     if test ! -f "$path" && test ! -d "$path"; then
46871       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46872     fi
46873 
46874     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46875   fi
46876 
46877 
46878     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46879     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46880 $as_echo_n "checking for freetype includes... " >&6; }
46881     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46882 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46883     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46884     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46885 $as_echo_n "checking for freetype libraries... " >&6; }
46886     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46887 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46888   fi
46889 
46890           fi
46891 
46892           if test "x$FOUND_FREETYPE" != xyes; then
46893             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46894 
46895   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46896   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46897   METHOD="well-known location"
46898 
46899   # Let's start with an optimistic view of the world :-)
46900   FOUND_FREETYPE=yes
46901 
46902   # First look for the canonical freetype main include file ft2build.h.
46903   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46904     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46905     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46906     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46907       # Fail.
46908       FOUND_FREETYPE=no
46909     fi
46910   fi
46911 
46912   if test "x$FOUND_FREETYPE" = xyes; then
46913     # Include file found, let's continue the sanity check.
46914     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46915 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46916 
46917     # Reset to default value
46918     FREETYPE_BASE_NAME=freetype
46919     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46920     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46921       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46922           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46923         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46924         # for the .6 version explicitly.
46925         FREETYPE_BASE_NAME=freetype.6
46926         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46927         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46928 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46929       else
46930         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46931 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46932         FOUND_FREETYPE=no
46933       fi
46934     else
46935       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46936         # On Windows, we will need both .lib and .dll file.
46937         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46938           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46939 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46940           FOUND_FREETYPE=no
46941         fi
46942       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46943           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46944         # Found lib in isa dir, use that instead.
46945         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46946         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46947 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46948       fi
46949     fi
46950   fi
46951 
46952   if test "x$FOUND_FREETYPE" = xyes; then
46953 
46954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46955 
46956   # Input might be given as Windows format, start by converting to
46957   # unix format.
46958   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46959   new_path=`$CYGPATH -u "$path"`
46960 
46961   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46962   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46963   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46964   # "foo.exe" is OK but "foo" is an error.
46965   #
46966   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46967   # It is also a way to make sure we got the proper file name for the real test later on.
46968   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46969   if test "x$test_shortpath" = x; then
46970     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46971 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46972     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46973   fi
46974 
46975   # Call helper function which possibly converts this using DOS-style short mode.
46976   # If so, the updated path is stored in $new_path.
46977 
46978   input_path="$new_path"
46979   # Check if we need to convert this using DOS-style short mode. If the path
46980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46981   # take no chances and rewrite it.
46982   # Note: m4 eats our [], so we need to use [ and ] instead.
46983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46984   if test "x$has_forbidden_chars" != x; then
46985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46986     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46987     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46988     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46989       # Going to short mode and back again did indeed matter. Since short mode is
46990       # case insensitive, let's make it lowercase to improve readability.
46991       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46992       # Now convert it back to Unix-stile (cygpath)
46993       input_path=`$CYGPATH -u "$shortmode_path"`
46994       new_path="$input_path"
46995     fi
46996   fi
46997 
46998   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46999   if test "x$test_cygdrive_prefix" = x; then
47000     # As a simple fix, exclude /usr/bin since it's not a real path.
47001     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47002       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47003       # a path prefixed by /cygdrive for fixpath to work.
47004       new_path="$CYGWIN_ROOT_PATH$input_path"
47005     fi
47006   fi
47007 
47008 
47009   if test "x$path" != "x$new_path"; then
47010     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47012 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47013   fi
47014 
47015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47016 
47017   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47018   has_colon=`$ECHO $path | $GREP ^.:`
47019   new_path="$path"
47020   if test "x$has_colon" = x; then
47021     # Not in mixed or Windows style, start by that.
47022     new_path=`cmd //c echo $path`
47023   fi
47024 
47025 
47026   input_path="$new_path"
47027   # Check if we need to convert this using DOS-style short mode. If the path
47028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47029   # take no chances and rewrite it.
47030   # Note: m4 eats our [], so we need to use [ and ] instead.
47031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47032   if test "x$has_forbidden_chars" != x; then
47033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47034     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47035   fi
47036 
47037 
47038   windows_path="$new_path"
47039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47040     unix_path=`$CYGPATH -u "$windows_path"`
47041     new_path="$unix_path"
47042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47044     new_path="$unix_path"
47045   fi
47046 
47047   if test "x$path" != "x$new_path"; then
47048     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47049     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47050 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47051   fi
47052 
47053   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47054   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47055 
47056   else
47057     # We're on a unix platform. Hooray! :)
47058     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47059     has_space=`$ECHO "$path" | $GREP " "`
47060     if test "x$has_space" != x; then
47061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47062 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47063       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47064     fi
47065 
47066     # Use eval to expand a potential ~
47067     eval path="$path"
47068     if test ! -f "$path" && test ! -d "$path"; then
47069       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47070     fi
47071 
47072     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47073   fi
47074 
47075 
47076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47077 
47078   # Input might be given as Windows format, start by converting to
47079   # unix format.
47080   path="$POTENTIAL_FREETYPE_LIB_PATH"
47081   new_path=`$CYGPATH -u "$path"`
47082 
47083   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47084   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47085   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47086   # "foo.exe" is OK but "foo" is an error.
47087   #
47088   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47089   # It is also a way to make sure we got the proper file name for the real test later on.
47090   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47091   if test "x$test_shortpath" = x; then
47092     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47093 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47094     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47095   fi
47096 
47097   # Call helper function which possibly converts this using DOS-style short mode.
47098   # If so, the updated path is stored in $new_path.
47099 
47100   input_path="$new_path"
47101   # Check if we need to convert this using DOS-style short mode. If the path
47102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47103   # take no chances and rewrite it.
47104   # Note: m4 eats our [], so we need to use [ and ] instead.
47105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47106   if test "x$has_forbidden_chars" != x; then
47107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47111       # Going to short mode and back again did indeed matter. Since short mode is
47112       # case insensitive, let's make it lowercase to improve readability.
47113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47114       # Now convert it back to Unix-stile (cygpath)
47115       input_path=`$CYGPATH -u "$shortmode_path"`
47116       new_path="$input_path"
47117     fi
47118   fi
47119 
47120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47121   if test "x$test_cygdrive_prefix" = x; then
47122     # As a simple fix, exclude /usr/bin since it's not a real path.
47123     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47125       # a path prefixed by /cygdrive for fixpath to work.
47126       new_path="$CYGWIN_ROOT_PATH$input_path"
47127     fi
47128   fi
47129 
47130 
47131   if test "x$path" != "x$new_path"; then
47132     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47134 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47135   fi
47136 
47137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47138 
47139   path="$POTENTIAL_FREETYPE_LIB_PATH"
47140   has_colon=`$ECHO $path | $GREP ^.:`
47141   new_path="$path"
47142   if test "x$has_colon" = x; then
47143     # Not in mixed or Windows style, start by that.
47144     new_path=`cmd //c echo $path`
47145   fi
47146 
47147 
47148   input_path="$new_path"
47149   # Check if we need to convert this using DOS-style short mode. If the path
47150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47151   # take no chances and rewrite it.
47152   # Note: m4 eats our [], so we need to use [ and ] instead.
47153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47154   if test "x$has_forbidden_chars" != x; then
47155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47156     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47157   fi
47158 
47159 
47160   windows_path="$new_path"
47161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47162     unix_path=`$CYGPATH -u "$windows_path"`
47163     new_path="$unix_path"
47164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47166     new_path="$unix_path"
47167   fi
47168 
47169   if test "x$path" != "x$new_path"; then
47170     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47171     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47172 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47173   fi
47174 
47175   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47176   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47177 
47178   else
47179     # We're on a unix platform. Hooray! :)
47180     path="$POTENTIAL_FREETYPE_LIB_PATH"
47181     has_space=`$ECHO "$path" | $GREP " "`
47182     if test "x$has_space" != x; then
47183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47184 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47185       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47186     fi
47187 
47188     # Use eval to expand a potential ~
47189     eval path="$path"
47190     if test ! -f "$path" && test ! -d "$path"; then
47191       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47192     fi
47193 
47194     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47195   fi
47196 
47197 
47198     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47200 $as_echo_n "checking for freetype includes... " >&6; }
47201     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47202 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47203     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47204     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47205 $as_echo_n "checking for freetype libraries... " >&6; }
47206     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47207 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47208   fi
47209 
47210           fi
47211 
47212           if test "x$FOUND_FREETYPE" != xyes; then
47213             FREETYPE_BASE_DIR="$SYSROOT/usr"
47214             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47215 
47216   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47217   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47218   METHOD="well-known location"
47219 
47220   # Let's start with an optimistic view of the world :-)
47221   FOUND_FREETYPE=yes
47222 
47223   # First look for the canonical freetype main include file ft2build.h.
47224   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47225     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47226     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47227     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47228       # Fail.
47229       FOUND_FREETYPE=no
47230     fi
47231   fi
47232 
47233   if test "x$FOUND_FREETYPE" = xyes; then
47234     # Include file found, let's continue the sanity check.
47235     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47236 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47237 
47238     # Reset to default value
47239     FREETYPE_BASE_NAME=freetype
47240     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47241     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47242       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47243           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47244         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47245         # for the .6 version explicitly.
47246         FREETYPE_BASE_NAME=freetype.6
47247         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47248         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47249 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47250       else
47251         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47252 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47253         FOUND_FREETYPE=no
47254       fi
47255     else
47256       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47257         # On Windows, we will need both .lib and .dll file.
47258         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47259           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47260 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47261           FOUND_FREETYPE=no
47262         fi
47263       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47264           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47265         # Found lib in isa dir, use that instead.
47266         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47267         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47268 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47269       fi
47270     fi
47271   fi
47272 
47273   if test "x$FOUND_FREETYPE" = xyes; then
47274 
47275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47276 
47277   # Input might be given as Windows format, start by converting to
47278   # unix format.
47279   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47280   new_path=`$CYGPATH -u "$path"`
47281 
47282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47285   # "foo.exe" is OK but "foo" is an error.
47286   #
47287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47288   # It is also a way to make sure we got the proper file name for the real test later on.
47289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47290   if test "x$test_shortpath" = x; then
47291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47292 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47293     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47294   fi
47295 
47296   # Call helper function which possibly converts this using DOS-style short mode.
47297   # If so, the updated path is stored in $new_path.
47298 
47299   input_path="$new_path"
47300   # Check if we need to convert this using DOS-style short mode. If the path
47301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47302   # take no chances and rewrite it.
47303   # Note: m4 eats our [], so we need to use [ and ] instead.
47304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47305   if test "x$has_forbidden_chars" != x; then
47306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47310       # Going to short mode and back again did indeed matter. Since short mode is
47311       # case insensitive, let's make it lowercase to improve readability.
47312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47313       # Now convert it back to Unix-stile (cygpath)
47314       input_path=`$CYGPATH -u "$shortmode_path"`
47315       new_path="$input_path"
47316     fi
47317   fi
47318 
47319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47320   if test "x$test_cygdrive_prefix" = x; then
47321     # As a simple fix, exclude /usr/bin since it's not a real path.
47322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47324       # a path prefixed by /cygdrive for fixpath to work.
47325       new_path="$CYGWIN_ROOT_PATH$input_path"
47326     fi
47327   fi
47328 
47329 
47330   if test "x$path" != "x$new_path"; then
47331     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47333 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47334   fi
47335 
47336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47337 
47338   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47339   has_colon=`$ECHO $path | $GREP ^.:`
47340   new_path="$path"
47341   if test "x$has_colon" = x; then
47342     # Not in mixed or Windows style, start by that.
47343     new_path=`cmd //c echo $path`
47344   fi
47345 
47346 
47347   input_path="$new_path"
47348   # Check if we need to convert this using DOS-style short mode. If the path
47349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47350   # take no chances and rewrite it.
47351   # Note: m4 eats our [], so we need to use [ and ] instead.
47352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47353   if test "x$has_forbidden_chars" != x; then
47354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47356   fi
47357 
47358 
47359   windows_path="$new_path"
47360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47361     unix_path=`$CYGPATH -u "$windows_path"`
47362     new_path="$unix_path"
47363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47365     new_path="$unix_path"
47366   fi
47367 
47368   if test "x$path" != "x$new_path"; then
47369     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47371 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47372   fi
47373 
47374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47376 
47377   else
47378     # We're on a unix platform. Hooray! :)
47379     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47380     has_space=`$ECHO "$path" | $GREP " "`
47381     if test "x$has_space" != x; then
47382       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47383 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47384       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47385     fi
47386 
47387     # Use eval to expand a potential ~
47388     eval path="$path"
47389     if test ! -f "$path" && test ! -d "$path"; then
47390       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47391     fi
47392 
47393     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47394   fi
47395 
47396 
47397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47398 
47399   # Input might be given as Windows format, start by converting to
47400   # unix format.
47401   path="$POTENTIAL_FREETYPE_LIB_PATH"
47402   new_path=`$CYGPATH -u "$path"`
47403 
47404   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47405   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47406   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47407   # "foo.exe" is OK but "foo" is an error.
47408   #
47409   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47410   # It is also a way to make sure we got the proper file name for the real test later on.
47411   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47412   if test "x$test_shortpath" = x; then
47413     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47414 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47415     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47416   fi
47417 
47418   # Call helper function which possibly converts this using DOS-style short mode.
47419   # If so, the updated path is stored in $new_path.
47420 
47421   input_path="$new_path"
47422   # Check if we need to convert this using DOS-style short mode. If the path
47423   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47424   # take no chances and rewrite it.
47425   # Note: m4 eats our [], so we need to use [ and ] instead.
47426   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47427   if test "x$has_forbidden_chars" != x; then
47428     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47429     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47430     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47431     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47432       # Going to short mode and back again did indeed matter. Since short mode is
47433       # case insensitive, let's make it lowercase to improve readability.
47434       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47435       # Now convert it back to Unix-stile (cygpath)
47436       input_path=`$CYGPATH -u "$shortmode_path"`
47437       new_path="$input_path"
47438     fi
47439   fi
47440 
47441   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47442   if test "x$test_cygdrive_prefix" = x; then
47443     # As a simple fix, exclude /usr/bin since it's not a real path.
47444     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47445       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47446       # a path prefixed by /cygdrive for fixpath to work.
47447       new_path="$CYGWIN_ROOT_PATH$input_path"
47448     fi
47449   fi
47450 
47451 
47452   if test "x$path" != "x$new_path"; then
47453     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47454     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47455 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47456   fi
47457 
47458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47459 
47460   path="$POTENTIAL_FREETYPE_LIB_PATH"
47461   has_colon=`$ECHO $path | $GREP ^.:`
47462   new_path="$path"
47463   if test "x$has_colon" = x; then
47464     # Not in mixed or Windows style, start by that.
47465     new_path=`cmd //c echo $path`
47466   fi
47467 
47468 
47469   input_path="$new_path"
47470   # Check if we need to convert this using DOS-style short mode. If the path
47471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47472   # take no chances and rewrite it.
47473   # Note: m4 eats our [], so we need to use [ and ] instead.
47474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47475   if test "x$has_forbidden_chars" != x; then
47476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47477     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47478   fi
47479 
47480 
47481   windows_path="$new_path"
47482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47483     unix_path=`$CYGPATH -u "$windows_path"`
47484     new_path="$unix_path"
47485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47487     new_path="$unix_path"
47488   fi
47489 
47490   if test "x$path" != "x$new_path"; then
47491     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47492     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47493 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47494   fi
47495 
47496   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47497   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47498 
47499   else
47500     # We're on a unix platform. Hooray! :)
47501     path="$POTENTIAL_FREETYPE_LIB_PATH"
47502     has_space=`$ECHO "$path" | $GREP " "`
47503     if test "x$has_space" != x; then
47504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47505 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47506       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47507     fi
47508 
47509     # Use eval to expand a potential ~
47510     eval path="$path"
47511     if test ! -f "$path" && test ! -d "$path"; then
47512       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47513     fi
47514 
47515     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47516   fi
47517 
47518 
47519     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47520     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47521 $as_echo_n "checking for freetype includes... " >&6; }
47522     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47523 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47524     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47525     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47526 $as_echo_n "checking for freetype libraries... " >&6; }
47527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47528 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47529   fi
47530 
47531             else
47532 
47533   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47534   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47535   METHOD="well-known location"
47536 
47537   # Let's start with an optimistic view of the world :-)
47538   FOUND_FREETYPE=yes
47539 
47540   # First look for the canonical freetype main include file ft2build.h.
47541   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47542     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47543     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47544     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47545       # Fail.
47546       FOUND_FREETYPE=no
47547     fi
47548   fi
47549 
47550   if test "x$FOUND_FREETYPE" = xyes; then
47551     # Include file found, let's continue the sanity check.
47552     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47553 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47554 
47555     # Reset to default value
47556     FREETYPE_BASE_NAME=freetype
47557     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47558     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47559       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47560           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47561         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47562         # for the .6 version explicitly.
47563         FREETYPE_BASE_NAME=freetype.6
47564         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47565         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47566 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47567       else
47568         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47569 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47570         FOUND_FREETYPE=no
47571       fi
47572     else
47573       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47574         # On Windows, we will need both .lib and .dll file.
47575         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47576           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47577 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47578           FOUND_FREETYPE=no
47579         fi
47580       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47581           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47582         # Found lib in isa dir, use that instead.
47583         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47584         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47585 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47586       fi
47587     fi
47588   fi
47589 
47590   if test "x$FOUND_FREETYPE" = xyes; then
47591 
47592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47593 
47594   # Input might be given as Windows format, start by converting to
47595   # unix format.
47596   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47597   new_path=`$CYGPATH -u "$path"`
47598 
47599   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47600   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47601   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47602   # "foo.exe" is OK but "foo" is an error.
47603   #
47604   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47605   # It is also a way to make sure we got the proper file name for the real test later on.
47606   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47607   if test "x$test_shortpath" = x; then
47608     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47609 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47610     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47611   fi
47612 
47613   # Call helper function which possibly converts this using DOS-style short mode.
47614   # If so, the updated path is stored in $new_path.
47615 
47616   input_path="$new_path"
47617   # Check if we need to convert this using DOS-style short mode. If the path
47618   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47619   # take no chances and rewrite it.
47620   # Note: m4 eats our [], so we need to use [ and ] instead.
47621   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47622   if test "x$has_forbidden_chars" != x; then
47623     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47624     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47625     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47626     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47627       # Going to short mode and back again did indeed matter. Since short mode is
47628       # case insensitive, let's make it lowercase to improve readability.
47629       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47630       # Now convert it back to Unix-stile (cygpath)
47631       input_path=`$CYGPATH -u "$shortmode_path"`
47632       new_path="$input_path"
47633     fi
47634   fi
47635 
47636   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47637   if test "x$test_cygdrive_prefix" = x; then
47638     # As a simple fix, exclude /usr/bin since it's not a real path.
47639     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47640       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47641       # a path prefixed by /cygdrive for fixpath to work.
47642       new_path="$CYGWIN_ROOT_PATH$input_path"
47643     fi
47644   fi
47645 
47646 
47647   if test "x$path" != "x$new_path"; then
47648     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47649     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47650 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47651   fi
47652 
47653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47654 
47655   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47656   has_colon=`$ECHO $path | $GREP ^.:`
47657   new_path="$path"
47658   if test "x$has_colon" = x; then
47659     # Not in mixed or Windows style, start by that.
47660     new_path=`cmd //c echo $path`
47661   fi
47662 
47663 
47664   input_path="$new_path"
47665   # Check if we need to convert this using DOS-style short mode. If the path
47666   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47667   # take no chances and rewrite it.
47668   # Note: m4 eats our [], so we need to use [ and ] instead.
47669   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47670   if test "x$has_forbidden_chars" != x; then
47671     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47672     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47673   fi
47674 
47675 
47676   windows_path="$new_path"
47677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47678     unix_path=`$CYGPATH -u "$windows_path"`
47679     new_path="$unix_path"
47680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47682     new_path="$unix_path"
47683   fi
47684 
47685   if test "x$path" != "x$new_path"; then
47686     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47688 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47689   fi
47690 
47691   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47692   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47693 
47694   else
47695     # We're on a unix platform. Hooray! :)
47696     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47697     has_space=`$ECHO "$path" | $GREP " "`
47698     if test "x$has_space" != x; then
47699       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47700 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47701       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47702     fi
47703 
47704     # Use eval to expand a potential ~
47705     eval path="$path"
47706     if test ! -f "$path" && test ! -d "$path"; then
47707       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47708     fi
47709 
47710     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47711   fi
47712 
47713 
47714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47715 
47716   # Input might be given as Windows format, start by converting to
47717   # unix format.
47718   path="$POTENTIAL_FREETYPE_LIB_PATH"
47719   new_path=`$CYGPATH -u "$path"`
47720 
47721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47724   # "foo.exe" is OK but "foo" is an error.
47725   #
47726   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47727   # It is also a way to make sure we got the proper file name for the real test later on.
47728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47729   if test "x$test_shortpath" = x; then
47730     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47731 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47732     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47733   fi
47734 
47735   # Call helper function which possibly converts this using DOS-style short mode.
47736   # If so, the updated path is stored in $new_path.
47737 
47738   input_path="$new_path"
47739   # Check if we need to convert this using DOS-style short mode. If the path
47740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47741   # take no chances and rewrite it.
47742   # Note: m4 eats our [], so we need to use [ and ] instead.
47743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47744   if test "x$has_forbidden_chars" != x; then
47745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47749       # Going to short mode and back again did indeed matter. Since short mode is
47750       # case insensitive, let's make it lowercase to improve readability.
47751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47752       # Now convert it back to Unix-stile (cygpath)
47753       input_path=`$CYGPATH -u "$shortmode_path"`
47754       new_path="$input_path"
47755     fi
47756   fi
47757 
47758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47759   if test "x$test_cygdrive_prefix" = x; then
47760     # As a simple fix, exclude /usr/bin since it's not a real path.
47761     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47763       # a path prefixed by /cygdrive for fixpath to work.
47764       new_path="$CYGWIN_ROOT_PATH$input_path"
47765     fi
47766   fi
47767 
47768 
47769   if test "x$path" != "x$new_path"; then
47770     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47772 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47773   fi
47774 
47775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47776 
47777   path="$POTENTIAL_FREETYPE_LIB_PATH"
47778   has_colon=`$ECHO $path | $GREP ^.:`
47779   new_path="$path"
47780   if test "x$has_colon" = x; then
47781     # Not in mixed or Windows style, start by that.
47782     new_path=`cmd //c echo $path`
47783   fi
47784 
47785 
47786   input_path="$new_path"
47787   # Check if we need to convert this using DOS-style short mode. If the path
47788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47789   # take no chances and rewrite it.
47790   # Note: m4 eats our [], so we need to use [ and ] instead.
47791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47792   if test "x$has_forbidden_chars" != x; then
47793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47794     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47795   fi
47796 
47797 
47798   windows_path="$new_path"
47799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47800     unix_path=`$CYGPATH -u "$windows_path"`
47801     new_path="$unix_path"
47802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47804     new_path="$unix_path"
47805   fi
47806 
47807   if test "x$path" != "x$new_path"; then
47808     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47810 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47811   fi
47812 
47813   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47814   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47815 
47816   else
47817     # We're on a unix platform. Hooray! :)
47818     path="$POTENTIAL_FREETYPE_LIB_PATH"
47819     has_space=`$ECHO "$path" | $GREP " "`
47820     if test "x$has_space" != x; then
47821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47822 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47823       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47824     fi
47825 
47826     # Use eval to expand a potential ~
47827     eval path="$path"
47828     if test ! -f "$path" && test ! -d "$path"; then
47829       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47830     fi
47831 
47832     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47833   fi
47834 
47835 
47836     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47837     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47838 $as_echo_n "checking for freetype includes... " >&6; }
47839     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47840 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47841     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47843 $as_echo_n "checking for freetype libraries... " >&6; }
47844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47845 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47846   fi
47847 
47848               if test "x$FOUND_FREETYPE" != xyes; then
47849 
47850   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47851   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47852   METHOD="well-known location"
47853 
47854   # Let's start with an optimistic view of the world :-)
47855   FOUND_FREETYPE=yes
47856 
47857   # First look for the canonical freetype main include file ft2build.h.
47858   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47859     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47860     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47861     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47862       # Fail.
47863       FOUND_FREETYPE=no
47864     fi
47865   fi
47866 
47867   if test "x$FOUND_FREETYPE" = xyes; then
47868     # Include file found, let's continue the sanity check.
47869     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47870 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47871 
47872     # Reset to default value
47873     FREETYPE_BASE_NAME=freetype
47874     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47875     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47876       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47877           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47878         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47879         # for the .6 version explicitly.
47880         FREETYPE_BASE_NAME=freetype.6
47881         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47882         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47883 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47884       else
47885         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47886 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47887         FOUND_FREETYPE=no
47888       fi
47889     else
47890       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47891         # On Windows, we will need both .lib and .dll file.
47892         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47893           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47894 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47895           FOUND_FREETYPE=no
47896         fi
47897       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47898           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47899         # Found lib in isa dir, use that instead.
47900         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47901         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47902 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47903       fi
47904     fi
47905   fi
47906 
47907   if test "x$FOUND_FREETYPE" = xyes; then
47908 
47909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47910 
47911   # Input might be given as Windows format, start by converting to
47912   # unix format.
47913   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47914   new_path=`$CYGPATH -u "$path"`
47915 
47916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47919   # "foo.exe" is OK but "foo" is an error.
47920   #
47921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47922   # It is also a way to make sure we got the proper file name for the real test later on.
47923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47924   if test "x$test_shortpath" = x; then
47925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47926 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47927     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47928   fi
47929 
47930   # Call helper function which possibly converts this using DOS-style short mode.
47931   # If so, the updated path is stored in $new_path.
47932 
47933   input_path="$new_path"
47934   # Check if we need to convert this using DOS-style short mode. If the path
47935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47936   # take no chances and rewrite it.
47937   # Note: m4 eats our [], so we need to use [ and ] instead.
47938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47939   if test "x$has_forbidden_chars" != x; then
47940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47944       # Going to short mode and back again did indeed matter. Since short mode is
47945       # case insensitive, let's make it lowercase to improve readability.
47946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47947       # Now convert it back to Unix-stile (cygpath)
47948       input_path=`$CYGPATH -u "$shortmode_path"`
47949       new_path="$input_path"
47950     fi
47951   fi
47952 
47953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47954   if test "x$test_cygdrive_prefix" = x; then
47955     # As a simple fix, exclude /usr/bin since it's not a real path.
47956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47958       # a path prefixed by /cygdrive for fixpath to work.
47959       new_path="$CYGWIN_ROOT_PATH$input_path"
47960     fi
47961   fi
47962 
47963 
47964   if test "x$path" != "x$new_path"; then
47965     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47967 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47968   fi
47969 
47970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47971 
47972   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47973   has_colon=`$ECHO $path | $GREP ^.:`
47974   new_path="$path"
47975   if test "x$has_colon" = x; then
47976     # Not in mixed or Windows style, start by that.
47977     new_path=`cmd //c echo $path`
47978   fi
47979 
47980 
47981   input_path="$new_path"
47982   # Check if we need to convert this using DOS-style short mode. If the path
47983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47984   # take no chances and rewrite it.
47985   # Note: m4 eats our [], so we need to use [ and ] instead.
47986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47987   if test "x$has_forbidden_chars" != x; then
47988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47990   fi
47991 
47992 
47993   windows_path="$new_path"
47994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47995     unix_path=`$CYGPATH -u "$windows_path"`
47996     new_path="$unix_path"
47997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47999     new_path="$unix_path"
48000   fi
48001 
48002   if test "x$path" != "x$new_path"; then
48003     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48005 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48006   fi
48007 
48008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48010 
48011   else
48012     # We're on a unix platform. Hooray! :)
48013     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48014     has_space=`$ECHO "$path" | $GREP " "`
48015     if test "x$has_space" != x; then
48016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48017 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48018       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48019     fi
48020 
48021     # Use eval to expand a potential ~
48022     eval path="$path"
48023     if test ! -f "$path" && test ! -d "$path"; then
48024       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48025     fi
48026 
48027     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48028   fi
48029 
48030 
48031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48032 
48033   # Input might be given as Windows format, start by converting to
48034   # unix format.
48035   path="$POTENTIAL_FREETYPE_LIB_PATH"
48036   new_path=`$CYGPATH -u "$path"`
48037 
48038   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48039   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48040   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48041   # "foo.exe" is OK but "foo" is an error.
48042   #
48043   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48044   # It is also a way to make sure we got the proper file name for the real test later on.
48045   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48046   if test "x$test_shortpath" = x; then
48047     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48048 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48049     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48050   fi
48051 
48052   # Call helper function which possibly converts this using DOS-style short mode.
48053   # If so, the updated path is stored in $new_path.
48054 
48055   input_path="$new_path"
48056   # Check if we need to convert this using DOS-style short mode. If the path
48057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48058   # take no chances and rewrite it.
48059   # Note: m4 eats our [], so we need to use [ and ] instead.
48060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48061   if test "x$has_forbidden_chars" != x; then
48062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48063     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48064     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48065     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48066       # Going to short mode and back again did indeed matter. Since short mode is
48067       # case insensitive, let's make it lowercase to improve readability.
48068       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48069       # Now convert it back to Unix-stile (cygpath)
48070       input_path=`$CYGPATH -u "$shortmode_path"`
48071       new_path="$input_path"
48072     fi
48073   fi
48074 
48075   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48076   if test "x$test_cygdrive_prefix" = x; then
48077     # As a simple fix, exclude /usr/bin since it's not a real path.
48078     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48079       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48080       # a path prefixed by /cygdrive for fixpath to work.
48081       new_path="$CYGWIN_ROOT_PATH$input_path"
48082     fi
48083   fi
48084 
48085 
48086   if test "x$path" != "x$new_path"; then
48087     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48088     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48089 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48090   fi
48091 
48092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48093 
48094   path="$POTENTIAL_FREETYPE_LIB_PATH"
48095   has_colon=`$ECHO $path | $GREP ^.:`
48096   new_path="$path"
48097   if test "x$has_colon" = x; then
48098     # Not in mixed or Windows style, start by that.
48099     new_path=`cmd //c echo $path`
48100   fi
48101 
48102 
48103   input_path="$new_path"
48104   # Check if we need to convert this using DOS-style short mode. If the path
48105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48106   # take no chances and rewrite it.
48107   # Note: m4 eats our [], so we need to use [ and ] instead.
48108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48109   if test "x$has_forbidden_chars" != x; then
48110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48111     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48112   fi
48113 
48114 
48115   windows_path="$new_path"
48116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48117     unix_path=`$CYGPATH -u "$windows_path"`
48118     new_path="$unix_path"
48119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48121     new_path="$unix_path"
48122   fi
48123 
48124   if test "x$path" != "x$new_path"; then
48125     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48126     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48127 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48128   fi
48129 
48130   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48131   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48132 
48133   else
48134     # We're on a unix platform. Hooray! :)
48135     path="$POTENTIAL_FREETYPE_LIB_PATH"
48136     has_space=`$ECHO "$path" | $GREP " "`
48137     if test "x$has_space" != x; then
48138       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48139 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48140       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48141     fi
48142 
48143     # Use eval to expand a potential ~
48144     eval path="$path"
48145     if test ! -f "$path" && test ! -d "$path"; then
48146       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48147     fi
48148 
48149     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48150   fi
48151 
48152 
48153     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48155 $as_echo_n "checking for freetype includes... " >&6; }
48156     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48157 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48158     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48159     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48160 $as_echo_n "checking for freetype libraries... " >&6; }
48161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48162 $as_echo "$FREETYPE_LIB_PATH" >&6; }
48163   fi
48164 
48165               fi
48166             fi
48167           fi
48168         fi
48169       fi # end check in well-known locations
48170 
48171       if test "x$FOUND_FREETYPE" != xyes; then
48172 
48173   # Print a helpful message on how to acquire the necessary build dependency.
48174   # freetype is the help tag: freetype, cups, pulse, alsa etc
48175   MISSING_DEPENDENCY=freetype
48176 
48177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48178     cygwin_help $MISSING_DEPENDENCY
48179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48180     msys_help $MISSING_DEPENDENCY
48181   else
48182     PKGHANDLER_COMMAND=
48183 
48184     case $PKGHANDLER in
48185       apt-get)
48186         apt_help     $MISSING_DEPENDENCY ;;
48187       yum)
48188         yum_help     $MISSING_DEPENDENCY ;;
48189       port)
48190         port_help    $MISSING_DEPENDENCY ;;
48191       pkgutil)
48192         pkgutil_help $MISSING_DEPENDENCY ;;
48193       pkgadd)
48194         pkgadd_help  $MISSING_DEPENDENCY ;;
48195     esac
48196 
48197     if test "x$PKGHANDLER_COMMAND" != x; then
48198       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48199     fi
48200   fi
48201 
48202         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48203       fi
48204     fi # end user specified settings
48205 
48206     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48207     if test "x$FREETYPE_CFLAGS" = x; then
48208 
48209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48210 
48211   # Input might be given as Windows format, start by converting to
48212   # unix format.
48213   path="$FREETYPE_INCLUDE_PATH"
48214   new_path=`$CYGPATH -u "$path"`
48215 
48216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48219   # "foo.exe" is OK but "foo" is an error.
48220   #
48221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48222   # It is also a way to make sure we got the proper file name for the real test later on.
48223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48224   if test "x$test_shortpath" = x; then
48225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48226 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48227     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48228   fi
48229 
48230   # Call helper function which possibly converts this using DOS-style short mode.
48231   # If so, the updated path is stored in $new_path.
48232 
48233   input_path="$new_path"
48234   # Check if we need to convert this using DOS-style short mode. If the path
48235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48236   # take no chances and rewrite it.
48237   # Note: m4 eats our [], so we need to use [ and ] instead.
48238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48239   if test "x$has_forbidden_chars" != x; then
48240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48244       # Going to short mode and back again did indeed matter. Since short mode is
48245       # case insensitive, let's make it lowercase to improve readability.
48246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48247       # Now convert it back to Unix-stile (cygpath)
48248       input_path=`$CYGPATH -u "$shortmode_path"`
48249       new_path="$input_path"
48250     fi
48251   fi
48252 
48253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48254   if test "x$test_cygdrive_prefix" = x; then
48255     # As a simple fix, exclude /usr/bin since it's not a real path.
48256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48258       # a path prefixed by /cygdrive for fixpath to work.
48259       new_path="$CYGWIN_ROOT_PATH$input_path"
48260     fi
48261   fi
48262 
48263 
48264   if test "x$path" != "x$new_path"; then
48265     FREETYPE_INCLUDE_PATH="$new_path"
48266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48267 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48268   fi
48269 
48270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48271 
48272   path="$FREETYPE_INCLUDE_PATH"
48273   has_colon=`$ECHO $path | $GREP ^.:`
48274   new_path="$path"
48275   if test "x$has_colon" = x; then
48276     # Not in mixed or Windows style, start by that.
48277     new_path=`cmd //c echo $path`
48278   fi
48279 
48280 
48281   input_path="$new_path"
48282   # Check if we need to convert this using DOS-style short mode. If the path
48283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48284   # take no chances and rewrite it.
48285   # Note: m4 eats our [], so we need to use [ and ] instead.
48286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48287   if test "x$has_forbidden_chars" != x; then
48288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48290   fi
48291 
48292 
48293   windows_path="$new_path"
48294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48295     unix_path=`$CYGPATH -u "$windows_path"`
48296     new_path="$unix_path"
48297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48299     new_path="$unix_path"
48300   fi
48301 
48302   if test "x$path" != "x$new_path"; then
48303     FREETYPE_INCLUDE_PATH="$new_path"
48304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48305 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48306   fi
48307 
48308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48310 
48311   else
48312     # We're on a unix platform. Hooray! :)
48313     path="$FREETYPE_INCLUDE_PATH"
48314     has_space=`$ECHO "$path" | $GREP " "`
48315     if test "x$has_space" != x; then
48316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48317 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48318       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48319     fi
48320 
48321     # Use eval to expand a potential ~
48322     eval path="$path"
48323     if test ! -f "$path" && test ! -d "$path"; then
48324       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48325     fi
48326 
48327     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48328   fi
48329 
48330       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48331         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48332       else
48333         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48334       fi
48335     fi
48336 
48337     if test "x$FREETYPE_LIBS" = x; then
48338 
48339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48340 
48341   # Input might be given as Windows format, start by converting to
48342   # unix format.
48343   path="$FREETYPE_LIB_PATH"
48344   new_path=`$CYGPATH -u "$path"`
48345 
48346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48349   # "foo.exe" is OK but "foo" is an error.
48350   #
48351   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48352   # It is also a way to make sure we got the proper file name for the real test later on.
48353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48354   if test "x$test_shortpath" = x; then
48355     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48356 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48357     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48358   fi
48359 
48360   # Call helper function which possibly converts this using DOS-style short mode.
48361   # If so, the updated path is stored in $new_path.
48362 
48363   input_path="$new_path"
48364   # Check if we need to convert this using DOS-style short mode. If the path
48365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48366   # take no chances and rewrite it.
48367   # Note: m4 eats our [], so we need to use [ and ] instead.
48368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48369   if test "x$has_forbidden_chars" != x; then
48370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48371     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48372     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48373     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48374       # Going to short mode and back again did indeed matter. Since short mode is
48375       # case insensitive, let's make it lowercase to improve readability.
48376       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48377       # Now convert it back to Unix-stile (cygpath)
48378       input_path=`$CYGPATH -u "$shortmode_path"`
48379       new_path="$input_path"
48380     fi
48381   fi
48382 
48383   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48384   if test "x$test_cygdrive_prefix" = x; then
48385     # As a simple fix, exclude /usr/bin since it's not a real path.
48386     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48387       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48388       # a path prefixed by /cygdrive for fixpath to work.
48389       new_path="$CYGWIN_ROOT_PATH$input_path"
48390     fi
48391   fi
48392 
48393 
48394   if test "x$path" != "x$new_path"; then
48395     FREETYPE_LIB_PATH="$new_path"
48396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48397 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48398   fi
48399 
48400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48401 
48402   path="$FREETYPE_LIB_PATH"
48403   has_colon=`$ECHO $path | $GREP ^.:`
48404   new_path="$path"
48405   if test "x$has_colon" = x; then
48406     # Not in mixed or Windows style, start by that.
48407     new_path=`cmd //c echo $path`
48408   fi
48409 
48410 
48411   input_path="$new_path"
48412   # Check if we need to convert this using DOS-style short mode. If the path
48413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48414   # take no chances and rewrite it.
48415   # Note: m4 eats our [], so we need to use [ and ] instead.
48416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48417   if test "x$has_forbidden_chars" != x; then
48418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48420   fi
48421 
48422 
48423   windows_path="$new_path"
48424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48425     unix_path=`$CYGPATH -u "$windows_path"`
48426     new_path="$unix_path"
48427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48429     new_path="$unix_path"
48430   fi
48431 
48432   if test "x$path" != "x$new_path"; then
48433     FREETYPE_LIB_PATH="$new_path"
48434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48435 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48436   fi
48437 
48438   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48439   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48440 
48441   else
48442     # We're on a unix platform. Hooray! :)
48443     path="$FREETYPE_LIB_PATH"
48444     has_space=`$ECHO "$path" | $GREP " "`
48445     if test "x$has_space" != x; then
48446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48447 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48448       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48449     fi
48450 
48451     # Use eval to expand a potential ~
48452     eval path="$path"
48453     if test ! -f "$path" && test ! -d "$path"; then
48454       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48455     fi
48456 
48457     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48458   fi
48459 
48460       if test "x$OPENJDK_TARGET_OS" = xwindows; then
48461         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48462       else
48463         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48464       fi
48465     fi
48466 
48467     # Try to compile it
48468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48469 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48470     ac_ext=cpp
48471 ac_cpp='$CXXCPP $CPPFLAGS'
48472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48475 
48476     PREV_CXXCFLAGS="$CXXFLAGS"
48477     PREV_LIBS="$LIBS"
48478     PREV_CXX="$CXX"
48479     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48480     LIBS="$LIBS $FREETYPE_LIBS"
48481     CXX="$FIXPATH $CXX"
48482     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48483 /* end confdefs.h.  */
48484 
48485           #include<ft2build.h>
48486           #include FT_FREETYPE_H
48487           int main () {
48488             FT_Init_FreeType(NULL);
48489             return 0;
48490           }
48491 
48492 _ACEOF
48493 if ac_fn_cxx_try_link "$LINENO"; then :
48494 
48495           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48496 $as_echo "yes" >&6; }
48497 
48498 else
48499 
48500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48501 $as_echo "no" >&6; }
48502           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48503 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48504           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48505 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48506 
48507 
48508   # Print a helpful message on how to acquire the necessary build dependency.
48509   # freetype is the help tag: freetype, cups, pulse, alsa etc
48510   MISSING_DEPENDENCY=freetype
48511 
48512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48513     cygwin_help $MISSING_DEPENDENCY
48514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48515     msys_help $MISSING_DEPENDENCY
48516   else
48517     PKGHANDLER_COMMAND=
48518 
48519     case $PKGHANDLER in
48520       apt-get)
48521         apt_help     $MISSING_DEPENDENCY ;;
48522       yum)
48523         yum_help     $MISSING_DEPENDENCY ;;
48524       port)
48525         port_help    $MISSING_DEPENDENCY ;;
48526       pkgutil)
48527         pkgutil_help $MISSING_DEPENDENCY ;;
48528       pkgadd)
48529         pkgadd_help  $MISSING_DEPENDENCY ;;
48530     esac
48531 
48532     if test "x$PKGHANDLER_COMMAND" != x; then
48533       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48534     fi
48535   fi
48536 
48537 
48538           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48539 
48540 
48541 fi
48542 rm -f core conftest.err conftest.$ac_objext \
48543     conftest$ac_exeext conftest.$ac_ext
48544     CXXCFLAGS="$PREV_CXXFLAGS"
48545     LIBS="$PREV_LIBS"
48546     CXX="$PREV_CXX"
48547     ac_ext=cpp
48548 ac_cpp='$CXXCPP $CPPFLAGS'
48549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48552 
48553 
48554     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48555 $as_echo_n "checking if we should bundle freetype... " >&6; }
48556     if test "x$BUNDLE_FREETYPE" = xyes; then
48557       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48558     fi
48559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48560 $as_echo "$BUNDLE_FREETYPE" >&6; }
48561 
48562   fi # end freetype needed
48563 
48564 
48565 
48566 
48567 
48568 
48569 
48570   ###############################################################################
48571   #
48572   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48573   #
48574 
48575 # Check whether --with-alsa was given.
48576 if test "${with_alsa+set}" = set; then :
48577   withval=$with_alsa;
48578 fi
48579 
48580 
48581 # Check whether --with-alsa-include was given.
48582 if test "${with_alsa_include+set}" = set; then :
48583   withval=$with_alsa_include;
48584 fi
48585 
48586 
48587 # Check whether --with-alsa-lib was given.
48588 if test "${with_alsa_lib+set}" = set; then :
48589   withval=$with_alsa_lib;
48590 fi
48591 
48592 
48593   if test "x$ALSA_NOT_NEEDED" = xyes; then
48594     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48595       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48596 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48597     fi
48598     ALSA_CFLAGS=
48599     ALSA_LIBS=
48600   else
48601     ALSA_FOUND=no
48602 
48603     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48604       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48605     fi
48606 
48607     if test "x${with_alsa}" != x; then
48608       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48609       ALSA_CFLAGS="-I${with_alsa}/include"
48610       ALSA_FOUND=yes
48611     fi
48612     if test "x${with_alsa_include}" != x; then
48613       ALSA_CFLAGS="-I${with_alsa_include}"
48614       ALSA_FOUND=yes
48615     fi
48616     if test "x${with_alsa_lib}" != x; then
48617       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48618       ALSA_FOUND=yes
48619     fi
48620     if test "x$ALSA_FOUND" = xno; then
48621 
48622 
48623   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48624     # Source the builddeps file again, to make sure it uses the latest variables!
48625     . $builddepsfile
48626     # Look for a target and build machine specific resource!
48627     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48628     if test "x$resource" = x; then
48629       # Ok, lets instead look for a target specific resource
48630       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48631     fi
48632     if test "x$resource" = x; then
48633       # Ok, lets instead look for a build specific resource
48634       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48635     fi
48636     if test "x$resource" = x; then
48637       # Ok, lets instead look for a generic resource
48638       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48639       resource=${builddep_alsa}
48640     fi
48641     if test "x$resource" != x; then
48642       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48643 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48644       # If the resource in the builddeps.conf file is an existing directory,
48645       # for example /java/linux/cups
48646       if test -d ${resource}; then
48647         depdir=${resource}
48648       else
48649 
48650   # alsa is for example mymodule
48651   # $resource is for example libs/general/libmymod_1_2_3.zip
48652   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48653   # $with_builddeps_dir is for example /localhome/builddeps
48654   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48655   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48656   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48657   filename=`basename $resource`
48658   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48659   filebase=${filename%%.*}
48660   extension=${filename#*.}
48661   installdir=$with_builddeps_dir/$filebase
48662   if test ! -f $installdir/$filename.unpacked; then
48663     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48664 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48665     if test ! -d $installdir; then
48666       mkdir -p $installdir
48667     fi
48668     if test ! -d $installdir; then
48669       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48670     fi
48671     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48672     touch $tmpfile
48673     if test ! -f $tmpfile; then
48674       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48675     fi
48676 
48677   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48678   # $tmpfile is the local file name for the downloaded file.
48679   VALID_TOOL=no
48680   if test "x$BDEPS_FTP" = xwget; then
48681     VALID_TOOL=yes
48682     wget -O $tmpfile $with_builddeps_server/$resource
48683   fi
48684   if test "x$BDEPS_FTP" = xlftp; then
48685     VALID_TOOL=yes
48686     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48687   fi
48688   if test "x$BDEPS_FTP" = xftp; then
48689     VALID_TOOL=yes
48690     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48691     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48692     FTPUSERPWD=${FTPSERVER%%@*}
48693     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48694       FTPUSER=${userpwd%%:*}
48695       FTPPWD=${userpwd#*@}
48696       FTPSERVER=${FTPSERVER#*@}
48697     else
48698       FTPUSER=ftp
48699       FTPPWD=ftp
48700     fi
48701     # the "pass" command does not work on some
48702     # ftp clients (read ftp.exe) but if it works,
48703     # passive mode is better!
48704     ( \
48705         echo "user $FTPUSER $FTPPWD"        ; \
48706         echo "pass"                         ; \
48707         echo "bin"                          ; \
48708         echo "get $FTPPATH $tmpfile"              ; \
48709     ) | ftp -in $FTPSERVER
48710   fi
48711   if test "x$VALID_TOOL" != xyes; then
48712     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48713   fi
48714 
48715     mv $tmpfile $installdir/$filename
48716     if test ! -s $installdir/$filename; then
48717       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48718     fi
48719     case "$extension" in
48720       zip)  echo "Unzipping $installdir/$filename..."
48721         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48722         ;;
48723       tar.gz) echo "Untaring $installdir/$filename..."
48724         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48725         ;;
48726       tgz) echo "Untaring $installdir/$filename..."
48727         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48728         ;;
48729       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48730         ;;
48731     esac
48732   fi
48733   if test -f $installdir/$filename.unpacked; then
48734     depdir=$installdir
48735   fi
48736 
48737       fi
48738       # Source the builddeps file again, because in the previous command, the depdir
48739       # was updated to point at the current build dependency install directory.
48740       . $builddepsfile
48741       # Now extract variables from the builddeps.conf files.
48742       theroot=${builddep_alsa_ROOT}
48743       thecflags=${builddep_alsa_CFLAGS}
48744       thelibs=${builddep_alsa_LIBS}
48745       if test "x$depdir" = x; then
48746         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48747       fi
48748       ALSA=$depdir
48749       if test "x$theroot" != x; then
48750         ALSA="$theroot"
48751       fi
48752       if test "x$thecflags" != x; then
48753         ALSA_CFLAGS="$thecflags"
48754       fi
48755       if test "x$thelibs" != x; then
48756         ALSA_LIBS="$thelibs"
48757       fi
48758       ALSA_FOUND=yes
48759       else ALSA_FOUND=no
48760 
48761     fi
48762     else ALSA_FOUND=no
48763 
48764   fi
48765 
48766     fi
48767     # Do not try pkg-config if we have a sysroot set.
48768     if test "x$SYSROOT" = x; then
48769       if test "x$ALSA_FOUND" = xno; then
48770 
48771 pkg_failed=no
48772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48773 $as_echo_n "checking for ALSA... " >&6; }
48774 
48775 if test -n "$ALSA_CFLAGS"; then
48776     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48777  elif test -n "$PKG_CONFIG"; then
48778     if test -n "$PKG_CONFIG" && \
48779     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48780   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48781   ac_status=$?
48782   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48783   test $ac_status = 0; }; then
48784   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48785 else
48786   pkg_failed=yes
48787 fi
48788  else
48789     pkg_failed=untried
48790 fi
48791 if test -n "$ALSA_LIBS"; then
48792     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48793  elif test -n "$PKG_CONFIG"; then
48794     if test -n "$PKG_CONFIG" && \
48795     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48796   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48797   ac_status=$?
48798   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48799   test $ac_status = 0; }; then
48800   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48801 else
48802   pkg_failed=yes
48803 fi
48804  else
48805     pkg_failed=untried
48806 fi
48807 
48808 
48809 
48810 if test $pkg_failed = yes; then
48811 
48812 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48813         _pkg_short_errors_supported=yes
48814 else
48815         _pkg_short_errors_supported=no
48816 fi
48817         if test $_pkg_short_errors_supported = yes; then
48818                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48819         else
48820                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48821         fi
48822         # Put the nasty error message in config.log where it belongs
48823         echo "$ALSA_PKG_ERRORS" >&5
48824 
48825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48826 $as_echo "no" >&6; }
48827                 ALSA_FOUND=no
48828 elif test $pkg_failed = untried; then
48829         ALSA_FOUND=no
48830 else
48831         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48832         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48833         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48834 $as_echo "yes" >&6; }
48835         ALSA_FOUND=yes
48836 fi
48837       fi
48838     fi
48839     if test "x$ALSA_FOUND" = xno; then
48840       for ac_header in alsa/asoundlib.h
48841 do :
48842   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48843 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48844   cat >>confdefs.h <<_ACEOF
48845 #define HAVE_ALSA_ASOUNDLIB_H 1
48846 _ACEOF
48847 
48848             ALSA_FOUND=yes
48849             ALSA_CFLAGS=-Iignoreme
48850             ALSA_LIBS=-lasound
48851             DEFAULT_ALSA=yes
48852 
48853 else
48854   ALSA_FOUND=no
48855 fi
48856 
48857 done
48858 
48859     fi
48860     if test "x$ALSA_FOUND" = xno; then
48861 
48862   # Print a helpful message on how to acquire the necessary build dependency.
48863   # alsa is the help tag: freetype, cups, pulse, alsa etc
48864   MISSING_DEPENDENCY=alsa
48865 
48866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48867     cygwin_help $MISSING_DEPENDENCY
48868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48869     msys_help $MISSING_DEPENDENCY
48870   else
48871     PKGHANDLER_COMMAND=
48872 
48873     case $PKGHANDLER in
48874       apt-get)
48875         apt_help     $MISSING_DEPENDENCY ;;
48876       yum)
48877         yum_help     $MISSING_DEPENDENCY ;;
48878       port)
48879         port_help    $MISSING_DEPENDENCY ;;
48880       pkgutil)
48881         pkgutil_help $MISSING_DEPENDENCY ;;
48882       pkgadd)
48883         pkgadd_help  $MISSING_DEPENDENCY ;;
48884     esac
48885 
48886     if test "x$PKGHANDLER_COMMAND" != x; then
48887       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48888     fi
48889   fi
48890 
48891       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48892     fi
48893   fi
48894 
48895 
48896 
48897 
48898 
48899 
48900   ###############################################################################
48901   #
48902   # Check for the jpeg library
48903   #
48904 
48905 
48906 # Check whether --with-libjpeg was given.
48907 if test "${with_libjpeg+set}" = set; then :
48908   withval=$with_libjpeg;
48909 fi
48910 
48911 
48912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48913 $as_echo_n "checking for which libjpeg to use... " >&6; }
48914 
48915   # default is bundled
48916   DEFAULT_LIBJPEG=bundled
48917 
48918   #
48919   # if user didn't specify, use DEFAULT_LIBJPEG
48920   #
48921   if test "x${with_libjpeg}" = "x"; then
48922     with_libjpeg=${DEFAULT_LIBJPEG}
48923   fi
48924 
48925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48926 $as_echo "${with_libjpeg}" >&6; }
48927 
48928   if test "x${with_libjpeg}" = "xbundled"; then
48929     USE_EXTERNAL_LIBJPEG=false
48930   elif test "x${with_libjpeg}" = "xsystem"; then
48931     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48932 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48933 
48934 else
48935    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48936 fi
48937 
48938 
48939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48940 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48941 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48942   $as_echo_n "(cached) " >&6
48943 else
48944   ac_check_lib_save_LIBS=$LIBS
48945 LIBS="-ljpeg  $LIBS"
48946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48947 /* end confdefs.h.  */
48948 
48949 /* Override any GCC internal prototype to avoid an error.
48950    Use char because int might match the return type of a GCC
48951    builtin and then its argument prototype would still apply.  */
48952 #ifdef __cplusplus
48953 extern "C"
48954 #endif
48955 char jpeg_CreateDecompress ();
48956 int
48957 main ()
48958 {
48959 return jpeg_CreateDecompress ();
48960   ;
48961   return 0;
48962 }
48963 _ACEOF
48964 if ac_fn_cxx_try_link "$LINENO"; then :
48965   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48966 else
48967   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48968 fi
48969 rm -f core conftest.err conftest.$ac_objext \
48970     conftest$ac_exeext conftest.$ac_ext
48971 LIBS=$ac_check_lib_save_LIBS
48972 fi
48973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48974 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48975 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48976   cat >>confdefs.h <<_ACEOF
48977 #define HAVE_LIBJPEG 1
48978 _ACEOF
48979 
48980   LIBS="-ljpeg $LIBS"
48981 
48982 else
48983    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48984 fi
48985 
48986 
48987     USE_EXTERNAL_LIBJPEG=true
48988   else
48989     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48990   fi
48991 
48992 
48993 
48994   ###############################################################################
48995   #
48996   # Check for the gif library
48997   #
48998 
48999 
49000 # Check whether --with-giflib was given.
49001 if test "${with_giflib+set}" = set; then :
49002   withval=$with_giflib;
49003 fi
49004 
49005 
49006 
49007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49008 $as_echo_n "checking for which giflib to use... " >&6; }
49009 
49010   # default is bundled
49011   DEFAULT_GIFLIB=bundled
49012 
49013   #
49014   # if user didn't specify, use DEFAULT_GIFLIB
49015   #
49016   if test "x${with_giflib}" = "x"; then
49017     with_giflib=${DEFAULT_GIFLIB}
49018   fi
49019 
49020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49021 $as_echo "${with_giflib}" >&6; }
49022 
49023   if test "x${with_giflib}" = "xbundled"; then
49024     USE_EXTERNAL_LIBGIF=false
49025   elif test "x${with_giflib}" = "xsystem"; then
49026     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49027 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49028 
49029 else
49030    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49031 fi
49032 
49033 
49034     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49035 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49036 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49037   $as_echo_n "(cached) " >&6
49038 else
49039   ac_check_lib_save_LIBS=$LIBS
49040 LIBS="-lgif  $LIBS"
49041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49042 /* end confdefs.h.  */
49043 
49044 /* Override any GCC internal prototype to avoid an error.
49045    Use char because int might match the return type of a GCC
49046    builtin and then its argument prototype would still apply.  */
49047 #ifdef __cplusplus
49048 extern "C"
49049 #endif
49050 char DGifGetCode ();
49051 int
49052 main ()
49053 {
49054 return DGifGetCode ();
49055   ;
49056   return 0;
49057 }
49058 _ACEOF
49059 if ac_fn_cxx_try_link "$LINENO"; then :
49060   ac_cv_lib_gif_DGifGetCode=yes
49061 else
49062   ac_cv_lib_gif_DGifGetCode=no
49063 fi
49064 rm -f core conftest.err conftest.$ac_objext \
49065     conftest$ac_exeext conftest.$ac_ext
49066 LIBS=$ac_check_lib_save_LIBS
49067 fi
49068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49069 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49070 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49071   cat >>confdefs.h <<_ACEOF
49072 #define HAVE_LIBGIF 1
49073 _ACEOF
49074 
49075   LIBS="-lgif $LIBS"
49076 
49077 else
49078    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49079 fi
49080 
49081 
49082     USE_EXTERNAL_LIBGIF=true
49083   else
49084     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49085   fi
49086 
49087 
49088   ###############################################################################
49089   #
49090   # Check for the lcms2 library
49091   #
49092 
49093 
49094 # Check whether --with-lcms was given.
49095 if test "${with_lcms+set}" = set; then :
49096   withval=$with_lcms;
49097 fi
49098 
49099 
49100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49101 $as_echo_n "checking for which lcms to use... " >&6; }
49102 
49103   DEFAULT_LCMS=bundled
49104 
49105   #
49106   # If user didn't specify, use DEFAULT_LCMS
49107   #
49108   if test "x${with_lcms}" = "x"; then
49109       with_lcms=${DEFAULT_LCMS}
49110   fi
49111 
49112   if test "x${with_lcms}" = "xbundled"; then
49113     USE_EXTERNAL_LCMS=false
49114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49115 $as_echo "bundled" >&6; }
49116   elif test "x${with_lcms}" = "xsystem"; then
49117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49118 $as_echo "system" >&6; }
49119 
49120 pkg_failed=no
49121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49122 $as_echo_n "checking for LCMS... " >&6; }
49123 
49124 if test -n "$LCMS_CFLAGS"; then
49125     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49126  elif test -n "$PKG_CONFIG"; then
49127     if test -n "$PKG_CONFIG" && \
49128     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49129   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49130   ac_status=$?
49131   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49132   test $ac_status = 0; }; then
49133   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49134 else
49135   pkg_failed=yes
49136 fi
49137  else
49138     pkg_failed=untried
49139 fi
49140 if test -n "$LCMS_LIBS"; then
49141     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49142  elif test -n "$PKG_CONFIG"; then
49143     if test -n "$PKG_CONFIG" && \
49144     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49145   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49146   ac_status=$?
49147   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49148   test $ac_status = 0; }; then
49149   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49150 else
49151   pkg_failed=yes
49152 fi
49153  else
49154     pkg_failed=untried
49155 fi
49156 
49157 
49158 
49159 if test $pkg_failed = yes; then
49160 
49161 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49162         _pkg_short_errors_supported=yes
49163 else
49164         _pkg_short_errors_supported=no
49165 fi
49166         if test $_pkg_short_errors_supported = yes; then
49167                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49168         else
49169                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49170         fi
49171         # Put the nasty error message in config.log where it belongs
49172         echo "$LCMS_PKG_ERRORS" >&5
49173 
49174         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49175 $as_echo "no" >&6; }
49176                 LCMS_FOUND=no
49177 elif test $pkg_failed = untried; then
49178         LCMS_FOUND=no
49179 else
49180         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49181         LCMS_LIBS=$pkg_cv_LCMS_LIBS
49182         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49183 $as_echo "yes" >&6; }
49184         LCMS_FOUND=yes
49185 fi
49186     if test "x${LCMS_FOUND}" = "xyes"; then
49187       USE_EXTERNAL_LCMS=true
49188     else
49189       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49190     fi
49191   else
49192     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49193   fi
49194 
49195 
49196 
49197   ###############################################################################
49198   #
49199   # Check for the png library
49200   #
49201 
49202 
49203 # Check whether --with-libpng was given.
49204 if test "${with_libpng+set}" = set; then :
49205   withval=$with_libpng;
49206 fi
49207 
49208 
49209 
49210   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49211 $as_echo_n "checking for which libpng to use... " >&6; }
49212 
49213   # default is bundled
49214   DEFAULT_LIBPNG=bundled
49215 
49216   #
49217   # if user didn't specify, use DEFAULT_LIBPNG
49218   #
49219   if test "x${with_libpng}" = "x"; then
49220       with_libpng=${DEFAULT_LIBPNG}
49221   fi
49222 
49223   if test "x${with_libpng}" = "xbundled"; then
49224       USE_EXTERNAL_LIBPNG=false
49225       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49226 $as_echo "bundled" >&6; }
49227   elif test "x${with_libpng}" = "xsystem"; then
49228 
49229 pkg_failed=no
49230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49231 $as_echo_n "checking for PNG... " >&6; }
49232 
49233 if test -n "$PNG_CFLAGS"; then
49234     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49235  elif test -n "$PKG_CONFIG"; then
49236     if test -n "$PKG_CONFIG" && \
49237     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49238   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49239   ac_status=$?
49240   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49241   test $ac_status = 0; }; then
49242   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49243 else
49244   pkg_failed=yes
49245 fi
49246  else
49247     pkg_failed=untried
49248 fi
49249 if test -n "$PNG_LIBS"; then
49250     pkg_cv_PNG_LIBS="$PNG_LIBS"
49251  elif test -n "$PKG_CONFIG"; then
49252     if test -n "$PKG_CONFIG" && \
49253     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49254   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49255   ac_status=$?
49256   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49257   test $ac_status = 0; }; then
49258   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49259 else
49260   pkg_failed=yes
49261 fi
49262  else
49263     pkg_failed=untried
49264 fi
49265 
49266 
49267 
49268 if test $pkg_failed = yes; then
49269 
49270 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49271         _pkg_short_errors_supported=yes
49272 else
49273         _pkg_short_errors_supported=no
49274 fi
49275         if test $_pkg_short_errors_supported = yes; then
49276                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49277         else
49278                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49279         fi
49280         # Put the nasty error message in config.log where it belongs
49281         echo "$PNG_PKG_ERRORS" >&5
49282 
49283         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49284 $as_echo "no" >&6; }
49285                  LIBPNG_FOUND=no
49286 elif test $pkg_failed = untried; then
49287          LIBPNG_FOUND=no
49288 else
49289         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49290         PNG_LIBS=$pkg_cv_PNG_LIBS
49291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49292 $as_echo "yes" >&6; }
49293          LIBPNG_FOUND=yes
49294 fi
49295       if test "x${LIBPNG_FOUND}" = "xyes"; then
49296           USE_EXTERNAL_LIBPNG=true
49297           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49298 $as_echo "system" >&6; }
49299       else
49300           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49301 $as_echo "system not found" >&6; }
49302           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49303       fi
49304   else
49305       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49306   fi
49307 
49308 
49309   ###############################################################################
49310   #
49311   # Check for the zlib library
49312   #
49313 
49314 
49315 # Check whether --with-zlib was given.
49316 if test "${with_zlib+set}" = set; then :
49317   withval=$with_zlib;
49318 fi
49319 
49320 
49321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49322 $as_echo_n "checking for compress in -lz... " >&6; }
49323 if ${ac_cv_lib_z_compress+:} false; then :
49324   $as_echo_n "(cached) " >&6
49325 else
49326   ac_check_lib_save_LIBS=$LIBS
49327 LIBS="-lz  $LIBS"
49328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49329 /* end confdefs.h.  */
49330 
49331 /* Override any GCC internal prototype to avoid an error.
49332    Use char because int might match the return type of a GCC
49333    builtin and then its argument prototype would still apply.  */
49334 #ifdef __cplusplus
49335 extern "C"
49336 #endif
49337 char compress ();
49338 int
49339 main ()
49340 {
49341 return compress ();
49342   ;
49343   return 0;
49344 }
49345 _ACEOF
49346 if ac_fn_cxx_try_link "$LINENO"; then :
49347   ac_cv_lib_z_compress=yes
49348 else
49349   ac_cv_lib_z_compress=no
49350 fi
49351 rm -f core conftest.err conftest.$ac_objext \
49352     conftest$ac_exeext conftest.$ac_ext
49353 LIBS=$ac_check_lib_save_LIBS
49354 fi
49355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49356 $as_echo "$ac_cv_lib_z_compress" >&6; }
49357 if test "x$ac_cv_lib_z_compress" = xyes; then :
49358    ZLIB_FOUND=yes
49359 else
49360    ZLIB_FOUND=no
49361 fi
49362 
49363 
49364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49365 $as_echo_n "checking for which zlib to use... " >&6; }
49366 
49367   DEFAULT_ZLIB=bundled
49368   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49369     #
49370     # On macosx default is system...on others default is
49371     #
49372     DEFAULT_ZLIB=system
49373   fi
49374 
49375   if test "x${ZLIB_FOUND}" != "xyes"; then
49376     #
49377     # If we don't find any system...set default to bundled
49378     #
49379     DEFAULT_ZLIB=bundled
49380   fi
49381 
49382   #
49383   # If user didn't specify, use DEFAULT_ZLIB
49384   #
49385   if test "x${with_zlib}" = "x"; then
49386     with_zlib=${DEFAULT_ZLIB}
49387   fi
49388 
49389   if test "x${with_zlib}" = "xbundled"; then
49390     USE_EXTERNAL_LIBZ=false
49391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49392 $as_echo "bundled" >&6; }
49393   elif test "x${with_zlib}" = "xsystem"; then
49394     if test "x${ZLIB_FOUND}" = "xyes"; then
49395       USE_EXTERNAL_LIBZ=true
49396       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49397 $as_echo "system" >&6; }
49398     else
49399       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49400 $as_echo "system not found" >&6; }
49401       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49402     fi
49403   else
49404     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49405   fi
49406 
49407 
49408 
49409   ###############################################################################
49410   LIBZIP_CAN_USE_MMAP=true
49411 
49412 
49413 
49414   ###############################################################################
49415   #
49416   # Check if altzone exists in time.h
49417   #
49418 
49419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49420 /* end confdefs.h.  */
49421 #include <time.h>
49422 int
49423 main ()
49424 {
49425 return (int)altzone;
49426   ;
49427   return 0;
49428 }
49429 _ACEOF
49430 if ac_fn_cxx_try_link "$LINENO"; then :
49431   has_altzone=yes
49432 else
49433   has_altzone=no
49434 fi
49435 rm -f core conftest.err conftest.$ac_objext \
49436     conftest$ac_exeext conftest.$ac_ext
49437   if test "x$has_altzone" = xyes; then
49438 
49439 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49440 
49441   fi
49442 
49443   ###############################################################################
49444   #
49445   # Check the maths library
49446   #
49447 
49448   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49449 $as_echo_n "checking for cos in -lm... " >&6; }
49450 if ${ac_cv_lib_m_cos+:} false; then :
49451   $as_echo_n "(cached) " >&6
49452 else
49453   ac_check_lib_save_LIBS=$LIBS
49454 LIBS="-lm  $LIBS"
49455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49456 /* end confdefs.h.  */
49457 
49458 /* Override any GCC internal prototype to avoid an error.
49459    Use char because int might match the return type of a GCC
49460    builtin and then its argument prototype would still apply.  */
49461 #ifdef __cplusplus
49462 extern "C"
49463 #endif
49464 char cos ();
49465 int
49466 main ()
49467 {
49468 return cos ();
49469   ;
49470   return 0;
49471 }
49472 _ACEOF
49473 if ac_fn_cxx_try_link "$LINENO"; then :
49474   ac_cv_lib_m_cos=yes
49475 else
49476   ac_cv_lib_m_cos=no
49477 fi
49478 rm -f core conftest.err conftest.$ac_objext \
49479     conftest$ac_exeext conftest.$ac_ext
49480 LIBS=$ac_check_lib_save_LIBS
49481 fi
49482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49483 $as_echo "$ac_cv_lib_m_cos" >&6; }
49484 if test "x$ac_cv_lib_m_cos" = xyes; then :
49485   cat >>confdefs.h <<_ACEOF
49486 #define HAVE_LIBM 1
49487 _ACEOF
49488 
49489   LIBS="-lm $LIBS"
49490 
49491 else
49492 
49493         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49494 $as_echo "$as_me: Maths library was not found" >&6;}
49495 
49496 
49497 fi
49498 
49499 
49500 
49501   ###############################################################################
49502   #
49503   # Check for libdl.so
49504 
49505   save_LIBS="$LIBS"
49506   LIBS=""
49507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49508 $as_echo_n "checking for dlopen in -ldl... " >&6; }
49509 if ${ac_cv_lib_dl_dlopen+:} false; then :
49510   $as_echo_n "(cached) " >&6
49511 else
49512   ac_check_lib_save_LIBS=$LIBS
49513 LIBS="-ldl  $LIBS"
49514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49515 /* end confdefs.h.  */
49516 
49517 /* Override any GCC internal prototype to avoid an error.
49518    Use char because int might match the return type of a GCC
49519    builtin and then its argument prototype would still apply.  */
49520 #ifdef __cplusplus
49521 extern "C"
49522 #endif
49523 char dlopen ();
49524 int
49525 main ()
49526 {
49527 return dlopen ();
49528   ;
49529   return 0;
49530 }
49531 _ACEOF
49532 if ac_fn_cxx_try_link "$LINENO"; then :
49533   ac_cv_lib_dl_dlopen=yes
49534 else
49535   ac_cv_lib_dl_dlopen=no
49536 fi
49537 rm -f core conftest.err conftest.$ac_objext \
49538     conftest$ac_exeext conftest.$ac_ext
49539 LIBS=$ac_check_lib_save_LIBS
49540 fi
49541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49542 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49543 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49544   cat >>confdefs.h <<_ACEOF
49545 #define HAVE_LIBDL 1
49546 _ACEOF
49547 
49548   LIBS="-ldl $LIBS"
49549 
49550 fi
49551 
49552   LIBDL="$LIBS"
49553 
49554   LIBS="$save_LIBS"
49555 
49556 
49557   ###############################################################################
49558   #
49559   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49560   # dynamic build is configured on command line.
49561   #
49562 
49563 # Check whether --with-stdc++lib was given.
49564 if test "${with_stdc__lib+set}" = set; then :
49565   withval=$with_stdc__lib;
49566         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49567                 && test "x$with_stdc__lib" != xdefault; then
49568           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49569         fi
49570 
49571 else
49572   with_stdc__lib=default
49573 
49574 fi
49575 
49576 
49577   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49578     # Test if -lstdc++ works.
49579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49580 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49581     ac_ext=cpp
49582 ac_cpp='$CXXCPP $CPPFLAGS'
49583 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49584 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49585 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49586 
49587     OLD_CXXFLAGS="$CXXFLAGS"
49588     CXXFLAGS="$CXXFLAGS -lstdc++"
49589     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49590 /* end confdefs.h.  */
49591 
49592 int
49593 main ()
49594 {
49595 return 0;
49596   ;
49597   return 0;
49598 }
49599 _ACEOF
49600 if ac_fn_cxx_try_link "$LINENO"; then :
49601   has_dynamic_libstdcxx=yes
49602 else
49603   has_dynamic_libstdcxx=no
49604 fi
49605 rm -f core conftest.err conftest.$ac_objext \
49606     conftest$ac_exeext conftest.$ac_ext
49607     CXXFLAGS="$OLD_CXXFLAGS"
49608     ac_ext=cpp
49609 ac_cpp='$CXXCPP $CPPFLAGS'
49610 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49611 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49612 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49613 
49614     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49615 $as_echo "$has_dynamic_libstdcxx" >&6; }
49616 
49617     # Test if stdc++ can be linked statically.
49618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49619 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49620     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49621     ac_ext=cpp
49622 ac_cpp='$CXXCPP $CPPFLAGS'
49623 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49624 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49625 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49626 
49627     OLD_LIBS="$LIBS"
49628     OLD_CXX="$CXX"
49629     LIBS="$STATIC_STDCXX_FLAGS"
49630     CXX="$CC"
49631     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49632 /* end confdefs.h.  */
49633 
49634 int
49635 main ()
49636 {
49637 return 0;
49638   ;
49639   return 0;
49640 }
49641 _ACEOF
49642 if ac_fn_cxx_try_link "$LINENO"; then :
49643   has_static_libstdcxx=yes
49644 else
49645   has_static_libstdcxx=no
49646 fi
49647 rm -f core conftest.err conftest.$ac_objext \
49648     conftest$ac_exeext conftest.$ac_ext
49649     LIBS="$OLD_LIBS"
49650     CXX="$OLD_CXX"
49651     ac_ext=cpp
49652 ac_cpp='$CXXCPP $CPPFLAGS'
49653 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49654 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49655 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49656 
49657     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49658 $as_echo "$has_static_libstdcxx" >&6; }
49659 
49660     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49661       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49662     fi
49663 
49664     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49665       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49666     fi
49667 
49668     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49669       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49670     fi
49671 
49672     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49673 $as_echo_n "checking how to link with libstdc++... " >&6; }
49674     # If dynamic was requested, it's available since it would fail above otherwise.
49675     # If dynamic wasn't requested, go with static unless it isn't available.
49676     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49677       LIBCXX="$LIBCXX -lstdc++"
49678       LDCXX="$CXX"
49679       STATIC_CXX_SETTING="STATIC_CXX=false"
49680       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49681 $as_echo "dynamic" >&6; }
49682     else
49683       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49684       LDCXX="$CC"
49685       STATIC_CXX_SETTING="STATIC_CXX=true"
49686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49687 $as_echo "static" >&6; }
49688     fi
49689   fi
49690 
49691 
49692   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49693     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49694 
49695 pkg_failed=no
49696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49697 $as_echo_n "checking for LIBFFI... " >&6; }
49698 
49699 if test -n "$LIBFFI_CFLAGS"; then
49700     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49701  elif test -n "$PKG_CONFIG"; then
49702     if test -n "$PKG_CONFIG" && \
49703     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49704   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49705   ac_status=$?
49706   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49707   test $ac_status = 0; }; then
49708   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49709 else
49710   pkg_failed=yes
49711 fi
49712  else
49713     pkg_failed=untried
49714 fi
49715 if test -n "$LIBFFI_LIBS"; then
49716     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49717  elif test -n "$PKG_CONFIG"; then
49718     if test -n "$PKG_CONFIG" && \
49719     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49720   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49721   ac_status=$?
49722   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49723   test $ac_status = 0; }; then
49724   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49725 else
49726   pkg_failed=yes
49727 fi
49728  else
49729     pkg_failed=untried
49730 fi
49731 
49732 
49733 
49734 if test $pkg_failed = yes; then
49735 
49736 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49737         _pkg_short_errors_supported=yes
49738 else
49739         _pkg_short_errors_supported=no
49740 fi
49741         if test $_pkg_short_errors_supported = yes; then
49742                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49743         else
49744                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49745         fi
49746         # Put the nasty error message in config.log where it belongs
49747         echo "$LIBFFI_PKG_ERRORS" >&5
49748 
49749         as_fn_error $? "Package requirements (libffi) were not met:
49750 
49751 $LIBFFI_PKG_ERRORS
49752 
49753 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49754 installed software in a non-standard prefix.
49755 
49756 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49757 and LIBFFI_LIBS to avoid the need to call pkg-config.
49758 See the pkg-config man page for more details.
49759 " "$LINENO" 5
49760 elif test $pkg_failed = untried; then
49761         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49762 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49763 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49764 is in your PATH or set the PKG_CONFIG environment variable to the full
49765 path to pkg-config.
49766 
49767 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49768 and LIBFFI_LIBS to avoid the need to call pkg-config.
49769 See the pkg-config man page for more details.
49770 
49771 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49772 See \`config.log' for more details" "$LINENO" 5; }
49773 else
49774         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49775         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49776         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49777 $as_echo "yes" >&6; }
49778         :
49779 fi
49780 
49781   fi
49782 
49783   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49784     # Extract the first word of "llvm-config", so it can be a program name with args.
49785 set dummy llvm-config; ac_word=$2
49786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49787 $as_echo_n "checking for $ac_word... " >&6; }
49788 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49789   $as_echo_n "(cached) " >&6
49790 else
49791   if test -n "$LLVM_CONFIG"; then
49792   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49793 else
49794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49795 for as_dir in $PATH
49796 do
49797   IFS=$as_save_IFS
49798   test -z "$as_dir" && as_dir=.
49799     for ac_exec_ext in '' $ac_executable_extensions; do
49800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49801     ac_cv_prog_LLVM_CONFIG="llvm-config"
49802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49803     break 2
49804   fi
49805 done
49806   done
49807 IFS=$as_save_IFS
49808 
49809 fi
49810 fi
49811 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49812 if test -n "$LLVM_CONFIG"; then
49813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49814 $as_echo "$LLVM_CONFIG" >&6; }
49815 else
49816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49817 $as_echo "no" >&6; }
49818 fi
49819 
49820 
49821 
49822     if test "x$LLVM_CONFIG" != xllvm-config; then
49823       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49824     fi
49825 
49826     llvm_components="jit mcjit engine nativecodegen native"
49827     unset LLVM_CFLAGS
49828     for flag in $("$LLVM_CONFIG" --cxxflags); do
49829       if echo "${flag}" | grep -q '^-[ID]'; then
49830         if test "${flag}" != "-D_DEBUG" ; then
49831           if test "${LLVM_CFLAGS}" != "" ; then
49832             LLVM_CFLAGS="${LLVM_CFLAGS} "
49833           fi
49834           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49835         fi
49836       fi
49837     done
49838     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49839     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49840 
49841     unset LLVM_LDFLAGS
49842     for flag in $("${LLVM_CONFIG}" --ldflags); do
49843       if echo "${flag}" | grep -q '^-L'; then
49844         if test "${LLVM_LDFLAGS}" != ""; then
49845           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49846         fi
49847         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49848       fi
49849     done
49850 
49851     unset LLVM_LIBS
49852     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49853       if echo "${flag}" | grep -q '^-l'; then
49854         if test "${LLVM_LIBS}" != ""; then
49855           LLVM_LIBS="${LLVM_LIBS} "
49856         fi
49857         LLVM_LIBS="${LLVM_LIBS}${flag}"
49858       fi
49859     done
49860 
49861 
49862 
49863 
49864   fi
49865 
49866   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49867   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49868     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49869   fi
49870 
49871   # TODO better (platform agnostic) test
49872   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49873     LIBCXX="-lstdc++"
49874   fi
49875 
49876 
49877 
49878 
49879   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49880 
49881 
49882 # Check whether --with-msvcr-dll was given.
49883 if test "${with_msvcr_dll+set}" = set; then :
49884   withval=$with_msvcr_dll;
49885 fi
49886 
49887 
49888   if test "x$with_msvcr_dll" != x; then
49889     # If given explicitely by user, do not probe. If not present, fail directly.
49890 
49891   DLL_NAME="$DLL_NAME"
49892   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49893   METHOD="--with-msvcr-dll"
49894   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49895     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49896 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49897 
49898     # Need to check if the found msvcr is correct architecture
49899     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49900 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49901     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49903       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49904       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49905       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49906         CORRECT_MSVCR_ARCH="PE32 executable"
49907       else
49908         CORRECT_MSVCR_ARCH="PE32+ executable"
49909       fi
49910     else
49911       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49912         CORRECT_MSVCR_ARCH=386
49913       else
49914         CORRECT_MSVCR_ARCH=x86-64
49915       fi
49916     fi
49917     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49918       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49919 $as_echo "ok" >&6; }
49920       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49921       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49922 $as_echo_n "checking for $DLL_NAME... " >&6; }
49923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49924 $as_echo "$MSVC_DLL" >&6; }
49925     else
49926       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49927 $as_echo "incorrect, ignoring" >&6; }
49928       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49929 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49930     fi
49931   fi
49932 
49933     if test "x$MSVC_DLL" = x; then
49934       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49935     fi
49936   else
49937 
49938   VAR_NAME="MSVCR_DLL"
49939   DLL_NAME="${MSVCR_NAME}"
49940   MSVC_DLL=
49941 
49942   if test "x$MSVC_DLL" = x; then
49943     # Probe: Using well-known location from Visual Studio 10.0
49944     if test "x$VCINSTALLDIR" != x; then
49945       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49946 
49947   windows_path="$CYGWIN_VC_INSTALL_DIR"
49948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49949     unix_path=`$CYGPATH -u "$windows_path"`
49950     CYGWIN_VC_INSTALL_DIR="$unix_path"
49951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49953     CYGWIN_VC_INSTALL_DIR="$unix_path"
49954   fi
49955 
49956       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49957         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49958       else
49959         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49960       fi
49961       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49962 
49963   DLL_NAME="$DLL_NAME"
49964   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49965   METHOD="well-known location in VCINSTALLDIR"
49966   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49967     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49968 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49969 
49970     # Need to check if the found msvcr is correct architecture
49971     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49972 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49973     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49974     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49975       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49976       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49977       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49978         CORRECT_MSVCR_ARCH="PE32 executable"
49979       else
49980         CORRECT_MSVCR_ARCH="PE32+ executable"
49981       fi
49982     else
49983       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49984         CORRECT_MSVCR_ARCH=386
49985       else
49986         CORRECT_MSVCR_ARCH=x86-64
49987       fi
49988     fi
49989     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49990       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49991 $as_echo "ok" >&6; }
49992       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49993       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49994 $as_echo_n "checking for $DLL_NAME... " >&6; }
49995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49996 $as_echo "$MSVC_DLL" >&6; }
49997     else
49998       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49999 $as_echo "incorrect, ignoring" >&6; }
50000       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50001 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50002     fi
50003   fi
50004 
50005     fi
50006   fi
50007 
50008   if test "x$MSVC_DLL" = x; then
50009     # Probe: Check in the Boot JDK directory.
50010     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50011 
50012   DLL_NAME="$DLL_NAME"
50013   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50014   METHOD="well-known location in Boot JDK"
50015   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50016     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50017 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50018 
50019     # Need to check if the found msvcr is correct architecture
50020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50021 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50022     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50023     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50024       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50025       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50026       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50027         CORRECT_MSVCR_ARCH="PE32 executable"
50028       else
50029         CORRECT_MSVCR_ARCH="PE32+ executable"
50030       fi
50031     else
50032       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50033         CORRECT_MSVCR_ARCH=386
50034       else
50035         CORRECT_MSVCR_ARCH=x86-64
50036       fi
50037     fi
50038     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50039       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50040 $as_echo "ok" >&6; }
50041       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50042       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50043 $as_echo_n "checking for $DLL_NAME... " >&6; }
50044       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50045 $as_echo "$MSVC_DLL" >&6; }
50046     else
50047       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50048 $as_echo "incorrect, ignoring" >&6; }
50049       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50050 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50051     fi
50052   fi
50053 
50054   fi
50055 
50056   if test "x$MSVC_DLL" = x; then
50057     # Probe: Look in the Windows system32 directory
50058     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50059 
50060   windows_path="$CYGWIN_SYSTEMROOT"
50061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50062     unix_path=`$CYGPATH -u "$windows_path"`
50063     CYGWIN_SYSTEMROOT="$unix_path"
50064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50066     CYGWIN_SYSTEMROOT="$unix_path"
50067   fi
50068 
50069     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50070 
50071   DLL_NAME="$DLL_NAME"
50072   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50073   METHOD="well-known location in SYSTEMROOT"
50074   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50075     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50076 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50077 
50078     # Need to check if the found msvcr is correct architecture
50079     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50080 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50081     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50082     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50083       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50084       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50085       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50086         CORRECT_MSVCR_ARCH="PE32 executable"
50087       else
50088         CORRECT_MSVCR_ARCH="PE32+ executable"
50089       fi
50090     else
50091       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50092         CORRECT_MSVCR_ARCH=386
50093       else
50094         CORRECT_MSVCR_ARCH=x86-64
50095       fi
50096     fi
50097     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50098       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50099 $as_echo "ok" >&6; }
50100       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50101       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50102 $as_echo_n "checking for $DLL_NAME... " >&6; }
50103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50104 $as_echo "$MSVC_DLL" >&6; }
50105     else
50106       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50107 $as_echo "incorrect, ignoring" >&6; }
50108       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50109 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50110     fi
50111   fi
50112 
50113   fi
50114 
50115   if test "x$MSVC_DLL" = x; then
50116     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50117     if test "x$VS100COMNTOOLS" != x; then
50118       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50119 
50120   windows_path="$CYGWIN_VS_TOOLS_DIR"
50121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50122     unix_path=`$CYGPATH -u "$windows_path"`
50123     CYGWIN_VS_TOOLS_DIR="$unix_path"
50124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50126     CYGWIN_VS_TOOLS_DIR="$unix_path"
50127   fi
50128 
50129       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50130         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50131             | $GREP -i /x64/ | $HEAD --lines 1`
50132       else
50133         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50134             | $GREP -i /x86/ | $HEAD --lines 1`
50135       fi
50136 
50137   DLL_NAME="$DLL_NAME"
50138   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50139   METHOD="search of VS100COMNTOOLS"
50140   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50141     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50142 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50143 
50144     # Need to check if the found msvcr is correct architecture
50145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50146 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50147     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50148     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50149       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50150       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50151       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50152         CORRECT_MSVCR_ARCH="PE32 executable"
50153       else
50154         CORRECT_MSVCR_ARCH="PE32+ executable"
50155       fi
50156     else
50157       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50158         CORRECT_MSVCR_ARCH=386
50159       else
50160         CORRECT_MSVCR_ARCH=x86-64
50161       fi
50162     fi
50163     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50164       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50165 $as_echo "ok" >&6; }
50166       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50167       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50168 $as_echo_n "checking for $DLL_NAME... " >&6; }
50169       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50170 $as_echo "$MSVC_DLL" >&6; }
50171     else
50172       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50173 $as_echo "incorrect, ignoring" >&6; }
50174       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50175 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50176     fi
50177   fi
50178 
50179     fi
50180   fi
50181 
50182   if test "x$MSVC_DLL" = x; then
50183     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50184     # (This was the original behaviour; kept since it might turn something up)
50185     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50186       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50187         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50188             | $GREP x64 | $HEAD --lines 1`
50189       else
50190         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50191             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50192         if test "x$POSSIBLE_MSVC_DLL" = x; then
50193           # We're grasping at straws now...
50194           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50195               | $HEAD --lines 1`
50196         fi
50197       fi
50198 
50199 
50200   DLL_NAME="$DLL_NAME"
50201   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50202   METHOD="search of VCINSTALLDIR"
50203   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50204     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50205 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50206 
50207     # Need to check if the found msvcr is correct architecture
50208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50209 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50210     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50212       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50213       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50214       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50215         CORRECT_MSVCR_ARCH="PE32 executable"
50216       else
50217         CORRECT_MSVCR_ARCH="PE32+ executable"
50218       fi
50219     else
50220       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50221         CORRECT_MSVCR_ARCH=386
50222       else
50223         CORRECT_MSVCR_ARCH=x86-64
50224       fi
50225     fi
50226     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50227       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50228 $as_echo "ok" >&6; }
50229       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50230       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50231 $as_echo_n "checking for $DLL_NAME... " >&6; }
50232       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50233 $as_echo "$MSVC_DLL" >&6; }
50234     else
50235       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50236 $as_echo "incorrect, ignoring" >&6; }
50237       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50238 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50239     fi
50240   fi
50241 
50242     fi
50243   fi
50244 
50245   if test "x$MSVC_DLL" = x; then
50246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50247 $as_echo_n "checking for $DLL_NAME... " >&6; }
50248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50249 $as_echo "no" >&6; }
50250     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50251   fi
50252 
50253   MSVCR_DLL=$MSVC_DLL
50254 
50255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50256 
50257   # Input might be given as Windows format, start by converting to
50258   # unix format.
50259   path="$MSVCR_DLL"
50260   new_path=`$CYGPATH -u "$path"`
50261 
50262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50265   # "foo.exe" is OK but "foo" is an error.
50266   #
50267   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50268   # It is also a way to make sure we got the proper file name for the real test later on.
50269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50270   if test "x$test_shortpath" = x; then
50271     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50272 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50273     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50274   fi
50275 
50276   # Call helper function which possibly converts this using DOS-style short mode.
50277   # If so, the updated path is stored in $new_path.
50278 
50279   input_path="$new_path"
50280   # Check if we need to convert this using DOS-style short mode. If the path
50281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50282   # take no chances and rewrite it.
50283   # Note: m4 eats our [], so we need to use [ and ] instead.
50284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50285   if test "x$has_forbidden_chars" != x; then
50286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50290       # Going to short mode and back again did indeed matter. Since short mode is
50291       # case insensitive, let's make it lowercase to improve readability.
50292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50293       # Now convert it back to Unix-stile (cygpath)
50294       input_path=`$CYGPATH -u "$shortmode_path"`
50295       new_path="$input_path"
50296     fi
50297   fi
50298 
50299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50300   if test "x$test_cygdrive_prefix" = x; then
50301     # As a simple fix, exclude /usr/bin since it's not a real path.
50302     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50304       # a path prefixed by /cygdrive for fixpath to work.
50305       new_path="$CYGWIN_ROOT_PATH$input_path"
50306     fi
50307   fi
50308 
50309 
50310   if test "x$path" != "x$new_path"; then
50311     MSVCR_DLL="$new_path"
50312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50313 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50314   fi
50315 
50316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50317 
50318   path="$MSVCR_DLL"
50319   has_colon=`$ECHO $path | $GREP ^.:`
50320   new_path="$path"
50321   if test "x$has_colon" = x; then
50322     # Not in mixed or Windows style, start by that.
50323     new_path=`cmd //c echo $path`
50324   fi
50325 
50326 
50327   input_path="$new_path"
50328   # Check if we need to convert this using DOS-style short mode. If the path
50329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50330   # take no chances and rewrite it.
50331   # Note: m4 eats our [], so we need to use [ and ] instead.
50332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50333   if test "x$has_forbidden_chars" != x; then
50334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50335     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50336   fi
50337 
50338 
50339   windows_path="$new_path"
50340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50341     unix_path=`$CYGPATH -u "$windows_path"`
50342     new_path="$unix_path"
50343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50345     new_path="$unix_path"
50346   fi
50347 
50348   if test "x$path" != "x$new_path"; then
50349     MSVCR_DLL="$new_path"
50350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50351 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50352   fi
50353 
50354   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50355   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50356 
50357   else
50358     # We're on a unix platform. Hooray! :)
50359     path="$MSVCR_DLL"
50360     has_space=`$ECHO "$path" | $GREP " "`
50361     if test "x$has_space" != x; then
50362       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50363 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50364       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50365     fi
50366 
50367     # Use eval to expand a potential ~
50368     eval path="$path"
50369     if test ! -f "$path" && test ! -d "$path"; then
50370       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50371     fi
50372 
50373     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50374   fi
50375 
50376   MSVCR_DLL=$MSVCR_DLL
50377 
50378 
50379   fi
50380 
50381 
50382 # Check whether --with-msvcp-dll was given.
50383 if test "${with_msvcp_dll+set}" = set; then :
50384   withval=$with_msvcp_dll;
50385 fi
50386 
50387 
50388   if test "x$MSVCP_NAME" != "x"; then
50389     if test "x$with_msvcp_dll" != x; then
50390       # If given explicitely by user, do not probe. If not present, fail directly.
50391 
50392   DLL_NAME="$DLL_NAME"
50393   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50394   METHOD="--with-msvcp-dll"
50395   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50396     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50397 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50398 
50399     # Need to check if the found msvcr is correct architecture
50400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50401 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50402     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50403     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50404       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50405       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50406       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50407         CORRECT_MSVCR_ARCH="PE32 executable"
50408       else
50409         CORRECT_MSVCR_ARCH="PE32+ executable"
50410       fi
50411     else
50412       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50413         CORRECT_MSVCR_ARCH=386
50414       else
50415         CORRECT_MSVCR_ARCH=x86-64
50416       fi
50417     fi
50418     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50419       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50420 $as_echo "ok" >&6; }
50421       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50422       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50423 $as_echo_n "checking for $DLL_NAME... " >&6; }
50424       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50425 $as_echo "$MSVC_DLL" >&6; }
50426     else
50427       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50428 $as_echo "incorrect, ignoring" >&6; }
50429       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50430 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50431     fi
50432   fi
50433 
50434       if test "x$MSVC_DLL" = x; then
50435         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50436       fi
50437     else
50438 
50439   VAR_NAME="MSVCP_DLL"
50440   DLL_NAME="${MSVCP_NAME}"
50441   MSVC_DLL=
50442 
50443   if test "x$MSVC_DLL" = x; then
50444     # Probe: Using well-known location from Visual Studio 10.0
50445     if test "x$VCINSTALLDIR" != x; then
50446       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50447 
50448   windows_path="$CYGWIN_VC_INSTALL_DIR"
50449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50450     unix_path=`$CYGPATH -u "$windows_path"`
50451     CYGWIN_VC_INSTALL_DIR="$unix_path"
50452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50454     CYGWIN_VC_INSTALL_DIR="$unix_path"
50455   fi
50456 
50457       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50458         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50459       else
50460         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50461       fi
50462       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50463 
50464   DLL_NAME="$DLL_NAME"
50465   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50466   METHOD="well-known location in VCINSTALLDIR"
50467   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50468     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50469 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50470 
50471     # Need to check if the found msvcr is correct architecture
50472     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50473 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50474     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50475     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50476       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50477       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50478       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50479         CORRECT_MSVCR_ARCH="PE32 executable"
50480       else
50481         CORRECT_MSVCR_ARCH="PE32+ executable"
50482       fi
50483     else
50484       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50485         CORRECT_MSVCR_ARCH=386
50486       else
50487         CORRECT_MSVCR_ARCH=x86-64
50488       fi
50489     fi
50490     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50491       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50492 $as_echo "ok" >&6; }
50493       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50494       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50495 $as_echo_n "checking for $DLL_NAME... " >&6; }
50496       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50497 $as_echo "$MSVC_DLL" >&6; }
50498     else
50499       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50500 $as_echo "incorrect, ignoring" >&6; }
50501       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50502 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50503     fi
50504   fi
50505 
50506     fi
50507   fi
50508 
50509   if test "x$MSVC_DLL" = x; then
50510     # Probe: Check in the Boot JDK directory.
50511     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50512 
50513   DLL_NAME="$DLL_NAME"
50514   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50515   METHOD="well-known location in Boot JDK"
50516   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50517     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50518 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50519 
50520     # Need to check if the found msvcr is correct architecture
50521     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50522 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50523     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50524     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50525       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50526       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50527       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50528         CORRECT_MSVCR_ARCH="PE32 executable"
50529       else
50530         CORRECT_MSVCR_ARCH="PE32+ executable"
50531       fi
50532     else
50533       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50534         CORRECT_MSVCR_ARCH=386
50535       else
50536         CORRECT_MSVCR_ARCH=x86-64
50537       fi
50538     fi
50539     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50540       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50541 $as_echo "ok" >&6; }
50542       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50543       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50544 $as_echo_n "checking for $DLL_NAME... " >&6; }
50545       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50546 $as_echo "$MSVC_DLL" >&6; }
50547     else
50548       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50549 $as_echo "incorrect, ignoring" >&6; }
50550       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50551 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50552     fi
50553   fi
50554 
50555   fi
50556 
50557   if test "x$MSVC_DLL" = x; then
50558     # Probe: Look in the Windows system32 directory
50559     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50560 
50561   windows_path="$CYGWIN_SYSTEMROOT"
50562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50563     unix_path=`$CYGPATH -u "$windows_path"`
50564     CYGWIN_SYSTEMROOT="$unix_path"
50565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50567     CYGWIN_SYSTEMROOT="$unix_path"
50568   fi
50569 
50570     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50571 
50572   DLL_NAME="$DLL_NAME"
50573   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50574   METHOD="well-known location in SYSTEMROOT"
50575   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50576     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50577 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50578 
50579     # Need to check if the found msvcr is correct architecture
50580     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50581 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50582     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50583     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50584       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50585       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50586       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50587         CORRECT_MSVCR_ARCH="PE32 executable"
50588       else
50589         CORRECT_MSVCR_ARCH="PE32+ executable"
50590       fi
50591     else
50592       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50593         CORRECT_MSVCR_ARCH=386
50594       else
50595         CORRECT_MSVCR_ARCH=x86-64
50596       fi
50597     fi
50598     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50599       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50600 $as_echo "ok" >&6; }
50601       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50602       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50603 $as_echo_n "checking for $DLL_NAME... " >&6; }
50604       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50605 $as_echo "$MSVC_DLL" >&6; }
50606     else
50607       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50608 $as_echo "incorrect, ignoring" >&6; }
50609       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50610 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50611     fi
50612   fi
50613 
50614   fi
50615 
50616   if test "x$MSVC_DLL" = x; then
50617     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50618     if test "x$VS100COMNTOOLS" != x; then
50619       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50620 
50621   windows_path="$CYGWIN_VS_TOOLS_DIR"
50622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50623     unix_path=`$CYGPATH -u "$windows_path"`
50624     CYGWIN_VS_TOOLS_DIR="$unix_path"
50625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50626     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50627     CYGWIN_VS_TOOLS_DIR="$unix_path"
50628   fi
50629 
50630       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50631         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50632             | $GREP -i /x64/ | $HEAD --lines 1`
50633       else
50634         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50635             | $GREP -i /x86/ | $HEAD --lines 1`
50636       fi
50637 
50638   DLL_NAME="$DLL_NAME"
50639   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50640   METHOD="search of VS100COMNTOOLS"
50641   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50642     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50643 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50644 
50645     # Need to check if the found msvcr is correct architecture
50646     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50647 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50648     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50649     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50650       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50651       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50652       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50653         CORRECT_MSVCR_ARCH="PE32 executable"
50654       else
50655         CORRECT_MSVCR_ARCH="PE32+ executable"
50656       fi
50657     else
50658       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50659         CORRECT_MSVCR_ARCH=386
50660       else
50661         CORRECT_MSVCR_ARCH=x86-64
50662       fi
50663     fi
50664     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50665       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50666 $as_echo "ok" >&6; }
50667       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50668       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50669 $as_echo_n "checking for $DLL_NAME... " >&6; }
50670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50671 $as_echo "$MSVC_DLL" >&6; }
50672     else
50673       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50674 $as_echo "incorrect, ignoring" >&6; }
50675       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50676 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50677     fi
50678   fi
50679 
50680     fi
50681   fi
50682 
50683   if test "x$MSVC_DLL" = x; then
50684     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50685     # (This was the original behaviour; kept since it might turn something up)
50686     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50687       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50688         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50689             | $GREP x64 | $HEAD --lines 1`
50690       else
50691         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50692             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50693         if test "x$POSSIBLE_MSVC_DLL" = x; then
50694           # We're grasping at straws now...
50695           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50696               | $HEAD --lines 1`
50697         fi
50698       fi
50699 
50700 
50701   DLL_NAME="$DLL_NAME"
50702   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50703   METHOD="search of VCINSTALLDIR"
50704   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50705     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50706 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50707 
50708     # Need to check if the found msvcr is correct architecture
50709     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50710 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50711     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50712     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50713       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50714       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50715       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50716         CORRECT_MSVCR_ARCH="PE32 executable"
50717       else
50718         CORRECT_MSVCR_ARCH="PE32+ executable"
50719       fi
50720     else
50721       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50722         CORRECT_MSVCR_ARCH=386
50723       else
50724         CORRECT_MSVCR_ARCH=x86-64
50725       fi
50726     fi
50727     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50729 $as_echo "ok" >&6; }
50730       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50731       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50732 $as_echo_n "checking for $DLL_NAME... " >&6; }
50733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50734 $as_echo "$MSVC_DLL" >&6; }
50735     else
50736       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50737 $as_echo "incorrect, ignoring" >&6; }
50738       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50739 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50740     fi
50741   fi
50742 
50743     fi
50744   fi
50745 
50746   if test "x$MSVC_DLL" = x; then
50747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50748 $as_echo_n "checking for $DLL_NAME... " >&6; }
50749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50750 $as_echo "no" >&6; }
50751     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50752   fi
50753 
50754   MSVCP_DLL=$MSVC_DLL
50755 
50756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50757 
50758   # Input might be given as Windows format, start by converting to
50759   # unix format.
50760   path="$MSVCP_DLL"
50761   new_path=`$CYGPATH -u "$path"`
50762 
50763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50766   # "foo.exe" is OK but "foo" is an error.
50767   #
50768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50769   # It is also a way to make sure we got the proper file name for the real test later on.
50770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50771   if test "x$test_shortpath" = x; then
50772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50773 $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50774     as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50775   fi
50776 
50777   # Call helper function which possibly converts this using DOS-style short mode.
50778   # If so, the updated path is stored in $new_path.
50779 
50780   input_path="$new_path"
50781   # Check if we need to convert this using DOS-style short mode. If the path
50782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50783   # take no chances and rewrite it.
50784   # Note: m4 eats our [], so we need to use [ and ] instead.
50785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50786   if test "x$has_forbidden_chars" != x; then
50787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50791       # Going to short mode and back again did indeed matter. Since short mode is
50792       # case insensitive, let's make it lowercase to improve readability.
50793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50794       # Now convert it back to Unix-stile (cygpath)
50795       input_path=`$CYGPATH -u "$shortmode_path"`
50796       new_path="$input_path"
50797     fi
50798   fi
50799 
50800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50801   if test "x$test_cygdrive_prefix" = x; then
50802     # As a simple fix, exclude /usr/bin since it's not a real path.
50803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50805       # a path prefixed by /cygdrive for fixpath to work.
50806       new_path="$CYGWIN_ROOT_PATH$input_path"
50807     fi
50808   fi
50809 
50810 
50811   if test "x$path" != "x$new_path"; then
50812     MSVCP_DLL="$new_path"
50813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50814 $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50815   fi
50816 
50817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50818 
50819   path="$MSVCP_DLL"
50820   has_colon=`$ECHO $path | $GREP ^.:`
50821   new_path="$path"
50822   if test "x$has_colon" = x; then
50823     # Not in mixed or Windows style, start by that.
50824     new_path=`cmd //c echo $path`
50825   fi
50826 
50827 
50828   input_path="$new_path"
50829   # Check if we need to convert this using DOS-style short mode. If the path
50830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50831   # take no chances and rewrite it.
50832   # Note: m4 eats our [], so we need to use [ and ] instead.
50833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50834   if test "x$has_forbidden_chars" != x; then
50835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50837   fi
50838 
50839 
50840   windows_path="$new_path"
50841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50842     unix_path=`$CYGPATH -u "$windows_path"`
50843     new_path="$unix_path"
50844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50846     new_path="$unix_path"
50847   fi
50848 
50849   if test "x$path" != "x$new_path"; then
50850     MSVCP_DLL="$new_path"
50851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50852 $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50853   fi
50854 
50855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50857 
50858   else
50859     # We're on a unix platform. Hooray! :)
50860     path="$MSVCP_DLL"
50861     has_space=`$ECHO "$path" | $GREP " "`
50862     if test "x$has_space" != x; then
50863       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50864 $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50865       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50866     fi
50867 
50868     # Use eval to expand a potential ~
50869     eval path="$path"
50870     if test ! -f "$path" && test ! -d "$path"; then
50871       as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50872     fi
50873 
50874     MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50875   fi
50876 
50877   MSVCP_DLL=$MSVCP_DLL
50878 
50879 
50880     fi
50881   fi
50882 
50883 
50884 
50885 # Check whether --with-dxsdk was given.
50886 if test "${with_dxsdk+set}" = set; then :
50887   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50888 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50889 fi
50890 
50891 
50892 
50893 
50894 # Check whether --with-dxsdk-lib was given.
50895 if test "${with_dxsdk_lib+set}" = set; then :
50896   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50897 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50898 fi
50899 
50900 
50901 
50902 
50903 # Check whether --with-dxsdk-include was given.
50904 if test "${with_dxsdk_include+set}" = set; then :
50905   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50906 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50907 fi
50908 
50909 
50910   fi
50911 
50912 
50913 ###############################################################################
50914 #
50915 # We need to do some final tweaking, when everything else is done.
50916 #
50917 ###############################################################################
50918 
50919 
50920   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50921 
50922 
50923   # The name of the Service Agent jar.
50924   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50925   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50926     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50927   fi
50928 
50929 
50930 
50931     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50932 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50933 
50934     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50935       ENABLE_INTREE_EC=yes
50936       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50937 $as_echo "yes" >&6; }
50938     else
50939       ENABLE_INTREE_EC=no
50940       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50941 $as_echo "no" >&6; }
50942     fi
50943 
50944 
50945 
50946 
50947 ###############################################################################
50948 #
50949 # Configure parts of the build that only affect the build performance,
50950 # not the result.
50951 #
50952 ###############################################################################
50953 
50954 
50955   # How many cores do we have on this build system?
50956 
50957 # Check whether --with-num-cores was given.
50958 if test "${with_num_cores+set}" = set; then :
50959   withval=$with_num_cores;
50960 fi
50961 
50962   if test "x$with_num_cores" = x; then
50963     # The number of cores were not specified, try to probe them.
50964 
50965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50966 $as_echo_n "checking for number of cores... " >&6; }
50967   NUM_CORES=1
50968   FOUND_CORES=no
50969 
50970   if test -f /proc/cpuinfo; then
50971     # Looks like a Linux (or cygwin) system
50972     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50973     FOUND_CORES=yes
50974   elif test -x /usr/sbin/psrinfo; then
50975     # Looks like a Solaris system
50976     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50977     FOUND_CORES=yes
50978   elif test -x /usr/sbin/system_profiler; then
50979     # Looks like a MacOSX system
50980     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50981     FOUND_CORES=yes
50982   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50983     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50984     FOUND_CORES=yes
50985   elif test -n "$NUMBER_OF_PROCESSORS"; then
50986     # On windows, look in the env
50987     NUM_CORES=$NUMBER_OF_PROCESSORS
50988     FOUND_CORES=yes
50989   fi
50990 
50991   if test "x$FOUND_CORES" = xyes; then
50992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50993 $as_echo "$NUM_CORES" >&6; }
50994   else
50995     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50996 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
50997     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50998 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50999   fi
51000 
51001   else
51002     NUM_CORES=$with_num_cores
51003   fi
51004 
51005 
51006 
51007   # How much memory do we have on this build system?
51008 
51009 # Check whether --with-memory-size was given.
51010 if test "${with_memory_size+set}" = set; then :
51011   withval=$with_memory_size;
51012 fi
51013 
51014   if test "x$with_memory_size" = x; then
51015     # The memory size was not specified, try to probe it.
51016 
51017   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51018 $as_echo_n "checking for memory size... " >&6; }
51019   # Default to 1024 MB
51020   MEMORY_SIZE=1024
51021   FOUND_MEM=no
51022 
51023   if test -f /proc/meminfo; then
51024     # Looks like a Linux (or cygwin) system
51025     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51026     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51027     FOUND_MEM=yes
51028   elif test -x /usr/sbin/prtconf; then
51029     # Looks like a Solaris or AIX system
51030     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51031     FOUND_MEM=yes
51032   elif test -x /usr/sbin/system_profiler; then
51033     # Looks like a MacOSX system
51034     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51035     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51036     FOUND_MEM=yes
51037   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51038     # Windows, but without cygwin
51039     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51040     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51041     FOUND_MEM=yes
51042   fi
51043 
51044   if test "x$FOUND_MEM" = xyes; then
51045     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51046 $as_echo "$MEMORY_SIZE MB" >&6; }
51047   else
51048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51049 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51050     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51051 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51052   fi
51053 
51054   else
51055     MEMORY_SIZE=$with_memory_size
51056   fi
51057 
51058 
51059 
51060   # Provide a decent default number of parallel jobs for make depending on
51061   # number of cores, amount of memory and machine architecture.
51062 
51063 # Check whether --with-jobs was given.
51064 if test "${with_jobs+set}" = set; then :
51065   withval=$with_jobs;
51066 fi
51067 
51068   if test "x$with_jobs" = x; then
51069     # Number of jobs was not specified, calculate.
51070     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51071 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51072     # Approximate memory in GB.
51073     memory_gb=`expr $MEMORY_SIZE / 1024`
51074     # Pick the lowest of memory in gb and number of cores.
51075     if test "$memory_gb" -lt "$NUM_CORES"; then
51076       JOBS="$memory_gb"
51077     else
51078       JOBS="$NUM_CORES"
51079       # On bigger machines, leave some room for other processes to run
51080       if test "$JOBS" -gt "4"; then
51081         JOBS=`expr $JOBS '*' 90 / 100`
51082       fi
51083     fi
51084     # Cap number of jobs to 16
51085     if test "$JOBS" -gt "16"; then
51086       JOBS=16
51087     fi
51088     if test "$JOBS" -eq "0"; then
51089       JOBS=1
51090     fi
51091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51092 $as_echo "$JOBS" >&6; }
51093   else
51094     JOBS=$with_jobs
51095   fi
51096 
51097 
51098 
51099 # Setup arguments for the boot jdk (after cores and memory have been setup)
51100 
51101   ##############################################################################
51102   #
51103   # Specify jvm options for anything that is run with the Boot JDK.
51104   # Not all JVM:s accept the same arguments on the command line.
51105   #
51106 
51107 # Check whether --with-boot-jdk-jvmargs was given.
51108 if test "${with_boot_jdk_jvmargs+set}" = set; then :
51109   withval=$with_boot_jdk_jvmargs;
51110 fi
51111 
51112 
51113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51114 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
51115 
51116   # Disable special log output when a debug build is used as Boot JDK...
51117 
51118   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51119   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51120   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51121   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51122   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51123   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51124     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51125     JVM_ARG_OK=true
51126   else
51127     $ECHO "Arg failed:" >&5
51128     $ECHO "$OUTPUT" >&5
51129     JVM_ARG_OK=false
51130   fi
51131 
51132 
51133   # Apply user provided options.
51134 
51135   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51136   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51137   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51138   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51139   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51140   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51141     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51142     JVM_ARG_OK=true
51143   else
51144     $ECHO "Arg failed:" >&5
51145     $ECHO "$OUTPUT" >&5
51146     JVM_ARG_OK=false
51147   fi
51148 
51149 
51150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51151 $as_echo "$boot_jdk_jvmargs" >&6; }
51152 
51153   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51154   JAVA_FLAGS=$boot_jdk_jvmargs
51155 
51156 
51157 
51158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51159 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51160 
51161   # Starting amount of heap memory.
51162 
51163   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51164   $ECHO "Command: $JAVA -Xms64M -version" >&5
51165   OUTPUT=`$JAVA -Xms64M -version 2>&1`
51166   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51167   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51168   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51169     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51170     JVM_ARG_OK=true
51171   else
51172     $ECHO "Arg failed:" >&5
51173     $ECHO "$OUTPUT" >&5
51174     JVM_ARG_OK=false
51175   fi
51176 
51177 
51178   # Maximum amount of heap memory.
51179   # Maximum stack size.
51180   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51181   if test "x$BUILD_NUM_BITS" = x32; then
51182     if test "$JVM_MAX_HEAP" -gt "1100"; then
51183       JVM_MAX_HEAP=1100
51184     elif test "$JVM_MAX_HEAP" -lt "512"; then
51185       JVM_MAX_HEAP=512
51186     fi
51187     STACK_SIZE=768
51188   else
51189     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51190     # pointers are used. Apparently, we need to increase the heap and stack
51191     # space for the jvm. More specifically, when running javac to build huge
51192     # jdk batch
51193     if test "$JVM_MAX_HEAP" -gt "1600"; then
51194       JVM_MAX_HEAP=1600
51195     elif test "$JVM_MAX_HEAP" -lt "512"; then
51196       JVM_MAX_HEAP=512
51197     fi
51198     STACK_SIZE=1536
51199   fi
51200 
51201   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51202   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51203   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51204   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51205   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51206   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51207     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51208     JVM_ARG_OK=true
51209   else
51210     $ECHO "Arg failed:" >&5
51211     $ECHO "$OUTPUT" >&5
51212     JVM_ARG_OK=false
51213   fi
51214 
51215 
51216   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51217   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51218   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51219   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51220   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51221   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51222     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51223     JVM_ARG_OK=true
51224   else
51225     $ECHO "Arg failed:" >&5
51226     $ECHO "$OUTPUT" >&5
51227     JVM_ARG_OK=false
51228   fi
51229 
51230 
51231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51232 $as_echo "$boot_jdk_jvmargs_big" >&6; }
51233 
51234   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51235 
51236 
51237 
51238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51239 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51240 
51241   # Use serial gc for small short lived tools if possible
51242 
51243   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51244   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51245   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51246   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51247   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51248   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51249     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51250     JVM_ARG_OK=true
51251   else
51252     $ECHO "Arg failed:" >&5
51253     $ECHO "$OUTPUT" >&5
51254     JVM_ARG_OK=false
51255   fi
51256 
51257 
51258   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51259   $ECHO "Command: $JAVA -Xms32M -version" >&5
51260   OUTPUT=`$JAVA -Xms32M -version 2>&1`
51261   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51262   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51263   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51264     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51265     JVM_ARG_OK=true
51266   else
51267     $ECHO "Arg failed:" >&5
51268     $ECHO "$OUTPUT" >&5
51269     JVM_ARG_OK=false
51270   fi
51271 
51272 
51273   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51274   $ECHO "Command: $JAVA -Xmx512M -version" >&5
51275   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51276   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51277   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51278   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51279     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51280     JVM_ARG_OK=true
51281   else
51282     $ECHO "Arg failed:" >&5
51283     $ECHO "$OUTPUT" >&5
51284     JVM_ARG_OK=false
51285   fi
51286 
51287 
51288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51289 $as_echo "$boot_jdk_jvmargs_small" >&6; }
51290 
51291   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51292 
51293 
51294   JAVA_TOOL_FLAGS_SMALL=""
51295   for f in $JAVA_FLAGS_SMALL; do
51296     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51297   done
51298 
51299 
51300 
51301 # Setup smart javac (after cores and memory have been setup)
51302 
51303 
51304 # Check whether --with-sjavac-server-java was given.
51305 if test "${with_sjavac_server_java+set}" = set; then :
51306   withval=$with_sjavac_server_java;
51307 fi
51308 
51309 
51310   if test "x$with_sjavac_server_java" != x; then
51311     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51312     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51313     if test "x$FOUND_VERSION" = x; then
51314       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51315     fi
51316   else
51317     SJAVAC_SERVER_JAVA="$JAVA"
51318   fi
51319 
51320 
51321   if test "$MEMORY_SIZE" -gt "3000"; then
51322 
51323   $ECHO "Check if jvm arg is ok: -d64" >&5
51324   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51325   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51326   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51327   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51328   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51329     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51330     JVM_ARG_OK=true
51331   else
51332     $ECHO "Arg failed:" >&5
51333     $ECHO "$OUTPUT" >&5
51334     JVM_ARG_OK=false
51335   fi
51336 
51337     if test "$JVM_ARG_OK" = true; then
51338       JVM_64BIT=true
51339       JVM_ARG_OK=false
51340     fi
51341   fi
51342 
51343   MX_VALUE=`expr $MEMORY_SIZE / 2`
51344   if test "$JVM_64BIT" = true; then
51345     # Set ms lower than mx since more than one instance of the server might
51346     # get launched at the same time before they figure out which instance won.
51347     MS_VALUE=512
51348     if test "$MX_VALUE" -gt "2048"; then
51349       MX_VALUE=2048
51350     fi
51351   else
51352     MS_VALUE=256
51353     if test "$MX_VALUE" -gt "1500"; then
51354       MX_VALUE=1500
51355     fi
51356   fi
51357   if test "$MX_VALUE" -lt "512"; then
51358     MX_VALUE=512
51359   fi
51360 
51361   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51362   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51363   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51364   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51365   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51366   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51367     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51368     JVM_ARG_OK=true
51369   else
51370     $ECHO "Arg failed:" >&5
51371     $ECHO "$OUTPUT" >&5
51372     JVM_ARG_OK=false
51373   fi
51374 
51375 
51376 
51377   # Check whether --enable-sjavac was given.
51378 if test "${enable_sjavac+set}" = set; then :
51379   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51380 else
51381   ENABLE_SJAVAC='no'
51382 fi
51383 
51384   if test "x$JVM_ARG_OK" = "xfalse"; then
51385     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51386 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51387     ENABLE_SJAVAC=no;
51388   fi
51389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51390 $as_echo_n "checking whether to use sjavac... " >&6; }
51391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51392 $as_echo "$ENABLE_SJAVAC" >&6; }
51393 
51394 
51395   if test "x$ENABLE_SJAVAC" = xyes; then
51396     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51397   else
51398     SJAVAC_SERVER_DIR=
51399   fi
51400 
51401 
51402 
51403 # Can the C/C++ compiler use precompiled headers?
51404 
51405 
51406   ###############################################################################
51407   #
51408   # Can the C/C++ compiler use precompiled headers?
51409   #
51410   # Check whether --enable-precompiled-headers was given.
51411 if test "${enable_precompiled_headers+set}" = set; then :
51412   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51413 else
51414   ENABLE_PRECOMPH=yes
51415 fi
51416 
51417 
51418   USE_PRECOMPILED_HEADER=1
51419   if test "x$ENABLE_PRECOMPH" = xno; then
51420     USE_PRECOMPILED_HEADER=0
51421   fi
51422 
51423   if test "x$ENABLE_PRECOMPH" = xyes; then
51424     # Check that the compiler actually supports precomp headers.
51425     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51426       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51427 $as_echo_n "checking that precompiled headers work... " >&6; }
51428       echo "int alfa();" > conftest.h
51429       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51430       if test ! -f conftest.hpp.gch; then
51431         USE_PRECOMPILED_HEADER=0
51432         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51433 $as_echo "no" >&6; }
51434       else
51435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51436 $as_echo "yes" >&6; }
51437       fi
51438       rm -f conftest.h conftest.hpp.gch
51439     fi
51440   fi
51441 
51442 
51443 
51444 
51445 # Setup use of ccache, if available
51446 
51447   # Check whether --enable-ccache was given.
51448 if test "${enable_ccache+set}" = set; then :
51449   enableval=$enable_ccache;
51450 fi
51451 
51452 
51453   CCACHE=
51454   CCACHE_STATUS=
51455   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51456 $as_echo_n "checking is ccache enabled... " >&6; }
51457   if test "x$enable_ccache" = xyes; then
51458     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51459       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51460 $as_echo "yes" >&6; }
51461       OLD_PATH="$PATH"
51462       if test "x$TOOLCHAIN_PATH" != x; then
51463         PATH=$TOOLCHAIN_PATH:$PATH
51464       fi
51465 
51466 
51467 
51468   # Publish this variable in the help.
51469 
51470 
51471   if test "x$CCACHE" = x; then
51472     # The variable is not set by user, try to locate tool using the code snippet
51473     for ac_prog in ccache
51474 do
51475   # Extract the first word of "$ac_prog", so it can be a program name with args.
51476 set dummy $ac_prog; ac_word=$2
51477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51478 $as_echo_n "checking for $ac_word... " >&6; }
51479 if ${ac_cv_path_CCACHE+:} false; then :
51480   $as_echo_n "(cached) " >&6
51481 else
51482   case $CCACHE in
51483   [\\/]* | ?:[\\/]*)
51484   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51485   ;;
51486   *)
51487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51488 for as_dir in $PATH
51489 do
51490   IFS=$as_save_IFS
51491   test -z "$as_dir" && as_dir=.
51492     for ac_exec_ext in '' $ac_executable_extensions; do
51493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51494     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51496     break 2
51497   fi
51498 done
51499   done
51500 IFS=$as_save_IFS
51501 
51502   ;;
51503 esac
51504 fi
51505 CCACHE=$ac_cv_path_CCACHE
51506 if test -n "$CCACHE"; then
51507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51508 $as_echo "$CCACHE" >&6; }
51509 else
51510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51511 $as_echo "no" >&6; }
51512 fi
51513 
51514 
51515   test -n "$CCACHE" && break
51516 done
51517 
51518   else
51519     # The variable is set, but is it from the command line or the environment?
51520 
51521     # Try to remove the string !CCACHE! from our list.
51522     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51523     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51524       # If it failed, the variable was not from the command line. Ignore it,
51525       # but warn the user (except for BASH, which is always set by the calling BASH).
51526       if test "xCCACHE" != xBASH; then
51527         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51528 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51529       fi
51530       # Try to locate tool using the code snippet
51531       for ac_prog in ccache
51532 do
51533   # Extract the first word of "$ac_prog", so it can be a program name with args.
51534 set dummy $ac_prog; ac_word=$2
51535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51536 $as_echo_n "checking for $ac_word... " >&6; }
51537 if ${ac_cv_path_CCACHE+:} false; then :
51538   $as_echo_n "(cached) " >&6
51539 else
51540   case $CCACHE in
51541   [\\/]* | ?:[\\/]*)
51542   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51543   ;;
51544   *)
51545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51546 for as_dir in $PATH
51547 do
51548   IFS=$as_save_IFS
51549   test -z "$as_dir" && as_dir=.
51550     for ac_exec_ext in '' $ac_executable_extensions; do
51551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51552     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51554     break 2
51555   fi
51556 done
51557   done
51558 IFS=$as_save_IFS
51559 
51560   ;;
51561 esac
51562 fi
51563 CCACHE=$ac_cv_path_CCACHE
51564 if test -n "$CCACHE"; then
51565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51566 $as_echo "$CCACHE" >&6; }
51567 else
51568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51569 $as_echo "no" >&6; }
51570 fi
51571 
51572 
51573   test -n "$CCACHE" && break
51574 done
51575 
51576     else
51577       # If it succeeded, then it was overridden by the user. We will use it
51578       # for the tool.
51579 
51580       # First remove it from the list of overridden variables, so we can test
51581       # for unknown variables in the end.
51582       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51583 
51584       # Check if the provided tool contains a complete path.
51585       tool_specified="$CCACHE"
51586       tool_basename="${tool_specified##*/}"
51587       if test "x$tool_basename" = "x$tool_specified"; then
51588         # A command without a complete path is provided, search $PATH.
51589         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51590 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51591         # Extract the first word of "$tool_basename", so it can be a program name with args.
51592 set dummy $tool_basename; ac_word=$2
51593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51594 $as_echo_n "checking for $ac_word... " >&6; }
51595 if ${ac_cv_path_CCACHE+:} false; then :
51596   $as_echo_n "(cached) " >&6
51597 else
51598   case $CCACHE in
51599   [\\/]* | ?:[\\/]*)
51600   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51601   ;;
51602   *)
51603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51604 for as_dir in $PATH
51605 do
51606   IFS=$as_save_IFS
51607   test -z "$as_dir" && as_dir=.
51608     for ac_exec_ext in '' $ac_executable_extensions; do
51609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51610     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51612     break 2
51613   fi
51614 done
51615   done
51616 IFS=$as_save_IFS
51617 
51618   ;;
51619 esac
51620 fi
51621 CCACHE=$ac_cv_path_CCACHE
51622 if test -n "$CCACHE"; then
51623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51624 $as_echo "$CCACHE" >&6; }
51625 else
51626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51627 $as_echo "no" >&6; }
51628 fi
51629 
51630 
51631         if test "x$CCACHE" = x; then
51632           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51633         fi
51634       else
51635         # Otherwise we believe it is a complete path. Use it as it is.
51636         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51637 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51639 $as_echo_n "checking for CCACHE... " >&6; }
51640         if test ! -x "$tool_specified"; then
51641           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51642 $as_echo "not found" >&6; }
51643           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51644         fi
51645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51646 $as_echo "$tool_specified" >&6; }
51647       fi
51648     fi
51649   fi
51650 
51651 
51652 
51653   if test "x$CCACHE" = x; then
51654     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51655   fi
51656 
51657 
51658       PATH="$OLD_PATH"
51659       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
51660       CCACHE_STATUS="Active ($CCACHE_VERSION)"
51661     else
51662       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51663 $as_echo "no" >&6; }
51664       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
51665 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
51666     fi
51667   elif test "x$enable_ccache" = xno; then
51668     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51669 $as_echo "no, explicitly disabled" >&6; }
51670     CCACHE_STATUS="Disabled"
51671   elif test "x$enable_ccache" = x; then
51672     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51673 $as_echo "no" >&6; }
51674   else
51675     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51676 $as_echo "unknown" >&6; }
51677     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51678   fi
51679 
51680 
51681 
51682 # Check whether --with-ccache-dir was given.
51683 if test "${with_ccache_dir+set}" = set; then :
51684   withval=$with_ccache_dir;
51685 fi
51686 
51687 
51688   if test "x$with_ccache_dir" != x; then
51689     # When using a non home ccache directory, assume the use is to share ccache files
51690     # with other users. Thus change the umask.
51691     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51692     if test "x$CCACHE" = x; then
51693       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51694 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51695     fi
51696   fi
51697 
51698   if test "x$CCACHE" != x; then
51699 
51700   if test "x$CCACHE" != x; then
51701     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
51702       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
51703           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`
51704       if test "x$HAS_BAD_CCACHE" != "x"; then
51705         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
51706       fi
51707       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51708 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51709       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
51710       PUSHED_FLAGS="$CXXFLAGS"
51711       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
51712       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51713 /* end confdefs.h.  */
51714 
51715 int
51716 main ()
51717 {
51718 
51719   ;
51720   return 0;
51721 }
51722 _ACEOF
51723 if ac_fn_cxx_try_compile "$LINENO"; then :
51724   CC_KNOWS_CCACHE_TRICK=yes
51725 else
51726   CC_KNOWS_CCACHE_TRICK=no
51727 fi
51728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51729       CXXFLAGS="$PUSHED_FLAGS"
51730       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51732 $as_echo "yes" >&6; }
51733         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
51734 
51735         CCACHE_SLOPPINESS=pch_defines,time_macros
51736       else
51737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51738 $as_echo "no" >&6; }
51739         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
51740       fi
51741     fi
51742 
51743     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
51744         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
51745 
51746     if test "x$SET_CCACHE_DIR" != x; then
51747       mkdir -p $CCACHE_DIR > /dev/null 2>&1
51748       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51749     fi
51750   fi
51751 
51752   fi
51753 
51754 
51755 ###############################################################################
51756 #
51757 # And now the finish...
51758 #
51759 ###############################################################################
51760 
51761 # Check for some common pitfalls
51762 
51763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51764     file_to_test="$SRC_ROOT/LICENSE"
51765     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51766       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
51767     fi
51768   fi
51769 
51770 
51771   # Did user specify any unknown variables?
51772 
51773   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51774     # Replace the separating ! with spaces before presenting for end user.
51775     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51776     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51777 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51778   fi
51779 
51780 
51781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51782 $as_echo_n "checking if build directory is on local disk... " >&6; }
51783 
51784   # df -l lists only local disks; if the given directory is not found then
51785   # a non-zero exit code is given
51786   if test "x$DF" = x; then
51787     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51788       # msys does not have df; use Windows "net use" instead.
51789       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51790       if test "x$IS_NETWORK_DISK" = x; then
51791         OUTPUT_DIR_IS_LOCAL="yes"
51792       else
51793         OUTPUT_DIR_IS_LOCAL="no"
51794       fi
51795     else
51796       # No df here, say it's local
51797       OUTPUT_DIR_IS_LOCAL="yes"
51798     fi
51799   else
51800     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51801       OUTPUT_DIR_IS_LOCAL="yes"
51802     else
51803       OUTPUT_DIR_IS_LOCAL="no"
51804     fi
51805   fi
51806 
51807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51808 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51809 
51810 
51811 
51812   # Check if the user has any old-style ALT_ variables set.
51813   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51814 
51815   # Before generating output files, test if they exist. If they do, this is a reconfigure.
51816   # Since we can't properly handle the dependencies for this, warn the user about the situation
51817   if test -e $OUTPUT_ROOT/spec.gmk; then
51818     IS_RECONFIGURE=yes
51819   else
51820     IS_RECONFIGURE=no
51821   fi
51822 
51823 
51824 # At the end, call the custom hook. (Dummy macro if no custom sources available)
51825 
51826 
51827 # We're messing a bit with internal autoconf variables to put the config.status
51828 # in the output directory instead of the current directory.
51829 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51830 
51831 # Create the actual output files. Now the main work of configure is done.
51832 cat >confcache <<\_ACEOF
51833 # This file is a shell script that caches the results of configure
51834 # tests run on this system so they can be shared between configure
51835 # scripts and configure runs, see configure's option --config-cache.
51836 # It is not useful on other systems.  If it contains results you don't
51837 # want to keep, you may remove or edit it.
51838 #
51839 # config.status only pays attention to the cache file if you give it
51840 # the --recheck option to rerun configure.
51841 #
51842 # `ac_cv_env_foo' variables (set or unset) will be overridden when
51843 # loading this file, other *unset* `ac_cv_foo' will be assigned the
51844 # following values.
51845 
51846 _ACEOF
51847 
51848 # The following way of writing the cache mishandles newlines in values,
51849 # but we know of no workaround that is simple, portable, and efficient.
51850 # So, we kill variables containing newlines.
51851 # Ultrix sh set writes to stderr and can't be redirected directly,
51852 # and sets the high bit in the cache file unless we assign to the vars.
51853 (
51854   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51855     eval ac_val=\$$ac_var
51856     case $ac_val in #(
51857     *${as_nl}*)
51858       case $ac_var in #(
51859       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51860 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51861       esac
51862       case $ac_var in #(
51863       _ | IFS | as_nl) ;; #(
51864       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51865       *) { eval $ac_var=; unset $ac_var;} ;;
51866       esac ;;
51867     esac
51868   done
51869 
51870   (set) 2>&1 |
51871     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51872     *${as_nl}ac_space=\ *)
51873       # `set' does not quote correctly, so add quotes: double-quote
51874       # substitution turns \\\\ into \\, and sed turns \\ into \.
51875       sed -n \
51876         "s/'/'\\\\''/g;
51877           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51878       ;; #(
51879     *)
51880       # `set' quotes correctly as required by POSIX, so do not add quotes.
51881       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51882       ;;
51883     esac |
51884     sort
51885 ) |
51886   sed '
51887      /^ac_cv_env_/b end
51888      t clear
51889      :clear
51890      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51891      t end
51892      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51893      :end' >>confcache
51894 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51895   if test -w "$cache_file"; then
51896     if test "x$cache_file" != "x/dev/null"; then
51897       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51898 $as_echo "$as_me: updating cache $cache_file" >&6;}
51899       if test ! -f "$cache_file" || test -h "$cache_file"; then
51900         cat confcache >"$cache_file"
51901       else
51902         case $cache_file in #(
51903         */* | ?:*)
51904           mv -f confcache "$cache_file"$$ &&
51905           mv -f "$cache_file"$$ "$cache_file" ;; #(
51906         *)
51907           mv -f confcache "$cache_file" ;;
51908         esac
51909       fi
51910     fi
51911   else
51912     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51913 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51914   fi
51915 fi
51916 rm -f confcache
51917 
51918 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51919 # Let make expand exec_prefix.
51920 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51921 
51922 # Transform confdefs.h into DEFS.
51923 # Protect against shell expansion while executing Makefile rules.
51924 # Protect against Makefile macro expansion.
51925 #
51926 # If the first sed substitution is executed (which looks for macros that
51927 # take arguments), then branch to the quote section.  Otherwise,
51928 # look for a macro that doesn't take arguments.
51929 ac_script='
51930 :mline
51931 /\\$/{
51932  N
51933  s,\\\n,,
51934  b mline
51935 }
51936 t clear
51937 :clear
51938 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
51939 t quote
51940 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
51941 t quote
51942 b any
51943 :quote
51944 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51945 s/\[/\\&/g
51946 s/\]/\\&/g
51947 s/\$/$$/g
51948 H
51949 :any
51950 ${
51951         g
51952         s/^\n//
51953         s/\n/ /g
51954         p
51955 }
51956 '
51957 DEFS=`sed -n "$ac_script" confdefs.h`
51958 
51959 
51960 ac_libobjs=
51961 ac_ltlibobjs=
51962 U=
51963 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51964   # 1. Remove the extension, and $U if already installed.
51965   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51966   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51967   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51968   #    will be set to the directory where LIBOBJS objects are built.
51969   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51970   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51971 done
51972 LIBOBJS=$ac_libobjs
51973 
51974 LTLIBOBJS=$ac_ltlibobjs
51975 
51976 
51977 
51978 : "${CONFIG_STATUS=./config.status}"
51979 ac_write_fail=0
51980 ac_clean_files_save=$ac_clean_files
51981 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51982 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51983 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51984 as_write_fail=0
51985 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51986 #! $SHELL
51987 # Generated by $as_me.
51988 # Run this file to recreate the current configuration.
51989 # Compiler output produced by configure, useful for debugging
51990 # configure, is in config.log if it exists.
51991 
51992 debug=false
51993 ac_cs_recheck=false
51994 ac_cs_silent=false
51995 
51996 SHELL=\${CONFIG_SHELL-$SHELL}
51997 export SHELL
51998 _ASEOF
51999 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
52000 ## -------------------- ##
52001 ## M4sh Initialization. ##
52002 ## -------------------- ##
52003 
52004 # Be more Bourne compatible
52005 DUALCASE=1; export DUALCASE # for MKS sh
52006 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52007   emulate sh
52008   NULLCMD=:
52009   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52010   # is contrary to our usage.  Disable this feature.
52011   alias -g '${1+"$@"}'='"$@"'
52012   setopt NO_GLOB_SUBST
52013 else
52014   case `(set -o) 2>/dev/null` in #(
52015   *posix*) :
52016     set -o posix ;; #(
52017   *) :
52018      ;;
52019 esac
52020 fi
52021 
52022 
52023 as_nl='
52024 '
52025 export as_nl
52026 # Printing a long string crashes Solaris 7 /usr/bin/printf.
52027 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52028 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52029 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52030 # Prefer a ksh shell builtin over an external printf program on Solaris,
52031 # but without wasting forks for bash or zsh.
52032 if test -z "$BASH_VERSION$ZSH_VERSION" \
52033     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52034   as_echo='print -r --'
52035   as_echo_n='print -rn --'
52036 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52037   as_echo='printf %s\n'
52038   as_echo_n='printf %s'
52039 else
52040   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52041     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52042     as_echo_n='/usr/ucb/echo -n'
52043   else
52044     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52045     as_echo_n_body='eval
52046       arg=$1;
52047       case $arg in #(
52048       *"$as_nl"*)
52049         expr "X$arg" : "X\\(.*\\)$as_nl";
52050         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52051       esac;
52052       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52053     '
52054     export as_echo_n_body
52055     as_echo_n='sh -c $as_echo_n_body as_echo'
52056   fi
52057   export as_echo_body
52058   as_echo='sh -c $as_echo_body as_echo'
52059 fi
52060 
52061 # The user is always right.
52062 if test "${PATH_SEPARATOR+set}" != set; then
52063   PATH_SEPARATOR=:
52064   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52065     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52066       PATH_SEPARATOR=';'
52067   }
52068 fi
52069 
52070 
52071 # IFS
52072 # We need space, tab and new line, in precisely that order.  Quoting is
52073 # there to prevent editors from complaining about space-tab.
52074 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
52075 # splitting by setting IFS to empty value.)
52076 IFS=" ""        $as_nl"
52077 
52078 # Find who we are.  Look in the path if we contain no directory separator.
52079 as_myself=
52080 case $0 in #((
52081   *[\\/]* ) as_myself=$0 ;;
52082   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52083 for as_dir in $PATH
52084 do
52085   IFS=$as_save_IFS
52086   test -z "$as_dir" && as_dir=.
52087     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52088   done
52089 IFS=$as_save_IFS
52090 
52091      ;;
52092 esac
52093 # We did not find ourselves, most probably we were run as `sh COMMAND'
52094 # in which case we are not to be found in the path.
52095 if test "x$as_myself" = x; then
52096   as_myself=$0
52097 fi
52098 if test ! -f "$as_myself"; then
52099   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52100   exit 1
52101 fi
52102 
52103 # Unset variables that we do not need and which cause bugs (e.g. in
52104 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52105 # suppresses any "Segmentation fault" message there.  '((' could
52106 # trigger a bug in pdksh 5.2.14.
52107 for as_var in BASH_ENV ENV MAIL MAILPATH
52108 do eval test x\${$as_var+set} = xset \
52109   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52110 done
52111 PS1='$ '
52112 PS2='> '
52113 PS4='+ '
52114 
52115 # NLS nuisances.
52116 LC_ALL=C
52117 export LC_ALL
52118 LANGUAGE=C
52119 export LANGUAGE
52120 
52121 # CDPATH.
52122 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52123 
52124 
52125 # as_fn_error STATUS ERROR [LINENO LOG_FD]
52126 # ----------------------------------------
52127 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52128 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52129 # script with STATUS, using 1 if that was 0.
52130 as_fn_error ()
52131 {
52132   as_status=$1; test $as_status -eq 0 && as_status=1
52133   if test "$4"; then
52134     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52135     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52136   fi
52137   $as_echo "$as_me: error: $2" >&2
52138   as_fn_exit $as_status
52139 } # as_fn_error
52140 
52141 
52142 # as_fn_set_status STATUS
52143 # -----------------------
52144 # Set $? to STATUS, without forking.
52145 as_fn_set_status ()
52146 {
52147   return $1
52148 } # as_fn_set_status
52149 
52150 # as_fn_exit STATUS
52151 # -----------------
52152 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52153 as_fn_exit ()
52154 {
52155   set +e
52156   as_fn_set_status $1
52157   exit $1
52158 } # as_fn_exit
52159 
52160 # as_fn_unset VAR
52161 # ---------------
52162 # Portably unset VAR.
52163 as_fn_unset ()
52164 {
52165   { eval $1=; unset $1;}
52166 }
52167 as_unset=as_fn_unset
52168 # as_fn_append VAR VALUE
52169 # ----------------------
52170 # Append the text in VALUE to the end of the definition contained in VAR. Take
52171 # advantage of any shell optimizations that allow amortized linear growth over
52172 # repeated appends, instead of the typical quadratic growth present in naive
52173 # implementations.
52174 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52175   eval 'as_fn_append ()
52176   {
52177     eval $1+=\$2
52178   }'
52179 else
52180   as_fn_append ()
52181   {
52182     eval $1=\$$1\$2
52183   }
52184 fi # as_fn_append
52185 
52186 # as_fn_arith ARG...
52187 # ------------------
52188 # Perform arithmetic evaluation on the ARGs, and store the result in the
52189 # global $as_val. Take advantage of shells that can avoid forks. The arguments
52190 # must be portable across $(()) and expr.
52191 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52192   eval 'as_fn_arith ()
52193   {
52194     as_val=$(( $* ))
52195   }'
52196 else
52197   as_fn_arith ()
52198   {
52199     as_val=`expr "$@" || test $? -eq 1`
52200   }
52201 fi # as_fn_arith
52202 
52203 
52204 if expr a : '\(a\)' >/dev/null 2>&1 &&
52205    test "X`expr 00001 : '.*\(...\)'`" = X001; then
52206   as_expr=expr
52207 else
52208   as_expr=false
52209 fi
52210 
52211 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52212   as_basename=basename
52213 else
52214   as_basename=false
52215 fi
52216 
52217 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52218   as_dirname=dirname
52219 else
52220   as_dirname=false
52221 fi
52222 
52223 as_me=`$as_basename -- "$0" ||
52224 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52225          X"$0" : 'X\(//\)$' \| \
52226          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52227 $as_echo X/"$0" |
52228     sed '/^.*\/\([^/][^/]*\)\/*$/{
52229             s//\1/
52230             q
52231           }
52232           /^X\/\(\/\/\)$/{
52233             s//\1/
52234             q
52235           }
52236           /^X\/\(\/\).*/{
52237             s//\1/
52238             q
52239           }
52240           s/.*/./; q'`
52241 
52242 # Avoid depending upon Character Ranges.
52243 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52244 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52245 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52246 as_cr_digits='0123456789'
52247 as_cr_alnum=$as_cr_Letters$as_cr_digits
52248 
52249 ECHO_C= ECHO_N= ECHO_T=
52250 case `echo -n x` in #(((((
52251 -n*)
52252   case `echo 'xy\c'` in
52253   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
52254   xy)  ECHO_C='\c';;
52255   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52256        ECHO_T=' ';;
52257   esac;;
52258 *)
52259   ECHO_N='-n';;
52260 esac
52261 
52262 rm -f conf$$ conf$$.exe conf$$.file
52263 if test -d conf$$.dir; then
52264   rm -f conf$$.dir/conf$$.file
52265 else
52266   rm -f conf$$.dir
52267   mkdir conf$$.dir 2>/dev/null
52268 fi
52269 if (echo >conf$$.file) 2>/dev/null; then
52270   if ln -s conf$$.file conf$$ 2>/dev/null; then
52271     as_ln_s='ln -s'
52272     # ... but there are two gotchas:
52273     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52274     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52275     # In both cases, we have to default to `cp -pR'.
52276     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52277       as_ln_s='cp -pR'
52278   elif ln conf$$.file conf$$ 2>/dev/null; then
52279     as_ln_s=ln
52280   else
52281     as_ln_s='cp -pR'
52282   fi
52283 else
52284   as_ln_s='cp -pR'
52285 fi
52286 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52287 rmdir conf$$.dir 2>/dev/null
52288 
52289 
52290 # as_fn_mkdir_p
52291 # -------------
52292 # Create "$as_dir" as a directory, including parents if necessary.
52293 as_fn_mkdir_p ()
52294 {
52295 
52296   case $as_dir in #(
52297   -*) as_dir=./$as_dir;;
52298   esac
52299   test -d "$as_dir" || eval $as_mkdir_p || {
52300     as_dirs=
52301     while :; do
52302       case $as_dir in #(
52303       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52304       *) as_qdir=$as_dir;;
52305       esac
52306       as_dirs="'$as_qdir' $as_dirs"
52307       as_dir=`$as_dirname -- "$as_dir" ||
52308 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52309          X"$as_dir" : 'X\(//\)[^/]' \| \
52310          X"$as_dir" : 'X\(//\)$' \| \
52311          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52312 $as_echo X"$as_dir" |
52313     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52314             s//\1/
52315             q
52316           }
52317           /^X\(\/\/\)[^/].*/{
52318             s//\1/
52319             q
52320           }
52321           /^X\(\/\/\)$/{
52322             s//\1/
52323             q
52324           }
52325           /^X\(\/\).*/{
52326             s//\1/
52327             q
52328           }
52329           s/.*/./; q'`
52330       test -d "$as_dir" && break
52331     done
52332     test -z "$as_dirs" || eval "mkdir $as_dirs"
52333   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52334 
52335 
52336 } # as_fn_mkdir_p
52337 if mkdir -p . 2>/dev/null; then
52338   as_mkdir_p='mkdir -p "$as_dir"'
52339 else
52340   test -d ./-p && rmdir ./-p
52341   as_mkdir_p=false
52342 fi
52343 
52344 
52345 # as_fn_executable_p FILE
52346 # -----------------------
52347 # Test if FILE is an executable regular file.
52348 as_fn_executable_p ()
52349 {
52350   test -f "$1" && test -x "$1"
52351 } # as_fn_executable_p
52352 as_test_x='test -x'
52353 as_executable_p=as_fn_executable_p
52354 
52355 # Sed expression to map a string onto a valid CPP name.
52356 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52357 
52358 # Sed expression to map a string onto a valid variable name.
52359 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52360 
52361 
52362 exec 6>&1
52363 ## ----------------------------------- ##
52364 ## Main body of $CONFIG_STATUS script. ##
52365 ## ----------------------------------- ##
52366 _ASEOF
52367 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52368 
52369 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52370 # Save the log message, to keep $0 and so on meaningful, and to
52371 # report actual input values of CONFIG_FILES etc. instead of their
52372 # values after options handling.
52373 ac_log="
52374 This file was extended by OpenJDK $as_me jdk9, which was
52375 generated by GNU Autoconf 2.69.  Invocation command line was
52376 
52377   CONFIG_FILES    = $CONFIG_FILES
52378   CONFIG_HEADERS  = $CONFIG_HEADERS
52379   CONFIG_LINKS    = $CONFIG_LINKS
52380   CONFIG_COMMANDS = $CONFIG_COMMANDS
52381   $ $0 $@
52382 
52383 on `(hostname || uname -n) 2>/dev/null | sed 1q`
52384 "
52385 
52386 _ACEOF
52387 
52388 case $ac_config_files in *"
52389 "*) set x $ac_config_files; shift; ac_config_files=$*;;
52390 esac
52391 
52392 
52393 
52394 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52395 # Files that config.status was made for.
52396 config_files="$ac_config_files"
52397 
52398 _ACEOF
52399 
52400 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52401 ac_cs_usage="\
52402 \`$as_me' instantiates files and other configuration actions
52403 from templates according to the current configuration.  Unless the files
52404 and actions are specified as TAGs, all are instantiated by default.
52405 
52406 Usage: $0 [OPTION]... [TAG]...
52407 
52408   -h, --help       print this help, then exit
52409   -V, --version    print version number and configuration settings, then exit
52410       --config     print configuration, then exit
52411   -q, --quiet, --silent
52412                    do not print progress messages
52413   -d, --debug      don't remove temporary files
52414       --recheck    update $as_me by reconfiguring in the same conditions
52415       --file=FILE[:TEMPLATE]
52416                    instantiate the configuration file FILE
52417 
52418 Configuration files:
52419 $config_files
52420 
52421 Report bugs to <build-dev@openjdk.java.net>.
52422 OpenJDK home page: <http://openjdk.java.net>."
52423 
52424 _ACEOF
52425 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52426 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52427 ac_cs_version="\\
52428 OpenJDK config.status jdk9
52429 configured by $0, generated by GNU Autoconf 2.69,
52430   with options \\"\$ac_cs_config\\"
52431 
52432 Copyright (C) 2012 Free Software Foundation, Inc.
52433 This config.status script is free software; the Free Software Foundation
52434 gives unlimited permission to copy, distribute and modify it."
52435 
52436 ac_pwd='$ac_pwd'
52437 srcdir='$srcdir'
52438 AWK='$AWK'
52439 test -n "\$AWK" || AWK=awk
52440 _ACEOF
52441 
52442 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52443 # The default lists apply if the user does not specify any file.
52444 ac_need_defaults=:
52445 while test $# != 0
52446 do
52447   case $1 in
52448   --*=?*)
52449     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52450     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52451     ac_shift=:
52452     ;;
52453   --*=)
52454     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52455     ac_optarg=
52456     ac_shift=:
52457     ;;
52458   *)
52459     ac_option=$1
52460     ac_optarg=$2
52461     ac_shift=shift
52462     ;;
52463   esac
52464 
52465   case $ac_option in
52466   # Handling of the options.
52467   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52468     ac_cs_recheck=: ;;
52469   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52470     $as_echo "$ac_cs_version"; exit ;;
52471   --config | --confi | --conf | --con | --co | --c )
52472     $as_echo "$ac_cs_config"; exit ;;
52473   --debug | --debu | --deb | --de | --d | -d )
52474     debug=: ;;
52475   --file | --fil | --fi | --f )
52476     $ac_shift
52477     case $ac_optarg in
52478     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52479     '') as_fn_error $? "missing file argument" ;;
52480     esac
52481     as_fn_append CONFIG_FILES " '$ac_optarg'"
52482     ac_need_defaults=false;;
52483   --he | --h |  --help | --hel | -h )
52484     $as_echo "$ac_cs_usage"; exit ;;
52485   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52486   | -silent | --silent | --silen | --sile | --sil | --si | --s)
52487     ac_cs_silent=: ;;
52488 
52489   # This is an error.
52490   -*) as_fn_error $? "unrecognized option: \`$1'
52491 Try \`$0 --help' for more information." ;;
52492 
52493   *) as_fn_append ac_config_targets " $1"
52494      ac_need_defaults=false ;;
52495 
52496   esac
52497   shift
52498 done
52499 
52500 ac_configure_extra_args=
52501 
52502 if $ac_cs_silent; then
52503   exec 6>/dev/null
52504   ac_configure_extra_args="$ac_configure_extra_args --silent"
52505 fi
52506 
52507 _ACEOF
52508 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52509 if \$ac_cs_recheck; then
52510   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52511   shift
52512   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52513   CONFIG_SHELL='$SHELL'
52514   export CONFIG_SHELL
52515   exec "\$@"
52516 fi
52517 
52518 _ACEOF
52519 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52520 exec 5>>config.log
52521 {
52522   echo
52523   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52524 ## Running $as_me. ##
52525 _ASBOX
52526   $as_echo "$ac_log"
52527 } >&5
52528 
52529 _ACEOF
52530 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52531 _ACEOF
52532 
52533 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52534 
52535 # Handling of arguments.
52536 for ac_config_target in $ac_config_targets
52537 do
52538   case $ac_config_target in
52539     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52540     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52541     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52542     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52543     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52544 
52545   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52546   esac
52547 done
52548 
52549 
52550 # If the user did not use the arguments to specify the items to instantiate,
52551 # then the envvar interface is used.  Set only those that are not.
52552 # We use the long form for the default assignment because of an extremely
52553 # bizarre bug on SunOS 4.1.3.
52554 if $ac_need_defaults; then
52555   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52556 fi
52557 
52558 # Have a temporary directory for convenience.  Make it in the build tree
52559 # simply because there is no reason against having it here, and in addition,
52560 # creating and moving files from /tmp can sometimes cause problems.
52561 # Hook for its removal unless debugging.
52562 # Note that there is a small window in which the directory will not be cleaned:
52563 # after its creation but before its name has been assigned to `$tmp'.
52564 $debug ||
52565 {
52566   tmp= ac_tmp=
52567   trap 'exit_status=$?
52568   : "${ac_tmp:=$tmp}"
52569   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52570 ' 0
52571   trap 'as_fn_exit 1' 1 2 13 15
52572 }
52573 # Create a (secure) tmp directory for tmp files.
52574 
52575 {
52576   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52577   test -d "$tmp"
52578 }  ||
52579 {
52580   tmp=./conf$$-$RANDOM
52581   (umask 077 && mkdir "$tmp")
52582 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52583 ac_tmp=$tmp
52584 
52585 # Set up the scripts for CONFIG_FILES section.
52586 # No need to generate them if there are no CONFIG_FILES.
52587 # This happens for instance with `./config.status config.h'.
52588 if test -n "$CONFIG_FILES"; then
52589 
52590 
52591 ac_cr=`echo X | tr X '\015'`
52592 # On cygwin, bash can eat \r inside `` if the user requested igncr.
52593 # But we know of no other shell where ac_cr would be empty at this
52594 # point, so we can use a bashism as a fallback.
52595 if test "x$ac_cr" = x; then
52596   eval ac_cr=\$\'\\r\'
52597 fi
52598 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52599 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52600   ac_cs_awk_cr='\\r'
52601 else
52602   ac_cs_awk_cr=$ac_cr
52603 fi
52604 
52605 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52606 _ACEOF
52607 
52608 
52609 {
52610   echo "cat >conf$$subs.awk <<_ACEOF" &&
52611   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52612   echo "_ACEOF"
52613 } >conf$$subs.sh ||
52614   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52615 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52616 ac_delim='%!_!# '
52617 for ac_last_try in false false false false false :; do
52618   . ./conf$$subs.sh ||
52619     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52620 
52621   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52622   if test $ac_delim_n = $ac_delim_num; then
52623     break
52624   elif $ac_last_try; then
52625     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52626   else
52627     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52628   fi
52629 done
52630 rm -f conf$$subs.sh
52631 
52632 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52633 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52634 _ACEOF
52635 sed -n '
52636 h
52637 s/^/S["/; s/!.*/"]=/
52638 p
52639 g
52640 s/^[^!]*!//
52641 :repl
52642 t repl
52643 s/'"$ac_delim"'$//
52644 t delim
52645 :nl
52646 h
52647 s/\(.\{148\}\)..*/\1/
52648 t more1
52649 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52650 p
52651 n
52652 b repl
52653 :more1
52654 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52655 p
52656 g
52657 s/.\{148\}//
52658 t nl
52659 :delim
52660 h
52661 s/\(.\{148\}\)..*/\1/
52662 t more2
52663 s/["\\]/\\&/g; s/^/"/; s/$/"/
52664 p
52665 b
52666 :more2
52667 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52668 p
52669 g
52670 s/.\{148\}//
52671 t delim
52672 ' <conf$$subs.awk | sed '
52673 /^[^""]/{
52674   N
52675   s/\n//
52676 }
52677 ' >>$CONFIG_STATUS || ac_write_fail=1
52678 rm -f conf$$subs.awk
52679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52680 _ACAWK
52681 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52682   for (key in S) S_is_set[key] = 1
52683   FS = ""
52684 
52685 }
52686 {
52687   line = $ 0
52688   nfields = split(line, field, "@")
52689   substed = 0
52690   len = length(field[1])
52691   for (i = 2; i < nfields; i++) {
52692     key = field[i]
52693     keylen = length(key)
52694     if (S_is_set[key]) {
52695       value = S[key]
52696       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52697       len += length(value) + length(field[++i])
52698       substed = 1
52699     } else
52700       len += 1 + keylen
52701   }
52702 
52703   print line
52704 }
52705 
52706 _ACAWK
52707 _ACEOF
52708 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52709 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52710   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52711 else
52712   cat
52713 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52714   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52715 _ACEOF
52716 
52717 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52718 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52719 # trailing colons and then remove the whole line if VPATH becomes empty
52720 # (actually we leave an empty line to preserve line numbers).
52721 if test "x$srcdir" = x.; then
52722   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
52723 h
52724 s///
52725 s/^/:/
52726 s/[      ]*$/:/
52727 s/:\$(srcdir):/:/g
52728 s/:\${srcdir}:/:/g
52729 s/:@srcdir@:/:/g
52730 s/^:*//
52731 s/:*$//
52732 x
52733 s/\(=[   ]*\).*/\1/
52734 G
52735 s/\n//
52736 s/^[^=]*=[       ]*$//
52737 }'
52738 fi
52739 
52740 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52741 fi # test -n "$CONFIG_FILES"
52742 
52743 
52744 eval set X "  :F $CONFIG_FILES      "
52745 shift
52746 for ac_tag
52747 do
52748   case $ac_tag in
52749   :[FHLC]) ac_mode=$ac_tag; continue;;
52750   esac
52751   case $ac_mode$ac_tag in
52752   :[FHL]*:*);;
52753   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52754   :[FH]-) ac_tag=-:-;;
52755   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52756   esac
52757   ac_save_IFS=$IFS
52758   IFS=:
52759   set x $ac_tag
52760   IFS=$ac_save_IFS
52761   shift
52762   ac_file=$1
52763   shift
52764 
52765   case $ac_mode in
52766   :L) ac_source=$1;;
52767   :[FH])
52768     ac_file_inputs=
52769     for ac_f
52770     do
52771       case $ac_f in
52772       -) ac_f="$ac_tmp/stdin";;
52773       *) # Look for the file first in the build tree, then in the source tree
52774          # (if the path is not absolute).  The absolute path cannot be DOS-style,
52775          # because $ac_f cannot contain `:'.
52776          test -f "$ac_f" ||
52777            case $ac_f in
52778            [\\/$]*) false;;
52779            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52780            esac ||
52781            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52782       esac
52783       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52784       as_fn_append ac_file_inputs " '$ac_f'"
52785     done
52786 
52787     # Let's still pretend it is `configure' which instantiates (i.e., don't
52788     # use $as_me), people would be surprised to read:
52789     #    /* config.h.  Generated by config.status.  */
52790     configure_input='Generated from '`
52791           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52792         `' by configure.'
52793     if test x"$ac_file" != x-; then
52794       configure_input="$ac_file.  $configure_input"
52795       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52796 $as_echo "$as_me: creating $ac_file" >&6;}
52797     fi
52798     # Neutralize special characters interpreted by sed in replacement strings.
52799     case $configure_input in #(
52800     *\&* | *\|* | *\\* )
52801        ac_sed_conf_input=`$as_echo "$configure_input" |
52802        sed 's/[\\\\&|]/\\\\&/g'`;; #(
52803     *) ac_sed_conf_input=$configure_input;;
52804     esac
52805 
52806     case $ac_tag in
52807     *:-:* | *:-) cat >"$ac_tmp/stdin" \
52808       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52809     esac
52810     ;;
52811   esac
52812 
52813   ac_dir=`$as_dirname -- "$ac_file" ||
52814 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52815          X"$ac_file" : 'X\(//\)[^/]' \| \
52816          X"$ac_file" : 'X\(//\)$' \| \
52817          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52818 $as_echo X"$ac_file" |
52819     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52820             s//\1/
52821             q
52822           }
52823           /^X\(\/\/\)[^/].*/{
52824             s//\1/
52825             q
52826           }
52827           /^X\(\/\/\)$/{
52828             s//\1/
52829             q
52830           }
52831           /^X\(\/\).*/{
52832             s//\1/
52833             q
52834           }
52835           s/.*/./; q'`
52836   as_dir="$ac_dir"; as_fn_mkdir_p
52837   ac_builddir=.
52838 
52839 case "$ac_dir" in
52840 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52841 *)
52842   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52843   # A ".." for each directory in $ac_dir_suffix.
52844   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52845   case $ac_top_builddir_sub in
52846   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52847   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52848   esac ;;
52849 esac
52850 ac_abs_top_builddir=$ac_pwd
52851 ac_abs_builddir=$ac_pwd$ac_dir_suffix
52852 # for backward compatibility:
52853 ac_top_builddir=$ac_top_build_prefix
52854 
52855 case $srcdir in
52856   .)  # We are building in place.
52857     ac_srcdir=.
52858     ac_top_srcdir=$ac_top_builddir_sub
52859     ac_abs_top_srcdir=$ac_pwd ;;
52860   [\\/]* | ?:[\\/]* )  # Absolute name.
52861     ac_srcdir=$srcdir$ac_dir_suffix;
52862     ac_top_srcdir=$srcdir
52863     ac_abs_top_srcdir=$srcdir ;;
52864   *) # Relative name.
52865     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52866     ac_top_srcdir=$ac_top_build_prefix$srcdir
52867     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52868 esac
52869 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52870 
52871 
52872   case $ac_mode in
52873   :F)
52874   #
52875   # CONFIG_FILE
52876   #
52877 
52878 _ACEOF
52879 
52880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52881 # If the template does not know about datarootdir, expand it.
52882 # FIXME: This hack should be removed a few years after 2.60.
52883 ac_datarootdir_hack=; ac_datarootdir_seen=
52884 ac_sed_dataroot='
52885 /datarootdir/ {
52886   p
52887   q
52888 }
52889 /@datadir@/p
52890 /@docdir@/p
52891 /@infodir@/p
52892 /@localedir@/p
52893 /@mandir@/p'
52894 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52895 *datarootdir*) ac_datarootdir_seen=yes;;
52896 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52897   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52898 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52899 _ACEOF
52900 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52901   ac_datarootdir_hack='
52902   s&@datadir@&$datadir&g
52903   s&@docdir@&$docdir&g
52904   s&@infodir@&$infodir&g
52905   s&@localedir@&$localedir&g
52906   s&@mandir@&$mandir&g
52907   s&\\\${datarootdir}&$datarootdir&g' ;;
52908 esac
52909 _ACEOF
52910 
52911 # Neutralize VPATH when `$srcdir' = `.'.
52912 # Shell code in configure.ac might set extrasub.
52913 # FIXME: do we really want to maintain this feature?
52914 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52915 ac_sed_extra="$ac_vpsub
52916 $extrasub
52917 _ACEOF
52918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52919 :t
52920 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52921 s|@configure_input@|$ac_sed_conf_input|;t t
52922 s&@top_builddir@&$ac_top_builddir_sub&;t t
52923 s&@top_build_prefix@&$ac_top_build_prefix&;t t
52924 s&@srcdir@&$ac_srcdir&;t t
52925 s&@abs_srcdir@&$ac_abs_srcdir&;t t
52926 s&@top_srcdir@&$ac_top_srcdir&;t t
52927 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52928 s&@builddir@&$ac_builddir&;t t
52929 s&@abs_builddir@&$ac_abs_builddir&;t t
52930 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52931 $ac_datarootdir_hack
52932 "
52933 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52934   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52935 
52936 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52937   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52938   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
52939       "$ac_tmp/out"`; test -z "$ac_out"; } &&
52940   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52941 which seems to be undefined.  Please make sure it is defined" >&5
52942 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52943 which seems to be undefined.  Please make sure it is defined" >&2;}
52944 
52945   rm -f "$ac_tmp/stdin"
52946   case $ac_file in
52947   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52948   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52949   esac \
52950   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52951  ;;
52952 
52953 
52954 
52955   esac
52956 
52957 done # for ac_tag
52958 
52959 
52960 as_fn_exit 0
52961 _ACEOF
52962 ac_clean_files=$ac_clean_files_save
52963 
52964 test $ac_write_fail = 0 ||
52965   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52966 
52967 
52968 # configure is writing to config.log, and then calls config.status.
52969 # config.status does its own redirection, appending to config.log.
52970 # Unfortunately, on DOS this fails, as config.log is still kept open
52971 # by configure, so config.status won't be able to write to it; its
52972 # output is simply discarded.  So we exec the FD to /dev/null,
52973 # effectively closing config.log, so it can be properly (re)opened and
52974 # appended to by config.status.  When coming back to configure, we
52975 # need to make the FD available again.
52976 if test "$no_create" != yes; then
52977   ac_cs_success=:
52978   ac_config_status_args=
52979   test "$silent" = yes &&
52980     ac_config_status_args="$ac_config_status_args --quiet"
52981   exec 5>/dev/null
52982   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52983   exec 5>>config.log
52984   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52985   # would make configure fail if this is the last instruction.
52986   $ac_cs_success || as_fn_exit 1
52987 fi
52988 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52989   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52990 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52991 fi
52992 
52993 
52994 # Try to move the config.log file to the output directory.
52995 if test -e ./config.log; then
52996   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52997 fi
52998 
52999 # Make the compare script executable
53000 $CHMOD +x $OUTPUT_ROOT/compare.sh
53001 
53002 # Finally output some useful information to the user
53003 
53004   # Finally output some useful information to the user
53005 
53006   printf "\n"
53007   printf "====================================================\n"
53008   if test "x$no_create" != "xyes"; then
53009     if test "x$IS_RECONFIGURE" != "xyes"; then
53010       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
53011     else
53012       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
53013     fi
53014   else
53015     if test "x$IS_RECONFIGURE" != "xyes"; then
53016       printf "A configuration has been successfully checked but not created\n"
53017     else
53018       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
53019     fi
53020   fi
53021   if test "x$CONFIGURE_COMMAND_LINE" != x; then
53022     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53023   else
53024     printf "using default settings.\n"
53025   fi
53026 
53027   printf "\n"
53028   printf "Configuration summary:\n"
53029   printf "* Debug level:    $DEBUG_LEVEL\n"
53030   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53031   printf "* JDK variant:    $JDK_VARIANT\n"
53032   printf "* JVM variants:   $with_jvm_variants\n"
53033   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53034 
53035   printf "\n"
53036   printf "Tools summary:\n"
53037   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53038     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53039   fi
53040   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53041   if test "x$TOOLCHAIN_VERSION" != "x"; then
53042     print_version=" $TOOLCHAIN_VERSION"
53043   fi
53044   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53045   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53046   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53047 
53048   printf "\n"
53049   printf "Build performance summary:\n"
53050   printf "* Cores to use:   $JOBS\n"
53051   printf "* Memory limit:   $MEMORY_SIZE MB\n"
53052   if test "x$CCACHE_STATUS" != "x"; then
53053     printf "* ccache status:  $CCACHE_STATUS\n"
53054   fi
53055   printf "\n"
53056 
53057   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53058     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53059     printf "will result in longer build times.\n"
53060     printf "\n"
53061   fi
53062 
53063   if test "x$FOUND_ALT_VARIABLES" != "x"; then
53064     printf "WARNING: You have old-style ALT_ environment variables set.\n"
53065     printf "These are not respected, and will be ignored. It is recommended\n"
53066     printf "that you clean your environment. The following variables are set:\n"
53067     printf "$FOUND_ALT_VARIABLES\n"
53068     printf "\n"
53069   fi
53070 
53071   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53072     printf "WARNING: Your build output directory is not on a local disk.\n"
53073     printf "This will severely degrade build performance!\n"
53074     printf "It is recommended that you create an output directory on a local disk,\n"
53075     printf "and run the configure script again from that directory.\n"
53076     printf "\n"
53077   fi
53078 
53079   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53080     printf "WARNING: The result of this configuration has overridden an older\n"
53081     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53082     printf "proper build. Failure to do so might result in strange build problems.\n"
53083     printf "\n"
53084   fi
53085 
53086   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53087     printf "WARNING: The result of this configuration was not saved.\n"
53088     printf "You should run without '--no-create | -n' to create the configuration.\n"
53089     printf "\n"
53090   fi
53091 
53092 
53093 
53094 if test -e "$OUTPUT_ROOT/config.log"; then
53095   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53096   if test $? -eq 0; then
53097     printf "The following warnings were produced. Repeated here for convenience:\n"
53098     # We must quote sed expression (using []) to stop m4 from eating the [].
53099     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53100     printf "\n"
53101   fi
53102 fi
53103 
53104