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 CCACHE
 633 USE_PRECOMPILED_HEADER
 634 SJAVAC_SERVER_DIR
 635 ENABLE_SJAVAC
 636 SJAVAC_SERVER_JAVA
 637 JOBS
 638 MEMORY_SIZE
 639 NUM_CORES
 640 ENABLE_INTREE_EC
 641 SALIB_NAME
 642 HOTSPOT_MAKE_ARGS
 643 MSVCR_DLL
 644 LIBCXX
 645 LLVM_LIBS
 646 LLVM_LDFLAGS
 647 LLVM_CFLAGS
 648 LLVM_CONFIG
 649 LIBFFI_LIBS
 650 LIBFFI_CFLAGS
 651 STATIC_CXX_SETTING
 652 LIBDL
 653 LIBM
 654 LIBZIP_CAN_USE_MMAP
 655 USE_EXTERNAL_LIBZ
 656 USE_EXTERNAL_LIBPNG
 657 PNG_LIBS
 658 PNG_CFLAGS
 659 USE_EXTERNAL_LIBGIF
 660 USE_EXTERNAL_LIBJPEG
 661 ALSA_LIBS
 662 ALSA_CFLAGS
 663 FREETYPE_BUNDLE_LIB_PATH
 664 FREETYPE_LIBS
 665 FREETYPE_CFLAGS
 666 CUPS_CFLAGS
 667 X_EXTRA_LIBS
 668 X_LIBS
 669 X_PRE_LIBS
 670 X_CFLAGS
 671 XMKMF
 672 FIXPATH
 673 ZIP_DEBUGINFO_FILES
 674 ENABLE_DEBUG_SYMBOLS
 675 CFLAGS_WARNINGS_ARE_ERRORS
 676 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 677 ZERO_ARCHFLAG
 678 LDFLAGS_CXX_JDK
 679 LDFLAGS_JDKEXE_SUFFIX
 680 LDFLAGS_JDKLIB_SUFFIX
 681 LDFLAGS_JDKEXE
 682 LDFLAGS_JDKLIB
 683 CXXFLAGS_JDKEXE
 684 CXXFLAGS_JDKLIB
 685 CFLAGS_JDKEXE
 686 CFLAGS_JDKLIB
 687 MACOSX_VERSION_MIN
 688 LEGACY_EXTRA_LDFLAGS
 689 LEGACY_EXTRA_CXXFLAGS
 690 LEGACY_EXTRA_CFLAGS
 691 CXX_O_FLAG_NONE
 692 CXX_O_FLAG_NORM
 693 CXX_O_FLAG_HI
 694 CXX_O_FLAG_HIGHEST
 695 C_O_FLAG_NONE
 696 C_O_FLAG_NORM
 697 C_O_FLAG_HI
 698 C_O_FLAG_HIGHEST
 699 CXXFLAGS_DEBUG_SYMBOLS
 700 CFLAGS_DEBUG_SYMBOLS
 701 CXX_FLAG_DEPS
 702 C_FLAG_DEPS
 703 SET_SHARED_LIBRARY_MAPFILE
 704 SET_SHARED_LIBRARY_NAME
 705 SET_SHARED_LIBRARY_ORIGIN
 706 SET_EXECUTABLE_ORIGIN
 707 SHARED_LIBRARY_FLAGS
 708 CXX_FLAG_REORDER
 709 C_FLAG_REORDER
 710 SYSROOT_LDFLAGS
 711 SYSROOT_CFLAGS
 712 RC_FLAGS
 713 AR_OUT_OPTION
 714 LD_OUT_OPTION
 715 EXE_OUT_OPTION
 716 CC_OUT_OPTION
 717 POST_MCS_CMD
 718 POST_STRIP_CMD
 719 ARFLAGS
 720 COMPILER_TARGET_BITS_FLAG
 721 JT_HOME
 722 JTREGEXE
 723 USING_BROKEN_SUSE_LD
 724 PACKAGE_PATH
 725 LDEXECXX
 726 LDEXE
 727 USE_CLANG
 728 HOTSPOT_LD
 729 HOTSPOT_CXX
 730 HOTSPOT_RC
 731 HOTSPOT_MT
 732 BUILD_LD
 733 BUILD_CXX
 734 BUILD_CC
 735 ac_ct_OBJDUMP
 736 OBJDUMP
 737 ac_ct_OBJCOPY
 738 OBJCOPY
 739 ac_ct_NM
 740 ac_ct_STRIP
 741 MCS
 742 GNM
 743 NM
 744 STRIP
 745 DUMPBIN
 746 RC
 747 MT
 748 LIPO
 749 ac_ct_OBJC
 750 OBJCFLAGS
 751 OBJC
 752 ac_ct_AR
 753 AR
 754 AS
 755 LDCXX
 756 LD
 757 CXXCPP
 758 CPP
 759 ac_ct_CXX
 760 CXXFLAGS
 761 CXX
 762 ac_ct_PROPER_COMPILER_CXX
 763 PROPER_COMPILER_CXX
 764 TOOLCHAIN_PATH_CXX
 765 POTENTIAL_CXX
 766 OBJEXT
 767 EXEEXT
 768 ac_ct_CC
 769 CPPFLAGS
 770 LDFLAGS
 771 CFLAGS
 772 CC
 773 ac_ct_PROPER_COMPILER_CC
 774 PROPER_COMPILER_CC
 775 TOOLCHAIN_PATH_CC
 776 POTENTIAL_CC
 777 VS_LIB
 778 VS_INCLUDE
 779 VS_PATH
 780 CYGWIN_LINK
 781 EXE_SUFFIX
 782 OBJ_SUFFIX
 783 STATIC_LIBRARY
 784 SHARED_LIBRARY
 785 STATIC_LIBRARY_SUFFIX
 786 SHARED_LIBRARY_SUFFIX
 787 LIBRARY_PREFIX
 788 TOOLCHAIN_TYPE
 789 BUILD_HOTSPOT
 790 HOTSPOT_DIST
 791 BUILD_OUTPUT
 792 OVERRIDE_SRC_ROOT
 793 ADD_SRC_ROOT
 794 JDK_TOPDIR
 795 NASHORN_TOPDIR
 796 HOTSPOT_TOPDIR
 797 JAXWS_TOPDIR
 798 JAXP_TOPDIR
 799 CORBA_TOPDIR
 800 LANGTOOLS_TOPDIR
 801 JAVA_FLAGS_SMALL
 802 JAVA_FLAGS_BIG
 803 JAVA_FLAGS
 804 JAVAC_FLAGS
 805 BOOT_JDK_SOURCETARGET
 806 JARSIGNER
 807 NATIVE2ASCII
 808 JAR
 809 JAVAH
 810 JAVAC
 811 JAVA
 812 BOOT_JDK
 813 BOOT_TOOLSJAR
 814 BOOT_RTJAR
 815 JAVA_CHECK
 816 JAVAC_CHECK
 817 COOKED_BUILD_NUMBER
 818 JDK_VERSION
 819 COPYRIGHT_YEAR
 820 MACOSX_BUNDLE_ID_BASE
 821 MACOSX_BUNDLE_NAME_BASE
 822 COMPANY_NAME
 823 JDK_RC_PLATFORM_NAME
 824 PRODUCT_SUFFIX
 825 PRODUCT_NAME
 826 LAUNCHER_NAME
 827 MILESTONE
 828 JDK_BUILD_NUMBER
 829 JDK_UPDATE_VERSION
 830 JDK_MICRO_VERSION
 831 JDK_MINOR_VERSION
 832 JDK_MAJOR_VERSION
 833 USER_RELEASE_SUFFIX
 834 COMPRESS_JARS
 835 RMICONNECTOR_IIOP
 836 UNLIMITED_CRYPTO
 837 CACERTS_FILE
 838 TEST_IN_BUILD
 839 BUILD_HEADLESS
 840 SUPPORT_HEADFUL
 841 SUPPORT_HEADLESS
 842 BDEPS_FTP
 843 BDEPS_UNZIP
 844 OS_VERSION_MICRO
 845 OS_VERSION_MINOR
 846 OS_VERSION_MAJOR
 847 PKG_CONFIG
 848 CODESIGN
 849 XATTR
 850 DSYMUTIL
 851 IS_GNU_TIME
 852 TIME
 853 STAT
 854 HG
 855 READELF
 856 OTOOL
 857 LDD
 858 ZIP
 859 UNZIP
 860 FIND_DELETE
 861 MAKE
 862 CHECK_TOOLSDIR_MAKE
 863 CHECK_TOOLSDIR_GMAKE
 864 CHECK_MAKE
 865 CHECK_GMAKE
 866 PKGHANDLER
 867 OUTPUT_ROOT
 868 CONF_NAME
 869 SPEC
 870 BUILD_VARIANT_RELEASE
 871 DEBUG_CLASSFILES
 872 FASTDEBUG
 873 VARIANT
 874 DEBUG_LEVEL
 875 MACOSX_UNIVERSAL
 876 INCLUDE_SA
 877 JVM_VARIANT_CORE
 878 JVM_VARIANT_ZEROSHARK
 879 JVM_VARIANT_ZERO
 880 JVM_VARIANT_KERNEL
 881 JVM_VARIANT_MINIMAL1
 882 JVM_VARIANT_CLIENT
 883 JVM_VARIANT_SERVER
 884 JVM_VARIANTS
 885 JVM_INTERPRETER
 886 JDK_VARIANT
 887 SET_OPENJDK
 888 BUILD_LOG_WRAPPER
 889 BUILD_LOG_PREVIOUS
 890 BUILD_LOG
 891 TOPDIR
 892 PATH_SEP
 893 ZERO_ARCHDEF
 894 DEFINE_CROSS_COMPILE_ARCH
 895 LP64
 896 OPENJDK_TARGET_OS_EXPORT_DIR
 897 OPENJDK_TARGET_OS_API_DIR
 898 OPENJDK_TARGET_CPU_JLI_CFLAGS
 899 OPENJDK_TARGET_CPU_OSARCH
 900 OPENJDK_TARGET_CPU_ISADIR
 901 OPENJDK_TARGET_CPU_LIBDIR
 902 OPENJDK_TARGET_CPU_LEGACY_LIB
 903 OPENJDK_TARGET_CPU_LEGACY
 904 REQUIRED_OS_VERSION
 905 REQUIRED_OS_NAME
 906 COMPILE_TYPE
 907 OPENJDK_TARGET_CPU_ENDIAN
 908 OPENJDK_TARGET_CPU_BITS
 909 OPENJDK_TARGET_CPU_ARCH
 910 OPENJDK_TARGET_CPU
 911 OPENJDK_TARGET_OS_API
 912 OPENJDK_TARGET_OS
 913 OPENJDK_BUILD_CPU_ENDIAN
 914 OPENJDK_BUILD_CPU_BITS
 915 OPENJDK_BUILD_CPU_ARCH
 916 OPENJDK_BUILD_CPU
 917 OPENJDK_BUILD_OS_API
 918 OPENJDK_BUILD_OS
 919 OPENJDK_BUILD_AUTOCONF_NAME
 920 OPENJDK_TARGET_AUTOCONF_NAME
 921 target_os
 922 target_vendor
 923 target_cpu
 924 target
 925 host_os
 926 host_vendor
 927 host_cpu
 928 host
 929 build_os
 930 build_vendor
 931 build_cpu
 932 build
 933 SETFILE
 934 DF
 935 READLINK
 936 CYGPATH
 937 SED
 938 FGREP
 939 EGREP
 940 GREP
 941 AWK
 942 XARGS
 943 WHICH
 944 WC
 945 UNIQ
 946 UNAME
 947 TR
 948 TOUCH
 949 TEE
 950 TAR
 951 TAIL
 952 SORT
 953 SH
 954 RM
 955 PRINTF
 956 NAWK
 957 MV
 958 MKTEMP
 959 MKDIR
 960 LS
 961 LN
 962 HEAD
 963 FIND
 964 FILE
 965 EXPR
 966 ECHO
 967 DIRNAME
 968 DIFF
 969 DATE
 970 CUT
 971 CPIO
 972 CP
 973 COMM
 974 CMP
 975 CHMOD
 976 CAT
 977 BASH
 978 BASENAME
 979 DATE_WHEN_CONFIGURED
 980 CONFIGURE_COMMAND_LINE
 981 target_alias
 982 host_alias
 983 build_alias
 984 LIBS
 985 ECHO_T
 986 ECHO_N
 987 ECHO_C
 988 DEFS
 989 mandir
 990 localedir
 991 libdir
 992 psdir
 993 pdfdir
 994 dvidir
 995 htmldir
 996 infodir
 997 docdir
 998 oldincludedir
 999 includedir
1000 localstatedir
1001 sharedstatedir
1002 sysconfdir
1003 datadir
1004 datarootdir
1005 libexecdir
1006 sbindir
1007 bindir
1008 program_transform_name
1009 prefix
1010 exec_prefix
1011 PACKAGE_URL
1012 PACKAGE_BUGREPORT
1013 PACKAGE_STRING
1014 PACKAGE_VERSION
1015 PACKAGE_TARNAME
1016 PACKAGE_NAME
1017 PATH_SEPARATOR
1018 SHELL'
1019 ac_subst_files=''
1020 ac_user_opts='
1021 enable_option_checking
1022 with_target_bits
1023 enable_openjdk_only
1024 with_custom_make_dir
1025 with_jdk_variant
1026 with_jvm_interpreter
1027 with_jvm_variants
1028 enable_debug
1029 with_debug_level
1030 with_devkit
1031 with_sys_root
1032 with_sysroot
1033 with_tools_dir
1034 with_toolchain_path
1035 with_extra_path
1036 with_conf_name
1037 with_builddeps_conf
1038 with_builddeps_server
1039 with_builddeps_dir
1040 with_builddeps_group
1041 enable_headful
1042 enable_hotspot_test_in_build
1043 with_cacerts_file
1044 enable_unlimited_crypto
1045 enable_rmiconnector_iiop
1046 with_milestone
1047 with_update_version
1048 with_user_release_suffix
1049 with_build_number
1050 with_boot_jdk
1051 with_boot_jdk_jvmargs
1052 with_add_source_root
1053 with_override_source_root
1054 with_adds_and_overrides
1055 with_override_langtools
1056 with_override_corba
1057 with_override_jaxp
1058 with_override_jaxws
1059 with_override_hotspot
1060 with_override_nashorn
1061 with_override_jdk
1062 with_import_hotspot
1063 with_toolchain_type
1064 with_jtreg
1065 with_extra_cflags
1066 with_extra_cxxflags
1067 with_extra_ldflags
1068 enable_debug_symbols
1069 enable_zip_debug_info
1070 enable_macosx_runtime_support
1071 with_x
1072 with_cups
1073 with_cups_include
1074 with_freetype
1075 with_freetype_include
1076 with_freetype_lib
1077 enable_freetype_bundling
1078 with_alsa
1079 with_alsa_include
1080 with_alsa_lib
1081 with_giflib
1082 with_libpng
1083 with_zlib
1084 with_stdc__lib
1085 with_msvcr_dll
1086 with_dxsdk
1087 with_dxsdk_lib
1088 with_dxsdk_include
1089 with_num_cores
1090 with_memory_size
1091 with_jobs
1092 with_sjavac_server_java
1093 enable_sjavac
1094 enable_precompiled_headers
1095 enable_ccache
1096 with_ccache_dir
1097 '
1098       ac_precious_vars='build_alias
1099 host_alias
1100 target_alias
1101 BASENAME
1102 BASH
1103 CAT
1104 CHMOD
1105 CMP
1106 COMM
1107 CP
1108 CPIO
1109 CUT
1110 DATE
1111 DIFF
1112 DIRNAME
1113 ECHO
1114 EXPR
1115 FILE
1116 FIND
1117 HEAD
1118 LN
1119 LS
1120 MKDIR
1121 MKTEMP
1122 MV
1123 NAWK
1124 PRINTF
1125 RM
1126 SH
1127 SORT
1128 TAIL
1129 TAR
1130 TEE
1131 TOUCH
1132 TR
1133 UNAME
1134 UNIQ
1135 WC
1136 WHICH
1137 XARGS
1138 AWK
1139 GREP
1140 EGREP
1141 FGREP
1142 SED
1143 CYGPATH
1144 READLINK
1145 DF
1146 SETFILE
1147 UNZIP
1148 ZIP
1149 LDD
1150 OTOOL
1151 READELF
1152 HG
1153 STAT
1154 TIME
1155 DSYMUTIL
1156 XATTR
1157 CODESIGN
1158 PKG_CONFIG
1159 JAVA
1160 JAVAC
1161 JAVAH
1162 JAR
1163 NATIVE2ASCII
1164 JARSIGNER
1165 CC
1166 CFLAGS
1167 LDFLAGS
1168 LIBS
1169 CPPFLAGS
1170 CXX
1171 CXXFLAGS
1172 CCC
1173 CPP
1174 CXXCPP
1175 AS
1176 AR
1177 OBJC
1178 OBJCFLAGS
1179 LIPO
1180 STRIP
1181 NM
1182 GNM
1183 MCS
1184 OBJCOPY
1185 OBJDUMP
1186 BUILD_CC
1187 BUILD_CXX
1188 BUILD_LD
1189 JTREGEXE
1190 XMKMF
1191 FREETYPE_CFLAGS
1192 FREETYPE_LIBS
1193 ALSA_CFLAGS
1194 ALSA_LIBS
1195 PNG_CFLAGS
1196 PNG_LIBS
1197 LIBFFI_CFLAGS
1198 LIBFFI_LIBS
1199 CCACHE'
1200 
1201 
1202 # Initialize some variables set by options.
1203 ac_init_help=
1204 ac_init_version=false
1205 ac_unrecognized_opts=
1206 ac_unrecognized_sep=
1207 # The variables have the same names as the options, with
1208 # dashes changed to underlines.
1209 cache_file=/dev/null
1210 exec_prefix=NONE
1211 no_create=
1212 no_recursion=
1213 prefix=NONE
1214 program_prefix=NONE
1215 program_suffix=NONE
1216 program_transform_name=s,x,x,
1217 silent=
1218 site=
1219 srcdir=
1220 verbose=
1221 x_includes=NONE
1222 x_libraries=NONE
1223 
1224 # Installation directory options.
1225 # These are left unexpanded so users can "make install exec_prefix=/foo"
1226 # and all the variables that are supposed to be based on exec_prefix
1227 # by default will actually change.
1228 # Use braces instead of parens because sh, perl, etc. also accept them.
1229 # (The list follows the same order as the GNU Coding Standards.)
1230 bindir='${exec_prefix}/bin'
1231 sbindir='${exec_prefix}/sbin'
1232 libexecdir='${exec_prefix}/libexec'
1233 datarootdir='${prefix}/share'
1234 datadir='${datarootdir}'
1235 sysconfdir='${prefix}/etc'
1236 sharedstatedir='${prefix}/com'
1237 localstatedir='${prefix}/var'
1238 includedir='${prefix}/include'
1239 oldincludedir='/usr/include'
1240 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1241 infodir='${datarootdir}/info'
1242 htmldir='${docdir}'
1243 dvidir='${docdir}'
1244 pdfdir='${docdir}'
1245 psdir='${docdir}'
1246 libdir='${exec_prefix}/lib'
1247 localedir='${datarootdir}/locale'
1248 mandir='${datarootdir}/man'
1249 
1250 ac_prev=
1251 ac_dashdash=
1252 for ac_option
1253 do
1254   # If the previous option needs an argument, assign it.
1255   if test -n "$ac_prev"; then
1256     eval $ac_prev=\$ac_option
1257     ac_prev=
1258     continue
1259   fi
1260 
1261   case $ac_option in
1262   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1263   *=)   ac_optarg= ;;
1264   *)    ac_optarg=yes ;;
1265   esac
1266 
1267   # Accept the important Cygnus configure options, so we can diagnose typos.
1268 
1269   case $ac_dashdash$ac_option in
1270   --)
1271     ac_dashdash=yes ;;
1272 
1273   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1274     ac_prev=bindir ;;
1275   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1276     bindir=$ac_optarg ;;
1277 
1278   -build | --build | --buil | --bui | --bu)
1279     ac_prev=build_alias ;;
1280   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1281     build_alias=$ac_optarg ;;
1282 
1283   -cache-file | --cache-file | --cache-fil | --cache-fi \
1284   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1285     ac_prev=cache_file ;;
1286   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1287   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1288     cache_file=$ac_optarg ;;
1289 
1290   --config-cache | -C)
1291     cache_file=config.cache ;;
1292 
1293   -datadir | --datadir | --datadi | --datad)
1294     ac_prev=datadir ;;
1295   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1296     datadir=$ac_optarg ;;
1297 
1298   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1299   | --dataroo | --dataro | --datar)
1300     ac_prev=datarootdir ;;
1301   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1302   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1303     datarootdir=$ac_optarg ;;
1304 
1305   -disable-* | --disable-*)
1306     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1307     # Reject names that are not valid shell variable names.
1308     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1309       as_fn_error $? "invalid feature name: $ac_useropt"
1310     ac_useropt_orig=$ac_useropt
1311     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1312     case $ac_user_opts in
1313       *"
1314 "enable_$ac_useropt"
1315 "*) ;;
1316       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1317          ac_unrecognized_sep=', ';;
1318     esac
1319     eval enable_$ac_useropt=no ;;
1320 
1321   -docdir | --docdir | --docdi | --doc | --do)
1322     ac_prev=docdir ;;
1323   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1324     docdir=$ac_optarg ;;
1325 
1326   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1327     ac_prev=dvidir ;;
1328   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1329     dvidir=$ac_optarg ;;
1330 
1331   -enable-* | --enable-*)
1332     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
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--enable-$ac_useropt_orig"
1343          ac_unrecognized_sep=', ';;
1344     esac
1345     eval enable_$ac_useropt=\$ac_optarg ;;
1346 
1347   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1348   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1349   | --exec | --exe | --ex)
1350     ac_prev=exec_prefix ;;
1351   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1352   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1353   | --exec=* | --exe=* | --ex=*)
1354     exec_prefix=$ac_optarg ;;
1355 
1356   -gas | --gas | --ga | --g)
1357     # Obsolete; use --with-gas.
1358     with_gas=yes ;;
1359 
1360   -help | --help | --hel | --he | -h)
1361     ac_init_help=long ;;
1362   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1363     ac_init_help=recursive ;;
1364   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1365     ac_init_help=short ;;
1366 
1367   -host | --host | --hos | --ho)
1368     ac_prev=host_alias ;;
1369   -host=* | --host=* | --hos=* | --ho=*)
1370     host_alias=$ac_optarg ;;
1371 
1372   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1373     ac_prev=htmldir ;;
1374   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1375   | --ht=*)
1376     htmldir=$ac_optarg ;;
1377 
1378   -includedir | --includedir | --includedi | --included | --include \
1379   | --includ | --inclu | --incl | --inc)
1380     ac_prev=includedir ;;
1381   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1382   | --includ=* | --inclu=* | --incl=* | --inc=*)
1383     includedir=$ac_optarg ;;
1384 
1385   -infodir | --infodir | --infodi | --infod | --info | --inf)
1386     ac_prev=infodir ;;
1387   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1388     infodir=$ac_optarg ;;
1389 
1390   -libdir | --libdir | --libdi | --libd)
1391     ac_prev=libdir ;;
1392   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1393     libdir=$ac_optarg ;;
1394 
1395   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1396   | --libexe | --libex | --libe)
1397     ac_prev=libexecdir ;;
1398   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1399   | --libexe=* | --libex=* | --libe=*)
1400     libexecdir=$ac_optarg ;;
1401 
1402   -localedir | --localedir | --localedi | --localed | --locale)
1403     ac_prev=localedir ;;
1404   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1405     localedir=$ac_optarg ;;
1406 
1407   -localstatedir | --localstatedir | --localstatedi | --localstated \
1408   | --localstate | --localstat | --localsta | --localst | --locals)
1409     ac_prev=localstatedir ;;
1410   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1411   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1412     localstatedir=$ac_optarg ;;
1413 
1414   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1415     ac_prev=mandir ;;
1416   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1417     mandir=$ac_optarg ;;
1418 
1419   -nfp | --nfp | --nf)
1420     # Obsolete; use --without-fp.
1421     with_fp=no ;;
1422 
1423   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1424   | --no-cr | --no-c | -n)
1425     no_create=yes ;;
1426 
1427   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1428   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1429     no_recursion=yes ;;
1430 
1431   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1432   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1433   | --oldin | --oldi | --old | --ol | --o)
1434     ac_prev=oldincludedir ;;
1435   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1436   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1437   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1438     oldincludedir=$ac_optarg ;;
1439 
1440   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1441     ac_prev=prefix ;;
1442   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1443     prefix=$ac_optarg ;;
1444 
1445   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1446   | --program-pre | --program-pr | --program-p)
1447     ac_prev=program_prefix ;;
1448   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1449   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1450     program_prefix=$ac_optarg ;;
1451 
1452   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1453   | --program-suf | --program-su | --program-s)
1454     ac_prev=program_suffix ;;
1455   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1456   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1457     program_suffix=$ac_optarg ;;
1458 
1459   -program-transform-name | --program-transform-name \
1460   | --program-transform-nam | --program-transform-na \
1461   | --program-transform-n | --program-transform- \
1462   | --program-transform | --program-transfor \
1463   | --program-transfo | --program-transf \
1464   | --program-trans | --program-tran \
1465   | --progr-tra | --program-tr | --program-t)
1466     ac_prev=program_transform_name ;;
1467   -program-transform-name=* | --program-transform-name=* \
1468   | --program-transform-nam=* | --program-transform-na=* \
1469   | --program-transform-n=* | --program-transform-=* \
1470   | --program-transform=* | --program-transfor=* \
1471   | --program-transfo=* | --program-transf=* \
1472   | --program-trans=* | --program-tran=* \
1473   | --progr-tra=* | --program-tr=* | --program-t=*)
1474     program_transform_name=$ac_optarg ;;
1475 
1476   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1477     ac_prev=pdfdir ;;
1478   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1479     pdfdir=$ac_optarg ;;
1480 
1481   -psdir | --psdir | --psdi | --psd | --ps)
1482     ac_prev=psdir ;;
1483   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1484     psdir=$ac_optarg ;;
1485 
1486   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1487   | -silent | --silent | --silen | --sile | --sil)
1488     silent=yes ;;
1489 
1490   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1491     ac_prev=sbindir ;;
1492   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1493   | --sbi=* | --sb=*)
1494     sbindir=$ac_optarg ;;
1495 
1496   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1497   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1498   | --sharedst | --shareds | --shared | --share | --shar \
1499   | --sha | --sh)
1500     ac_prev=sharedstatedir ;;
1501   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1502   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1503   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1504   | --sha=* | --sh=*)
1505     sharedstatedir=$ac_optarg ;;
1506 
1507   -site | --site | --sit)
1508     ac_prev=site ;;
1509   -site=* | --site=* | --sit=*)
1510     site=$ac_optarg ;;
1511 
1512   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1513     ac_prev=srcdir ;;
1514   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1515     srcdir=$ac_optarg ;;
1516 
1517   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1518   | --syscon | --sysco | --sysc | --sys | --sy)
1519     ac_prev=sysconfdir ;;
1520   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1521   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1522     sysconfdir=$ac_optarg ;;
1523 
1524   -target | --target | --targe | --targ | --tar | --ta | --t)
1525     ac_prev=target_alias ;;
1526   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1527     target_alias=$ac_optarg ;;
1528 
1529   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1530     verbose=yes ;;
1531 
1532   -version | --version | --versio | --versi | --vers | -V)
1533     ac_init_version=: ;;
1534 
1535   -with-* | --with-*)
1536     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1537     # Reject names that are not valid shell variable names.
1538     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1539       as_fn_error $? "invalid package name: $ac_useropt"
1540     ac_useropt_orig=$ac_useropt
1541     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1542     case $ac_user_opts in
1543       *"
1544 "with_$ac_useropt"
1545 "*) ;;
1546       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1547          ac_unrecognized_sep=', ';;
1548     esac
1549     eval with_$ac_useropt=\$ac_optarg ;;
1550 
1551   -without-* | --without-*)
1552     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1553     # Reject names that are not valid shell variable names.
1554     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1555       as_fn_error $? "invalid package name: $ac_useropt"
1556     ac_useropt_orig=$ac_useropt
1557     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1558     case $ac_user_opts in
1559       *"
1560 "with_$ac_useropt"
1561 "*) ;;
1562       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1563          ac_unrecognized_sep=', ';;
1564     esac
1565     eval with_$ac_useropt=no ;;
1566 
1567   --x)
1568     # Obsolete; use --with-x.
1569     with_x=yes ;;
1570 
1571   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1572   | --x-incl | --x-inc | --x-in | --x-i)
1573     ac_prev=x_includes ;;
1574   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1575   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1576     x_includes=$ac_optarg ;;
1577 
1578   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1579   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1580     ac_prev=x_libraries ;;
1581   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1582   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1583     x_libraries=$ac_optarg ;;
1584 
1585   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1586 Try \`$0 --help' for more information"
1587     ;;
1588 
1589   *=*)
1590     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1591     # Reject names that are not valid shell variable names.
1592     case $ac_envvar in #(
1593       '' | [0-9]* | *[!_$as_cr_alnum]* )
1594       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1595     esac
1596     eval $ac_envvar=\$ac_optarg
1597     export $ac_envvar ;;
1598 
1599   *)
1600     # FIXME: should be removed in autoconf 3.0.
1601     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1602     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1603       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1604     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1605     ;;
1606 
1607   esac
1608 done
1609 
1610 if test -n "$ac_prev"; then
1611   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1612   as_fn_error $? "missing argument to $ac_option"
1613 fi
1614 
1615 if test -n "$ac_unrecognized_opts"; then
1616   case $enable_option_checking in
1617     no) ;;
1618     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1619     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1620   esac
1621 fi
1622 
1623 # Check all directory arguments for consistency.
1624 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1625                 datadir sysconfdir sharedstatedir localstatedir includedir \
1626                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1627                 libdir localedir mandir
1628 do
1629   eval ac_val=\$$ac_var
1630   # Remove trailing slashes.
1631   case $ac_val in
1632     */ )
1633       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1634       eval $ac_var=\$ac_val;;
1635   esac
1636   # Be sure to have absolute directory names.
1637   case $ac_val in
1638     [\\/$]* | ?:[\\/]* )  continue;;
1639     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1640   esac
1641   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1642 done
1643 
1644 # There might be people who depend on the old broken behavior: `$host'
1645 # used to hold the argument of --host etc.
1646 # FIXME: To remove some day.
1647 build=$build_alias
1648 host=$host_alias
1649 target=$target_alias
1650 
1651 # FIXME: To remove some day.
1652 if test "x$host_alias" != x; then
1653   if test "x$build_alias" = x; then
1654     cross_compiling=maybe
1655   elif test "x$build_alias" != "x$host_alias"; then
1656     cross_compiling=yes
1657   fi
1658 fi
1659 
1660 ac_tool_prefix=
1661 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1662 
1663 test "$silent" = yes && exec 6>/dev/null
1664 
1665 
1666 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1667 ac_ls_di=`ls -di .` &&
1668 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1669   as_fn_error $? "working directory cannot be determined"
1670 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1671   as_fn_error $? "pwd does not report name of working directory"
1672 
1673 
1674 # Find the source files, if location was not specified.
1675 if test -z "$srcdir"; then
1676   ac_srcdir_defaulted=yes
1677   # Try the directory containing this script, then the parent directory.
1678   ac_confdir=`$as_dirname -- "$as_myself" ||
1679 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1680          X"$as_myself" : 'X\(//\)[^/]' \| \
1681          X"$as_myself" : 'X\(//\)$' \| \
1682          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1683 $as_echo X"$as_myself" |
1684     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1685             s//\1/
1686             q
1687           }
1688           /^X\(\/\/\)[^/].*/{
1689             s//\1/
1690             q
1691           }
1692           /^X\(\/\/\)$/{
1693             s//\1/
1694             q
1695           }
1696           /^X\(\/\).*/{
1697             s//\1/
1698             q
1699           }
1700           s/.*/./; q'`
1701   srcdir=$ac_confdir
1702   if test ! -r "$srcdir/$ac_unique_file"; then
1703     srcdir=..
1704   fi
1705 else
1706   ac_srcdir_defaulted=no
1707 fi
1708 if test ! -r "$srcdir/$ac_unique_file"; then
1709   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1710   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1711 fi
1712 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1713 ac_abs_confdir=`(
1714         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1715         pwd)`
1716 # When building in place, set srcdir=.
1717 if test "$ac_abs_confdir" = "$ac_pwd"; then
1718   srcdir=.
1719 fi
1720 # Remove unnecessary trailing slashes from srcdir.
1721 # Double slashes in file names in object file debugging info
1722 # mess up M-x gdb in Emacs.
1723 case $srcdir in
1724 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1725 esac
1726 for ac_var in $ac_precious_vars; do
1727   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1728   eval ac_env_${ac_var}_value=\$${ac_var}
1729   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1730   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1731 done
1732 
1733 #
1734 # Report the --help message.
1735 #
1736 if test "$ac_init_help" = "long"; then
1737   # Omit some internal or obsolete options to make the list less imposing.
1738   # This message is too long to be a string in the A/UX 3.1 sh.
1739   cat <<_ACEOF
1740 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1741 
1742 Usage: $0 [OPTION]... [VAR=VALUE]...
1743 
1744 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1745 VAR=VALUE.  See below for descriptions of some of the useful variables.
1746 
1747 Defaults for the options are specified in brackets.
1748 
1749 Configuration:
1750   -h, --help              display this help and exit
1751       --help=short        display options specific to this package
1752       --help=recursive    display the short help of all the included packages
1753   -V, --version           display version information and exit
1754   -q, --quiet, --silent   do not print \`checking ...' messages
1755       --cache-file=FILE   cache test results in FILE [disabled]
1756   -C, --config-cache      alias for \`--cache-file=config.cache'
1757   -n, --no-create         do not create output files
1758       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1759 
1760 Installation directories:
1761   --prefix=PREFIX         install architecture-independent files in PREFIX
1762                           [$ac_default_prefix]
1763   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1764                           [PREFIX]
1765 
1766 By default, \`make install' will install all the files in
1767 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1768 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1769 for instance \`--prefix=\$HOME'.
1770 
1771 For better control, use the options below.
1772 
1773 Fine tuning of the installation directories:
1774   --bindir=DIR            user executables [EPREFIX/bin]
1775   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1776   --libexecdir=DIR        program executables [EPREFIX/libexec]
1777   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1778   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1779   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1780   --libdir=DIR            object code libraries [EPREFIX/lib]
1781   --includedir=DIR        C header files [PREFIX/include]
1782   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1783   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1784   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1785   --infodir=DIR           info documentation [DATAROOTDIR/info]
1786   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1787   --mandir=DIR            man documentation [DATAROOTDIR/man]
1788   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1789   --htmldir=DIR           html documentation [DOCDIR]
1790   --dvidir=DIR            dvi documentation [DOCDIR]
1791   --pdfdir=DIR            pdf documentation [DOCDIR]
1792   --psdir=DIR             ps documentation [DOCDIR]
1793 _ACEOF
1794 
1795   cat <<\_ACEOF
1796 
1797 X features:
1798   --x-includes=DIR    X include files are in DIR
1799   --x-libraries=DIR   X library files are in DIR
1800 
1801 System types:
1802   --build=BUILD     configure for building on BUILD [guessed]
1803   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1804   --target=TARGET   configure for building compilers for TARGET [HOST]
1805 _ACEOF
1806 fi
1807 
1808 if test -n "$ac_init_help"; then
1809   case $ac_init_help in
1810      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1811    esac
1812   cat <<\_ACEOF
1813 
1814 Optional Features:
1815   --disable-option-checking  ignore unrecognized --enable/--with options
1816   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1817   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1818   --enable-openjdk-only   suppress building custom source even if present
1819                           [disabled]
1820   --enable-debug          set the debug level to fastdebug (shorthand for
1821                           --with-debug-level=fastdebug) [disabled]
1822   --disable-headful       disable building headful support (graphical UI
1823                           support) [enabled]
1824   --enable-hotspot-test-in-build
1825                           run the Queens test after Hotspot build [disabled]
1826   --enable-unlimited-crypto
1827                           Enable unlimited crypto policy [disabled]
1828   --enable-rmiconnector-iiop
1829                           enable the JMX RMIConnector iiop transport
1830                           [disabled]
1831   --disable-debug-symbols disable generation of debug symbols [enabled]
1832   --disable-zip-debug-info
1833                           disable zipping of debug-info files [enabled]
1834   --enable-macosx-runtime-support
1835                           Deprecated. Option is kept for backwards
1836                           compatibility and is ignored
1837   --disable-freetype-bundling
1838                           disable bundling of the freetype library with the
1839                           build result [enabled on Windows or when using
1840                           --with-freetype, disabled otherwise]
1841   --enable-sjavac         use sjavac to do fast incremental compiles
1842                           [disabled]
1843   --disable-precompiled-headers
1844                           disable using precompiled headers when compiling C++
1845                           [enabled]
1846   --enable-ccache         enable using ccache to speed up recompilations
1847                           [disabled]
1848 
1849 Optional Packages:
1850   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1851   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1852   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1853                           support it), e.g. --with-target-bits=32 [guessed]
1854   --with-custom-make-dir  Deprecated. Option is kept for backwards
1855                           compatibility and is ignored
1856   --with-jdk-variant      JDK variant to build (normal) [normal]
1857   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1858   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1859                           client, minimal1, kernel, zero, zeroshark, core)
1860                           [server]
1861   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1862                           optimized (HotSpot build only)) [release]
1863   --with-devkit           use this devkit for compilers, tools and resources
1864   --with-sys-root         alias for --with-sysroot for backwards compatability
1865   --with-sysroot          use this directory as sysroot)
1866   --with-tools-dir        alias for --with-toolchain-path for backwards
1867                           compatibility
1868   --with-toolchain-path   prepend these directories when searching for
1869                           toolchain binaries (compilers etc)
1870   --with-extra-path       prepend these directories to the default path
1871   --with-conf-name        use this as the name of the configuration [generated
1872                           from important configuration options]
1873   --with-builddeps-conf   use this configuration file for the builddeps
1874   --with-builddeps-server download and use build dependencies from this server
1875                           url
1876   --with-builddeps-dir    store downloaded build dependencies here
1877                           [/localhome/builddeps]
1878   --with-builddeps-group  chgrp the downloaded build dependencies to this
1879                           group
1880   --with-cacerts-file     specify alternative cacerts file
1881   --with-milestone        Set milestone value for build [internal]
1882   --with-update-version   Set update version value for build [b00]
1883   --with-user-release-suffix
1884                           Add a custom string to the version string if build
1885                           number is not set.[username_builddateb00]
1886   --with-build-number     Set build number value for build [b00]
1887   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1888   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1889                           invocations of boot JDK, overriding the default
1890                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1891                           -enableassertions"
1892   --with-add-source-root  for each and every source directory, look in this
1893                           additional source root for the same directory; if it
1894                           exists and have files in it, include it in the build
1895   --with-override-source-root
1896                           for each and every source directory, look in this
1897                           override source root for the same directory; if it
1898                           exists, use that directory instead and ignore the
1899                           directory in the original source root
1900   --with-adds-and-overrides
1901                           use the subdirs 'adds' and 'overrides' in the
1902                           specified directory as add-source-root and
1903                           override-source-root
1904   --with-override-langtools
1905                           use this langtools dir for the build
1906   --with-override-corba   use this corba dir for the build
1907   --with-override-jaxp    use this jaxp dir for the build
1908   --with-override-jaxws   use this jaxws dir for the build
1909   --with-override-hotspot use this hotspot dir for the build
1910   --with-override-nashorn use this nashorn dir for the build
1911   --with-override-jdk     use this jdk dir for the build
1912   --with-import-hotspot   import hotspot binaries from this jdk image or
1913                           hotspot build dist dir instead of building from
1914                           source
1915   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1916                           to show possible values [platform dependent]
1917   --with-jtreg            Regression Test Harness [probed]
1918   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1919   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1920   --with-extra-ldflags    extra flags to be used when linking jdk
1921   --with-x                use the X Window System
1922   --with-cups             specify prefix directory for the cups package
1923                           (expecting the headers under PATH/include)
1924   --with-cups-include     specify directory for the cups include files
1925   --with-freetype         specify prefix directory for the freetype package
1926                           (expecting the libraries under PATH/lib and the
1927                           headers under PATH/include)
1928   --with-freetype-include specify directory for the freetype include files
1929   --with-freetype-lib     specify directory for the freetype library
1930   --with-alsa             specify prefix directory for the alsa package
1931                           (expecting the libraries under PATH/lib and the
1932                           headers under PATH/include)
1933   --with-alsa-include     specify directory for the alsa include files
1934   --with-alsa-lib         specify directory for the alsa library
1935   --with-giflib           use giflib from build system or OpenJDK source
1936                           (system, bundled) [bundled]
1937   --with-libpng           use libpng from build system or OpenJDK source
1938                           (system, bundled) [bundled]
1939   --with-zlib             use zlib from build system or OpenJDK source
1940                           (system, bundled) [bundled]
1941   --with-stdc++lib=<static>,<dynamic>,<default>
1942                           force linking of the C++ runtime on Linux to either
1943                           static or dynamic, default is static with dynamic as
1944                           fallback
1945   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1946                           only) [probed]
1947   --with-dxsdk            Deprecated. Option is kept for backwards
1948                           compatibility and is ignored
1949   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1950                           compatibility and is ignored
1951   --with-dxsdk-include    Deprecated. Option is kept for backwards
1952                           compatibility and is ignored
1953   --with-num-cores        number of cores in the build system, e.g.
1954                           --with-num-cores=8 [probed]
1955   --with-memory-size      memory (in MB) available in the build system, e.g.
1956                           --with-memory-size=1024 [probed]
1957   --with-jobs             number of parallel jobs to let make run [calculated
1958                           based on cores and memory]
1959   --with-sjavac-server-java
1960                           use this java binary for running the sjavac
1961                           background server [Boot JDK java]
1962   --with-ccache-dir       where to store ccache files [~/.ccache]
1963 
1964 Some influential environment variables:
1965   BASENAME    Override default value for BASENAME
1966   BASH        Override default value for BASH
1967   CAT         Override default value for CAT
1968   CHMOD       Override default value for CHMOD
1969   CMP         Override default value for CMP
1970   COMM        Override default value for COMM
1971   CP          Override default value for CP
1972   CPIO        Override default value for CPIO
1973   CUT         Override default value for CUT
1974   DATE        Override default value for DATE
1975   DIFF        Override default value for DIFF
1976   DIRNAME     Override default value for DIRNAME
1977   ECHO        Override default value for ECHO
1978   EXPR        Override default value for EXPR
1979   FILE        Override default value for FILE
1980   FIND        Override default value for FIND
1981   HEAD        Override default value for HEAD
1982   LN          Override default value for LN
1983   LS          Override default value for LS
1984   MKDIR       Override default value for MKDIR
1985   MKTEMP      Override default value for MKTEMP
1986   MV          Override default value for MV
1987   NAWK        Override default value for NAWK
1988   PRINTF      Override default value for PRINTF
1989   RM          Override default value for RM
1990   SH          Override default value for SH
1991   SORT        Override default value for SORT
1992   TAIL        Override default value for TAIL
1993   TAR         Override default value for TAR
1994   TEE         Override default value for TEE
1995   TOUCH       Override default value for TOUCH
1996   TR          Override default value for TR
1997   UNAME       Override default value for UNAME
1998   UNIQ        Override default value for UNIQ
1999   WC          Override default value for WC
2000   WHICH       Override default value for WHICH
2001   XARGS       Override default value for XARGS
2002   AWK         Override default value for AWK
2003   GREP        Override default value for GREP
2004   EGREP       Override default value for EGREP
2005   FGREP       Override default value for FGREP
2006   SED         Override default value for SED
2007   CYGPATH     Override default value for CYGPATH
2008   READLINK    Override default value for READLINK
2009   DF          Override default value for DF
2010   SETFILE     Override default value for SETFILE
2011   UNZIP       Override default value for UNZIP
2012   ZIP         Override default value for ZIP
2013   LDD         Override default value for LDD
2014   OTOOL       Override default value for OTOOL
2015   READELF     Override default value for READELF
2016   HG          Override default value for HG
2017   STAT        Override default value for STAT
2018   TIME        Override default value for TIME
2019   DSYMUTIL    Override default value for DSYMUTIL
2020   XATTR       Override default value for XATTR
2021   CODESIGN    Override default value for CODESIGN
2022   PKG_CONFIG  path to pkg-config utility
2023   JAVA        Override default value for JAVA
2024   JAVAC       Override default value for JAVAC
2025   JAVAH       Override default value for JAVAH
2026   JAR         Override default value for JAR
2027   NATIVE2ASCII
2028               Override default value for NATIVE2ASCII
2029   JARSIGNER   Override default value for JARSIGNER
2030   CC          C compiler command
2031   CFLAGS      C compiler flags
2032   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2033               nonstandard directory <lib dir>
2034   LIBS        libraries to pass to the linker, e.g. -l<library>
2035   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2036               you have headers in a nonstandard directory <include dir>
2037   CXX         C++ compiler command
2038   CXXFLAGS    C++ compiler flags
2039   CPP         C preprocessor
2040   CXXCPP      C++ preprocessor
2041   AS          Override default value for AS
2042   AR          Override default value for AR
2043   OBJC        Objective C compiler command
2044   OBJCFLAGS   Objective C compiler flags
2045   LIPO        Override default value for LIPO
2046   STRIP       Override default value for STRIP
2047   NM          Override default value for NM
2048   GNM         Override default value for GNM
2049   MCS         Override default value for MCS
2050   OBJCOPY     Override default value for OBJCOPY
2051   OBJDUMP     Override default value for OBJDUMP
2052   BUILD_CC    Override default value for BUILD_CC
2053   BUILD_CXX   Override default value for BUILD_CXX
2054   BUILD_LD    Override default value for BUILD_LD
2055   JTREGEXE    Override default value for JTREGEXE
2056   XMKMF       Path to xmkmf, Makefile generator for X Window System
2057   FREETYPE_CFLAGS
2058               C compiler flags for FREETYPE, overriding pkg-config
2059   FREETYPE_LIBS
2060               linker flags for FREETYPE, overriding pkg-config
2061   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2062   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2063   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2064   PNG_LIBS    linker flags for PNG, overriding pkg-config
2065   LIBFFI_CFLAGS
2066               C compiler flags for LIBFFI, overriding pkg-config
2067   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2068   CCACHE      Override default value for CCACHE
2069 
2070 Use these variables to override the choices made by `configure' or to help
2071 it to find libraries and programs with nonstandard names/locations.
2072 
2073 Report bugs to <build-dev@openjdk.java.net>.
2074 OpenJDK home page: <http://openjdk.java.net>.
2075 _ACEOF
2076 ac_status=$?
2077 fi
2078 
2079 if test "$ac_init_help" = "recursive"; then
2080   # If there are subdirs, report their specific --help.
2081   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2082     test -d "$ac_dir" ||
2083       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2084       continue
2085     ac_builddir=.
2086 
2087 case "$ac_dir" in
2088 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2089 *)
2090   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2091   # A ".." for each directory in $ac_dir_suffix.
2092   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2093   case $ac_top_builddir_sub in
2094   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2095   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2096   esac ;;
2097 esac
2098 ac_abs_top_builddir=$ac_pwd
2099 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2100 # for backward compatibility:
2101 ac_top_builddir=$ac_top_build_prefix
2102 
2103 case $srcdir in
2104   .)  # We are building in place.
2105     ac_srcdir=.
2106     ac_top_srcdir=$ac_top_builddir_sub
2107     ac_abs_top_srcdir=$ac_pwd ;;
2108   [\\/]* | ?:[\\/]* )  # Absolute name.
2109     ac_srcdir=$srcdir$ac_dir_suffix;
2110     ac_top_srcdir=$srcdir
2111     ac_abs_top_srcdir=$srcdir ;;
2112   *) # Relative name.
2113     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2114     ac_top_srcdir=$ac_top_build_prefix$srcdir
2115     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2116 esac
2117 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2118 
2119     cd "$ac_dir" || { ac_status=$?; continue; }
2120     # Check for guested configure.
2121     if test -f "$ac_srcdir/configure.gnu"; then
2122       echo &&
2123       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2124     elif test -f "$ac_srcdir/configure"; then
2125       echo &&
2126       $SHELL "$ac_srcdir/configure" --help=recursive
2127     else
2128       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2129     fi || ac_status=$?
2130     cd "$ac_pwd" || { ac_status=$?; break; }
2131   done
2132 fi
2133 
2134 test -n "$ac_init_help" && exit $ac_status
2135 if $ac_init_version; then
2136   cat <<\_ACEOF
2137 OpenJDK configure jdk9
2138 generated by GNU Autoconf 2.69
2139 
2140 Copyright (C) 2012 Free Software Foundation, Inc.
2141 This configure script is free software; the Free Software Foundation
2142 gives unlimited permission to copy, distribute and modify it.
2143 _ACEOF
2144   exit
2145 fi
2146 
2147 ## ------------------------ ##
2148 ## Autoconf initialization. ##
2149 ## ------------------------ ##
2150 
2151 # ac_fn_c_try_compile LINENO
2152 # --------------------------
2153 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2154 ac_fn_c_try_compile ()
2155 {
2156   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157   rm -f conftest.$ac_objext
2158   if { { ac_try="$ac_compile"
2159 case "(($ac_try" in
2160   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2161   *) ac_try_echo=$ac_try;;
2162 esac
2163 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2164 $as_echo "$ac_try_echo"; } >&5
2165   (eval "$ac_compile") 2>conftest.err
2166   ac_status=$?
2167   if test -s conftest.err; then
2168     grep -v '^ *+' conftest.err >conftest.er1
2169     cat conftest.er1 >&5
2170     mv -f conftest.er1 conftest.err
2171   fi
2172   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2173   test $ac_status = 0; } && {
2174          test -z "$ac_c_werror_flag" ||
2175          test ! -s conftest.err
2176        } && test -s conftest.$ac_objext; then :
2177   ac_retval=0
2178 else
2179   $as_echo "$as_me: failed program was:" >&5
2180 sed 's/^/| /' conftest.$ac_ext >&5
2181 
2182         ac_retval=1
2183 fi
2184   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2185   as_fn_set_status $ac_retval
2186 
2187 } # ac_fn_c_try_compile
2188 
2189 # ac_fn_cxx_try_compile LINENO
2190 # ----------------------------
2191 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2192 ac_fn_cxx_try_compile ()
2193 {
2194   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195   rm -f conftest.$ac_objext
2196   if { { ac_try="$ac_compile"
2197 case "(($ac_try" in
2198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199   *) ac_try_echo=$ac_try;;
2200 esac
2201 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202 $as_echo "$ac_try_echo"; } >&5
2203   (eval "$ac_compile") 2>conftest.err
2204   ac_status=$?
2205   if test -s conftest.err; then
2206     grep -v '^ *+' conftest.err >conftest.er1
2207     cat conftest.er1 >&5
2208     mv -f conftest.er1 conftest.err
2209   fi
2210   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211   test $ac_status = 0; } && {
2212          test -z "$ac_cxx_werror_flag" ||
2213          test ! -s conftest.err
2214        } && test -s conftest.$ac_objext; then :
2215   ac_retval=0
2216 else
2217   $as_echo "$as_me: failed program was:" >&5
2218 sed 's/^/| /' conftest.$ac_ext >&5
2219 
2220         ac_retval=1
2221 fi
2222   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223   as_fn_set_status $ac_retval
2224 
2225 } # ac_fn_cxx_try_compile
2226 
2227 # ac_fn_c_try_cpp LINENO
2228 # ----------------------
2229 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2230 ac_fn_c_try_cpp ()
2231 {
2232   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233   if { { ac_try="$ac_cpp conftest.$ac_ext"
2234 case "(($ac_try" in
2235   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2236   *) ac_try_echo=$ac_try;;
2237 esac
2238 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2239 $as_echo "$ac_try_echo"; } >&5
2240   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2241   ac_status=$?
2242   if test -s conftest.err; then
2243     grep -v '^ *+' conftest.err >conftest.er1
2244     cat conftest.er1 >&5
2245     mv -f conftest.er1 conftest.err
2246   fi
2247   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2248   test $ac_status = 0; } > conftest.i && {
2249          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2250          test ! -s conftest.err
2251        }; then :
2252   ac_retval=0
2253 else
2254   $as_echo "$as_me: failed program was:" >&5
2255 sed 's/^/| /' conftest.$ac_ext >&5
2256 
2257     ac_retval=1
2258 fi
2259   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260   as_fn_set_status $ac_retval
2261 
2262 } # ac_fn_c_try_cpp
2263 
2264 # ac_fn_cxx_try_cpp LINENO
2265 # ------------------------
2266 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2267 ac_fn_cxx_try_cpp ()
2268 {
2269   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270   if { { ac_try="$ac_cpp conftest.$ac_ext"
2271 case "(($ac_try" in
2272   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273   *) ac_try_echo=$ac_try;;
2274 esac
2275 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276 $as_echo "$ac_try_echo"; } >&5
2277   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2278   ac_status=$?
2279   if test -s conftest.err; then
2280     grep -v '^ *+' conftest.err >conftest.er1
2281     cat conftest.er1 >&5
2282     mv -f conftest.er1 conftest.err
2283   fi
2284   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285   test $ac_status = 0; } > conftest.i && {
2286          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2287          test ! -s conftest.err
2288        }; then :
2289   ac_retval=0
2290 else
2291   $as_echo "$as_me: failed program was:" >&5
2292 sed 's/^/| /' conftest.$ac_ext >&5
2293 
2294     ac_retval=1
2295 fi
2296   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297   as_fn_set_status $ac_retval
2298 
2299 } # ac_fn_cxx_try_cpp
2300 
2301 # ac_fn_objc_try_compile LINENO
2302 # -----------------------------
2303 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2304 ac_fn_objc_try_compile ()
2305 {
2306   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307   rm -f conftest.$ac_objext
2308   if { { ac_try="$ac_compile"
2309 case "(($ac_try" in
2310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311   *) ac_try_echo=$ac_try;;
2312 esac
2313 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314 $as_echo "$ac_try_echo"; } >&5
2315   (eval "$ac_compile") 2>conftest.err
2316   ac_status=$?
2317   if test -s conftest.err; then
2318     grep -v '^ *+' conftest.err >conftest.er1
2319     cat conftest.er1 >&5
2320     mv -f conftest.er1 conftest.err
2321   fi
2322   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323   test $ac_status = 0; } && {
2324          test -z "$ac_objc_werror_flag" ||
2325          test ! -s conftest.err
2326        } && test -s conftest.$ac_objext; then :
2327   ac_retval=0
2328 else
2329   $as_echo "$as_me: failed program was:" >&5
2330 sed 's/^/| /' conftest.$ac_ext >&5
2331 
2332         ac_retval=1
2333 fi
2334   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335   as_fn_set_status $ac_retval
2336 
2337 } # ac_fn_objc_try_compile
2338 
2339 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2340 # ---------------------------------------------------------
2341 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2342 # the include files in INCLUDES and setting the cache variable VAR
2343 # accordingly.
2344 ac_fn_cxx_check_header_mongrel ()
2345 {
2346   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347   if eval \${$3+:} false; then :
2348   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2349 $as_echo_n "checking for $2... " >&6; }
2350 if eval \${$3+:} false; then :
2351   $as_echo_n "(cached) " >&6
2352 fi
2353 eval ac_res=\$$3
2354                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2355 $as_echo "$ac_res" >&6; }
2356 else
2357   # Is the header compilable?
2358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2359 $as_echo_n "checking $2 usability... " >&6; }
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361 /* end confdefs.h.  */
2362 $4
2363 #include <$2>
2364 _ACEOF
2365 if ac_fn_cxx_try_compile "$LINENO"; then :
2366   ac_header_compiler=yes
2367 else
2368   ac_header_compiler=no
2369 fi
2370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2372 $as_echo "$ac_header_compiler" >&6; }
2373 
2374 # Is the header present?
2375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2376 $as_echo_n "checking $2 presence... " >&6; }
2377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378 /* end confdefs.h.  */
2379 #include <$2>
2380 _ACEOF
2381 if ac_fn_cxx_try_cpp "$LINENO"; then :
2382   ac_header_preproc=yes
2383 else
2384   ac_header_preproc=no
2385 fi
2386 rm -f conftest.err conftest.i conftest.$ac_ext
2387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2388 $as_echo "$ac_header_preproc" >&6; }
2389 
2390 # So?  What about this header?
2391 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2392   yes:no: )
2393     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2394 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2395     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2396 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2397     ;;
2398   no:yes:* )
2399     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2400 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2401     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2402 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2403     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2404 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2405     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2406 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2407     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2408 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2409 ( $as_echo "## ----------------------------------------- ##
2410 ## Report this to build-dev@openjdk.java.net ##
2411 ## ----------------------------------------- ##"
2412      ) | sed "s/^/$as_me: WARNING:     /" >&2
2413     ;;
2414 esac
2415   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2416 $as_echo_n "checking for $2... " >&6; }
2417 if eval \${$3+:} false; then :
2418   $as_echo_n "(cached) " >&6
2419 else
2420   eval "$3=\$ac_header_compiler"
2421 fi
2422 eval ac_res=\$$3
2423                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2424 $as_echo "$ac_res" >&6; }
2425 fi
2426   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427 
2428 } # ac_fn_cxx_check_header_mongrel
2429 
2430 # ac_fn_cxx_try_run LINENO
2431 # ------------------------
2432 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2433 # that executables *can* be run.
2434 ac_fn_cxx_try_run ()
2435 {
2436   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437   if { { ac_try="$ac_link"
2438 case "(($ac_try" in
2439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2440   *) ac_try_echo=$ac_try;;
2441 esac
2442 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2443 $as_echo "$ac_try_echo"; } >&5
2444   (eval "$ac_link") 2>&5
2445   ac_status=$?
2446   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2448   { { case "(($ac_try" in
2449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450   *) ac_try_echo=$ac_try;;
2451 esac
2452 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453 $as_echo "$ac_try_echo"; } >&5
2454   (eval "$ac_try") 2>&5
2455   ac_status=$?
2456   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2457   test $ac_status = 0; }; }; then :
2458   ac_retval=0
2459 else
2460   $as_echo "$as_me: program exited with status $ac_status" >&5
2461        $as_echo "$as_me: failed program was:" >&5
2462 sed 's/^/| /' conftest.$ac_ext >&5
2463 
2464        ac_retval=$ac_status
2465 fi
2466   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2467   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2468   as_fn_set_status $ac_retval
2469 
2470 } # ac_fn_cxx_try_run
2471 
2472 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2473 # ---------------------------------------------------------
2474 # Tests whether HEADER exists and can be compiled using the include files in
2475 # INCLUDES, setting the cache variable VAR accordingly.
2476 ac_fn_cxx_check_header_compile ()
2477 {
2478   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2479   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2480 $as_echo_n "checking for $2... " >&6; }
2481 if eval \${$3+:} false; then :
2482   $as_echo_n "(cached) " >&6
2483 else
2484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485 /* end confdefs.h.  */
2486 $4
2487 #include <$2>
2488 _ACEOF
2489 if ac_fn_cxx_try_compile "$LINENO"; then :
2490   eval "$3=yes"
2491 else
2492   eval "$3=no"
2493 fi
2494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2495 fi
2496 eval ac_res=\$$3
2497                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2498 $as_echo "$ac_res" >&6; }
2499   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500 
2501 } # ac_fn_cxx_check_header_compile
2502 
2503 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2504 # ----------------------------------------------
2505 # Tries to find the compile-time value of EXPR in a program that includes
2506 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2507 # computed
2508 ac_fn_cxx_compute_int ()
2509 {
2510   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2511   if test "$cross_compiling" = yes; then
2512     # Depending upon the size, compute the lo and hi bounds.
2513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2514 /* end confdefs.h.  */
2515 $4
2516 int
2517 main ()
2518 {
2519 static int test_array [1 - 2 * !(($2) >= 0)];
2520 test_array [0] = 0;
2521 return test_array [0];
2522 
2523   ;
2524   return 0;
2525 }
2526 _ACEOF
2527 if ac_fn_cxx_try_compile "$LINENO"; then :
2528   ac_lo=0 ac_mid=0
2529   while :; do
2530     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531 /* end confdefs.h.  */
2532 $4
2533 int
2534 main ()
2535 {
2536 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2537 test_array [0] = 0;
2538 return test_array [0];
2539 
2540   ;
2541   return 0;
2542 }
2543 _ACEOF
2544 if ac_fn_cxx_try_compile "$LINENO"; then :
2545   ac_hi=$ac_mid; break
2546 else
2547   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2548                         if test $ac_lo -le $ac_mid; then
2549                           ac_lo= ac_hi=
2550                           break
2551                         fi
2552                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2553 fi
2554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555   done
2556 else
2557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558 /* end confdefs.h.  */
2559 $4
2560 int
2561 main ()
2562 {
2563 static int test_array [1 - 2 * !(($2) < 0)];
2564 test_array [0] = 0;
2565 return test_array [0];
2566 
2567   ;
2568   return 0;
2569 }
2570 _ACEOF
2571 if ac_fn_cxx_try_compile "$LINENO"; then :
2572   ac_hi=-1 ac_mid=-1
2573   while :; do
2574     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575 /* end confdefs.h.  */
2576 $4
2577 int
2578 main ()
2579 {
2580 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2581 test_array [0] = 0;
2582 return test_array [0];
2583 
2584   ;
2585   return 0;
2586 }
2587 _ACEOF
2588 if ac_fn_cxx_try_compile "$LINENO"; then :
2589   ac_lo=$ac_mid; break
2590 else
2591   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2592                         if test $ac_mid -le $ac_hi; then
2593                           ac_lo= ac_hi=
2594                           break
2595                         fi
2596                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2597 fi
2598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599   done
2600 else
2601   ac_lo= ac_hi=
2602 fi
2603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604 fi
2605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606 # Binary search between lo and hi bounds.
2607 while test "x$ac_lo" != "x$ac_hi"; do
2608   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2609   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610 /* end confdefs.h.  */
2611 $4
2612 int
2613 main ()
2614 {
2615 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2616 test_array [0] = 0;
2617 return test_array [0];
2618 
2619   ;
2620   return 0;
2621 }
2622 _ACEOF
2623 if ac_fn_cxx_try_compile "$LINENO"; then :
2624   ac_hi=$ac_mid
2625 else
2626   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2627 fi
2628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2629 done
2630 case $ac_lo in #((
2631 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2632 '') ac_retval=1 ;;
2633 esac
2634   else
2635     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636 /* end confdefs.h.  */
2637 $4
2638 static long int longval () { return $2; }
2639 static unsigned long int ulongval () { return $2; }
2640 #include <stdio.h>
2641 #include <stdlib.h>
2642 int
2643 main ()
2644 {
2645 
2646   FILE *f = fopen ("conftest.val", "w");
2647   if (! f)
2648     return 1;
2649   if (($2) < 0)
2650     {
2651       long int i = longval ();
2652       if (i != ($2))
2653         return 1;
2654       fprintf (f, "%ld", i);
2655     }
2656   else
2657     {
2658       unsigned long int i = ulongval ();
2659       if (i != ($2))
2660         return 1;
2661       fprintf (f, "%lu", i);
2662     }
2663   /* Do not output a trailing newline, as this causes \r\n confusion
2664      on some platforms.  */
2665   return ferror (f) || fclose (f) != 0;
2666 
2667   ;
2668   return 0;
2669 }
2670 _ACEOF
2671 if ac_fn_cxx_try_run "$LINENO"; then :
2672   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2673 else
2674   ac_retval=1
2675 fi
2676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2677   conftest.$ac_objext conftest.beam conftest.$ac_ext
2678 rm -f conftest.val
2679 
2680   fi
2681   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2682   as_fn_set_status $ac_retval
2683 
2684 } # ac_fn_cxx_compute_int
2685 
2686 # ac_fn_cxx_try_link LINENO
2687 # -------------------------
2688 # Try to link conftest.$ac_ext, and return whether this succeeded.
2689 ac_fn_cxx_try_link ()
2690 {
2691   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2692   rm -f conftest.$ac_objext conftest$ac_exeext
2693   if { { ac_try="$ac_link"
2694 case "(($ac_try" in
2695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696   *) ac_try_echo=$ac_try;;
2697 esac
2698 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699 $as_echo "$ac_try_echo"; } >&5
2700   (eval "$ac_link") 2>conftest.err
2701   ac_status=$?
2702   if test -s conftest.err; then
2703     grep -v '^ *+' conftest.err >conftest.er1
2704     cat conftest.er1 >&5
2705     mv -f conftest.er1 conftest.err
2706   fi
2707   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2708   test $ac_status = 0; } && {
2709          test -z "$ac_cxx_werror_flag" ||
2710          test ! -s conftest.err
2711        } && test -s conftest$ac_exeext && {
2712          test "$cross_compiling" = yes ||
2713          test -x conftest$ac_exeext
2714        }; then :
2715   ac_retval=0
2716 else
2717   $as_echo "$as_me: failed program was:" >&5
2718 sed 's/^/| /' conftest.$ac_ext >&5
2719 
2720         ac_retval=1
2721 fi
2722   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2723   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2724   # interfere with the next link command; also delete a directory that is
2725   # left behind by Apple's compiler.  We do this before executing the actions.
2726   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2727   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728   as_fn_set_status $ac_retval
2729 
2730 } # ac_fn_cxx_try_link
2731 
2732 # ac_fn_cxx_check_func LINENO FUNC VAR
2733 # ------------------------------------
2734 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2735 ac_fn_cxx_check_func ()
2736 {
2737   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2739 $as_echo_n "checking for $2... " >&6; }
2740 if eval \${$3+:} false; then :
2741   $as_echo_n "(cached) " >&6
2742 else
2743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744 /* end confdefs.h.  */
2745 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2746    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2747 #define $2 innocuous_$2
2748 
2749 /* System header to define __stub macros and hopefully few prototypes,
2750     which can conflict with char $2 (); below.
2751     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2752     <limits.h> exists even on freestanding compilers.  */
2753 
2754 #ifdef __STDC__
2755 # include <limits.h>
2756 #else
2757 # include <assert.h>
2758 #endif
2759 
2760 #undef $2
2761 
2762 /* Override any GCC internal prototype to avoid an error.
2763    Use char because int might match the return type of a GCC
2764    builtin and then its argument prototype would still apply.  */
2765 #ifdef __cplusplus
2766 extern "C"
2767 #endif
2768 char $2 ();
2769 /* The GNU C library defines this for functions which it implements
2770     to always fail with ENOSYS.  Some functions are actually named
2771     something starting with __ and the normal name is an alias.  */
2772 #if defined __stub_$2 || defined __stub___$2
2773 choke me
2774 #endif
2775 
2776 int
2777 main ()
2778 {
2779 return $2 ();
2780   ;
2781   return 0;
2782 }
2783 _ACEOF
2784 if ac_fn_cxx_try_link "$LINENO"; then :
2785   eval "$3=yes"
2786 else
2787   eval "$3=no"
2788 fi
2789 rm -f core conftest.err conftest.$ac_objext \
2790     conftest$ac_exeext conftest.$ac_ext
2791 fi
2792 eval ac_res=\$$3
2793                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2794 $as_echo "$ac_res" >&6; }
2795   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796 
2797 } # ac_fn_cxx_check_func
2798 
2799 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2800 # -------------------------------------------------------
2801 # Tests whether HEADER exists and can be compiled using the include files in
2802 # INCLUDES, setting the cache variable VAR accordingly.
2803 ac_fn_c_check_header_compile ()
2804 {
2805   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2807 $as_echo_n "checking for $2... " >&6; }
2808 if eval \${$3+:} false; then :
2809   $as_echo_n "(cached) " >&6
2810 else
2811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812 /* end confdefs.h.  */
2813 $4
2814 #include <$2>
2815 _ACEOF
2816 if ac_fn_c_try_compile "$LINENO"; then :
2817   eval "$3=yes"
2818 else
2819   eval "$3=no"
2820 fi
2821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2822 fi
2823 eval ac_res=\$$3
2824                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2825 $as_echo "$ac_res" >&6; }
2826   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2827 
2828 } # ac_fn_c_check_header_compile
2829 cat >config.log <<_ACEOF
2830 This file contains any messages produced by compilers while
2831 running configure, to aid debugging if configure makes a mistake.
2832 
2833 It was created by OpenJDK $as_me jdk9, which was
2834 generated by GNU Autoconf 2.69.  Invocation command line was
2835 
2836   $ $0 $@
2837 
2838 _ACEOF
2839 exec 5>>config.log
2840 {
2841 cat <<_ASUNAME
2842 ## --------- ##
2843 ## Platform. ##
2844 ## --------- ##
2845 
2846 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2847 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2848 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2849 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2850 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2851 
2852 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2853 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2854 
2855 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2856 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2857 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2858 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2859 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2860 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2861 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2862 
2863 _ASUNAME
2864 
2865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2866 for as_dir in $PATH
2867 do
2868   IFS=$as_save_IFS
2869   test -z "$as_dir" && as_dir=.
2870     $as_echo "PATH: $as_dir"
2871   done
2872 IFS=$as_save_IFS
2873 
2874 } >&5
2875 
2876 cat >&5 <<_ACEOF
2877 
2878 
2879 ## ----------- ##
2880 ## Core tests. ##
2881 ## ----------- ##
2882 
2883 _ACEOF
2884 
2885 
2886 # Keep a trace of the command line.
2887 # Strip out --no-create and --no-recursion so they do not pile up.
2888 # Strip out --silent because we don't want to record it for future runs.
2889 # Also quote any args containing shell meta-characters.
2890 # Make two passes to allow for proper duplicate-argument suppression.
2891 ac_configure_args=
2892 ac_configure_args0=
2893 ac_configure_args1=
2894 ac_must_keep_next=false
2895 for ac_pass in 1 2
2896 do
2897   for ac_arg
2898   do
2899     case $ac_arg in
2900     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2901     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2902     | -silent | --silent | --silen | --sile | --sil)
2903       continue ;;
2904     *\'*)
2905       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2906     esac
2907     case $ac_pass in
2908     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2909     2)
2910       as_fn_append ac_configure_args1 " '$ac_arg'"
2911       if test $ac_must_keep_next = true; then
2912         ac_must_keep_next=false # Got value, back to normal.
2913       else
2914         case $ac_arg in
2915           *=* | --config-cache | -C | -disable-* | --disable-* \
2916           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2917           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2918           | -with-* | --with-* | -without-* | --without-* | --x)
2919             case "$ac_configure_args0 " in
2920               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2921             esac
2922             ;;
2923           -* ) ac_must_keep_next=true ;;
2924         esac
2925       fi
2926       as_fn_append ac_configure_args " '$ac_arg'"
2927       ;;
2928     esac
2929   done
2930 done
2931 { ac_configure_args0=; unset ac_configure_args0;}
2932 { ac_configure_args1=; unset ac_configure_args1;}
2933 
2934 # When interrupted or exit'd, cleanup temporary files, and complete
2935 # config.log.  We remove comments because anyway the quotes in there
2936 # would cause problems or look ugly.
2937 # WARNING: Use '\'' to represent an apostrophe within the trap.
2938 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2939 trap 'exit_status=$?
2940   # Save into config.log some information that might help in debugging.
2941   {
2942     echo
2943 
2944     $as_echo "## ---------------- ##
2945 ## Cache variables. ##
2946 ## ---------------- ##"
2947     echo
2948     # The following way of writing the cache mishandles newlines in values,
2949 (
2950   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2951     eval ac_val=\$$ac_var
2952     case $ac_val in #(
2953     *${as_nl}*)
2954       case $ac_var in #(
2955       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2956 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2957       esac
2958       case $ac_var in #(
2959       _ | IFS | as_nl) ;; #(
2960       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2961       *) { eval $ac_var=; unset $ac_var;} ;;
2962       esac ;;
2963     esac
2964   done
2965   (set) 2>&1 |
2966     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2967     *${as_nl}ac_space=\ *)
2968       sed -n \
2969         "s/'\''/'\''\\\\'\'''\''/g;
2970           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2971       ;; #(
2972     *)
2973       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2974       ;;
2975     esac |
2976     sort
2977 )
2978     echo
2979 
2980     $as_echo "## ----------------- ##
2981 ## Output variables. ##
2982 ## ----------------- ##"
2983     echo
2984     for ac_var in $ac_subst_vars
2985     do
2986       eval ac_val=\$$ac_var
2987       case $ac_val in
2988       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2989       esac
2990       $as_echo "$ac_var='\''$ac_val'\''"
2991     done | sort
2992     echo
2993 
2994     if test -n "$ac_subst_files"; then
2995       $as_echo "## ------------------- ##
2996 ## File substitutions. ##
2997 ## ------------------- ##"
2998       echo
2999       for ac_var in $ac_subst_files
3000       do
3001         eval ac_val=\$$ac_var
3002         case $ac_val in
3003         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3004         esac
3005         $as_echo "$ac_var='\''$ac_val'\''"
3006       done | sort
3007       echo
3008     fi
3009 
3010     if test -s confdefs.h; then
3011       $as_echo "## ----------- ##
3012 ## confdefs.h. ##
3013 ## ----------- ##"
3014       echo
3015       cat confdefs.h
3016       echo
3017     fi
3018     test "$ac_signal" != 0 &&
3019       $as_echo "$as_me: caught signal $ac_signal"
3020     $as_echo "$as_me: exit $exit_status"
3021   } >&5
3022   rm -f core *.core core.conftest.* &&
3023     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3024     exit $exit_status
3025 ' 0
3026 for ac_signal in 1 2 13 15; do
3027   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3028 done
3029 ac_signal=0
3030 
3031 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3032 rm -f -r conftest* confdefs.h
3033 
3034 $as_echo "/* confdefs.h */" > confdefs.h
3035 
3036 # Predefined preprocessor variables.
3037 
3038 cat >>confdefs.h <<_ACEOF
3039 #define PACKAGE_NAME "$PACKAGE_NAME"
3040 _ACEOF
3041 
3042 cat >>confdefs.h <<_ACEOF
3043 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3044 _ACEOF
3045 
3046 cat >>confdefs.h <<_ACEOF
3047 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3048 _ACEOF
3049 
3050 cat >>confdefs.h <<_ACEOF
3051 #define PACKAGE_STRING "$PACKAGE_STRING"
3052 _ACEOF
3053 
3054 cat >>confdefs.h <<_ACEOF
3055 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3056 _ACEOF
3057 
3058 cat >>confdefs.h <<_ACEOF
3059 #define PACKAGE_URL "$PACKAGE_URL"
3060 _ACEOF
3061 
3062 
3063 # Let the site file select an alternate cache file if it wants to.
3064 # Prefer an explicitly selected file to automatically selected ones.
3065 ac_site_file1=NONE
3066 ac_site_file2=NONE
3067 if test -n "$CONFIG_SITE"; then
3068   # We do not want a PATH search for config.site.
3069   case $CONFIG_SITE in #((
3070     -*)  ac_site_file1=./$CONFIG_SITE;;
3071     */*) ac_site_file1=$CONFIG_SITE;;
3072     *)   ac_site_file1=./$CONFIG_SITE;;
3073   esac
3074 elif test "x$prefix" != xNONE; then
3075   ac_site_file1=$prefix/share/config.site
3076   ac_site_file2=$prefix/etc/config.site
3077 else
3078   ac_site_file1=$ac_default_prefix/share/config.site
3079   ac_site_file2=$ac_default_prefix/etc/config.site
3080 fi
3081 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3082 do
3083   test "x$ac_site_file" = xNONE && continue
3084   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3085     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3086 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3087     sed 's/^/| /' "$ac_site_file" >&5
3088     . "$ac_site_file" \
3089       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3091 as_fn_error $? "failed to load site script $ac_site_file
3092 See \`config.log' for more details" "$LINENO" 5; }
3093   fi
3094 done
3095 
3096 if test -r "$cache_file"; then
3097   # Some versions of bash will fail to source /dev/null (special files
3098   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3099   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3100     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3101 $as_echo "$as_me: loading cache $cache_file" >&6;}
3102     case $cache_file in
3103       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3104       *)                      . "./$cache_file";;
3105     esac
3106   fi
3107 else
3108   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3109 $as_echo "$as_me: creating cache $cache_file" >&6;}
3110   >$cache_file
3111 fi
3112 
3113 # Check that the precious variables saved in the cache have kept the same
3114 # value.
3115 ac_cache_corrupted=false
3116 for ac_var in $ac_precious_vars; do
3117   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3118   eval ac_new_set=\$ac_env_${ac_var}_set
3119   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3120   eval ac_new_val=\$ac_env_${ac_var}_value
3121   case $ac_old_set,$ac_new_set in
3122     set,)
3123       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3124 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3125       ac_cache_corrupted=: ;;
3126     ,set)
3127       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3128 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3129       ac_cache_corrupted=: ;;
3130     ,);;
3131     *)
3132       if test "x$ac_old_val" != "x$ac_new_val"; then
3133         # differences in whitespace do not lead to failure.
3134         ac_old_val_w=`echo x $ac_old_val`
3135         ac_new_val_w=`echo x $ac_new_val`
3136         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3137           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3138 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3139           ac_cache_corrupted=:
3140         else
3141           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3142 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3143           eval $ac_var=\$ac_old_val
3144         fi
3145         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3146 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3147         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3148 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3149       fi;;
3150   esac
3151   # Pass precious variables to config.status.
3152   if test "$ac_new_set" = set; then
3153     case $ac_new_val in
3154     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3155     *) ac_arg=$ac_var=$ac_new_val ;;
3156     esac
3157     case " $ac_configure_args " in
3158       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3159       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3160     esac
3161   fi
3162 done
3163 if $ac_cache_corrupted; then
3164   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3165 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3166   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3167 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3168   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3169 fi
3170 ## -------------------- ##
3171 ## Main body of script. ##
3172 ## -------------------- ##
3173 
3174 ac_ext=c
3175 ac_cpp='$CPP $CPPFLAGS'
3176 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3177 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3178 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3179 
3180 
3181 
3182 ac_aux_dir=
3183 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3184   if test -f "$ac_dir/install-sh"; then
3185     ac_aux_dir=$ac_dir
3186     ac_install_sh="$ac_aux_dir/install-sh -c"
3187     break
3188   elif test -f "$ac_dir/install.sh"; then
3189     ac_aux_dir=$ac_dir
3190     ac_install_sh="$ac_aux_dir/install.sh -c"
3191     break
3192   elif test -f "$ac_dir/shtool"; then
3193     ac_aux_dir=$ac_dir
3194     ac_install_sh="$ac_aux_dir/shtool install -c"
3195     break
3196   fi
3197 done
3198 if test -z "$ac_aux_dir"; then
3199   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
3200 fi
3201 
3202 # These three variables are undocumented and unsupported,
3203 # and are intended to be withdrawn in a future Autoconf release.
3204 # They can cause serious problems if a builder's source tree is in a directory
3205 # whose full name contains unusual characters.
3206 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3207 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3208 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3209 
3210 
3211 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3212 
3213 #
3214 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3215 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3216 #
3217 # This code is free software; you can redistribute it and/or modify it
3218 # under the terms of the GNU General Public License version 2 only, as
3219 # published by the Free Software Foundation.  Oracle designates this
3220 # particular file as subject to the "Classpath" exception as provided
3221 # by Oracle in the LICENSE file that accompanied this code.
3222 #
3223 # This code is distributed in the hope that it will be useful, but WITHOUT
3224 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3225 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3226 # version 2 for more details (a copy is included in the LICENSE file that
3227 # accompanied this code).
3228 #
3229 # You should have received a copy of the GNU General Public License version
3230 # 2 along with this work; if not, write to the Free Software Foundation,
3231 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3232 #
3233 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3234 # or visit www.oracle.com if you need additional information or have any
3235 # questions.
3236 #
3237 
3238 #
3239 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3240 #
3241 # This program is free software; you can redistribute it and/or modify
3242 # it under the terms of the GNU General Public License as published by
3243 # the Free Software Foundation; either version 2 of the License, or
3244 # (at your option) any later version.
3245 #
3246 # This program is distributed in the hope that it will be useful, but
3247 # WITHOUT ANY WARRANTY; without even the implied warranty of
3248 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3249 # General Public License for more details.
3250 #
3251 # You should have received a copy of the GNU General Public License
3252 # along with this program; if not, write to the Free Software
3253 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3254 #
3255 # As a special exception to the GNU General Public License, if you
3256 # distribute this file as part of a program that contains a
3257 # configuration script generated by Autoconf, you may include it under
3258 # the same distribution terms that you use for the rest of that program.
3259 
3260 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3261 # ----------------------------------
3262 # PKG_PROG_PKG_CONFIG
3263 
3264 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3265 #
3266 # Check to see whether a particular set of modules exists.  Similar
3267 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3268 #
3269 #
3270 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3271 # this or PKG_CHECK_MODULES is called, or make sure to call
3272 # PKG_CHECK_EXISTS manually
3273 # --------------------------------------------------------------
3274 
3275 
3276 
3277 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3278 # ---------------------------------------------
3279 # _PKG_CONFIG
3280 
3281 # _PKG_SHORT_ERRORS_SUPPORTED
3282 # -----------------------------
3283 # _PKG_SHORT_ERRORS_SUPPORTED
3284 
3285 
3286 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3287 # [ACTION-IF-NOT-FOUND])
3288 #
3289 #
3290 # Note that if there is a possibility the first call to
3291 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3292 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3293 #
3294 #
3295 # --------------------------------------------------------------
3296 # PKG_CHECK_MODULES
3297 
3298 
3299 # Include these first...
3300 #
3301 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3302 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3303 #
3304 # This code is free software; you can redistribute it and/or modify it
3305 # under the terms of the GNU General Public License version 2 only, as
3306 # published by the Free Software Foundation.  Oracle designates this
3307 # particular file as subject to the "Classpath" exception as provided
3308 # by Oracle in the LICENSE file that accompanied this code.
3309 #
3310 # This code is distributed in the hope that it will be useful, but WITHOUT
3311 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3312 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3313 # version 2 for more details (a copy is included in the LICENSE file that
3314 # accompanied this code).
3315 #
3316 # You should have received a copy of the GNU General Public License version
3317 # 2 along with this work; if not, write to the Free Software Foundation,
3318 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3319 #
3320 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3321 # or visit www.oracle.com if you need additional information or have any
3322 # questions.
3323 #
3324 
3325 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3326 # If so, then append $1 to $2 \
3327 # Also set JVM_ARG_OK to true/false depending on outcome.
3328 
3329 
3330 # Appends a string to a path variable, only adding the : when needed.
3331 
3332 
3333 # Prepends a string to a path variable, only adding the : when needed.
3334 
3335 
3336 # This will make sure the given variable points to a full and proper
3337 # path. This means:
3338 # 1) There will be no spaces in the path. On posix platforms,
3339 #    spaces in the path will result in an error. On Windows,
3340 #    the path will be rewritten using short-style to be space-free.
3341 # 2) The path will be absolute, and it will be in unix-style (on
3342 #     cygwin).
3343 # $1: The name of the variable to fix
3344 
3345 
3346 # This will make sure the given variable points to a executable
3347 # with a full and proper path. This means:
3348 # 1) There will be no spaces in the path. On posix platforms,
3349 #    spaces in the path will result in an error. On Windows,
3350 #    the path will be rewritten using short-style to be space-free.
3351 # 2) The path will be absolute, and it will be in unix-style (on
3352 #     cygwin).
3353 # Any arguments given to the executable is preserved.
3354 # If the input variable does not have a directory specification, then
3355 # it need to be in the PATH.
3356 # $1: The name of the variable to fix
3357 
3358 
3359 
3360 
3361 # Register a --with argument but mark it as deprecated
3362 # $1: The name of the with argument to deprecate, not including --with-
3363 
3364 
3365 # Register a --enable argument but mark it as deprecated
3366 # $1: The name of the with argument to deprecate, not including --enable-
3367 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3368 
3369 
3370 
3371 
3372 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3373 # $1: variable to check
3374 
3375 
3376 # Check that there are no unprocessed overridden variables left.
3377 # If so, they are an incorrect argument and we will exit with an error.
3378 
3379 
3380 # Setup a tool for the given variable. If correctly specified by the user,
3381 # use that value, otherwise search for the tool using the supplied code snippet.
3382 # $1: variable to set
3383 # $2: code snippet to call to look for the tool
3384 
3385 
3386 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3387 # $1: variable to set
3388 # $2: executable name (or list of names) to look for
3389 
3390 
3391 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3392 # $1: variable to set
3393 # $2: executable name (or list of names) to look for
3394 
3395 
3396 # Like BASIC_PATH_PROGS but fails if no tool was found.
3397 # $1: variable to set
3398 # $2: executable name (or list of names) to look for
3399 
3400 
3401 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3402 # $1: variable to set
3403 # $2: autoconf macro to call to look for the special tool
3404 
3405 
3406 # Setup the most fundamental tools that relies on not much else to set up,
3407 # but is used by much of the early bootstrap code.
3408 
3409 
3410 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3411 
3412 
3413 
3414 
3415 
3416 
3417 
3418 
3419 
3420 #%%% Simple tools %%%
3421 
3422 # Check if we have found a usable version of make
3423 # $1: the path to a potential make binary (or empty)
3424 # $2: the description on how we found this
3425 
3426 
3427 # Goes looking for a usable version of GNU make.
3428 
3429 
3430 
3431 
3432 
3433 
3434 # Check if build directory is on local disk. If not possible to determine,
3435 # we prefer to claim it's local.
3436 # Argument 1: directory to test
3437 # Argument 2: what to do if it is on local disk
3438 # Argument 3: what to do otherwise (remote disk or failure)
3439 
3440 
3441 # Check that source files have basic read permissions set. This might
3442 # not be the case in cygwin in certain conditions.
3443 
3444 
3445 
3446 
3447 #
3448 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3449 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3450 #
3451 # This code is free software; you can redistribute it and/or modify it
3452 # under the terms of the GNU General Public License version 2 only, as
3453 # published by the Free Software Foundation.  Oracle designates this
3454 # particular file as subject to the "Classpath" exception as provided
3455 # by Oracle in the LICENSE file that accompanied this code.
3456 #
3457 # This code is distributed in the hope that it will be useful, but WITHOUT
3458 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3459 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3460 # version 2 for more details (a copy is included in the LICENSE file that
3461 # accompanied this code).
3462 #
3463 # You should have received a copy of the GNU General Public License version
3464 # 2 along with this work; if not, write to the Free Software Foundation,
3465 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3466 #
3467 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3468 # or visit www.oracle.com if you need additional information or have any
3469 # questions.
3470 #
3471 
3472 
3473 
3474 
3475 
3476 # Helper function which possibly converts a path using DOS-style short mode.
3477 # If so, the updated path is stored in $new_path.
3478 # $1: The path to check
3479 
3480 
3481 # Helper function which possibly converts a path using DOS-style short mode.
3482 # If so, the updated path is stored in $new_path.
3483 # $1: The path to check
3484 
3485 
3486 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3487 # and could probably be heavily simplified. However, all changes in this
3488 # area tend to need lot of testing in different scenarios, and in lack of
3489 # proper unit testing, cleaning this up has not been deemed worth the effort
3490 # at the moment.
3491 
3492 
3493 
3494 
3495 
3496 
3497 
3498 
3499 
3500 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3501 
3502 
3503 
3504 
3505 #
3506 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3507 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3508 #
3509 # This code is free software; you can redistribute it and/or modify it
3510 # under the terms of the GNU General Public License version 2 only, as
3511 # published by the Free Software Foundation.  Oracle designates this
3512 # particular file as subject to the "Classpath" exception as provided
3513 # by Oracle in the LICENSE file that accompanied this code.
3514 #
3515 # This code is distributed in the hope that it will be useful, but WITHOUT
3516 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3517 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3518 # version 2 for more details (a copy is included in the LICENSE file that
3519 # accompanied this code).
3520 #
3521 # You should have received a copy of the GNU General Public License version
3522 # 2 along with this work; if not, write to the Free Software Foundation,
3523 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3524 #
3525 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3526 # or visit www.oracle.com if you need additional information or have any
3527 # questions.
3528 #
3529 
3530 
3531 
3532 
3533 
3534 
3535 
3536 
3537 
3538 
3539 
3540 # ... then the rest
3541 #
3542 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3543 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544 #
3545 # This code is free software; you can redistribute it and/or modify it
3546 # under the terms of the GNU General Public License version 2 only, as
3547 # published by the Free Software Foundation.  Oracle designates this
3548 # particular file as subject to the "Classpath" exception as provided
3549 # by Oracle in the LICENSE file that accompanied this code.
3550 #
3551 # This code is distributed in the hope that it will be useful, but WITHOUT
3552 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554 # version 2 for more details (a copy is included in the LICENSE file that
3555 # accompanied this code).
3556 #
3557 # You should have received a copy of the GNU General Public License version
3558 # 2 along with this work; if not, write to the Free Software Foundation,
3559 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560 #
3561 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562 # or visit www.oracle.com if you need additional information or have any
3563 # questions.
3564 #
3565 
3566 ########################################################################
3567 # This file handles detection of the Boot JDK. The Boot JDK detection
3568 # process has been developed as a response to solve a complex real-world
3569 # problem. Initially, it was simple, but it has grown as platform after
3570 # platform, idiosyncracy after idiosyncracy has been supported.
3571 #
3572 # The basic idea is this:
3573 # 1) You need an acceptable *) JDK to use as a Boot JDK
3574 # 2) There are several ways to locate a JDK, that are mostly platform
3575 #    dependent **)
3576 # 3) You can have multiple JDKs installed
3577 # 4) If possible, configure should try to dig out an acceptable JDK
3578 #    automatically, without having to resort to command-line options
3579 #
3580 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3581 #     javac) and not a JRE, etc.
3582 #
3583 # **) On Windows we typically use a well-known path.
3584 #     On MacOSX we typically use the tool java_home.
3585 #     On Linux we typically find javac in the $PATH, and then follow a
3586 #     chain of symlinks that often ends up in a real JDK.
3587 #
3588 # This leads to the code where we check in different ways to locate a
3589 # JDK, and if one is found, check if it is acceptable. If not, we print
3590 # our reasons for rejecting it (useful when debugging non-working
3591 # configure situations) and continue checking the next one.
3592 ########################################################################
3593 
3594 # Execute the check given as argument, and verify the result
3595 # If the Boot JDK was previously found, do nothing
3596 # $1 A command line (typically autoconf macro) to execute
3597 
3598 
3599 # Test: Is bootjdk explicitely set by command line arguments?
3600 
3601 
3602 # Test: Is bootjdk available from builddeps?
3603 
3604 
3605 # Test: Is $JAVA_HOME set?
3606 
3607 
3608 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3609 
3610 
3611 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3612 # $1: Argument to the java_home binary (optional)
3613 
3614 
3615 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3616 
3617 
3618 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3619 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3620 # $1 = Path to directory containing jdk installations.
3621 # $2 = String to append to the found JDK directory to get the proper JDK home
3622 
3623 
3624 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3625 # environmental variable as base for where to look.
3626 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3627 
3628 
3629 # Test: Is there a JDK installed in default, well-known locations?
3630 
3631 
3632 # Check that a command-line tool in the Boot JDK is correct
3633 # $1 = name of variable to assign
3634 # $2 = name of binary
3635 
3636 
3637 ###############################################################################
3638 #
3639 # We need a Boot JDK to bootstrap the build.
3640 #
3641 
3642 
3643 
3644 
3645 
3646 #
3647 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3648 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3649 #
3650 # This code is free software; you can redistribute it and/or modify it
3651 # under the terms of the GNU General Public License version 2 only, as
3652 # published by the Free Software Foundation.  Oracle designates this
3653 # particular file as subject to the "Classpath" exception as provided
3654 # by Oracle in the LICENSE file that accompanied this code.
3655 #
3656 # This code is distributed in the hope that it will be useful, but WITHOUT
3657 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3658 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3659 # version 2 for more details (a copy is included in the LICENSE file that
3660 # accompanied this code).
3661 #
3662 # You should have received a copy of the GNU General Public License version
3663 # 2 along with this work; if not, write to the Free Software Foundation,
3664 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3665 #
3666 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3667 # or visit www.oracle.com if you need additional information or have any
3668 # questions.
3669 #
3670 
3671 
3672 
3673 
3674 
3675 
3676 
3677 
3678 
3679 
3680 
3681 
3682 
3683 
3684 
3685 
3686 
3687 
3688 
3689 
3690 #
3691 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3692 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3693 #
3694 # This code is free software; you can redistribute it and/or modify it
3695 # under the terms of the GNU General Public License version 2 only, as
3696 # published by the Free Software Foundation.  Oracle designates this
3697 # particular file as subject to the "Classpath" exception as provided
3698 # by Oracle in the LICENSE file that accompanied this code.
3699 #
3700 # This code is distributed in the hope that it will be useful, but WITHOUT
3701 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3702 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3703 # version 2 for more details (a copy is included in the LICENSE file that
3704 # accompanied this code).
3705 #
3706 # You should have received a copy of the GNU General Public License version
3707 # 2 along with this work; if not, write to the Free Software Foundation,
3708 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3709 #
3710 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3711 # or visit www.oracle.com if you need additional information or have any
3712 # questions.
3713 #
3714 
3715 
3716 
3717 
3718 
3719 # Documentation on common flags used for solstudio in HIGHEST.
3720 #
3721 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3722 #          done with care, there are some assumptions below that need to
3723 #          be understood about the use of pointers, and IEEE behavior.
3724 #
3725 # -fns: Use non-standard floating point mode (not IEEE 754)
3726 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3727 # -fsingle: Use single precision floating point with 'float'
3728 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3729 #   (Source with excessing pointer casting and data access with mixed
3730 #    pointer types are not recommended)
3731 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3732 #   (If you expect perfect errno behavior, do not use this)
3733 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3734 # -xrestrict: Pointer parameters to functions do not overlap
3735 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3736 #    If you pass in multiple pointers to the same data, do not use this)
3737 # -xlibmil: Inline some library routines
3738 #   (If you expect perfect errno behavior, do not use this)
3739 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3740 #   (If you expect perfect errno behavior, do not use this)
3741 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3742 
3743     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3744     # Bug?
3745     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3746     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3747     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3748     #fi
3749 
3750 
3751 
3752 
3753 
3754 
3755 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3756 #                                   [RUN-IF-FALSE])
3757 # ------------------------------------------------------------
3758 # Check that the c and c++ compilers support an argument
3759 
3760 
3761 
3762 
3763 #
3764 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3765 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3766 #
3767 # This code is free software; you can redistribute it and/or modify it
3768 # under the terms of the GNU General Public License version 2 only, as
3769 # published by the Free Software Foundation.  Oracle designates this
3770 # particular file as subject to the "Classpath" exception as provided
3771 # by Oracle in the LICENSE file that accompanied this code.
3772 #
3773 # This code is distributed in the hope that it will be useful, but WITHOUT
3774 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3775 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3776 # version 2 for more details (a copy is included in the LICENSE file that
3777 # accompanied this code).
3778 #
3779 # You should have received a copy of the GNU General Public License version
3780 # 2 along with this work; if not, write to the Free Software Foundation,
3781 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3782 #
3783 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3784 # or visit www.oracle.com if you need additional information or have any
3785 # questions.
3786 #
3787 
3788 
3789 
3790 
3791 
3792 cygwin_help() {
3793   case $1 in
3794     unzip)
3795       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3796       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3797       ;;
3798     zip)
3799       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3800       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3801       ;;
3802     make)
3803       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3804       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3805       ;;
3806     freetype)
3807       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3808         HELP_MSG="To install freetype, run:
3809 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3810 chmod +x /tmp/freetype-setup.exe
3811 /tmp/freetype-setup.exe
3812 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3813 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3814       else
3815         HELP_MSG="You need to build a 64-bit version of freetype.
3816 This is not readily available.
3817 You can find source code and build instructions on
3818 http://www.freetype.org/
3819 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3820       fi
3821       ;;
3822   esac
3823 }
3824 
3825 msys_help() {
3826   PKGHANDLER_COMMAND=""
3827 }
3828 
3829 apt_help() {
3830   case $1 in
3831     devkit)
3832       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3833     openjdk)
3834       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3835     alsa)
3836       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3837     cups)
3838       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3839     freetype)
3840       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3841     pulse)
3842       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3843     x11)
3844       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3845     ccache)
3846       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3847   esac
3848 }
3849 
3850 yum_help() {
3851   case $1 in
3852     devkit)
3853       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3854     openjdk)
3855       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3856     alsa)
3857       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3858     cups)
3859       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3860     freetype)
3861       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3862     pulse)
3863       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3864     x11)
3865       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3866     ccache)
3867       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3868   esac
3869 }
3870 
3871 port_help() {
3872   PKGHANDLER_COMMAND=""
3873 }
3874 
3875 pkgutil_help() {
3876   PKGHANDLER_COMMAND=""
3877 }
3878 
3879 pkgadd_help() {
3880   PKGHANDLER_COMMAND=""
3881 }
3882 
3883 # This function will check if we're called from the "configure" wrapper while
3884 # printing --help. If so, we will print out additional information that can
3885 # only be extracted within the autoconf script, and then exit. This must be
3886 # called at the very beginning in configure.ac.
3887 
3888 
3889 
3890 
3891 #
3892 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3893 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3894 #
3895 # This code is free software; you can redistribute it and/or modify it
3896 # under the terms of the GNU General Public License version 2 only, as
3897 # published by the Free Software Foundation.  Oracle designates this
3898 # particular file as subject to the "Classpath" exception as provided
3899 # by Oracle in the LICENSE file that accompanied this code.
3900 #
3901 # This code is distributed in the hope that it will be useful, but WITHOUT
3902 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3903 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3904 # version 2 for more details (a copy is included in the LICENSE file that
3905 # accompanied this code).
3906 #
3907 # You should have received a copy of the GNU General Public License version
3908 # 2 along with this work; if not, write to the Free Software Foundation,
3909 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3910 #
3911 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3912 # or visit www.oracle.com if you need additional information or have any
3913 # questions.
3914 #
3915 
3916 
3917 
3918 
3919 
3920 
3921 
3922 
3923 
3924 
3925 ###############################################################################
3926 #
3927 # Should we build only OpenJDK even if closed sources are present?
3928 #
3929 
3930 
3931 
3932 
3933 ###############################################################################
3934 #
3935 # Setup version numbers
3936 #
3937 
3938 
3939 
3940 
3941 
3942 
3943 #
3944 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3945 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3946 #
3947 # This code is free software; you can redistribute it and/or modify it
3948 # under the terms of the GNU General Public License version 2 only, as
3949 # published by the Free Software Foundation.  Oracle designates this
3950 # particular file as subject to the "Classpath" exception as provided
3951 # by Oracle in the LICENSE file that accompanied this code.
3952 #
3953 # This code is distributed in the hope that it will be useful, but WITHOUT
3954 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3955 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3956 # version 2 for more details (a copy is included in the LICENSE file that
3957 # accompanied this code).
3958 #
3959 # You should have received a copy of the GNU General Public License version
3960 # 2 along with this work; if not, write to the Free Software Foundation,
3961 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3962 #
3963 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3964 # or visit www.oracle.com if you need additional information or have any
3965 # questions.
3966 #
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3980 
3981 
3982 
3983 
3984 
3985 
3986 #
3987 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3988 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989 #
3990 # This code is free software; you can redistribute it and/or modify it
3991 # under the terms of the GNU General Public License version 2 only, as
3992 # published by the Free Software Foundation.  Oracle designates this
3993 # particular file as subject to the "Classpath" exception as provided
3994 # by Oracle in the LICENSE file that accompanied this code.
3995 #
3996 # This code is distributed in the hope that it will be useful, but WITHOUT
3997 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999 # version 2 for more details (a copy is included in the LICENSE file that
4000 # accompanied this code).
4001 #
4002 # You should have received a copy of the GNU General Public License version
4003 # 2 along with this work; if not, write to the Free Software Foundation,
4004 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005 #
4006 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007 # or visit www.oracle.com if you need additional information or have any
4008 # questions.
4009 #
4010 
4011 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4012 # Converts autoconf style CPU name to OpenJDK style, into
4013 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4014 
4015 
4016 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4017 # Converts autoconf style OS name to OpenJDK style, into
4018 # VAR_OS and VAR_OS_API.
4019 
4020 
4021 # Expects $host_os $host_cpu $build_os and $build_cpu
4022 # and $with_target_bits to have been setup!
4023 #
4024 # Translate the standard triplet(quadruplet) definition
4025 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4026 # OPENJDK_BUILD_OS, etc.
4027 
4028 
4029 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4030 # accordingly. Must be done after setting up build and target system, but before
4031 # doing anything else with these values.
4032 
4033 
4034 # Setup the legacy variables, for controlling the old makefiles.
4035 #
4036 
4037 
4038 
4039 
4040 #%%% Build and target systems %%%
4041 
4042 
4043 
4044 
4045 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4046 # Add -mX to various FLAGS variables.
4047 
4048 
4049 
4050 
4051 
4052 
4053 #
4054 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4055 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4056 #
4057 # This code is free software; you can redistribute it and/or modify it
4058 # under the terms of the GNU General Public License version 2 only, as
4059 # published by the Free Software Foundation.  Oracle designates this
4060 # particular file as subject to the "Classpath" exception as provided
4061 # by Oracle in the LICENSE file that accompanied this code.
4062 #
4063 # This code is distributed in the hope that it will be useful, but WITHOUT
4064 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4065 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4066 # version 2 for more details (a copy is included in the LICENSE file that
4067 # accompanied this code).
4068 #
4069 # You should have received a copy of the GNU General Public License version
4070 # 2 along with this work; if not, write to the Free Software Foundation,
4071 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4072 #
4073 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4074 # or visit www.oracle.com if you need additional information or have any
4075 # questions.
4076 #
4077 
4078 
4079 
4080 
4081 
4082 
4083 
4084 
4085 #
4086 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088 #
4089 # This code is free software; you can redistribute it and/or modify it
4090 # under the terms of the GNU General Public License version 2 only, as
4091 # published by the Free Software Foundation.  Oracle designates this
4092 # particular file as subject to the "Classpath" exception as provided
4093 # by Oracle in the LICENSE file that accompanied this code.
4094 #
4095 # This code is distributed in the hope that it will be useful, but WITHOUT
4096 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4098 # version 2 for more details (a copy is included in the LICENSE file that
4099 # accompanied this code).
4100 #
4101 # You should have received a copy of the GNU General Public License version
4102 # 2 along with this work; if not, write to the Free Software Foundation,
4103 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104 #
4105 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106 # or visit www.oracle.com if you need additional information or have any
4107 # questions.
4108 #
4109 
4110 ########################################################################
4111 # This file is responsible for detecting, verifying and setting up the
4112 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4113 # proper paths to the binaries, but it will not setup any flags.
4114 #
4115 # The binaries used is determined by the toolchain type, which is the family of
4116 # compilers and related tools that are used.
4117 ########################################################################
4118 
4119 
4120 # All valid toolchains, regardless of platform (used by help.m4)
4121 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4122 
4123 # These toolchains are valid on different platforms
4124 VALID_TOOLCHAINS_linux="gcc clang"
4125 VALID_TOOLCHAINS_solaris="solstudio"
4126 VALID_TOOLCHAINS_macosx="gcc clang"
4127 VALID_TOOLCHAINS_aix="xlc"
4128 VALID_TOOLCHAINS_windows="microsoft"
4129 
4130 # Toolchain descriptions
4131 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4132 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4133 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4134 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4135 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4136 
4137 # Setup a number of variables describing how native output files are
4138 # named on this platform/toolchain.
4139 
4140 
4141 # Determine which toolchain type to use, and make sure it is valid for this
4142 # platform. Setup various information about the selected toolchain.
4143 
4144 
4145 # Before we start detecting the toolchain executables, we might need some
4146 # special setup, e.g. additional paths etc.
4147 
4148 
4149 # Restore path, etc
4150 
4151 
4152 # Check if a compiler is of the toolchain type we expect, and save the version
4153 # information from it. If the compiler does not match the expected type,
4154 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4155 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4156 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4157 #
4158 # $1 = compiler to test (CC or CXX)
4159 # $2 = human readable name of compiler (C or C++)
4160 
4161 
4162 # Try to locate the given C or C++ compiler in the path, or otherwise.
4163 #
4164 # $1 = compiler to test (CC or CXX)
4165 # $2 = human readable name of compiler (C or C++)
4166 # $3 = list of compiler names to search for
4167 
4168 
4169 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4170 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4171 # archiver (AR). Verify that the compilers are correct according to the
4172 # toolchain type.
4173 
4174 
4175 # Setup additional tools that is considered a part of the toolchain, but not the
4176 # core part. Many of these are highly platform-specific and do not exist,
4177 # and/or are not needed on all platforms.
4178 
4179 
4180 # Setup the build tools (i.e, the compiler and linker used to build programs
4181 # that should be run on the build platform, not the target platform, as a build
4182 # helper). Since the non-cross-compile case uses the normal, target compilers
4183 # for this, we can only do this after these have been setup.
4184 
4185 
4186 # Setup legacy variables that are still needed as alternative ways to refer to
4187 # parts of the toolchain.
4188 
4189 
4190 # Do some additional checks on the detected tools.
4191 
4192 
4193 # Setup the JTReg Regression Test Harness.
4194 
4195 
4196 #
4197 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4198 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4199 #
4200 # This code is free software; you can redistribute it and/or modify it
4201 # under the terms of the GNU General Public License version 2 only, as
4202 # published by the Free Software Foundation.  Oracle designates this
4203 # particular file as subject to the "Classpath" exception as provided
4204 # by Oracle in the LICENSE file that accompanied this code.
4205 #
4206 # This code is distributed in the hope that it will be useful, but WITHOUT
4207 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4208 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4209 # version 2 for more details (a copy is included in the LICENSE file that
4210 # accompanied this code).
4211 #
4212 # You should have received a copy of the GNU General Public License version
4213 # 2 along with this work; if not, write to the Free Software Foundation,
4214 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4215 #
4216 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4217 # or visit www.oracle.com if you need additional information or have any
4218 # questions.
4219 #
4220 
4221 
4222 
4223 
4224 
4225 
4226 
4227 # Check if the VS env variables were setup prior to running configure.
4228 # If not, then find vcvarsall.bat and run it automatically, and integrate
4229 # the set env variables into the spec file.
4230 
4231 
4232 
4233 
4234 
4235 
4236 
4237 
4238 
4239 
4240 # This line needs to be here, verbatim, after all includes and the dummy hook
4241 # definitions. It is replaced with custom functionality when building
4242 # custom sources.
4243 #CUSTOM_AUTOCONF_INCLUDE
4244 
4245 # Do not change or remove the following line, it is needed for consistency checks:
4246 DATE_WHEN_GENERATED=1398121836
4247 
4248 ###############################################################################
4249 #
4250 # Initialization / Boot-strapping
4251 #
4252 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4253 # thus it jumps back and forth, each time gaining something needed later on.
4254 #
4255 ###############################################################################
4256 
4257 # If we are requested to print additional help, do that and then exit.
4258 # This must be the very first call.
4259 
4260   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4261     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4262     $PRINTF "Which are valid to use depends on the build platform.\n"
4263     for toolchain in $VALID_TOOLCHAINS_all; do
4264       # Use indirect variable referencing
4265       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4266       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4267       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4268     done
4269 
4270     # And now exit directly
4271     exit 0
4272   fi
4273 
4274 
4275 # Basic initialization that must happen first of all in the normal process.
4276 
4277   # Save the original command line. This is passed to us by the wrapper configure script.
4278 
4279   DATE_WHEN_CONFIGURED=`LANG=C date`
4280 
4281   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4282 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4283   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4284 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4285 
4286 
4287   # Start with tools that do not need have cross compilation support
4288   # and can be expected to be found in the default PATH. These tools are
4289   # used by configure. Nor are these tools expected to be found in the
4290   # devkit from the builddeps server either, since they are
4291   # needed to download the devkit.
4292 
4293   # First are all the simple required tools.
4294 
4295 
4296 
4297   # Publish this variable in the help.
4298 
4299 
4300   if test "x$BASENAME" = x; then
4301     # The variable is not set by user, try to locate tool using the code snippet
4302     for ac_prog in basename
4303 do
4304   # Extract the first word of "$ac_prog", so it can be a program name with args.
4305 set dummy $ac_prog; ac_word=$2
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307 $as_echo_n "checking for $ac_word... " >&6; }
4308 if ${ac_cv_path_BASENAME+:} false; then :
4309   $as_echo_n "(cached) " >&6
4310 else
4311   case $BASENAME in
4312   [\\/]* | ?:[\\/]*)
4313   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4314   ;;
4315   *)
4316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317 for as_dir in $PATH
4318 do
4319   IFS=$as_save_IFS
4320   test -z "$as_dir" && as_dir=.
4321     for ac_exec_ext in '' $ac_executable_extensions; do
4322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4323     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4325     break 2
4326   fi
4327 done
4328   done
4329 IFS=$as_save_IFS
4330 
4331   ;;
4332 esac
4333 fi
4334 BASENAME=$ac_cv_path_BASENAME
4335 if test -n "$BASENAME"; then
4336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4337 $as_echo "$BASENAME" >&6; }
4338 else
4339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4340 $as_echo "no" >&6; }
4341 fi
4342 
4343 
4344   test -n "$BASENAME" && break
4345 done
4346 
4347   else
4348     # The variable is set, but is it from the command line or the environment?
4349 
4350     # Try to remove the string !BASENAME! from our list.
4351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4353       # If it failed, the variable was not from the command line. Ignore it,
4354       # but warn the user (except for BASH, which is always set by the calling BASH).
4355       if test "xBASENAME" != xBASH; then
4356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4357 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4358       fi
4359       # Try to locate tool using the code snippet
4360       for ac_prog in basename
4361 do
4362   # Extract the first word of "$ac_prog", so it can be a program name with args.
4363 set dummy $ac_prog; ac_word=$2
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4365 $as_echo_n "checking for $ac_word... " >&6; }
4366 if ${ac_cv_path_BASENAME+:} false; then :
4367   $as_echo_n "(cached) " >&6
4368 else
4369   case $BASENAME in
4370   [\\/]* | ?:[\\/]*)
4371   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4372   ;;
4373   *)
4374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375 for as_dir in $PATH
4376 do
4377   IFS=$as_save_IFS
4378   test -z "$as_dir" && as_dir=.
4379     for ac_exec_ext in '' $ac_executable_extensions; do
4380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4381     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4383     break 2
4384   fi
4385 done
4386   done
4387 IFS=$as_save_IFS
4388 
4389   ;;
4390 esac
4391 fi
4392 BASENAME=$ac_cv_path_BASENAME
4393 if test -n "$BASENAME"; then
4394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4395 $as_echo "$BASENAME" >&6; }
4396 else
4397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4398 $as_echo "no" >&6; }
4399 fi
4400 
4401 
4402   test -n "$BASENAME" && break
4403 done
4404 
4405     else
4406       # If it succeeded, then it was overridden by the user. We will use it
4407       # for the tool.
4408 
4409       # First remove it from the list of overridden variables, so we can test
4410       # for unknown variables in the end.
4411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4412 
4413       # Check if the provided tool contains a complete path.
4414       tool_specified="$BASENAME"
4415       tool_basename="${tool_specified##*/}"
4416       if test "x$tool_basename" = "x$tool_specified"; then
4417         # A command without a complete path is provided, search $PATH.
4418         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4419 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4420         # Extract the first word of "$tool_basename", so it can be a program name with args.
4421 set dummy $tool_basename; ac_word=$2
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4423 $as_echo_n "checking for $ac_word... " >&6; }
4424 if ${ac_cv_path_BASENAME+:} false; then :
4425   $as_echo_n "(cached) " >&6
4426 else
4427   case $BASENAME in
4428   [\\/]* | ?:[\\/]*)
4429   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4430   ;;
4431   *)
4432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4433 for as_dir in $PATH
4434 do
4435   IFS=$as_save_IFS
4436   test -z "$as_dir" && as_dir=.
4437     for ac_exec_ext in '' $ac_executable_extensions; do
4438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4439     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4441     break 2
4442   fi
4443 done
4444   done
4445 IFS=$as_save_IFS
4446 
4447   ;;
4448 esac
4449 fi
4450 BASENAME=$ac_cv_path_BASENAME
4451 if test -n "$BASENAME"; then
4452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4453 $as_echo "$BASENAME" >&6; }
4454 else
4455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4456 $as_echo "no" >&6; }
4457 fi
4458 
4459 
4460         if test "x$BASENAME" = x; then
4461           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4462         fi
4463       else
4464         # Otherwise we believe it is a complete path. Use it as it is.
4465         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4466 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4467         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4468 $as_echo_n "checking for BASENAME... " >&6; }
4469         if test ! -x "$tool_specified"; then
4470           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4471 $as_echo "not found" >&6; }
4472           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4473         fi
4474         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4475 $as_echo "$tool_specified" >&6; }
4476       fi
4477     fi
4478   fi
4479 
4480 
4481 
4482   if test "x$BASENAME" = x; then
4483     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4484   fi
4485 
4486 
4487 
4488 
4489 
4490   # Publish this variable in the help.
4491 
4492 
4493   if test "x$BASH" = x; then
4494     # The variable is not set by user, try to locate tool using the code snippet
4495     for ac_prog in bash
4496 do
4497   # Extract the first word of "$ac_prog", so it can be a program name with args.
4498 set dummy $ac_prog; ac_word=$2
4499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4500 $as_echo_n "checking for $ac_word... " >&6; }
4501 if ${ac_cv_path_BASH+:} false; then :
4502   $as_echo_n "(cached) " >&6
4503 else
4504   case $BASH in
4505   [\\/]* | ?:[\\/]*)
4506   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4507   ;;
4508   *)
4509   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4510 for as_dir in $PATH
4511 do
4512   IFS=$as_save_IFS
4513   test -z "$as_dir" && as_dir=.
4514     for ac_exec_ext in '' $ac_executable_extensions; do
4515   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4516     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4517     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4518     break 2
4519   fi
4520 done
4521   done
4522 IFS=$as_save_IFS
4523 
4524   ;;
4525 esac
4526 fi
4527 BASH=$ac_cv_path_BASH
4528 if test -n "$BASH"; then
4529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4530 $as_echo "$BASH" >&6; }
4531 else
4532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4533 $as_echo "no" >&6; }
4534 fi
4535 
4536 
4537   test -n "$BASH" && break
4538 done
4539 
4540   else
4541     # The variable is set, but is it from the command line or the environment?
4542 
4543     # Try to remove the string !BASH! from our list.
4544     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4545     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4546       # If it failed, the variable was not from the command line. Ignore it,
4547       # but warn the user (except for BASH, which is always set by the calling BASH).
4548       if test "xBASH" != xBASH; then
4549         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4550 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4551       fi
4552       # Try to locate tool using the code snippet
4553       for ac_prog in bash
4554 do
4555   # Extract the first word of "$ac_prog", so it can be a program name with args.
4556 set dummy $ac_prog; ac_word=$2
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558 $as_echo_n "checking for $ac_word... " >&6; }
4559 if ${ac_cv_path_BASH+:} false; then :
4560   $as_echo_n "(cached) " >&6
4561 else
4562   case $BASH in
4563   [\\/]* | ?:[\\/]*)
4564   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4565   ;;
4566   *)
4567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568 for as_dir in $PATH
4569 do
4570   IFS=$as_save_IFS
4571   test -z "$as_dir" && as_dir=.
4572     for ac_exec_ext in '' $ac_executable_extensions; do
4573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4574     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576     break 2
4577   fi
4578 done
4579   done
4580 IFS=$as_save_IFS
4581 
4582   ;;
4583 esac
4584 fi
4585 BASH=$ac_cv_path_BASH
4586 if test -n "$BASH"; then
4587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4588 $as_echo "$BASH" >&6; }
4589 else
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591 $as_echo "no" >&6; }
4592 fi
4593 
4594 
4595   test -n "$BASH" && break
4596 done
4597 
4598     else
4599       # If it succeeded, then it was overridden by the user. We will use it
4600       # for the tool.
4601 
4602       # First remove it from the list of overridden variables, so we can test
4603       # for unknown variables in the end.
4604       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4605 
4606       # Check if the provided tool contains a complete path.
4607       tool_specified="$BASH"
4608       tool_basename="${tool_specified##*/}"
4609       if test "x$tool_basename" = "x$tool_specified"; then
4610         # A command without a complete path is provided, search $PATH.
4611         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4612 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4613         # Extract the first word of "$tool_basename", so it can be a program name with args.
4614 set dummy $tool_basename; ac_word=$2
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616 $as_echo_n "checking for $ac_word... " >&6; }
4617 if ${ac_cv_path_BASH+:} false; then :
4618   $as_echo_n "(cached) " >&6
4619 else
4620   case $BASH in
4621   [\\/]* | ?:[\\/]*)
4622   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4623   ;;
4624   *)
4625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626 for as_dir in $PATH
4627 do
4628   IFS=$as_save_IFS
4629   test -z "$as_dir" && as_dir=.
4630     for ac_exec_ext in '' $ac_executable_extensions; do
4631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634     break 2
4635   fi
4636 done
4637   done
4638 IFS=$as_save_IFS
4639 
4640   ;;
4641 esac
4642 fi
4643 BASH=$ac_cv_path_BASH
4644 if test -n "$BASH"; then
4645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4646 $as_echo "$BASH" >&6; }
4647 else
4648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649 $as_echo "no" >&6; }
4650 fi
4651 
4652 
4653         if test "x$BASH" = x; then
4654           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4655         fi
4656       else
4657         # Otherwise we believe it is a complete path. Use it as it is.
4658         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4659 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4660         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4661 $as_echo_n "checking for BASH... " >&6; }
4662         if test ! -x "$tool_specified"; then
4663           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4664 $as_echo "not found" >&6; }
4665           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4666         fi
4667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4668 $as_echo "$tool_specified" >&6; }
4669       fi
4670     fi
4671   fi
4672 
4673 
4674 
4675   if test "x$BASH" = x; then
4676     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4677   fi
4678 
4679 
4680 
4681 
4682 
4683   # Publish this variable in the help.
4684 
4685 
4686   if test "x$CAT" = x; then
4687     # The variable is not set by user, try to locate tool using the code snippet
4688     for ac_prog in cat
4689 do
4690   # Extract the first word of "$ac_prog", so it can be a program name with args.
4691 set dummy $ac_prog; ac_word=$2
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693 $as_echo_n "checking for $ac_word... " >&6; }
4694 if ${ac_cv_path_CAT+:} false; then :
4695   $as_echo_n "(cached) " >&6
4696 else
4697   case $CAT in
4698   [\\/]* | ?:[\\/]*)
4699   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4700   ;;
4701   *)
4702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703 for as_dir in $PATH
4704 do
4705   IFS=$as_save_IFS
4706   test -z "$as_dir" && as_dir=.
4707     for ac_exec_ext in '' $ac_executable_extensions; do
4708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4709     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4711     break 2
4712   fi
4713 done
4714   done
4715 IFS=$as_save_IFS
4716 
4717   ;;
4718 esac
4719 fi
4720 CAT=$ac_cv_path_CAT
4721 if test -n "$CAT"; then
4722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4723 $as_echo "$CAT" >&6; }
4724 else
4725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726 $as_echo "no" >&6; }
4727 fi
4728 
4729 
4730   test -n "$CAT" && break
4731 done
4732 
4733   else
4734     # The variable is set, but is it from the command line or the environment?
4735 
4736     # Try to remove the string !CAT! from our list.
4737     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4738     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4739       # If it failed, the variable was not from the command line. Ignore it,
4740       # but warn the user (except for BASH, which is always set by the calling BASH).
4741       if test "xCAT" != xBASH; then
4742         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4743 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4744       fi
4745       # Try to locate tool using the code snippet
4746       for ac_prog in cat
4747 do
4748   # Extract the first word of "$ac_prog", so it can be a program name with args.
4749 set dummy $ac_prog; ac_word=$2
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751 $as_echo_n "checking for $ac_word... " >&6; }
4752 if ${ac_cv_path_CAT+:} false; then :
4753   $as_echo_n "(cached) " >&6
4754 else
4755   case $CAT in
4756   [\\/]* | ?:[\\/]*)
4757   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4758   ;;
4759   *)
4760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761 for as_dir in $PATH
4762 do
4763   IFS=$as_save_IFS
4764   test -z "$as_dir" && as_dir=.
4765     for ac_exec_ext in '' $ac_executable_extensions; do
4766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4767     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4769     break 2
4770   fi
4771 done
4772   done
4773 IFS=$as_save_IFS
4774 
4775   ;;
4776 esac
4777 fi
4778 CAT=$ac_cv_path_CAT
4779 if test -n "$CAT"; then
4780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4781 $as_echo "$CAT" >&6; }
4782 else
4783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784 $as_echo "no" >&6; }
4785 fi
4786 
4787 
4788   test -n "$CAT" && break
4789 done
4790 
4791     else
4792       # If it succeeded, then it was overridden by the user. We will use it
4793       # for the tool.
4794 
4795       # First remove it from the list of overridden variables, so we can test
4796       # for unknown variables in the end.
4797       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4798 
4799       # Check if the provided tool contains a complete path.
4800       tool_specified="$CAT"
4801       tool_basename="${tool_specified##*/}"
4802       if test "x$tool_basename" = "x$tool_specified"; then
4803         # A command without a complete path is provided, search $PATH.
4804         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4805 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4806         # Extract the first word of "$tool_basename", so it can be a program name with args.
4807 set dummy $tool_basename; ac_word=$2
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809 $as_echo_n "checking for $ac_word... " >&6; }
4810 if ${ac_cv_path_CAT+:} false; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   case $CAT in
4814   [\\/]* | ?:[\\/]*)
4815   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4816   ;;
4817   *)
4818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819 for as_dir in $PATH
4820 do
4821   IFS=$as_save_IFS
4822   test -z "$as_dir" && as_dir=.
4823     for ac_exec_ext in '' $ac_executable_extensions; do
4824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4825     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827     break 2
4828   fi
4829 done
4830   done
4831 IFS=$as_save_IFS
4832 
4833   ;;
4834 esac
4835 fi
4836 CAT=$ac_cv_path_CAT
4837 if test -n "$CAT"; then
4838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4839 $as_echo "$CAT" >&6; }
4840 else
4841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842 $as_echo "no" >&6; }
4843 fi
4844 
4845 
4846         if test "x$CAT" = x; then
4847           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4848         fi
4849       else
4850         # Otherwise we believe it is a complete path. Use it as it is.
4851         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4852 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4853         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4854 $as_echo_n "checking for CAT... " >&6; }
4855         if test ! -x "$tool_specified"; then
4856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4857 $as_echo "not found" >&6; }
4858           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4859         fi
4860         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4861 $as_echo "$tool_specified" >&6; }
4862       fi
4863     fi
4864   fi
4865 
4866 
4867 
4868   if test "x$CAT" = x; then
4869     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4870   fi
4871 
4872 
4873 
4874 
4875 
4876   # Publish this variable in the help.
4877 
4878 
4879   if test "x$CHMOD" = x; then
4880     # The variable is not set by user, try to locate tool using the code snippet
4881     for ac_prog in chmod
4882 do
4883   # Extract the first word of "$ac_prog", so it can be a program name with args.
4884 set dummy $ac_prog; ac_word=$2
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886 $as_echo_n "checking for $ac_word... " >&6; }
4887 if ${ac_cv_path_CHMOD+:} false; then :
4888   $as_echo_n "(cached) " >&6
4889 else
4890   case $CHMOD in
4891   [\\/]* | ?:[\\/]*)
4892   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4893   ;;
4894   *)
4895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896 for as_dir in $PATH
4897 do
4898   IFS=$as_save_IFS
4899   test -z "$as_dir" && as_dir=.
4900     for ac_exec_ext in '' $ac_executable_extensions; do
4901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4902     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904     break 2
4905   fi
4906 done
4907   done
4908 IFS=$as_save_IFS
4909 
4910   ;;
4911 esac
4912 fi
4913 CHMOD=$ac_cv_path_CHMOD
4914 if test -n "$CHMOD"; then
4915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4916 $as_echo "$CHMOD" >&6; }
4917 else
4918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919 $as_echo "no" >&6; }
4920 fi
4921 
4922 
4923   test -n "$CHMOD" && break
4924 done
4925 
4926   else
4927     # The variable is set, but is it from the command line or the environment?
4928 
4929     # Try to remove the string !CHMOD! from our list.
4930     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4931     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4932       # If it failed, the variable was not from the command line. Ignore it,
4933       # but warn the user (except for BASH, which is always set by the calling BASH).
4934       if test "xCHMOD" != xBASH; then
4935         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4936 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4937       fi
4938       # Try to locate tool using the code snippet
4939       for ac_prog in chmod
4940 do
4941   # Extract the first word of "$ac_prog", so it can be a program name with args.
4942 set dummy $ac_prog; ac_word=$2
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944 $as_echo_n "checking for $ac_word... " >&6; }
4945 if ${ac_cv_path_CHMOD+:} false; then :
4946   $as_echo_n "(cached) " >&6
4947 else
4948   case $CHMOD in
4949   [\\/]* | ?:[\\/]*)
4950   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4951   ;;
4952   *)
4953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954 for as_dir in $PATH
4955 do
4956   IFS=$as_save_IFS
4957   test -z "$as_dir" && as_dir=.
4958     for ac_exec_ext in '' $ac_executable_extensions; do
4959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4960     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962     break 2
4963   fi
4964 done
4965   done
4966 IFS=$as_save_IFS
4967 
4968   ;;
4969 esac
4970 fi
4971 CHMOD=$ac_cv_path_CHMOD
4972 if test -n "$CHMOD"; then
4973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4974 $as_echo "$CHMOD" >&6; }
4975 else
4976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977 $as_echo "no" >&6; }
4978 fi
4979 
4980 
4981   test -n "$CHMOD" && break
4982 done
4983 
4984     else
4985       # If it succeeded, then it was overridden by the user. We will use it
4986       # for the tool.
4987 
4988       # First remove it from the list of overridden variables, so we can test
4989       # for unknown variables in the end.
4990       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4991 
4992       # Check if the provided tool contains a complete path.
4993       tool_specified="$CHMOD"
4994       tool_basename="${tool_specified##*/}"
4995       if test "x$tool_basename" = "x$tool_specified"; then
4996         # A command without a complete path is provided, search $PATH.
4997         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4998 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4999         # Extract the first word of "$tool_basename", so it can be a program name with args.
5000 set dummy $tool_basename; ac_word=$2
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002 $as_echo_n "checking for $ac_word... " >&6; }
5003 if ${ac_cv_path_CHMOD+:} false; then :
5004   $as_echo_n "(cached) " >&6
5005 else
5006   case $CHMOD in
5007   [\\/]* | ?:[\\/]*)
5008   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5009   ;;
5010   *)
5011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012 for as_dir in $PATH
5013 do
5014   IFS=$as_save_IFS
5015   test -z "$as_dir" && as_dir=.
5016     for ac_exec_ext in '' $ac_executable_extensions; do
5017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5018     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020     break 2
5021   fi
5022 done
5023   done
5024 IFS=$as_save_IFS
5025 
5026   ;;
5027 esac
5028 fi
5029 CHMOD=$ac_cv_path_CHMOD
5030 if test -n "$CHMOD"; then
5031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5032 $as_echo "$CHMOD" >&6; }
5033 else
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037 
5038 
5039         if test "x$CHMOD" = x; then
5040           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5041         fi
5042       else
5043         # Otherwise we believe it is a complete path. Use it as it is.
5044         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5045 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5047 $as_echo_n "checking for CHMOD... " >&6; }
5048         if test ! -x "$tool_specified"; then
5049           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5050 $as_echo "not found" >&6; }
5051           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5052         fi
5053         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5054 $as_echo "$tool_specified" >&6; }
5055       fi
5056     fi
5057   fi
5058 
5059 
5060 
5061   if test "x$CHMOD" = x; then
5062     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5063   fi
5064 
5065 
5066 
5067 
5068 
5069   # Publish this variable in the help.
5070 
5071 
5072   if test "x$CMP" = x; then
5073     # The variable is not set by user, try to locate tool using the code snippet
5074     for ac_prog in cmp
5075 do
5076   # Extract the first word of "$ac_prog", so it can be a program name with args.
5077 set dummy $ac_prog; ac_word=$2
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079 $as_echo_n "checking for $ac_word... " >&6; }
5080 if ${ac_cv_path_CMP+:} false; then :
5081   $as_echo_n "(cached) " >&6
5082 else
5083   case $CMP in
5084   [\\/]* | ?:[\\/]*)
5085   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5086   ;;
5087   *)
5088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089 for as_dir in $PATH
5090 do
5091   IFS=$as_save_IFS
5092   test -z "$as_dir" && as_dir=.
5093     for ac_exec_ext in '' $ac_executable_extensions; do
5094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5095     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097     break 2
5098   fi
5099 done
5100   done
5101 IFS=$as_save_IFS
5102 
5103   ;;
5104 esac
5105 fi
5106 CMP=$ac_cv_path_CMP
5107 if test -n "$CMP"; then
5108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5109 $as_echo "$CMP" >&6; }
5110 else
5111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112 $as_echo "no" >&6; }
5113 fi
5114 
5115 
5116   test -n "$CMP" && break
5117 done
5118 
5119   else
5120     # The variable is set, but is it from the command line or the environment?
5121 
5122     # Try to remove the string !CMP! from our list.
5123     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5124     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5125       # If it failed, the variable was not from the command line. Ignore it,
5126       # but warn the user (except for BASH, which is always set by the calling BASH).
5127       if test "xCMP" != xBASH; then
5128         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5129 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5130       fi
5131       # Try to locate tool using the code snippet
5132       for ac_prog in cmp
5133 do
5134   # Extract the first word of "$ac_prog", so it can be a program name with args.
5135 set dummy $ac_prog; ac_word=$2
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137 $as_echo_n "checking for $ac_word... " >&6; }
5138 if ${ac_cv_path_CMP+:} false; then :
5139   $as_echo_n "(cached) " >&6
5140 else
5141   case $CMP in
5142   [\\/]* | ?:[\\/]*)
5143   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5144   ;;
5145   *)
5146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147 for as_dir in $PATH
5148 do
5149   IFS=$as_save_IFS
5150   test -z "$as_dir" && as_dir=.
5151     for ac_exec_ext in '' $ac_executable_extensions; do
5152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5153     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5155     break 2
5156   fi
5157 done
5158   done
5159 IFS=$as_save_IFS
5160 
5161   ;;
5162 esac
5163 fi
5164 CMP=$ac_cv_path_CMP
5165 if test -n "$CMP"; then
5166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5167 $as_echo "$CMP" >&6; }
5168 else
5169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170 $as_echo "no" >&6; }
5171 fi
5172 
5173 
5174   test -n "$CMP" && break
5175 done
5176 
5177     else
5178       # If it succeeded, then it was overridden by the user. We will use it
5179       # for the tool.
5180 
5181       # First remove it from the list of overridden variables, so we can test
5182       # for unknown variables in the end.
5183       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5184 
5185       # Check if the provided tool contains a complete path.
5186       tool_specified="$CMP"
5187       tool_basename="${tool_specified##*/}"
5188       if test "x$tool_basename" = "x$tool_specified"; then
5189         # A command without a complete path is provided, search $PATH.
5190         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5191 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5192         # Extract the first word of "$tool_basename", so it can be a program name with args.
5193 set dummy $tool_basename; ac_word=$2
5194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195 $as_echo_n "checking for $ac_word... " >&6; }
5196 if ${ac_cv_path_CMP+:} false; then :
5197   $as_echo_n "(cached) " >&6
5198 else
5199   case $CMP in
5200   [\\/]* | ?:[\\/]*)
5201   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5202   ;;
5203   *)
5204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205 for as_dir in $PATH
5206 do
5207   IFS=$as_save_IFS
5208   test -z "$as_dir" && as_dir=.
5209     for ac_exec_ext in '' $ac_executable_extensions; do
5210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5211     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213     break 2
5214   fi
5215 done
5216   done
5217 IFS=$as_save_IFS
5218 
5219   ;;
5220 esac
5221 fi
5222 CMP=$ac_cv_path_CMP
5223 if test -n "$CMP"; then
5224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5225 $as_echo "$CMP" >&6; }
5226 else
5227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228 $as_echo "no" >&6; }
5229 fi
5230 
5231 
5232         if test "x$CMP" = x; then
5233           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5234         fi
5235       else
5236         # Otherwise we believe it is a complete path. Use it as it is.
5237         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5238 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5239         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5240 $as_echo_n "checking for CMP... " >&6; }
5241         if test ! -x "$tool_specified"; then
5242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5243 $as_echo "not found" >&6; }
5244           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5245         fi
5246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5247 $as_echo "$tool_specified" >&6; }
5248       fi
5249     fi
5250   fi
5251 
5252 
5253 
5254   if test "x$CMP" = x; then
5255     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5256   fi
5257 
5258 
5259 
5260 
5261 
5262   # Publish this variable in the help.
5263 
5264 
5265   if test "x$COMM" = x; then
5266     # The variable is not set by user, try to locate tool using the code snippet
5267     for ac_prog in comm
5268 do
5269   # Extract the first word of "$ac_prog", so it can be a program name with args.
5270 set dummy $ac_prog; ac_word=$2
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5272 $as_echo_n "checking for $ac_word... " >&6; }
5273 if ${ac_cv_path_COMM+:} false; then :
5274   $as_echo_n "(cached) " >&6
5275 else
5276   case $COMM in
5277   [\\/]* | ?:[\\/]*)
5278   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5279   ;;
5280   *)
5281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5282 for as_dir in $PATH
5283 do
5284   IFS=$as_save_IFS
5285   test -z "$as_dir" && as_dir=.
5286     for ac_exec_ext in '' $ac_executable_extensions; do
5287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5288     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5290     break 2
5291   fi
5292 done
5293   done
5294 IFS=$as_save_IFS
5295 
5296   ;;
5297 esac
5298 fi
5299 COMM=$ac_cv_path_COMM
5300 if test -n "$COMM"; then
5301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5302 $as_echo "$COMM" >&6; }
5303 else
5304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5305 $as_echo "no" >&6; }
5306 fi
5307 
5308 
5309   test -n "$COMM" && break
5310 done
5311 
5312   else
5313     # The variable is set, but is it from the command line or the environment?
5314 
5315     # Try to remove the string !COMM! from our list.
5316     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5317     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5318       # If it failed, the variable was not from the command line. Ignore it,
5319       # but warn the user (except for BASH, which is always set by the calling BASH).
5320       if test "xCOMM" != xBASH; then
5321         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5322 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5323       fi
5324       # Try to locate tool using the code snippet
5325       for ac_prog in comm
5326 do
5327   # Extract the first word of "$ac_prog", so it can be a program name with args.
5328 set dummy $ac_prog; ac_word=$2
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330 $as_echo_n "checking for $ac_word... " >&6; }
5331 if ${ac_cv_path_COMM+:} false; then :
5332   $as_echo_n "(cached) " >&6
5333 else
5334   case $COMM in
5335   [\\/]* | ?:[\\/]*)
5336   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5337   ;;
5338   *)
5339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340 for as_dir in $PATH
5341 do
5342   IFS=$as_save_IFS
5343   test -z "$as_dir" && as_dir=.
5344     for ac_exec_ext in '' $ac_executable_extensions; do
5345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5346     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348     break 2
5349   fi
5350 done
5351   done
5352 IFS=$as_save_IFS
5353 
5354   ;;
5355 esac
5356 fi
5357 COMM=$ac_cv_path_COMM
5358 if test -n "$COMM"; then
5359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5360 $as_echo "$COMM" >&6; }
5361 else
5362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363 $as_echo "no" >&6; }
5364 fi
5365 
5366 
5367   test -n "$COMM" && break
5368 done
5369 
5370     else
5371       # If it succeeded, then it was overridden by the user. We will use it
5372       # for the tool.
5373 
5374       # First remove it from the list of overridden variables, so we can test
5375       # for unknown variables in the end.
5376       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5377 
5378       # Check if the provided tool contains a complete path.
5379       tool_specified="$COMM"
5380       tool_basename="${tool_specified##*/}"
5381       if test "x$tool_basename" = "x$tool_specified"; then
5382         # A command without a complete path is provided, search $PATH.
5383         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5384 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5385         # Extract the first word of "$tool_basename", so it can be a program name with args.
5386 set dummy $tool_basename; ac_word=$2
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388 $as_echo_n "checking for $ac_word... " >&6; }
5389 if ${ac_cv_path_COMM+:} false; then :
5390   $as_echo_n "(cached) " >&6
5391 else
5392   case $COMM in
5393   [\\/]* | ?:[\\/]*)
5394   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5395   ;;
5396   *)
5397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398 for as_dir in $PATH
5399 do
5400   IFS=$as_save_IFS
5401   test -z "$as_dir" && as_dir=.
5402     for ac_exec_ext in '' $ac_executable_extensions; do
5403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5404     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5406     break 2
5407   fi
5408 done
5409   done
5410 IFS=$as_save_IFS
5411 
5412   ;;
5413 esac
5414 fi
5415 COMM=$ac_cv_path_COMM
5416 if test -n "$COMM"; then
5417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5418 $as_echo "$COMM" >&6; }
5419 else
5420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421 $as_echo "no" >&6; }
5422 fi
5423 
5424 
5425         if test "x$COMM" = x; then
5426           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5427         fi
5428       else
5429         # Otherwise we believe it is a complete path. Use it as it is.
5430         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5431 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5433 $as_echo_n "checking for COMM... " >&6; }
5434         if test ! -x "$tool_specified"; then
5435           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5436 $as_echo "not found" >&6; }
5437           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5438         fi
5439         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5440 $as_echo "$tool_specified" >&6; }
5441       fi
5442     fi
5443   fi
5444 
5445 
5446 
5447   if test "x$COMM" = x; then
5448     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5449   fi
5450 
5451 
5452 
5453 
5454 
5455   # Publish this variable in the help.
5456 
5457 
5458   if test "x$CP" = x; then
5459     # The variable is not set by user, try to locate tool using the code snippet
5460     for ac_prog in cp
5461 do
5462   # Extract the first word of "$ac_prog", so it can be a program name with args.
5463 set dummy $ac_prog; ac_word=$2
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465 $as_echo_n "checking for $ac_word... " >&6; }
5466 if ${ac_cv_path_CP+:} false; then :
5467   $as_echo_n "(cached) " >&6
5468 else
5469   case $CP in
5470   [\\/]* | ?:[\\/]*)
5471   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5472   ;;
5473   *)
5474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475 for as_dir in $PATH
5476 do
5477   IFS=$as_save_IFS
5478   test -z "$as_dir" && as_dir=.
5479     for ac_exec_ext in '' $ac_executable_extensions; do
5480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5481     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483     break 2
5484   fi
5485 done
5486   done
5487 IFS=$as_save_IFS
5488 
5489   ;;
5490 esac
5491 fi
5492 CP=$ac_cv_path_CP
5493 if test -n "$CP"; then
5494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5495 $as_echo "$CP" >&6; }
5496 else
5497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498 $as_echo "no" >&6; }
5499 fi
5500 
5501 
5502   test -n "$CP" && break
5503 done
5504 
5505   else
5506     # The variable is set, but is it from the command line or the environment?
5507 
5508     # Try to remove the string !CP! from our list.
5509     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5510     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5511       # If it failed, the variable was not from the command line. Ignore it,
5512       # but warn the user (except for BASH, which is always set by the calling BASH).
5513       if test "xCP" != xBASH; then
5514         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5515 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5516       fi
5517       # Try to locate tool using the code snippet
5518       for ac_prog in cp
5519 do
5520   # Extract the first word of "$ac_prog", so it can be a program name with args.
5521 set dummy $ac_prog; ac_word=$2
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5523 $as_echo_n "checking for $ac_word... " >&6; }
5524 if ${ac_cv_path_CP+:} false; then :
5525   $as_echo_n "(cached) " >&6
5526 else
5527   case $CP in
5528   [\\/]* | ?:[\\/]*)
5529   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5530   ;;
5531   *)
5532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH
5534 do
5535   IFS=$as_save_IFS
5536   test -z "$as_dir" && as_dir=.
5537     for ac_exec_ext in '' $ac_executable_extensions; do
5538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5539     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5541     break 2
5542   fi
5543 done
5544   done
5545 IFS=$as_save_IFS
5546 
5547   ;;
5548 esac
5549 fi
5550 CP=$ac_cv_path_CP
5551 if test -n "$CP"; then
5552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5553 $as_echo "$CP" >&6; }
5554 else
5555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5556 $as_echo "no" >&6; }
5557 fi
5558 
5559 
5560   test -n "$CP" && break
5561 done
5562 
5563     else
5564       # If it succeeded, then it was overridden by the user. We will use it
5565       # for the tool.
5566 
5567       # First remove it from the list of overridden variables, so we can test
5568       # for unknown variables in the end.
5569       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5570 
5571       # Check if the provided tool contains a complete path.
5572       tool_specified="$CP"
5573       tool_basename="${tool_specified##*/}"
5574       if test "x$tool_basename" = "x$tool_specified"; then
5575         # A command without a complete path is provided, search $PATH.
5576         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5577 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5578         # Extract the first word of "$tool_basename", so it can be a program name with args.
5579 set dummy $tool_basename; ac_word=$2
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5581 $as_echo_n "checking for $ac_word... " >&6; }
5582 if ${ac_cv_path_CP+:} false; then :
5583   $as_echo_n "(cached) " >&6
5584 else
5585   case $CP in
5586   [\\/]* | ?:[\\/]*)
5587   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5588   ;;
5589   *)
5590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591 for as_dir in $PATH
5592 do
5593   IFS=$as_save_IFS
5594   test -z "$as_dir" && as_dir=.
5595     for ac_exec_ext in '' $ac_executable_extensions; do
5596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5597     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599     break 2
5600   fi
5601 done
5602   done
5603 IFS=$as_save_IFS
5604 
5605   ;;
5606 esac
5607 fi
5608 CP=$ac_cv_path_CP
5609 if test -n "$CP"; then
5610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5611 $as_echo "$CP" >&6; }
5612 else
5613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5614 $as_echo "no" >&6; }
5615 fi
5616 
5617 
5618         if test "x$CP" = x; then
5619           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5620         fi
5621       else
5622         # Otherwise we believe it is a complete path. Use it as it is.
5623         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5624 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5626 $as_echo_n "checking for CP... " >&6; }
5627         if test ! -x "$tool_specified"; then
5628           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5629 $as_echo "not found" >&6; }
5630           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5631         fi
5632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5633 $as_echo "$tool_specified" >&6; }
5634       fi
5635     fi
5636   fi
5637 
5638 
5639 
5640   if test "x$CP" = x; then
5641     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5642   fi
5643 
5644 
5645 
5646 
5647 
5648   # Publish this variable in the help.
5649 
5650 
5651   if test "x$CPIO" = x; then
5652     # The variable is not set by user, try to locate tool using the code snippet
5653     for ac_prog in cpio
5654 do
5655   # Extract the first word of "$ac_prog", so it can be a program name with args.
5656 set dummy $ac_prog; ac_word=$2
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658 $as_echo_n "checking for $ac_word... " >&6; }
5659 if ${ac_cv_path_CPIO+:} false; then :
5660   $as_echo_n "(cached) " >&6
5661 else
5662   case $CPIO in
5663   [\\/]* | ?:[\\/]*)
5664   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5665   ;;
5666   *)
5667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668 for as_dir in $PATH
5669 do
5670   IFS=$as_save_IFS
5671   test -z "$as_dir" && as_dir=.
5672     for ac_exec_ext in '' $ac_executable_extensions; do
5673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676     break 2
5677   fi
5678 done
5679   done
5680 IFS=$as_save_IFS
5681 
5682   ;;
5683 esac
5684 fi
5685 CPIO=$ac_cv_path_CPIO
5686 if test -n "$CPIO"; then
5687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5688 $as_echo "$CPIO" >&6; }
5689 else
5690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691 $as_echo "no" >&6; }
5692 fi
5693 
5694 
5695   test -n "$CPIO" && break
5696 done
5697 
5698   else
5699     # The variable is set, but is it from the command line or the environment?
5700 
5701     # Try to remove the string !CPIO! from our list.
5702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5704       # If it failed, the variable was not from the command line. Ignore it,
5705       # but warn the user (except for BASH, which is always set by the calling BASH).
5706       if test "xCPIO" != xBASH; then
5707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5708 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5709       fi
5710       # Try to locate tool using the code snippet
5711       for ac_prog in cpio
5712 do
5713   # Extract the first word of "$ac_prog", so it can be a program name with args.
5714 set dummy $ac_prog; ac_word=$2
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716 $as_echo_n "checking for $ac_word... " >&6; }
5717 if ${ac_cv_path_CPIO+:} false; then :
5718   $as_echo_n "(cached) " >&6
5719 else
5720   case $CPIO in
5721   [\\/]* | ?:[\\/]*)
5722   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5723   ;;
5724   *)
5725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726 for as_dir in $PATH
5727 do
5728   IFS=$as_save_IFS
5729   test -z "$as_dir" && as_dir=.
5730     for ac_exec_ext in '' $ac_executable_extensions; do
5731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734     break 2
5735   fi
5736 done
5737   done
5738 IFS=$as_save_IFS
5739 
5740   ;;
5741 esac
5742 fi
5743 CPIO=$ac_cv_path_CPIO
5744 if test -n "$CPIO"; then
5745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5746 $as_echo "$CPIO" >&6; }
5747 else
5748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749 $as_echo "no" >&6; }
5750 fi
5751 
5752 
5753   test -n "$CPIO" && break
5754 done
5755 
5756     else
5757       # If it succeeded, then it was overridden by the user. We will use it
5758       # for the tool.
5759 
5760       # First remove it from the list of overridden variables, so we can test
5761       # for unknown variables in the end.
5762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5763 
5764       # Check if the provided tool contains a complete path.
5765       tool_specified="$CPIO"
5766       tool_basename="${tool_specified##*/}"
5767       if test "x$tool_basename" = "x$tool_specified"; then
5768         # A command without a complete path is provided, search $PATH.
5769         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5770 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5771         # Extract the first word of "$tool_basename", so it can be a program name with args.
5772 set dummy $tool_basename; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_path_CPIO+:} false; then :
5776   $as_echo_n "(cached) " >&6
5777 else
5778   case $CPIO in
5779   [\\/]* | ?:[\\/]*)
5780   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5781   ;;
5782   *)
5783   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784 for as_dir in $PATH
5785 do
5786   IFS=$as_save_IFS
5787   test -z "$as_dir" && as_dir=.
5788     for ac_exec_ext in '' $ac_executable_extensions; do
5789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792     break 2
5793   fi
5794 done
5795   done
5796 IFS=$as_save_IFS
5797 
5798   ;;
5799 esac
5800 fi
5801 CPIO=$ac_cv_path_CPIO
5802 if test -n "$CPIO"; then
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5804 $as_echo "$CPIO" >&6; }
5805 else
5806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807 $as_echo "no" >&6; }
5808 fi
5809 
5810 
5811         if test "x$CPIO" = x; then
5812           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5813         fi
5814       else
5815         # Otherwise we believe it is a complete path. Use it as it is.
5816         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5817 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5818         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5819 $as_echo_n "checking for CPIO... " >&6; }
5820         if test ! -x "$tool_specified"; then
5821           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5822 $as_echo "not found" >&6; }
5823           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5824         fi
5825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5826 $as_echo "$tool_specified" >&6; }
5827       fi
5828     fi
5829   fi
5830 
5831 
5832 
5833   if test "x$CPIO" = x; then
5834     as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5835   fi
5836 
5837 
5838 
5839 
5840 
5841   # Publish this variable in the help.
5842 
5843 
5844   if test "x$CUT" = x; then
5845     # The variable is not set by user, try to locate tool using the code snippet
5846     for ac_prog in cut
5847 do
5848   # Extract the first word of "$ac_prog", so it can be a program name with args.
5849 set dummy $ac_prog; ac_word=$2
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851 $as_echo_n "checking for $ac_word... " >&6; }
5852 if ${ac_cv_path_CUT+:} false; then :
5853   $as_echo_n "(cached) " >&6
5854 else
5855   case $CUT in
5856   [\\/]* | ?:[\\/]*)
5857   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5858   ;;
5859   *)
5860   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861 for as_dir in $PATH
5862 do
5863   IFS=$as_save_IFS
5864   test -z "$as_dir" && as_dir=.
5865     for ac_exec_ext in '' $ac_executable_extensions; do
5866   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5868     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869     break 2
5870   fi
5871 done
5872   done
5873 IFS=$as_save_IFS
5874 
5875   ;;
5876 esac
5877 fi
5878 CUT=$ac_cv_path_CUT
5879 if test -n "$CUT"; then
5880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5881 $as_echo "$CUT" >&6; }
5882 else
5883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884 $as_echo "no" >&6; }
5885 fi
5886 
5887 
5888   test -n "$CUT" && break
5889 done
5890 
5891   else
5892     # The variable is set, but is it from the command line or the environment?
5893 
5894     # Try to remove the string !CUT! from our list.
5895     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5896     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5897       # If it failed, the variable was not from the command line. Ignore it,
5898       # but warn the user (except for BASH, which is always set by the calling BASH).
5899       if test "xCUT" != xBASH; then
5900         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5901 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5902       fi
5903       # Try to locate tool using the code snippet
5904       for ac_prog in cut
5905 do
5906   # Extract the first word of "$ac_prog", so it can be a program name with args.
5907 set dummy $ac_prog; ac_word=$2
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909 $as_echo_n "checking for $ac_word... " >&6; }
5910 if ${ac_cv_path_CUT+:} false; then :
5911   $as_echo_n "(cached) " >&6
5912 else
5913   case $CUT in
5914   [\\/]* | ?:[\\/]*)
5915   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5916   ;;
5917   *)
5918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919 for as_dir in $PATH
5920 do
5921   IFS=$as_save_IFS
5922   test -z "$as_dir" && as_dir=.
5923     for ac_exec_ext in '' $ac_executable_extensions; do
5924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5925     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927     break 2
5928   fi
5929 done
5930   done
5931 IFS=$as_save_IFS
5932 
5933   ;;
5934 esac
5935 fi
5936 CUT=$ac_cv_path_CUT
5937 if test -n "$CUT"; then
5938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5939 $as_echo "$CUT" >&6; }
5940 else
5941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942 $as_echo "no" >&6; }
5943 fi
5944 
5945 
5946   test -n "$CUT" && break
5947 done
5948 
5949     else
5950       # If it succeeded, then it was overridden by the user. We will use it
5951       # for the tool.
5952 
5953       # First remove it from the list of overridden variables, so we can test
5954       # for unknown variables in the end.
5955       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5956 
5957       # Check if the provided tool contains a complete path.
5958       tool_specified="$CUT"
5959       tool_basename="${tool_specified##*/}"
5960       if test "x$tool_basename" = "x$tool_specified"; then
5961         # A command without a complete path is provided, search $PATH.
5962         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5963 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5964         # Extract the first word of "$tool_basename", so it can be a program name with args.
5965 set dummy $tool_basename; ac_word=$2
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967 $as_echo_n "checking for $ac_word... " >&6; }
5968 if ${ac_cv_path_CUT+:} false; then :
5969   $as_echo_n "(cached) " >&6
5970 else
5971   case $CUT in
5972   [\\/]* | ?:[\\/]*)
5973   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5974   ;;
5975   *)
5976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977 for as_dir in $PATH
5978 do
5979   IFS=$as_save_IFS
5980   test -z "$as_dir" && as_dir=.
5981     for ac_exec_ext in '' $ac_executable_extensions; do
5982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5983     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985     break 2
5986   fi
5987 done
5988   done
5989 IFS=$as_save_IFS
5990 
5991   ;;
5992 esac
5993 fi
5994 CUT=$ac_cv_path_CUT
5995 if test -n "$CUT"; then
5996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5997 $as_echo "$CUT" >&6; }
5998 else
5999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000 $as_echo "no" >&6; }
6001 fi
6002 
6003 
6004         if test "x$CUT" = x; then
6005           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6006         fi
6007       else
6008         # Otherwise we believe it is a complete path. Use it as it is.
6009         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6010 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6011         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6012 $as_echo_n "checking for CUT... " >&6; }
6013         if test ! -x "$tool_specified"; then
6014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6015 $as_echo "not found" >&6; }
6016           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6017         fi
6018         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6019 $as_echo "$tool_specified" >&6; }
6020       fi
6021     fi
6022   fi
6023 
6024 
6025 
6026   if test "x$CUT" = x; then
6027     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6028   fi
6029 
6030 
6031 
6032 
6033 
6034   # Publish this variable in the help.
6035 
6036 
6037   if test "x$DATE" = x; then
6038     # The variable is not set by user, try to locate tool using the code snippet
6039     for ac_prog in date
6040 do
6041   # Extract the first word of "$ac_prog", so it can be a program name with args.
6042 set dummy $ac_prog; ac_word=$2
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6044 $as_echo_n "checking for $ac_word... " >&6; }
6045 if ${ac_cv_path_DATE+:} false; then :
6046   $as_echo_n "(cached) " >&6
6047 else
6048   case $DATE in
6049   [\\/]* | ?:[\\/]*)
6050   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6051   ;;
6052   *)
6053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054 for as_dir in $PATH
6055 do
6056   IFS=$as_save_IFS
6057   test -z "$as_dir" && as_dir=.
6058     for ac_exec_ext in '' $ac_executable_extensions; do
6059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062     break 2
6063   fi
6064 done
6065   done
6066 IFS=$as_save_IFS
6067 
6068   ;;
6069 esac
6070 fi
6071 DATE=$ac_cv_path_DATE
6072 if test -n "$DATE"; then
6073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6074 $as_echo "$DATE" >&6; }
6075 else
6076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077 $as_echo "no" >&6; }
6078 fi
6079 
6080 
6081   test -n "$DATE" && break
6082 done
6083 
6084   else
6085     # The variable is set, but is it from the command line or the environment?
6086 
6087     # Try to remove the string !DATE! from our list.
6088     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6089     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6090       # If it failed, the variable was not from the command line. Ignore it,
6091       # but warn the user (except for BASH, which is always set by the calling BASH).
6092       if test "xDATE" != xBASH; then
6093         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6094 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6095       fi
6096       # Try to locate tool using the code snippet
6097       for ac_prog in date
6098 do
6099   # Extract the first word of "$ac_prog", so it can be a program name with args.
6100 set dummy $ac_prog; ac_word=$2
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6102 $as_echo_n "checking for $ac_word... " >&6; }
6103 if ${ac_cv_path_DATE+:} false; then :
6104   $as_echo_n "(cached) " >&6
6105 else
6106   case $DATE in
6107   [\\/]* | ?:[\\/]*)
6108   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6109   ;;
6110   *)
6111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112 for as_dir in $PATH
6113 do
6114   IFS=$as_save_IFS
6115   test -z "$as_dir" && as_dir=.
6116     for ac_exec_ext in '' $ac_executable_extensions; do
6117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6118     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120     break 2
6121   fi
6122 done
6123   done
6124 IFS=$as_save_IFS
6125 
6126   ;;
6127 esac
6128 fi
6129 DATE=$ac_cv_path_DATE
6130 if test -n "$DATE"; then
6131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6132 $as_echo "$DATE" >&6; }
6133 else
6134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135 $as_echo "no" >&6; }
6136 fi
6137 
6138 
6139   test -n "$DATE" && break
6140 done
6141 
6142     else
6143       # If it succeeded, then it was overridden by the user. We will use it
6144       # for the tool.
6145 
6146       # First remove it from the list of overridden variables, so we can test
6147       # for unknown variables in the end.
6148       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6149 
6150       # Check if the provided tool contains a complete path.
6151       tool_specified="$DATE"
6152       tool_basename="${tool_specified##*/}"
6153       if test "x$tool_basename" = "x$tool_specified"; then
6154         # A command without a complete path is provided, search $PATH.
6155         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6156 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6157         # Extract the first word of "$tool_basename", so it can be a program name with args.
6158 set dummy $tool_basename; ac_word=$2
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160 $as_echo_n "checking for $ac_word... " >&6; }
6161 if ${ac_cv_path_DATE+:} false; then :
6162   $as_echo_n "(cached) " >&6
6163 else
6164   case $DATE in
6165   [\\/]* | ?:[\\/]*)
6166   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6167   ;;
6168   *)
6169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6170 for as_dir in $PATH
6171 do
6172   IFS=$as_save_IFS
6173   test -z "$as_dir" && as_dir=.
6174     for ac_exec_ext in '' $ac_executable_extensions; do
6175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6176     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6178     break 2
6179   fi
6180 done
6181   done
6182 IFS=$as_save_IFS
6183 
6184   ;;
6185 esac
6186 fi
6187 DATE=$ac_cv_path_DATE
6188 if test -n "$DATE"; then
6189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6190 $as_echo "$DATE" >&6; }
6191 else
6192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193 $as_echo "no" >&6; }
6194 fi
6195 
6196 
6197         if test "x$DATE" = x; then
6198           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6199         fi
6200       else
6201         # Otherwise we believe it is a complete path. Use it as it is.
6202         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6203 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6204         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6205 $as_echo_n "checking for DATE... " >&6; }
6206         if test ! -x "$tool_specified"; then
6207           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6208 $as_echo "not found" >&6; }
6209           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6210         fi
6211         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6212 $as_echo "$tool_specified" >&6; }
6213       fi
6214     fi
6215   fi
6216 
6217 
6218 
6219   if test "x$DATE" = x; then
6220     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6221   fi
6222 
6223 
6224 
6225 
6226 
6227   # Publish this variable in the help.
6228 
6229 
6230   if test "x$DIFF" = x; then
6231     # The variable is not set by user, try to locate tool using the code snippet
6232     for ac_prog in gdiff diff
6233 do
6234   # Extract the first word of "$ac_prog", so it can be a program name with args.
6235 set dummy $ac_prog; ac_word=$2
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6237 $as_echo_n "checking for $ac_word... " >&6; }
6238 if ${ac_cv_path_DIFF+:} false; then :
6239   $as_echo_n "(cached) " >&6
6240 else
6241   case $DIFF in
6242   [\\/]* | ?:[\\/]*)
6243   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6244   ;;
6245   *)
6246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6247 for as_dir in $PATH
6248 do
6249   IFS=$as_save_IFS
6250   test -z "$as_dir" && as_dir=.
6251     for ac_exec_ext in '' $ac_executable_extensions; do
6252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6253     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6255     break 2
6256   fi
6257 done
6258   done
6259 IFS=$as_save_IFS
6260 
6261   ;;
6262 esac
6263 fi
6264 DIFF=$ac_cv_path_DIFF
6265 if test -n "$DIFF"; then
6266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6267 $as_echo "$DIFF" >&6; }
6268 else
6269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6270 $as_echo "no" >&6; }
6271 fi
6272 
6273 
6274   test -n "$DIFF" && break
6275 done
6276 
6277   else
6278     # The variable is set, but is it from the command line or the environment?
6279 
6280     # Try to remove the string !DIFF! from our list.
6281     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6282     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6283       # If it failed, the variable was not from the command line. Ignore it,
6284       # but warn the user (except for BASH, which is always set by the calling BASH).
6285       if test "xDIFF" != xBASH; then
6286         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6287 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6288       fi
6289       # Try to locate tool using the code snippet
6290       for ac_prog in gdiff diff
6291 do
6292   # Extract the first word of "$ac_prog", so it can be a program name with args.
6293 set dummy $ac_prog; ac_word=$2
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295 $as_echo_n "checking for $ac_word... " >&6; }
6296 if ${ac_cv_path_DIFF+:} false; then :
6297   $as_echo_n "(cached) " >&6
6298 else
6299   case $DIFF in
6300   [\\/]* | ?:[\\/]*)
6301   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6302   ;;
6303   *)
6304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305 for as_dir in $PATH
6306 do
6307   IFS=$as_save_IFS
6308   test -z "$as_dir" && as_dir=.
6309     for ac_exec_ext in '' $ac_executable_extensions; do
6310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313     break 2
6314   fi
6315 done
6316   done
6317 IFS=$as_save_IFS
6318 
6319   ;;
6320 esac
6321 fi
6322 DIFF=$ac_cv_path_DIFF
6323 if test -n "$DIFF"; then
6324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6325 $as_echo "$DIFF" >&6; }
6326 else
6327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328 $as_echo "no" >&6; }
6329 fi
6330 
6331 
6332   test -n "$DIFF" && break
6333 done
6334 
6335     else
6336       # If it succeeded, then it was overridden by the user. We will use it
6337       # for the tool.
6338 
6339       # First remove it from the list of overridden variables, so we can test
6340       # for unknown variables in the end.
6341       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6342 
6343       # Check if the provided tool contains a complete path.
6344       tool_specified="$DIFF"
6345       tool_basename="${tool_specified##*/}"
6346       if test "x$tool_basename" = "x$tool_specified"; then
6347         # A command without a complete path is provided, search $PATH.
6348         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6349 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6350         # Extract the first word of "$tool_basename", so it can be a program name with args.
6351 set dummy $tool_basename; ac_word=$2
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6353 $as_echo_n "checking for $ac_word... " >&6; }
6354 if ${ac_cv_path_DIFF+:} false; then :
6355   $as_echo_n "(cached) " >&6
6356 else
6357   case $DIFF in
6358   [\\/]* | ?:[\\/]*)
6359   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6360   ;;
6361   *)
6362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363 for as_dir in $PATH
6364 do
6365   IFS=$as_save_IFS
6366   test -z "$as_dir" && as_dir=.
6367     for ac_exec_ext in '' $ac_executable_extensions; do
6368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6369     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6371     break 2
6372   fi
6373 done
6374   done
6375 IFS=$as_save_IFS
6376 
6377   ;;
6378 esac
6379 fi
6380 DIFF=$ac_cv_path_DIFF
6381 if test -n "$DIFF"; then
6382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6383 $as_echo "$DIFF" >&6; }
6384 else
6385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386 $as_echo "no" >&6; }
6387 fi
6388 
6389 
6390         if test "x$DIFF" = x; then
6391           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6392         fi
6393       else
6394         # Otherwise we believe it is a complete path. Use it as it is.
6395         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6396 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6397         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6398 $as_echo_n "checking for DIFF... " >&6; }
6399         if test ! -x "$tool_specified"; then
6400           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6401 $as_echo "not found" >&6; }
6402           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6403         fi
6404         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6405 $as_echo "$tool_specified" >&6; }
6406       fi
6407     fi
6408   fi
6409 
6410 
6411 
6412   if test "x$DIFF" = x; then
6413     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6414   fi
6415 
6416 
6417 
6418 
6419 
6420   # Publish this variable in the help.
6421 
6422 
6423   if test "x$DIRNAME" = x; then
6424     # The variable is not set by user, try to locate tool using the code snippet
6425     for ac_prog in dirname
6426 do
6427   # Extract the first word of "$ac_prog", so it can be a program name with args.
6428 set dummy $ac_prog; ac_word=$2
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430 $as_echo_n "checking for $ac_word... " >&6; }
6431 if ${ac_cv_path_DIRNAME+:} false; then :
6432   $as_echo_n "(cached) " >&6
6433 else
6434   case $DIRNAME in
6435   [\\/]* | ?:[\\/]*)
6436   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6437   ;;
6438   *)
6439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440 for as_dir in $PATH
6441 do
6442   IFS=$as_save_IFS
6443   test -z "$as_dir" && as_dir=.
6444     for ac_exec_ext in '' $ac_executable_extensions; do
6445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6446     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448     break 2
6449   fi
6450 done
6451   done
6452 IFS=$as_save_IFS
6453 
6454   ;;
6455 esac
6456 fi
6457 DIRNAME=$ac_cv_path_DIRNAME
6458 if test -n "$DIRNAME"; then
6459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6460 $as_echo "$DIRNAME" >&6; }
6461 else
6462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463 $as_echo "no" >&6; }
6464 fi
6465 
6466 
6467   test -n "$DIRNAME" && break
6468 done
6469 
6470   else
6471     # The variable is set, but is it from the command line or the environment?
6472 
6473     # Try to remove the string !DIRNAME! from our list.
6474     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6475     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6476       # If it failed, the variable was not from the command line. Ignore it,
6477       # but warn the user (except for BASH, which is always set by the calling BASH).
6478       if test "xDIRNAME" != xBASH; then
6479         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6480 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6481       fi
6482       # Try to locate tool using the code snippet
6483       for ac_prog in dirname
6484 do
6485   # Extract the first word of "$ac_prog", so it can be a program name with args.
6486 set dummy $ac_prog; ac_word=$2
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488 $as_echo_n "checking for $ac_word... " >&6; }
6489 if ${ac_cv_path_DIRNAME+:} false; then :
6490   $as_echo_n "(cached) " >&6
6491 else
6492   case $DIRNAME in
6493   [\\/]* | ?:[\\/]*)
6494   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6495   ;;
6496   *)
6497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498 for as_dir in $PATH
6499 do
6500   IFS=$as_save_IFS
6501   test -z "$as_dir" && as_dir=.
6502     for ac_exec_ext in '' $ac_executable_extensions; do
6503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506     break 2
6507   fi
6508 done
6509   done
6510 IFS=$as_save_IFS
6511 
6512   ;;
6513 esac
6514 fi
6515 DIRNAME=$ac_cv_path_DIRNAME
6516 if test -n "$DIRNAME"; then
6517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6518 $as_echo "$DIRNAME" >&6; }
6519 else
6520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521 $as_echo "no" >&6; }
6522 fi
6523 
6524 
6525   test -n "$DIRNAME" && break
6526 done
6527 
6528     else
6529       # If it succeeded, then it was overridden by the user. We will use it
6530       # for the tool.
6531 
6532       # First remove it from the list of overridden variables, so we can test
6533       # for unknown variables in the end.
6534       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6535 
6536       # Check if the provided tool contains a complete path.
6537       tool_specified="$DIRNAME"
6538       tool_basename="${tool_specified##*/}"
6539       if test "x$tool_basename" = "x$tool_specified"; then
6540         # A command without a complete path is provided, search $PATH.
6541         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6542 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6543         # Extract the first word of "$tool_basename", so it can be a program name with args.
6544 set dummy $tool_basename; ac_word=$2
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546 $as_echo_n "checking for $ac_word... " >&6; }
6547 if ${ac_cv_path_DIRNAME+:} false; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   case $DIRNAME in
6551   [\\/]* | ?:[\\/]*)
6552   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6553   ;;
6554   *)
6555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556 for as_dir in $PATH
6557 do
6558   IFS=$as_save_IFS
6559   test -z "$as_dir" && as_dir=.
6560     for ac_exec_ext in '' $ac_executable_extensions; do
6561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564     break 2
6565   fi
6566 done
6567   done
6568 IFS=$as_save_IFS
6569 
6570   ;;
6571 esac
6572 fi
6573 DIRNAME=$ac_cv_path_DIRNAME
6574 if test -n "$DIRNAME"; then
6575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6576 $as_echo "$DIRNAME" >&6; }
6577 else
6578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579 $as_echo "no" >&6; }
6580 fi
6581 
6582 
6583         if test "x$DIRNAME" = x; then
6584           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6585         fi
6586       else
6587         # Otherwise we believe it is a complete path. Use it as it is.
6588         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6589 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6591 $as_echo_n "checking for DIRNAME... " >&6; }
6592         if test ! -x "$tool_specified"; then
6593           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6594 $as_echo "not found" >&6; }
6595           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6596         fi
6597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6598 $as_echo "$tool_specified" >&6; }
6599       fi
6600     fi
6601   fi
6602 
6603 
6604 
6605   if test "x$DIRNAME" = x; then
6606     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6607   fi
6608 
6609 
6610 
6611 
6612 
6613   # Publish this variable in the help.
6614 
6615 
6616   if test "x$ECHO" = x; then
6617     # The variable is not set by user, try to locate tool using the code snippet
6618     for ac_prog in echo
6619 do
6620   # Extract the first word of "$ac_prog", so it can be a program name with args.
6621 set dummy $ac_prog; ac_word=$2
6622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6623 $as_echo_n "checking for $ac_word... " >&6; }
6624 if ${ac_cv_path_ECHO+:} false; then :
6625   $as_echo_n "(cached) " >&6
6626 else
6627   case $ECHO in
6628   [\\/]* | ?:[\\/]*)
6629   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6630   ;;
6631   *)
6632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6633 for as_dir in $PATH
6634 do
6635   IFS=$as_save_IFS
6636   test -z "$as_dir" && as_dir=.
6637     for ac_exec_ext in '' $ac_executable_extensions; do
6638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6639     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6641     break 2
6642   fi
6643 done
6644   done
6645 IFS=$as_save_IFS
6646 
6647   ;;
6648 esac
6649 fi
6650 ECHO=$ac_cv_path_ECHO
6651 if test -n "$ECHO"; then
6652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6653 $as_echo "$ECHO" >&6; }
6654 else
6655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656 $as_echo "no" >&6; }
6657 fi
6658 
6659 
6660   test -n "$ECHO" && break
6661 done
6662 
6663   else
6664     # The variable is set, but is it from the command line or the environment?
6665 
6666     # Try to remove the string !ECHO! from our list.
6667     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6668     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6669       # If it failed, the variable was not from the command line. Ignore it,
6670       # but warn the user (except for BASH, which is always set by the calling BASH).
6671       if test "xECHO" != xBASH; then
6672         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6673 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6674       fi
6675       # Try to locate tool using the code snippet
6676       for ac_prog in echo
6677 do
6678   # Extract the first word of "$ac_prog", so it can be a program name with args.
6679 set dummy $ac_prog; ac_word=$2
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681 $as_echo_n "checking for $ac_word... " >&6; }
6682 if ${ac_cv_path_ECHO+:} false; then :
6683   $as_echo_n "(cached) " >&6
6684 else
6685   case $ECHO in
6686   [\\/]* | ?:[\\/]*)
6687   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6688   ;;
6689   *)
6690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691 for as_dir in $PATH
6692 do
6693   IFS=$as_save_IFS
6694   test -z "$as_dir" && as_dir=.
6695     for ac_exec_ext in '' $ac_executable_extensions; do
6696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699     break 2
6700   fi
6701 done
6702   done
6703 IFS=$as_save_IFS
6704 
6705   ;;
6706 esac
6707 fi
6708 ECHO=$ac_cv_path_ECHO
6709 if test -n "$ECHO"; then
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6711 $as_echo "$ECHO" >&6; }
6712 else
6713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714 $as_echo "no" >&6; }
6715 fi
6716 
6717 
6718   test -n "$ECHO" && break
6719 done
6720 
6721     else
6722       # If it succeeded, then it was overridden by the user. We will use it
6723       # for the tool.
6724 
6725       # First remove it from the list of overridden variables, so we can test
6726       # for unknown variables in the end.
6727       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6728 
6729       # Check if the provided tool contains a complete path.
6730       tool_specified="$ECHO"
6731       tool_basename="${tool_specified##*/}"
6732       if test "x$tool_basename" = "x$tool_specified"; then
6733         # A command without a complete path is provided, search $PATH.
6734         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6735 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6736         # Extract the first word of "$tool_basename", so it can be a program name with args.
6737 set dummy $tool_basename; ac_word=$2
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739 $as_echo_n "checking for $ac_word... " >&6; }
6740 if ${ac_cv_path_ECHO+:} false; then :
6741   $as_echo_n "(cached) " >&6
6742 else
6743   case $ECHO in
6744   [\\/]* | ?:[\\/]*)
6745   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6746   ;;
6747   *)
6748   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749 for as_dir in $PATH
6750 do
6751   IFS=$as_save_IFS
6752   test -z "$as_dir" && as_dir=.
6753     for ac_exec_ext in '' $ac_executable_extensions; do
6754   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757     break 2
6758   fi
6759 done
6760   done
6761 IFS=$as_save_IFS
6762 
6763   ;;
6764 esac
6765 fi
6766 ECHO=$ac_cv_path_ECHO
6767 if test -n "$ECHO"; then
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6769 $as_echo "$ECHO" >&6; }
6770 else
6771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772 $as_echo "no" >&6; }
6773 fi
6774 
6775 
6776         if test "x$ECHO" = x; then
6777           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6778         fi
6779       else
6780         # Otherwise we believe it is a complete path. Use it as it is.
6781         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6782 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6784 $as_echo_n "checking for ECHO... " >&6; }
6785         if test ! -x "$tool_specified"; then
6786           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6787 $as_echo "not found" >&6; }
6788           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6789         fi
6790         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6791 $as_echo "$tool_specified" >&6; }
6792       fi
6793     fi
6794   fi
6795 
6796 
6797 
6798   if test "x$ECHO" = x; then
6799     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6800   fi
6801 
6802 
6803 
6804 
6805 
6806   # Publish this variable in the help.
6807 
6808 
6809   if test "x$EXPR" = x; then
6810     # The variable is not set by user, try to locate tool using the code snippet
6811     for ac_prog in expr
6812 do
6813   # Extract the first word of "$ac_prog", so it can be a program name with args.
6814 set dummy $ac_prog; ac_word=$2
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816 $as_echo_n "checking for $ac_word... " >&6; }
6817 if ${ac_cv_path_EXPR+:} false; then :
6818   $as_echo_n "(cached) " >&6
6819 else
6820   case $EXPR in
6821   [\\/]* | ?:[\\/]*)
6822   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6823   ;;
6824   *)
6825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826 for as_dir in $PATH
6827 do
6828   IFS=$as_save_IFS
6829   test -z "$as_dir" && as_dir=.
6830     for ac_exec_ext in '' $ac_executable_extensions; do
6831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834     break 2
6835   fi
6836 done
6837   done
6838 IFS=$as_save_IFS
6839 
6840   ;;
6841 esac
6842 fi
6843 EXPR=$ac_cv_path_EXPR
6844 if test -n "$EXPR"; then
6845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6846 $as_echo "$EXPR" >&6; }
6847 else
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6850 fi
6851 
6852 
6853   test -n "$EXPR" && break
6854 done
6855 
6856   else
6857     # The variable is set, but is it from the command line or the environment?
6858 
6859     # Try to remove the string !EXPR! from our list.
6860     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6861     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6862       # If it failed, the variable was not from the command line. Ignore it,
6863       # but warn the user (except for BASH, which is always set by the calling BASH).
6864       if test "xEXPR" != xBASH; then
6865         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6866 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6867       fi
6868       # Try to locate tool using the code snippet
6869       for ac_prog in expr
6870 do
6871   # Extract the first word of "$ac_prog", so it can be a program name with args.
6872 set dummy $ac_prog; ac_word=$2
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6874 $as_echo_n "checking for $ac_word... " >&6; }
6875 if ${ac_cv_path_EXPR+:} false; then :
6876   $as_echo_n "(cached) " >&6
6877 else
6878   case $EXPR in
6879   [\\/]* | ?:[\\/]*)
6880   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6881   ;;
6882   *)
6883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6884 for as_dir in $PATH
6885 do
6886   IFS=$as_save_IFS
6887   test -z "$as_dir" && as_dir=.
6888     for ac_exec_ext in '' $ac_executable_extensions; do
6889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6890     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6892     break 2
6893   fi
6894 done
6895   done
6896 IFS=$as_save_IFS
6897 
6898   ;;
6899 esac
6900 fi
6901 EXPR=$ac_cv_path_EXPR
6902 if test -n "$EXPR"; then
6903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6904 $as_echo "$EXPR" >&6; }
6905 else
6906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907 $as_echo "no" >&6; }
6908 fi
6909 
6910 
6911   test -n "$EXPR" && break
6912 done
6913 
6914     else
6915       # If it succeeded, then it was overridden by the user. We will use it
6916       # for the tool.
6917 
6918       # First remove it from the list of overridden variables, so we can test
6919       # for unknown variables in the end.
6920       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6921 
6922       # Check if the provided tool contains a complete path.
6923       tool_specified="$EXPR"
6924       tool_basename="${tool_specified##*/}"
6925       if test "x$tool_basename" = "x$tool_specified"; then
6926         # A command without a complete path is provided, search $PATH.
6927         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6928 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6929         # Extract the first word of "$tool_basename", so it can be a program name with args.
6930 set dummy $tool_basename; ac_word=$2
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6932 $as_echo_n "checking for $ac_word... " >&6; }
6933 if ${ac_cv_path_EXPR+:} false; then :
6934   $as_echo_n "(cached) " >&6
6935 else
6936   case $EXPR in
6937   [\\/]* | ?:[\\/]*)
6938   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6939   ;;
6940   *)
6941   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6942 for as_dir in $PATH
6943 do
6944   IFS=$as_save_IFS
6945   test -z "$as_dir" && as_dir=.
6946     for ac_exec_ext in '' $ac_executable_extensions; do
6947   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6948     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6949     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6950     break 2
6951   fi
6952 done
6953   done
6954 IFS=$as_save_IFS
6955 
6956   ;;
6957 esac
6958 fi
6959 EXPR=$ac_cv_path_EXPR
6960 if test -n "$EXPR"; then
6961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6962 $as_echo "$EXPR" >&6; }
6963 else
6964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6965 $as_echo "no" >&6; }
6966 fi
6967 
6968 
6969         if test "x$EXPR" = x; then
6970           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6971         fi
6972       else
6973         # Otherwise we believe it is a complete path. Use it as it is.
6974         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6975 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6976         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6977 $as_echo_n "checking for EXPR... " >&6; }
6978         if test ! -x "$tool_specified"; then
6979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6980 $as_echo "not found" >&6; }
6981           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6982         fi
6983         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6984 $as_echo "$tool_specified" >&6; }
6985       fi
6986     fi
6987   fi
6988 
6989 
6990 
6991   if test "x$EXPR" = x; then
6992     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6993   fi
6994 
6995 
6996 
6997 
6998 
6999   # Publish this variable in the help.
7000 
7001 
7002   if test "x$FILE" = x; then
7003     # The variable is not set by user, try to locate tool using the code snippet
7004     for ac_prog in file
7005 do
7006   # Extract the first word of "$ac_prog", so it can be a program name with args.
7007 set dummy $ac_prog; ac_word=$2
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7009 $as_echo_n "checking for $ac_word... " >&6; }
7010 if ${ac_cv_path_FILE+:} false; then :
7011   $as_echo_n "(cached) " >&6
7012 else
7013   case $FILE in
7014   [\\/]* | ?:[\\/]*)
7015   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7016   ;;
7017   *)
7018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7019 for as_dir in $PATH
7020 do
7021   IFS=$as_save_IFS
7022   test -z "$as_dir" && as_dir=.
7023     for ac_exec_ext in '' $ac_executable_extensions; do
7024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7025     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7027     break 2
7028   fi
7029 done
7030   done
7031 IFS=$as_save_IFS
7032 
7033   ;;
7034 esac
7035 fi
7036 FILE=$ac_cv_path_FILE
7037 if test -n "$FILE"; then
7038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7039 $as_echo "$FILE" >&6; }
7040 else
7041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042 $as_echo "no" >&6; }
7043 fi
7044 
7045 
7046   test -n "$FILE" && break
7047 done
7048 
7049   else
7050     # The variable is set, but is it from the command line or the environment?
7051 
7052     # Try to remove the string !FILE! from our list.
7053     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7054     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7055       # If it failed, the variable was not from the command line. Ignore it,
7056       # but warn the user (except for BASH, which is always set by the calling BASH).
7057       if test "xFILE" != xBASH; then
7058         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7059 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7060       fi
7061       # Try to locate tool using the code snippet
7062       for ac_prog in file
7063 do
7064   # Extract the first word of "$ac_prog", so it can be a program name with args.
7065 set dummy $ac_prog; ac_word=$2
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7067 $as_echo_n "checking for $ac_word... " >&6; }
7068 if ${ac_cv_path_FILE+:} false; then :
7069   $as_echo_n "(cached) " >&6
7070 else
7071   case $FILE in
7072   [\\/]* | ?:[\\/]*)
7073   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7074   ;;
7075   *)
7076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7077 for as_dir in $PATH
7078 do
7079   IFS=$as_save_IFS
7080   test -z "$as_dir" && as_dir=.
7081     for ac_exec_ext in '' $ac_executable_extensions; do
7082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7083     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7085     break 2
7086   fi
7087 done
7088   done
7089 IFS=$as_save_IFS
7090 
7091   ;;
7092 esac
7093 fi
7094 FILE=$ac_cv_path_FILE
7095 if test -n "$FILE"; then
7096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7097 $as_echo "$FILE" >&6; }
7098 else
7099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7100 $as_echo "no" >&6; }
7101 fi
7102 
7103 
7104   test -n "$FILE" && break
7105 done
7106 
7107     else
7108       # If it succeeded, then it was overridden by the user. We will use it
7109       # for the tool.
7110 
7111       # First remove it from the list of overridden variables, so we can test
7112       # for unknown variables in the end.
7113       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7114 
7115       # Check if the provided tool contains a complete path.
7116       tool_specified="$FILE"
7117       tool_basename="${tool_specified##*/}"
7118       if test "x$tool_basename" = "x$tool_specified"; then
7119         # A command without a complete path is provided, search $PATH.
7120         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7121 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7122         # Extract the first word of "$tool_basename", so it can be a program name with args.
7123 set dummy $tool_basename; ac_word=$2
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125 $as_echo_n "checking for $ac_word... " >&6; }
7126 if ${ac_cv_path_FILE+:} false; then :
7127   $as_echo_n "(cached) " >&6
7128 else
7129   case $FILE in
7130   [\\/]* | ?:[\\/]*)
7131   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7132   ;;
7133   *)
7134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135 for as_dir in $PATH
7136 do
7137   IFS=$as_save_IFS
7138   test -z "$as_dir" && as_dir=.
7139     for ac_exec_ext in '' $ac_executable_extensions; do
7140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7141     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143     break 2
7144   fi
7145 done
7146   done
7147 IFS=$as_save_IFS
7148 
7149   ;;
7150 esac
7151 fi
7152 FILE=$ac_cv_path_FILE
7153 if test -n "$FILE"; then
7154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7155 $as_echo "$FILE" >&6; }
7156 else
7157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158 $as_echo "no" >&6; }
7159 fi
7160 
7161 
7162         if test "x$FILE" = x; then
7163           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7164         fi
7165       else
7166         # Otherwise we believe it is a complete path. Use it as it is.
7167         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7168 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7170 $as_echo_n "checking for FILE... " >&6; }
7171         if test ! -x "$tool_specified"; then
7172           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7173 $as_echo "not found" >&6; }
7174           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7175         fi
7176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7177 $as_echo "$tool_specified" >&6; }
7178       fi
7179     fi
7180   fi
7181 
7182 
7183 
7184   if test "x$FILE" = x; then
7185     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7186   fi
7187 
7188 
7189 
7190 
7191 
7192   # Publish this variable in the help.
7193 
7194 
7195   if test "x$FIND" = x; then
7196     # The variable is not set by user, try to locate tool using the code snippet
7197     for ac_prog in find
7198 do
7199   # Extract the first word of "$ac_prog", so it can be a program name with args.
7200 set dummy $ac_prog; ac_word=$2
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202 $as_echo_n "checking for $ac_word... " >&6; }
7203 if ${ac_cv_path_FIND+:} false; then :
7204   $as_echo_n "(cached) " >&6
7205 else
7206   case $FIND in
7207   [\\/]* | ?:[\\/]*)
7208   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7209   ;;
7210   *)
7211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212 for as_dir in $PATH
7213 do
7214   IFS=$as_save_IFS
7215   test -z "$as_dir" && as_dir=.
7216     for ac_exec_ext in '' $ac_executable_extensions; do
7217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220     break 2
7221   fi
7222 done
7223   done
7224 IFS=$as_save_IFS
7225 
7226   ;;
7227 esac
7228 fi
7229 FIND=$ac_cv_path_FIND
7230 if test -n "$FIND"; then
7231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7232 $as_echo "$FIND" >&6; }
7233 else
7234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235 $as_echo "no" >&6; }
7236 fi
7237 
7238 
7239   test -n "$FIND" && break
7240 done
7241 
7242   else
7243     # The variable is set, but is it from the command line or the environment?
7244 
7245     # Try to remove the string !FIND! from our list.
7246     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7247     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7248       # If it failed, the variable was not from the command line. Ignore it,
7249       # but warn the user (except for BASH, which is always set by the calling BASH).
7250       if test "xFIND" != xBASH; then
7251         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7252 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7253       fi
7254       # Try to locate tool using the code snippet
7255       for ac_prog in find
7256 do
7257   # Extract the first word of "$ac_prog", so it can be a program name with args.
7258 set dummy $ac_prog; ac_word=$2
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260 $as_echo_n "checking for $ac_word... " >&6; }
7261 if ${ac_cv_path_FIND+:} false; then :
7262   $as_echo_n "(cached) " >&6
7263 else
7264   case $FIND in
7265   [\\/]* | ?:[\\/]*)
7266   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7267   ;;
7268   *)
7269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7270 for as_dir in $PATH
7271 do
7272   IFS=$as_save_IFS
7273   test -z "$as_dir" && as_dir=.
7274     for ac_exec_ext in '' $ac_executable_extensions; do
7275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7276     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7278     break 2
7279   fi
7280 done
7281   done
7282 IFS=$as_save_IFS
7283 
7284   ;;
7285 esac
7286 fi
7287 FIND=$ac_cv_path_FIND
7288 if test -n "$FIND"; then
7289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7290 $as_echo "$FIND" >&6; }
7291 else
7292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293 $as_echo "no" >&6; }
7294 fi
7295 
7296 
7297   test -n "$FIND" && break
7298 done
7299 
7300     else
7301       # If it succeeded, then it was overridden by the user. We will use it
7302       # for the tool.
7303 
7304       # First remove it from the list of overridden variables, so we can test
7305       # for unknown variables in the end.
7306       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7307 
7308       # Check if the provided tool contains a complete path.
7309       tool_specified="$FIND"
7310       tool_basename="${tool_specified##*/}"
7311       if test "x$tool_basename" = "x$tool_specified"; then
7312         # A command without a complete path is provided, search $PATH.
7313         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7314 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7315         # Extract the first word of "$tool_basename", so it can be a program name with args.
7316 set dummy $tool_basename; ac_word=$2
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7318 $as_echo_n "checking for $ac_word... " >&6; }
7319 if ${ac_cv_path_FIND+:} false; then :
7320   $as_echo_n "(cached) " >&6
7321 else
7322   case $FIND in
7323   [\\/]* | ?:[\\/]*)
7324   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7325   ;;
7326   *)
7327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328 for as_dir in $PATH
7329 do
7330   IFS=$as_save_IFS
7331   test -z "$as_dir" && as_dir=.
7332     for ac_exec_ext in '' $ac_executable_extensions; do
7333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7334     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7336     break 2
7337   fi
7338 done
7339   done
7340 IFS=$as_save_IFS
7341 
7342   ;;
7343 esac
7344 fi
7345 FIND=$ac_cv_path_FIND
7346 if test -n "$FIND"; then
7347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7348 $as_echo "$FIND" >&6; }
7349 else
7350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351 $as_echo "no" >&6; }
7352 fi
7353 
7354 
7355         if test "x$FIND" = x; then
7356           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7357         fi
7358       else
7359         # Otherwise we believe it is a complete path. Use it as it is.
7360         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7361 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7362         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7363 $as_echo_n "checking for FIND... " >&6; }
7364         if test ! -x "$tool_specified"; then
7365           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7366 $as_echo "not found" >&6; }
7367           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7368         fi
7369         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7370 $as_echo "$tool_specified" >&6; }
7371       fi
7372     fi
7373   fi
7374 
7375 
7376 
7377   if test "x$FIND" = x; then
7378     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7379   fi
7380 
7381 
7382 
7383 
7384 
7385   # Publish this variable in the help.
7386 
7387 
7388   if test "x$HEAD" = x; then
7389     # The variable is not set by user, try to locate tool using the code snippet
7390     for ac_prog in head
7391 do
7392   # Extract the first word of "$ac_prog", so it can be a program name with args.
7393 set dummy $ac_prog; ac_word=$2
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7395 $as_echo_n "checking for $ac_word... " >&6; }
7396 if ${ac_cv_path_HEAD+:} false; then :
7397   $as_echo_n "(cached) " >&6
7398 else
7399   case $HEAD in
7400   [\\/]* | ?:[\\/]*)
7401   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7402   ;;
7403   *)
7404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7405 for as_dir in $PATH
7406 do
7407   IFS=$as_save_IFS
7408   test -z "$as_dir" && as_dir=.
7409     for ac_exec_ext in '' $ac_executable_extensions; do
7410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7411     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7413     break 2
7414   fi
7415 done
7416   done
7417 IFS=$as_save_IFS
7418 
7419   ;;
7420 esac
7421 fi
7422 HEAD=$ac_cv_path_HEAD
7423 if test -n "$HEAD"; then
7424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7425 $as_echo "$HEAD" >&6; }
7426 else
7427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428 $as_echo "no" >&6; }
7429 fi
7430 
7431 
7432   test -n "$HEAD" && break
7433 done
7434 
7435   else
7436     # The variable is set, but is it from the command line or the environment?
7437 
7438     # Try to remove the string !HEAD! from our list.
7439     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7440     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7441       # If it failed, the variable was not from the command line. Ignore it,
7442       # but warn the user (except for BASH, which is always set by the calling BASH).
7443       if test "xHEAD" != xBASH; then
7444         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7445 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7446       fi
7447       # Try to locate tool using the code snippet
7448       for ac_prog in head
7449 do
7450   # Extract the first word of "$ac_prog", so it can be a program name with args.
7451 set dummy $ac_prog; ac_word=$2
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453 $as_echo_n "checking for $ac_word... " >&6; }
7454 if ${ac_cv_path_HEAD+:} false; then :
7455   $as_echo_n "(cached) " >&6
7456 else
7457   case $HEAD in
7458   [\\/]* | ?:[\\/]*)
7459   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7460   ;;
7461   *)
7462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463 for as_dir in $PATH
7464 do
7465   IFS=$as_save_IFS
7466   test -z "$as_dir" && as_dir=.
7467     for ac_exec_ext in '' $ac_executable_extensions; do
7468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7469     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7471     break 2
7472   fi
7473 done
7474   done
7475 IFS=$as_save_IFS
7476 
7477   ;;
7478 esac
7479 fi
7480 HEAD=$ac_cv_path_HEAD
7481 if test -n "$HEAD"; then
7482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7483 $as_echo "$HEAD" >&6; }
7484 else
7485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7486 $as_echo "no" >&6; }
7487 fi
7488 
7489 
7490   test -n "$HEAD" && break
7491 done
7492 
7493     else
7494       # If it succeeded, then it was overridden by the user. We will use it
7495       # for the tool.
7496 
7497       # First remove it from the list of overridden variables, so we can test
7498       # for unknown variables in the end.
7499       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7500 
7501       # Check if the provided tool contains a complete path.
7502       tool_specified="$HEAD"
7503       tool_basename="${tool_specified##*/}"
7504       if test "x$tool_basename" = "x$tool_specified"; then
7505         # A command without a complete path is provided, search $PATH.
7506         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7507 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7508         # Extract the first word of "$tool_basename", so it can be a program name with args.
7509 set dummy $tool_basename; ac_word=$2
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511 $as_echo_n "checking for $ac_word... " >&6; }
7512 if ${ac_cv_path_HEAD+:} false; then :
7513   $as_echo_n "(cached) " >&6
7514 else
7515   case $HEAD in
7516   [\\/]* | ?:[\\/]*)
7517   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7518   ;;
7519   *)
7520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521 for as_dir in $PATH
7522 do
7523   IFS=$as_save_IFS
7524   test -z "$as_dir" && as_dir=.
7525     for ac_exec_ext in '' $ac_executable_extensions; do
7526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529     break 2
7530   fi
7531 done
7532   done
7533 IFS=$as_save_IFS
7534 
7535   ;;
7536 esac
7537 fi
7538 HEAD=$ac_cv_path_HEAD
7539 if test -n "$HEAD"; then
7540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7541 $as_echo "$HEAD" >&6; }
7542 else
7543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544 $as_echo "no" >&6; }
7545 fi
7546 
7547 
7548         if test "x$HEAD" = x; then
7549           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7550         fi
7551       else
7552         # Otherwise we believe it is a complete path. Use it as it is.
7553         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7554 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7555         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7556 $as_echo_n "checking for HEAD... " >&6; }
7557         if test ! -x "$tool_specified"; then
7558           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7559 $as_echo "not found" >&6; }
7560           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7561         fi
7562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7563 $as_echo "$tool_specified" >&6; }
7564       fi
7565     fi
7566   fi
7567 
7568 
7569 
7570   if test "x$HEAD" = x; then
7571     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7572   fi
7573 
7574 
7575 
7576 
7577 
7578   # Publish this variable in the help.
7579 
7580 
7581   if test "x$LN" = x; then
7582     # The variable is not set by user, try to locate tool using the code snippet
7583     for ac_prog in ln
7584 do
7585   # Extract the first word of "$ac_prog", so it can be a program name with args.
7586 set dummy $ac_prog; ac_word=$2
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7588 $as_echo_n "checking for $ac_word... " >&6; }
7589 if ${ac_cv_path_LN+:} false; then :
7590   $as_echo_n "(cached) " >&6
7591 else
7592   case $LN in
7593   [\\/]* | ?:[\\/]*)
7594   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7595   ;;
7596   *)
7597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7598 for as_dir in $PATH
7599 do
7600   IFS=$as_save_IFS
7601   test -z "$as_dir" && as_dir=.
7602     for ac_exec_ext in '' $ac_executable_extensions; do
7603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7604     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7606     break 2
7607   fi
7608 done
7609   done
7610 IFS=$as_save_IFS
7611 
7612   ;;
7613 esac
7614 fi
7615 LN=$ac_cv_path_LN
7616 if test -n "$LN"; then
7617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7618 $as_echo "$LN" >&6; }
7619 else
7620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7621 $as_echo "no" >&6; }
7622 fi
7623 
7624 
7625   test -n "$LN" && break
7626 done
7627 
7628   else
7629     # The variable is set, but is it from the command line or the environment?
7630 
7631     # Try to remove the string !LN! from our list.
7632     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7633     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7634       # If it failed, the variable was not from the command line. Ignore it,
7635       # but warn the user (except for BASH, which is always set by the calling BASH).
7636       if test "xLN" != xBASH; then
7637         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7638 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7639       fi
7640       # Try to locate tool using the code snippet
7641       for ac_prog in ln
7642 do
7643   # Extract the first word of "$ac_prog", so it can be a program name with args.
7644 set dummy $ac_prog; ac_word=$2
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7646 $as_echo_n "checking for $ac_word... " >&6; }
7647 if ${ac_cv_path_LN+:} false; then :
7648   $as_echo_n "(cached) " >&6
7649 else
7650   case $LN in
7651   [\\/]* | ?:[\\/]*)
7652   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7653   ;;
7654   *)
7655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656 for as_dir in $PATH
7657 do
7658   IFS=$as_save_IFS
7659   test -z "$as_dir" && as_dir=.
7660     for ac_exec_ext in '' $ac_executable_extensions; do
7661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664     break 2
7665   fi
7666 done
7667   done
7668 IFS=$as_save_IFS
7669 
7670   ;;
7671 esac
7672 fi
7673 LN=$ac_cv_path_LN
7674 if test -n "$LN"; then
7675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7676 $as_echo "$LN" >&6; }
7677 else
7678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7679 $as_echo "no" >&6; }
7680 fi
7681 
7682 
7683   test -n "$LN" && break
7684 done
7685 
7686     else
7687       # If it succeeded, then it was overridden by the user. We will use it
7688       # for the tool.
7689 
7690       # First remove it from the list of overridden variables, so we can test
7691       # for unknown variables in the end.
7692       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7693 
7694       # Check if the provided tool contains a complete path.
7695       tool_specified="$LN"
7696       tool_basename="${tool_specified##*/}"
7697       if test "x$tool_basename" = "x$tool_specified"; then
7698         # A command without a complete path is provided, search $PATH.
7699         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7700 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7701         # Extract the first word of "$tool_basename", so it can be a program name with args.
7702 set dummy $tool_basename; ac_word=$2
7703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7704 $as_echo_n "checking for $ac_word... " >&6; }
7705 if ${ac_cv_path_LN+:} false; then :
7706   $as_echo_n "(cached) " >&6
7707 else
7708   case $LN in
7709   [\\/]* | ?:[\\/]*)
7710   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7711   ;;
7712   *)
7713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714 for as_dir in $PATH
7715 do
7716   IFS=$as_save_IFS
7717   test -z "$as_dir" && as_dir=.
7718     for ac_exec_ext in '' $ac_executable_extensions; do
7719   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7720     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7722     break 2
7723   fi
7724 done
7725   done
7726 IFS=$as_save_IFS
7727 
7728   ;;
7729 esac
7730 fi
7731 LN=$ac_cv_path_LN
7732 if test -n "$LN"; then
7733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7734 $as_echo "$LN" >&6; }
7735 else
7736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737 $as_echo "no" >&6; }
7738 fi
7739 
7740 
7741         if test "x$LN" = x; then
7742           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7743         fi
7744       else
7745         # Otherwise we believe it is a complete path. Use it as it is.
7746         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7747 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7748         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7749 $as_echo_n "checking for LN... " >&6; }
7750         if test ! -x "$tool_specified"; then
7751           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7752 $as_echo "not found" >&6; }
7753           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7754         fi
7755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7756 $as_echo "$tool_specified" >&6; }
7757       fi
7758     fi
7759   fi
7760 
7761 
7762 
7763   if test "x$LN" = x; then
7764     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7765   fi
7766 
7767 
7768 
7769 
7770 
7771   # Publish this variable in the help.
7772 
7773 
7774   if test "x$LS" = x; then
7775     # The variable is not set by user, try to locate tool using the code snippet
7776     for ac_prog in ls
7777 do
7778   # Extract the first word of "$ac_prog", so it can be a program name with args.
7779 set dummy $ac_prog; ac_word=$2
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7781 $as_echo_n "checking for $ac_word... " >&6; }
7782 if ${ac_cv_path_LS+:} false; then :
7783   $as_echo_n "(cached) " >&6
7784 else
7785   case $LS in
7786   [\\/]* | ?:[\\/]*)
7787   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7788   ;;
7789   *)
7790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791 for as_dir in $PATH
7792 do
7793   IFS=$as_save_IFS
7794   test -z "$as_dir" && as_dir=.
7795     for ac_exec_ext in '' $ac_executable_extensions; do
7796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799     break 2
7800   fi
7801 done
7802   done
7803 IFS=$as_save_IFS
7804 
7805   ;;
7806 esac
7807 fi
7808 LS=$ac_cv_path_LS
7809 if test -n "$LS"; then
7810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7811 $as_echo "$LS" >&6; }
7812 else
7813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7814 $as_echo "no" >&6; }
7815 fi
7816 
7817 
7818   test -n "$LS" && break
7819 done
7820 
7821   else
7822     # The variable is set, but is it from the command line or the environment?
7823 
7824     # Try to remove the string !LS! from our list.
7825     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7826     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7827       # If it failed, the variable was not from the command line. Ignore it,
7828       # but warn the user (except for BASH, which is always set by the calling BASH).
7829       if test "xLS" != xBASH; then
7830         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7831 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7832       fi
7833       # Try to locate tool using the code snippet
7834       for ac_prog in ls
7835 do
7836   # Extract the first word of "$ac_prog", so it can be a program name with args.
7837 set dummy $ac_prog; ac_word=$2
7838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7839 $as_echo_n "checking for $ac_word... " >&6; }
7840 if ${ac_cv_path_LS+:} false; then :
7841   $as_echo_n "(cached) " >&6
7842 else
7843   case $LS in
7844   [\\/]* | ?:[\\/]*)
7845   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7846   ;;
7847   *)
7848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7849 for as_dir in $PATH
7850 do
7851   IFS=$as_save_IFS
7852   test -z "$as_dir" && as_dir=.
7853     for ac_exec_ext in '' $ac_executable_extensions; do
7854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7855     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7857     break 2
7858   fi
7859 done
7860   done
7861 IFS=$as_save_IFS
7862 
7863   ;;
7864 esac
7865 fi
7866 LS=$ac_cv_path_LS
7867 if test -n "$LS"; then
7868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7869 $as_echo "$LS" >&6; }
7870 else
7871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872 $as_echo "no" >&6; }
7873 fi
7874 
7875 
7876   test -n "$LS" && break
7877 done
7878 
7879     else
7880       # If it succeeded, then it was overridden by the user. We will use it
7881       # for the tool.
7882 
7883       # First remove it from the list of overridden variables, so we can test
7884       # for unknown variables in the end.
7885       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7886 
7887       # Check if the provided tool contains a complete path.
7888       tool_specified="$LS"
7889       tool_basename="${tool_specified##*/}"
7890       if test "x$tool_basename" = "x$tool_specified"; then
7891         # A command without a complete path is provided, search $PATH.
7892         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7893 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7894         # Extract the first word of "$tool_basename", so it can be a program name with args.
7895 set dummy $tool_basename; ac_word=$2
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7897 $as_echo_n "checking for $ac_word... " >&6; }
7898 if ${ac_cv_path_LS+:} false; then :
7899   $as_echo_n "(cached) " >&6
7900 else
7901   case $LS in
7902   [\\/]* | ?:[\\/]*)
7903   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7904   ;;
7905   *)
7906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7907 for as_dir in $PATH
7908 do
7909   IFS=$as_save_IFS
7910   test -z "$as_dir" && as_dir=.
7911     for ac_exec_ext in '' $ac_executable_extensions; do
7912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7913     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7915     break 2
7916   fi
7917 done
7918   done
7919 IFS=$as_save_IFS
7920 
7921   ;;
7922 esac
7923 fi
7924 LS=$ac_cv_path_LS
7925 if test -n "$LS"; then
7926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7927 $as_echo "$LS" >&6; }
7928 else
7929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7930 $as_echo "no" >&6; }
7931 fi
7932 
7933 
7934         if test "x$LS" = x; then
7935           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7936         fi
7937       else
7938         # Otherwise we believe it is a complete path. Use it as it is.
7939         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7940 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7941         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7942 $as_echo_n "checking for LS... " >&6; }
7943         if test ! -x "$tool_specified"; then
7944           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7945 $as_echo "not found" >&6; }
7946           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7947         fi
7948         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7949 $as_echo "$tool_specified" >&6; }
7950       fi
7951     fi
7952   fi
7953 
7954 
7955 
7956   if test "x$LS" = x; then
7957     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7958   fi
7959 
7960 
7961 
7962 
7963 
7964   # Publish this variable in the help.
7965 
7966 
7967   if test "x$MKDIR" = x; then
7968     # The variable is not set by user, try to locate tool using the code snippet
7969     for ac_prog in mkdir
7970 do
7971   # Extract the first word of "$ac_prog", so it can be a program name with args.
7972 set dummy $ac_prog; ac_word=$2
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7974 $as_echo_n "checking for $ac_word... " >&6; }
7975 if ${ac_cv_path_MKDIR+:} false; then :
7976   $as_echo_n "(cached) " >&6
7977 else
7978   case $MKDIR in
7979   [\\/]* | ?:[\\/]*)
7980   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7981   ;;
7982   *)
7983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984 for as_dir in $PATH
7985 do
7986   IFS=$as_save_IFS
7987   test -z "$as_dir" && as_dir=.
7988     for ac_exec_ext in '' $ac_executable_extensions; do
7989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7990     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7992     break 2
7993   fi
7994 done
7995   done
7996 IFS=$as_save_IFS
7997 
7998   ;;
7999 esac
8000 fi
8001 MKDIR=$ac_cv_path_MKDIR
8002 if test -n "$MKDIR"; then
8003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8004 $as_echo "$MKDIR" >&6; }
8005 else
8006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007 $as_echo "no" >&6; }
8008 fi
8009 
8010 
8011   test -n "$MKDIR" && break
8012 done
8013 
8014   else
8015     # The variable is set, but is it from the command line or the environment?
8016 
8017     # Try to remove the string !MKDIR! from our list.
8018     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8019     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8020       # If it failed, the variable was not from the command line. Ignore it,
8021       # but warn the user (except for BASH, which is always set by the calling BASH).
8022       if test "xMKDIR" != xBASH; then
8023         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8024 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8025       fi
8026       # Try to locate tool using the code snippet
8027       for ac_prog in mkdir
8028 do
8029   # Extract the first word of "$ac_prog", so it can be a program name with args.
8030 set dummy $ac_prog; ac_word=$2
8031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032 $as_echo_n "checking for $ac_word... " >&6; }
8033 if ${ac_cv_path_MKDIR+:} false; then :
8034   $as_echo_n "(cached) " >&6
8035 else
8036   case $MKDIR in
8037   [\\/]* | ?:[\\/]*)
8038   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8039   ;;
8040   *)
8041   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042 for as_dir in $PATH
8043 do
8044   IFS=$as_save_IFS
8045   test -z "$as_dir" && as_dir=.
8046     for ac_exec_ext in '' $ac_executable_extensions; do
8047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050     break 2
8051   fi
8052 done
8053   done
8054 IFS=$as_save_IFS
8055 
8056   ;;
8057 esac
8058 fi
8059 MKDIR=$ac_cv_path_MKDIR
8060 if test -n "$MKDIR"; then
8061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8062 $as_echo "$MKDIR" >&6; }
8063 else
8064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065 $as_echo "no" >&6; }
8066 fi
8067 
8068 
8069   test -n "$MKDIR" && break
8070 done
8071 
8072     else
8073       # If it succeeded, then it was overridden by the user. We will use it
8074       # for the tool.
8075 
8076       # First remove it from the list of overridden variables, so we can test
8077       # for unknown variables in the end.
8078       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8079 
8080       # Check if the provided tool contains a complete path.
8081       tool_specified="$MKDIR"
8082       tool_basename="${tool_specified##*/}"
8083       if test "x$tool_basename" = "x$tool_specified"; then
8084         # A command without a complete path is provided, search $PATH.
8085         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8086 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8087         # Extract the first word of "$tool_basename", so it can be a program name with args.
8088 set dummy $tool_basename; ac_word=$2
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090 $as_echo_n "checking for $ac_word... " >&6; }
8091 if ${ac_cv_path_MKDIR+:} false; then :
8092   $as_echo_n "(cached) " >&6
8093 else
8094   case $MKDIR in
8095   [\\/]* | ?:[\\/]*)
8096   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8097   ;;
8098   *)
8099   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8100 for as_dir in $PATH
8101 do
8102   IFS=$as_save_IFS
8103   test -z "$as_dir" && as_dir=.
8104     for ac_exec_ext in '' $ac_executable_extensions; do
8105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8106     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8108     break 2
8109   fi
8110 done
8111   done
8112 IFS=$as_save_IFS
8113 
8114   ;;
8115 esac
8116 fi
8117 MKDIR=$ac_cv_path_MKDIR
8118 if test -n "$MKDIR"; then
8119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8120 $as_echo "$MKDIR" >&6; }
8121 else
8122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8123 $as_echo "no" >&6; }
8124 fi
8125 
8126 
8127         if test "x$MKDIR" = x; then
8128           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8129         fi
8130       else
8131         # Otherwise we believe it is a complete path. Use it as it is.
8132         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8133 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8134         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8135 $as_echo_n "checking for MKDIR... " >&6; }
8136         if test ! -x "$tool_specified"; then
8137           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8138 $as_echo "not found" >&6; }
8139           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8140         fi
8141         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8142 $as_echo "$tool_specified" >&6; }
8143       fi
8144     fi
8145   fi
8146 
8147 
8148 
8149   if test "x$MKDIR" = x; then
8150     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8151   fi
8152 
8153 
8154 
8155 
8156 
8157   # Publish this variable in the help.
8158 
8159 
8160   if test "x$MKTEMP" = x; then
8161     # The variable is not set by user, try to locate tool using the code snippet
8162     for ac_prog in mktemp
8163 do
8164   # Extract the first word of "$ac_prog", so it can be a program name with args.
8165 set dummy $ac_prog; ac_word=$2
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167 $as_echo_n "checking for $ac_word... " >&6; }
8168 if ${ac_cv_path_MKTEMP+:} false; then :
8169   $as_echo_n "(cached) " >&6
8170 else
8171   case $MKTEMP in
8172   [\\/]* | ?:[\\/]*)
8173   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8174   ;;
8175   *)
8176   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177 for as_dir in $PATH
8178 do
8179   IFS=$as_save_IFS
8180   test -z "$as_dir" && as_dir=.
8181     for ac_exec_ext in '' $ac_executable_extensions; do
8182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185     break 2
8186   fi
8187 done
8188   done
8189 IFS=$as_save_IFS
8190 
8191   ;;
8192 esac
8193 fi
8194 MKTEMP=$ac_cv_path_MKTEMP
8195 if test -n "$MKTEMP"; then
8196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8197 $as_echo "$MKTEMP" >&6; }
8198 else
8199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200 $as_echo "no" >&6; }
8201 fi
8202 
8203 
8204   test -n "$MKTEMP" && break
8205 done
8206 
8207   else
8208     # The variable is set, but is it from the command line or the environment?
8209 
8210     # Try to remove the string !MKTEMP! from our list.
8211     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8212     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8213       # If it failed, the variable was not from the command line. Ignore it,
8214       # but warn the user (except for BASH, which is always set by the calling BASH).
8215       if test "xMKTEMP" != xBASH; then
8216         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8217 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8218       fi
8219       # Try to locate tool using the code snippet
8220       for ac_prog in mktemp
8221 do
8222   # Extract the first word of "$ac_prog", so it can be a program name with args.
8223 set dummy $ac_prog; ac_word=$2
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225 $as_echo_n "checking for $ac_word... " >&6; }
8226 if ${ac_cv_path_MKTEMP+:} false; then :
8227   $as_echo_n "(cached) " >&6
8228 else
8229   case $MKTEMP in
8230   [\\/]* | ?:[\\/]*)
8231   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8232   ;;
8233   *)
8234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235 for as_dir in $PATH
8236 do
8237   IFS=$as_save_IFS
8238   test -z "$as_dir" && as_dir=.
8239     for ac_exec_ext in '' $ac_executable_extensions; do
8240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243     break 2
8244   fi
8245 done
8246   done
8247 IFS=$as_save_IFS
8248 
8249   ;;
8250 esac
8251 fi
8252 MKTEMP=$ac_cv_path_MKTEMP
8253 if test -n "$MKTEMP"; then
8254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8255 $as_echo "$MKTEMP" >&6; }
8256 else
8257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258 $as_echo "no" >&6; }
8259 fi
8260 
8261 
8262   test -n "$MKTEMP" && break
8263 done
8264 
8265     else
8266       # If it succeeded, then it was overridden by the user. We will use it
8267       # for the tool.
8268 
8269       # First remove it from the list of overridden variables, so we can test
8270       # for unknown variables in the end.
8271       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8272 
8273       # Check if the provided tool contains a complete path.
8274       tool_specified="$MKTEMP"
8275       tool_basename="${tool_specified##*/}"
8276       if test "x$tool_basename" = "x$tool_specified"; then
8277         # A command without a complete path is provided, search $PATH.
8278         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8279 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8280         # Extract the first word of "$tool_basename", so it can be a program name with args.
8281 set dummy $tool_basename; ac_word=$2
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283 $as_echo_n "checking for $ac_word... " >&6; }
8284 if ${ac_cv_path_MKTEMP+:} false; then :
8285   $as_echo_n "(cached) " >&6
8286 else
8287   case $MKTEMP in
8288   [\\/]* | ?:[\\/]*)
8289   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8290   ;;
8291   *)
8292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293 for as_dir in $PATH
8294 do
8295   IFS=$as_save_IFS
8296   test -z "$as_dir" && as_dir=.
8297     for ac_exec_ext in '' $ac_executable_extensions; do
8298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301     break 2
8302   fi
8303 done
8304   done
8305 IFS=$as_save_IFS
8306 
8307   ;;
8308 esac
8309 fi
8310 MKTEMP=$ac_cv_path_MKTEMP
8311 if test -n "$MKTEMP"; then
8312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8313 $as_echo "$MKTEMP" >&6; }
8314 else
8315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316 $as_echo "no" >&6; }
8317 fi
8318 
8319 
8320         if test "x$MKTEMP" = x; then
8321           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8322         fi
8323       else
8324         # Otherwise we believe it is a complete path. Use it as it is.
8325         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8326 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8327         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8328 $as_echo_n "checking for MKTEMP... " >&6; }
8329         if test ! -x "$tool_specified"; then
8330           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8331 $as_echo "not found" >&6; }
8332           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8333         fi
8334         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8335 $as_echo "$tool_specified" >&6; }
8336       fi
8337     fi
8338   fi
8339 
8340 
8341 
8342   if test "x$MKTEMP" = x; then
8343     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8344   fi
8345 
8346 
8347 
8348 
8349 
8350   # Publish this variable in the help.
8351 
8352 
8353   if test "x$MV" = x; then
8354     # The variable is not set by user, try to locate tool using the code snippet
8355     for ac_prog in mv
8356 do
8357   # Extract the first word of "$ac_prog", so it can be a program name with args.
8358 set dummy $ac_prog; ac_word=$2
8359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8360 $as_echo_n "checking for $ac_word... " >&6; }
8361 if ${ac_cv_path_MV+:} false; then :
8362   $as_echo_n "(cached) " >&6
8363 else
8364   case $MV in
8365   [\\/]* | ?:[\\/]*)
8366   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8367   ;;
8368   *)
8369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8370 for as_dir in $PATH
8371 do
8372   IFS=$as_save_IFS
8373   test -z "$as_dir" && as_dir=.
8374     for ac_exec_ext in '' $ac_executable_extensions; do
8375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8376     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8378     break 2
8379   fi
8380 done
8381   done
8382 IFS=$as_save_IFS
8383 
8384   ;;
8385 esac
8386 fi
8387 MV=$ac_cv_path_MV
8388 if test -n "$MV"; then
8389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8390 $as_echo "$MV" >&6; }
8391 else
8392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393 $as_echo "no" >&6; }
8394 fi
8395 
8396 
8397   test -n "$MV" && break
8398 done
8399 
8400   else
8401     # The variable is set, but is it from the command line or the environment?
8402 
8403     # Try to remove the string !MV! from our list.
8404     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8405     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8406       # If it failed, the variable was not from the command line. Ignore it,
8407       # but warn the user (except for BASH, which is always set by the calling BASH).
8408       if test "xMV" != xBASH; then
8409         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8410 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8411       fi
8412       # Try to locate tool using the code snippet
8413       for ac_prog in mv
8414 do
8415   # Extract the first word of "$ac_prog", so it can be a program name with args.
8416 set dummy $ac_prog; ac_word=$2
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8418 $as_echo_n "checking for $ac_word... " >&6; }
8419 if ${ac_cv_path_MV+:} false; then :
8420   $as_echo_n "(cached) " >&6
8421 else
8422   case $MV in
8423   [\\/]* | ?:[\\/]*)
8424   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8425   ;;
8426   *)
8427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8428 for as_dir in $PATH
8429 do
8430   IFS=$as_save_IFS
8431   test -z "$as_dir" && as_dir=.
8432     for ac_exec_ext in '' $ac_executable_extensions; do
8433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8434     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8436     break 2
8437   fi
8438 done
8439   done
8440 IFS=$as_save_IFS
8441 
8442   ;;
8443 esac
8444 fi
8445 MV=$ac_cv_path_MV
8446 if test -n "$MV"; then
8447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8448 $as_echo "$MV" >&6; }
8449 else
8450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451 $as_echo "no" >&6; }
8452 fi
8453 
8454 
8455   test -n "$MV" && break
8456 done
8457 
8458     else
8459       # If it succeeded, then it was overridden by the user. We will use it
8460       # for the tool.
8461 
8462       # First remove it from the list of overridden variables, so we can test
8463       # for unknown variables in the end.
8464       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8465 
8466       # Check if the provided tool contains a complete path.
8467       tool_specified="$MV"
8468       tool_basename="${tool_specified##*/}"
8469       if test "x$tool_basename" = "x$tool_specified"; then
8470         # A command without a complete path is provided, search $PATH.
8471         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8472 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8473         # Extract the first word of "$tool_basename", so it can be a program name with args.
8474 set dummy $tool_basename; ac_word=$2
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8476 $as_echo_n "checking for $ac_word... " >&6; }
8477 if ${ac_cv_path_MV+:} false; then :
8478   $as_echo_n "(cached) " >&6
8479 else
8480   case $MV in
8481   [\\/]* | ?:[\\/]*)
8482   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8483   ;;
8484   *)
8485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8486 for as_dir in $PATH
8487 do
8488   IFS=$as_save_IFS
8489   test -z "$as_dir" && as_dir=.
8490     for ac_exec_ext in '' $ac_executable_extensions; do
8491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8492     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8494     break 2
8495   fi
8496 done
8497   done
8498 IFS=$as_save_IFS
8499 
8500   ;;
8501 esac
8502 fi
8503 MV=$ac_cv_path_MV
8504 if test -n "$MV"; then
8505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8506 $as_echo "$MV" >&6; }
8507 else
8508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8509 $as_echo "no" >&6; }
8510 fi
8511 
8512 
8513         if test "x$MV" = x; then
8514           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8515         fi
8516       else
8517         # Otherwise we believe it is a complete path. Use it as it is.
8518         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8519 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8520         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8521 $as_echo_n "checking for MV... " >&6; }
8522         if test ! -x "$tool_specified"; then
8523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8524 $as_echo "not found" >&6; }
8525           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8526         fi
8527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8528 $as_echo "$tool_specified" >&6; }
8529       fi
8530     fi
8531   fi
8532 
8533 
8534 
8535   if test "x$MV" = x; then
8536     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8537   fi
8538 
8539 
8540 
8541 
8542 
8543   # Publish this variable in the help.
8544 
8545 
8546   if test "x$NAWK" = x; then
8547     # The variable is not set by user, try to locate tool using the code snippet
8548     for ac_prog in nawk gawk awk
8549 do
8550   # Extract the first word of "$ac_prog", so it can be a program name with args.
8551 set dummy $ac_prog; ac_word=$2
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553 $as_echo_n "checking for $ac_word... " >&6; }
8554 if ${ac_cv_path_NAWK+:} false; then :
8555   $as_echo_n "(cached) " >&6
8556 else
8557   case $NAWK in
8558   [\\/]* | ?:[\\/]*)
8559   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8560   ;;
8561   *)
8562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563 for as_dir in $PATH
8564 do
8565   IFS=$as_save_IFS
8566   test -z "$as_dir" && as_dir=.
8567     for ac_exec_ext in '' $ac_executable_extensions; do
8568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571     break 2
8572   fi
8573 done
8574   done
8575 IFS=$as_save_IFS
8576 
8577   ;;
8578 esac
8579 fi
8580 NAWK=$ac_cv_path_NAWK
8581 if test -n "$NAWK"; then
8582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8583 $as_echo "$NAWK" >&6; }
8584 else
8585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586 $as_echo "no" >&6; }
8587 fi
8588 
8589 
8590   test -n "$NAWK" && break
8591 done
8592 
8593   else
8594     # The variable is set, but is it from the command line or the environment?
8595 
8596     # Try to remove the string !NAWK! from our list.
8597     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8598     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8599       # If it failed, the variable was not from the command line. Ignore it,
8600       # but warn the user (except for BASH, which is always set by the calling BASH).
8601       if test "xNAWK" != xBASH; then
8602         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8603 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8604       fi
8605       # Try to locate tool using the code snippet
8606       for ac_prog in nawk gawk awk
8607 do
8608   # Extract the first word of "$ac_prog", so it can be a program name with args.
8609 set dummy $ac_prog; ac_word=$2
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611 $as_echo_n "checking for $ac_word... " >&6; }
8612 if ${ac_cv_path_NAWK+:} false; then :
8613   $as_echo_n "(cached) " >&6
8614 else
8615   case $NAWK in
8616   [\\/]* | ?:[\\/]*)
8617   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8618   ;;
8619   *)
8620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621 for as_dir in $PATH
8622 do
8623   IFS=$as_save_IFS
8624   test -z "$as_dir" && as_dir=.
8625     for ac_exec_ext in '' $ac_executable_extensions; do
8626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629     break 2
8630   fi
8631 done
8632   done
8633 IFS=$as_save_IFS
8634 
8635   ;;
8636 esac
8637 fi
8638 NAWK=$ac_cv_path_NAWK
8639 if test -n "$NAWK"; then
8640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8641 $as_echo "$NAWK" >&6; }
8642 else
8643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644 $as_echo "no" >&6; }
8645 fi
8646 
8647 
8648   test -n "$NAWK" && break
8649 done
8650 
8651     else
8652       # If it succeeded, then it was overridden by the user. We will use it
8653       # for the tool.
8654 
8655       # First remove it from the list of overridden variables, so we can test
8656       # for unknown variables in the end.
8657       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8658 
8659       # Check if the provided tool contains a complete path.
8660       tool_specified="$NAWK"
8661       tool_basename="${tool_specified##*/}"
8662       if test "x$tool_basename" = "x$tool_specified"; then
8663         # A command without a complete path is provided, search $PATH.
8664         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8665 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8666         # Extract the first word of "$tool_basename", so it can be a program name with args.
8667 set dummy $tool_basename; ac_word=$2
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8669 $as_echo_n "checking for $ac_word... " >&6; }
8670 if ${ac_cv_path_NAWK+:} false; then :
8671   $as_echo_n "(cached) " >&6
8672 else
8673   case $NAWK in
8674   [\\/]* | ?:[\\/]*)
8675   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8676   ;;
8677   *)
8678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679 for as_dir in $PATH
8680 do
8681   IFS=$as_save_IFS
8682   test -z "$as_dir" && as_dir=.
8683     for ac_exec_ext in '' $ac_executable_extensions; do
8684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8687     break 2
8688   fi
8689 done
8690   done
8691 IFS=$as_save_IFS
8692 
8693   ;;
8694 esac
8695 fi
8696 NAWK=$ac_cv_path_NAWK
8697 if test -n "$NAWK"; then
8698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8699 $as_echo "$NAWK" >&6; }
8700 else
8701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702 $as_echo "no" >&6; }
8703 fi
8704 
8705 
8706         if test "x$NAWK" = x; then
8707           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8708         fi
8709       else
8710         # Otherwise we believe it is a complete path. Use it as it is.
8711         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8712 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8713         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8714 $as_echo_n "checking for NAWK... " >&6; }
8715         if test ! -x "$tool_specified"; then
8716           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8717 $as_echo "not found" >&6; }
8718           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8719         fi
8720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8721 $as_echo "$tool_specified" >&6; }
8722       fi
8723     fi
8724   fi
8725 
8726 
8727 
8728   if test "x$NAWK" = x; then
8729     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8730   fi
8731 
8732 
8733 
8734 
8735 
8736   # Publish this variable in the help.
8737 
8738 
8739   if test "x$PRINTF" = x; then
8740     # The variable is not set by user, try to locate tool using the code snippet
8741     for ac_prog in printf
8742 do
8743   # Extract the first word of "$ac_prog", so it can be a program name with args.
8744 set dummy $ac_prog; ac_word=$2
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8746 $as_echo_n "checking for $ac_word... " >&6; }
8747 if ${ac_cv_path_PRINTF+:} false; then :
8748   $as_echo_n "(cached) " >&6
8749 else
8750   case $PRINTF in
8751   [\\/]* | ?:[\\/]*)
8752   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8753   ;;
8754   *)
8755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8756 for as_dir in $PATH
8757 do
8758   IFS=$as_save_IFS
8759   test -z "$as_dir" && as_dir=.
8760     for ac_exec_ext in '' $ac_executable_extensions; do
8761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8762     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8764     break 2
8765   fi
8766 done
8767   done
8768 IFS=$as_save_IFS
8769 
8770   ;;
8771 esac
8772 fi
8773 PRINTF=$ac_cv_path_PRINTF
8774 if test -n "$PRINTF"; then
8775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8776 $as_echo "$PRINTF" >&6; }
8777 else
8778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779 $as_echo "no" >&6; }
8780 fi
8781 
8782 
8783   test -n "$PRINTF" && break
8784 done
8785 
8786   else
8787     # The variable is set, but is it from the command line or the environment?
8788 
8789     # Try to remove the string !PRINTF! from our list.
8790     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8791     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8792       # If it failed, the variable was not from the command line. Ignore it,
8793       # but warn the user (except for BASH, which is always set by the calling BASH).
8794       if test "xPRINTF" != xBASH; then
8795         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8796 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8797       fi
8798       # Try to locate tool using the code snippet
8799       for ac_prog in printf
8800 do
8801   # Extract the first word of "$ac_prog", so it can be a program name with args.
8802 set dummy $ac_prog; ac_word=$2
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8804 $as_echo_n "checking for $ac_word... " >&6; }
8805 if ${ac_cv_path_PRINTF+:} false; then :
8806   $as_echo_n "(cached) " >&6
8807 else
8808   case $PRINTF in
8809   [\\/]* | ?:[\\/]*)
8810   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8811   ;;
8812   *)
8813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8814 for as_dir in $PATH
8815 do
8816   IFS=$as_save_IFS
8817   test -z "$as_dir" && as_dir=.
8818     for ac_exec_ext in '' $ac_executable_extensions; do
8819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8820     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8822     break 2
8823   fi
8824 done
8825   done
8826 IFS=$as_save_IFS
8827 
8828   ;;
8829 esac
8830 fi
8831 PRINTF=$ac_cv_path_PRINTF
8832 if test -n "$PRINTF"; then
8833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8834 $as_echo "$PRINTF" >&6; }
8835 else
8836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837 $as_echo "no" >&6; }
8838 fi
8839 
8840 
8841   test -n "$PRINTF" && break
8842 done
8843 
8844     else
8845       # If it succeeded, then it was overridden by the user. We will use it
8846       # for the tool.
8847 
8848       # First remove it from the list of overridden variables, so we can test
8849       # for unknown variables in the end.
8850       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8851 
8852       # Check if the provided tool contains a complete path.
8853       tool_specified="$PRINTF"
8854       tool_basename="${tool_specified##*/}"
8855       if test "x$tool_basename" = "x$tool_specified"; then
8856         # A command without a complete path is provided, search $PATH.
8857         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8858 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8859         # Extract the first word of "$tool_basename", so it can be a program name with args.
8860 set dummy $tool_basename; ac_word=$2
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862 $as_echo_n "checking for $ac_word... " >&6; }
8863 if ${ac_cv_path_PRINTF+:} false; then :
8864   $as_echo_n "(cached) " >&6
8865 else
8866   case $PRINTF in
8867   [\\/]* | ?:[\\/]*)
8868   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8869   ;;
8870   *)
8871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872 for as_dir in $PATH
8873 do
8874   IFS=$as_save_IFS
8875   test -z "$as_dir" && as_dir=.
8876     for ac_exec_ext in '' $ac_executable_extensions; do
8877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8878     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880     break 2
8881   fi
8882 done
8883   done
8884 IFS=$as_save_IFS
8885 
8886   ;;
8887 esac
8888 fi
8889 PRINTF=$ac_cv_path_PRINTF
8890 if test -n "$PRINTF"; then
8891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8892 $as_echo "$PRINTF" >&6; }
8893 else
8894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8895 $as_echo "no" >&6; }
8896 fi
8897 
8898 
8899         if test "x$PRINTF" = x; then
8900           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8901         fi
8902       else
8903         # Otherwise we believe it is a complete path. Use it as it is.
8904         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8905 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8906         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8907 $as_echo_n "checking for PRINTF... " >&6; }
8908         if test ! -x "$tool_specified"; then
8909           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8910 $as_echo "not found" >&6; }
8911           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8912         fi
8913         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8914 $as_echo "$tool_specified" >&6; }
8915       fi
8916     fi
8917   fi
8918 
8919 
8920 
8921   if test "x$PRINTF" = x; then
8922     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8923   fi
8924 
8925 
8926 
8927 
8928 
8929   # Publish this variable in the help.
8930 
8931 
8932   if test "x$RM" = x; then
8933     # The variable is not set by user, try to locate tool using the code snippet
8934     for ac_prog in rm
8935 do
8936   # Extract the first word of "$ac_prog", so it can be a program name with args.
8937 set dummy $ac_prog; ac_word=$2
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939 $as_echo_n "checking for $ac_word... " >&6; }
8940 if ${ac_cv_path_RM+:} false; then :
8941   $as_echo_n "(cached) " >&6
8942 else
8943   case $RM in
8944   [\\/]* | ?:[\\/]*)
8945   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8946   ;;
8947   *)
8948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949 for as_dir in $PATH
8950 do
8951   IFS=$as_save_IFS
8952   test -z "$as_dir" && as_dir=.
8953     for ac_exec_ext in '' $ac_executable_extensions; do
8954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8955     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957     break 2
8958   fi
8959 done
8960   done
8961 IFS=$as_save_IFS
8962 
8963   ;;
8964 esac
8965 fi
8966 RM=$ac_cv_path_RM
8967 if test -n "$RM"; then
8968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8969 $as_echo "$RM" >&6; }
8970 else
8971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972 $as_echo "no" >&6; }
8973 fi
8974 
8975 
8976   test -n "$RM" && break
8977 done
8978 
8979   else
8980     # The variable is set, but is it from the command line or the environment?
8981 
8982     # Try to remove the string !RM! from our list.
8983     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8984     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8985       # If it failed, the variable was not from the command line. Ignore it,
8986       # but warn the user (except for BASH, which is always set by the calling BASH).
8987       if test "xRM" != xBASH; then
8988         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8989 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8990       fi
8991       # Try to locate tool using the code snippet
8992       for ac_prog in rm
8993 do
8994   # Extract the first word of "$ac_prog", so it can be a program name with args.
8995 set dummy $ac_prog; ac_word=$2
8996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8997 $as_echo_n "checking for $ac_word... " >&6; }
8998 if ${ac_cv_path_RM+:} false; then :
8999   $as_echo_n "(cached) " >&6
9000 else
9001   case $RM in
9002   [\\/]* | ?:[\\/]*)
9003   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9004   ;;
9005   *)
9006   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9007 for as_dir in $PATH
9008 do
9009   IFS=$as_save_IFS
9010   test -z "$as_dir" && as_dir=.
9011     for ac_exec_ext in '' $ac_executable_extensions; do
9012   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9013     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9014     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9015     break 2
9016   fi
9017 done
9018   done
9019 IFS=$as_save_IFS
9020 
9021   ;;
9022 esac
9023 fi
9024 RM=$ac_cv_path_RM
9025 if test -n "$RM"; then
9026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9027 $as_echo "$RM" >&6; }
9028 else
9029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9030 $as_echo "no" >&6; }
9031 fi
9032 
9033 
9034   test -n "$RM" && break
9035 done
9036 
9037     else
9038       # If it succeeded, then it was overridden by the user. We will use it
9039       # for the tool.
9040 
9041       # First remove it from the list of overridden variables, so we can test
9042       # for unknown variables in the end.
9043       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9044 
9045       # Check if the provided tool contains a complete path.
9046       tool_specified="$RM"
9047       tool_basename="${tool_specified##*/}"
9048       if test "x$tool_basename" = "x$tool_specified"; then
9049         # A command without a complete path is provided, search $PATH.
9050         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9051 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9052         # Extract the first word of "$tool_basename", so it can be a program name with args.
9053 set dummy $tool_basename; ac_word=$2
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055 $as_echo_n "checking for $ac_word... " >&6; }
9056 if ${ac_cv_path_RM+:} false; then :
9057   $as_echo_n "(cached) " >&6
9058 else
9059   case $RM in
9060   [\\/]* | ?:[\\/]*)
9061   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9062   ;;
9063   *)
9064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065 for as_dir in $PATH
9066 do
9067   IFS=$as_save_IFS
9068   test -z "$as_dir" && as_dir=.
9069     for ac_exec_ext in '' $ac_executable_extensions; do
9070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9071     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9073     break 2
9074   fi
9075 done
9076   done
9077 IFS=$as_save_IFS
9078 
9079   ;;
9080 esac
9081 fi
9082 RM=$ac_cv_path_RM
9083 if test -n "$RM"; then
9084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9085 $as_echo "$RM" >&6; }
9086 else
9087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088 $as_echo "no" >&6; }
9089 fi
9090 
9091 
9092         if test "x$RM" = x; then
9093           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9094         fi
9095       else
9096         # Otherwise we believe it is a complete path. Use it as it is.
9097         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9098 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9099         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9100 $as_echo_n "checking for RM... " >&6; }
9101         if test ! -x "$tool_specified"; then
9102           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9103 $as_echo "not found" >&6; }
9104           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9105         fi
9106         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9107 $as_echo "$tool_specified" >&6; }
9108       fi
9109     fi
9110   fi
9111 
9112 
9113 
9114   if test "x$RM" = x; then
9115     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9116   fi
9117 
9118 
9119 
9120 
9121 
9122   # Publish this variable in the help.
9123 
9124 
9125   if test "x$SH" = x; then
9126     # The variable is not set by user, try to locate tool using the code snippet
9127     for ac_prog in sh
9128 do
9129   # Extract the first word of "$ac_prog", so it can be a program name with args.
9130 set dummy $ac_prog; ac_word=$2
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9132 $as_echo_n "checking for $ac_word... " >&6; }
9133 if ${ac_cv_path_SH+:} false; then :
9134   $as_echo_n "(cached) " >&6
9135 else
9136   case $SH in
9137   [\\/]* | ?:[\\/]*)
9138   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9139   ;;
9140   *)
9141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9142 for as_dir in $PATH
9143 do
9144   IFS=$as_save_IFS
9145   test -z "$as_dir" && as_dir=.
9146     for ac_exec_ext in '' $ac_executable_extensions; do
9147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9148     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9150     break 2
9151   fi
9152 done
9153   done
9154 IFS=$as_save_IFS
9155 
9156   ;;
9157 esac
9158 fi
9159 SH=$ac_cv_path_SH
9160 if test -n "$SH"; then
9161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9162 $as_echo "$SH" >&6; }
9163 else
9164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165 $as_echo "no" >&6; }
9166 fi
9167 
9168 
9169   test -n "$SH" && break
9170 done
9171 
9172   else
9173     # The variable is set, but is it from the command line or the environment?
9174 
9175     # Try to remove the string !SH! from our list.
9176     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9177     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9178       # If it failed, the variable was not from the command line. Ignore it,
9179       # but warn the user (except for BASH, which is always set by the calling BASH).
9180       if test "xSH" != xBASH; then
9181         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9182 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9183       fi
9184       # Try to locate tool using the code snippet
9185       for ac_prog in sh
9186 do
9187   # Extract the first word of "$ac_prog", so it can be a program name with args.
9188 set dummy $ac_prog; ac_word=$2
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9190 $as_echo_n "checking for $ac_word... " >&6; }
9191 if ${ac_cv_path_SH+:} false; then :
9192   $as_echo_n "(cached) " >&6
9193 else
9194   case $SH in
9195   [\\/]* | ?:[\\/]*)
9196   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9197   ;;
9198   *)
9199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9200 for as_dir in $PATH
9201 do
9202   IFS=$as_save_IFS
9203   test -z "$as_dir" && as_dir=.
9204     for ac_exec_ext in '' $ac_executable_extensions; do
9205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9206     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9208     break 2
9209   fi
9210 done
9211   done
9212 IFS=$as_save_IFS
9213 
9214   ;;
9215 esac
9216 fi
9217 SH=$ac_cv_path_SH
9218 if test -n "$SH"; then
9219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9220 $as_echo "$SH" >&6; }
9221 else
9222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9223 $as_echo "no" >&6; }
9224 fi
9225 
9226 
9227   test -n "$SH" && break
9228 done
9229 
9230     else
9231       # If it succeeded, then it was overridden by the user. We will use it
9232       # for the tool.
9233 
9234       # First remove it from the list of overridden variables, so we can test
9235       # for unknown variables in the end.
9236       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9237 
9238       # Check if the provided tool contains a complete path.
9239       tool_specified="$SH"
9240       tool_basename="${tool_specified##*/}"
9241       if test "x$tool_basename" = "x$tool_specified"; then
9242         # A command without a complete path is provided, search $PATH.
9243         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9244 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9245         # Extract the first word of "$tool_basename", so it can be a program name with args.
9246 set dummy $tool_basename; ac_word=$2
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248 $as_echo_n "checking for $ac_word... " >&6; }
9249 if ${ac_cv_path_SH+:} false; then :
9250   $as_echo_n "(cached) " >&6
9251 else
9252   case $SH in
9253   [\\/]* | ?:[\\/]*)
9254   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9255   ;;
9256   *)
9257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258 for as_dir in $PATH
9259 do
9260   IFS=$as_save_IFS
9261   test -z "$as_dir" && as_dir=.
9262     for ac_exec_ext in '' $ac_executable_extensions; do
9263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266     break 2
9267   fi
9268 done
9269   done
9270 IFS=$as_save_IFS
9271 
9272   ;;
9273 esac
9274 fi
9275 SH=$ac_cv_path_SH
9276 if test -n "$SH"; then
9277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9278 $as_echo "$SH" >&6; }
9279 else
9280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281 $as_echo "no" >&6; }
9282 fi
9283 
9284 
9285         if test "x$SH" = x; then
9286           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9287         fi
9288       else
9289         # Otherwise we believe it is a complete path. Use it as it is.
9290         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9291 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9293 $as_echo_n "checking for SH... " >&6; }
9294         if test ! -x "$tool_specified"; then
9295           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9296 $as_echo "not found" >&6; }
9297           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9298         fi
9299         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9300 $as_echo "$tool_specified" >&6; }
9301       fi
9302     fi
9303   fi
9304 
9305 
9306 
9307   if test "x$SH" = x; then
9308     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9309   fi
9310 
9311 
9312 
9313 
9314 
9315   # Publish this variable in the help.
9316 
9317 
9318   if test "x$SORT" = x; then
9319     # The variable is not set by user, try to locate tool using the code snippet
9320     for ac_prog in sort
9321 do
9322   # Extract the first word of "$ac_prog", so it can be a program name with args.
9323 set dummy $ac_prog; ac_word=$2
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9325 $as_echo_n "checking for $ac_word... " >&6; }
9326 if ${ac_cv_path_SORT+:} false; then :
9327   $as_echo_n "(cached) " >&6
9328 else
9329   case $SORT in
9330   [\\/]* | ?:[\\/]*)
9331   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9332   ;;
9333   *)
9334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9335 for as_dir in $PATH
9336 do
9337   IFS=$as_save_IFS
9338   test -z "$as_dir" && as_dir=.
9339     for ac_exec_ext in '' $ac_executable_extensions; do
9340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9341     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9343     break 2
9344   fi
9345 done
9346   done
9347 IFS=$as_save_IFS
9348 
9349   ;;
9350 esac
9351 fi
9352 SORT=$ac_cv_path_SORT
9353 if test -n "$SORT"; then
9354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9355 $as_echo "$SORT" >&6; }
9356 else
9357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9358 $as_echo "no" >&6; }
9359 fi
9360 
9361 
9362   test -n "$SORT" && break
9363 done
9364 
9365   else
9366     # The variable is set, but is it from the command line or the environment?
9367 
9368     # Try to remove the string !SORT! from our list.
9369     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9370     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9371       # If it failed, the variable was not from the command line. Ignore it,
9372       # but warn the user (except for BASH, which is always set by the calling BASH).
9373       if test "xSORT" != xBASH; then
9374         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9375 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9376       fi
9377       # Try to locate tool using the code snippet
9378       for ac_prog in sort
9379 do
9380   # Extract the first word of "$ac_prog", so it can be a program name with args.
9381 set dummy $ac_prog; ac_word=$2
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383 $as_echo_n "checking for $ac_word... " >&6; }
9384 if ${ac_cv_path_SORT+:} false; then :
9385   $as_echo_n "(cached) " >&6
9386 else
9387   case $SORT in
9388   [\\/]* | ?:[\\/]*)
9389   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9390   ;;
9391   *)
9392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393 for as_dir in $PATH
9394 do
9395   IFS=$as_save_IFS
9396   test -z "$as_dir" && as_dir=.
9397     for ac_exec_ext in '' $ac_executable_extensions; do
9398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401     break 2
9402   fi
9403 done
9404   done
9405 IFS=$as_save_IFS
9406 
9407   ;;
9408 esac
9409 fi
9410 SORT=$ac_cv_path_SORT
9411 if test -n "$SORT"; then
9412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9413 $as_echo "$SORT" >&6; }
9414 else
9415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416 $as_echo "no" >&6; }
9417 fi
9418 
9419 
9420   test -n "$SORT" && break
9421 done
9422 
9423     else
9424       # If it succeeded, then it was overridden by the user. We will use it
9425       # for the tool.
9426 
9427       # First remove it from the list of overridden variables, so we can test
9428       # for unknown variables in the end.
9429       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9430 
9431       # Check if the provided tool contains a complete path.
9432       tool_specified="$SORT"
9433       tool_basename="${tool_specified##*/}"
9434       if test "x$tool_basename" = "x$tool_specified"; then
9435         # A command without a complete path is provided, search $PATH.
9436         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9437 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9438         # Extract the first word of "$tool_basename", so it can be a program name with args.
9439 set dummy $tool_basename; ac_word=$2
9440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9441 $as_echo_n "checking for $ac_word... " >&6; }
9442 if ${ac_cv_path_SORT+:} false; then :
9443   $as_echo_n "(cached) " >&6
9444 else
9445   case $SORT in
9446   [\\/]* | ?:[\\/]*)
9447   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9448   ;;
9449   *)
9450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451 for as_dir in $PATH
9452 do
9453   IFS=$as_save_IFS
9454   test -z "$as_dir" && as_dir=.
9455     for ac_exec_ext in '' $ac_executable_extensions; do
9456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9457     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9459     break 2
9460   fi
9461 done
9462   done
9463 IFS=$as_save_IFS
9464 
9465   ;;
9466 esac
9467 fi
9468 SORT=$ac_cv_path_SORT
9469 if test -n "$SORT"; then
9470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9471 $as_echo "$SORT" >&6; }
9472 else
9473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474 $as_echo "no" >&6; }
9475 fi
9476 
9477 
9478         if test "x$SORT" = x; then
9479           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9480         fi
9481       else
9482         # Otherwise we believe it is a complete path. Use it as it is.
9483         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9484 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9485         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9486 $as_echo_n "checking for SORT... " >&6; }
9487         if test ! -x "$tool_specified"; then
9488           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9489 $as_echo "not found" >&6; }
9490           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9491         fi
9492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9493 $as_echo "$tool_specified" >&6; }
9494       fi
9495     fi
9496   fi
9497 
9498 
9499 
9500   if test "x$SORT" = x; then
9501     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9502   fi
9503 
9504 
9505 
9506 
9507 
9508   # Publish this variable in the help.
9509 
9510 
9511   if test "x$TAIL" = x; then
9512     # The variable is not set by user, try to locate tool using the code snippet
9513     for ac_prog in tail
9514 do
9515   # Extract the first word of "$ac_prog", so it can be a program name with args.
9516 set dummy $ac_prog; ac_word=$2
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9518 $as_echo_n "checking for $ac_word... " >&6; }
9519 if ${ac_cv_path_TAIL+:} false; then :
9520   $as_echo_n "(cached) " >&6
9521 else
9522   case $TAIL in
9523   [\\/]* | ?:[\\/]*)
9524   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9525   ;;
9526   *)
9527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9528 for as_dir in $PATH
9529 do
9530   IFS=$as_save_IFS
9531   test -z "$as_dir" && as_dir=.
9532     for ac_exec_ext in '' $ac_executable_extensions; do
9533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9534     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9536     break 2
9537   fi
9538 done
9539   done
9540 IFS=$as_save_IFS
9541 
9542   ;;
9543 esac
9544 fi
9545 TAIL=$ac_cv_path_TAIL
9546 if test -n "$TAIL"; then
9547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9548 $as_echo "$TAIL" >&6; }
9549 else
9550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551 $as_echo "no" >&6; }
9552 fi
9553 
9554 
9555   test -n "$TAIL" && break
9556 done
9557 
9558   else
9559     # The variable is set, but is it from the command line or the environment?
9560 
9561     # Try to remove the string !TAIL! from our list.
9562     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9563     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9564       # If it failed, the variable was not from the command line. Ignore it,
9565       # but warn the user (except for BASH, which is always set by the calling BASH).
9566       if test "xTAIL" != xBASH; then
9567         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9568 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9569       fi
9570       # Try to locate tool using the code snippet
9571       for ac_prog in tail
9572 do
9573   # Extract the first word of "$ac_prog", so it can be a program name with args.
9574 set dummy $ac_prog; ac_word=$2
9575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576 $as_echo_n "checking for $ac_word... " >&6; }
9577 if ${ac_cv_path_TAIL+:} false; then :
9578   $as_echo_n "(cached) " >&6
9579 else
9580   case $TAIL in
9581   [\\/]* | ?:[\\/]*)
9582   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9583   ;;
9584   *)
9585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586 for as_dir in $PATH
9587 do
9588   IFS=$as_save_IFS
9589   test -z "$as_dir" && as_dir=.
9590     for ac_exec_ext in '' $ac_executable_extensions; do
9591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594     break 2
9595   fi
9596 done
9597   done
9598 IFS=$as_save_IFS
9599 
9600   ;;
9601 esac
9602 fi
9603 TAIL=$ac_cv_path_TAIL
9604 if test -n "$TAIL"; then
9605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9606 $as_echo "$TAIL" >&6; }
9607 else
9608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609 $as_echo "no" >&6; }
9610 fi
9611 
9612 
9613   test -n "$TAIL" && break
9614 done
9615 
9616     else
9617       # If it succeeded, then it was overridden by the user. We will use it
9618       # for the tool.
9619 
9620       # First remove it from the list of overridden variables, so we can test
9621       # for unknown variables in the end.
9622       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9623 
9624       # Check if the provided tool contains a complete path.
9625       tool_specified="$TAIL"
9626       tool_basename="${tool_specified##*/}"
9627       if test "x$tool_basename" = "x$tool_specified"; then
9628         # A command without a complete path is provided, search $PATH.
9629         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9630 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9631         # Extract the first word of "$tool_basename", so it can be a program name with args.
9632 set dummy $tool_basename; ac_word=$2
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634 $as_echo_n "checking for $ac_word... " >&6; }
9635 if ${ac_cv_path_TAIL+:} false; then :
9636   $as_echo_n "(cached) " >&6
9637 else
9638   case $TAIL in
9639   [\\/]* | ?:[\\/]*)
9640   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9641   ;;
9642   *)
9643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644 for as_dir in $PATH
9645 do
9646   IFS=$as_save_IFS
9647   test -z "$as_dir" && as_dir=.
9648     for ac_exec_ext in '' $ac_executable_extensions; do
9649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652     break 2
9653   fi
9654 done
9655   done
9656 IFS=$as_save_IFS
9657 
9658   ;;
9659 esac
9660 fi
9661 TAIL=$ac_cv_path_TAIL
9662 if test -n "$TAIL"; then
9663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9664 $as_echo "$TAIL" >&6; }
9665 else
9666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667 $as_echo "no" >&6; }
9668 fi
9669 
9670 
9671         if test "x$TAIL" = x; then
9672           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673         fi
9674       else
9675         # Otherwise we believe it is a complete path. Use it as it is.
9676         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9677 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9678         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9679 $as_echo_n "checking for TAIL... " >&6; }
9680         if test ! -x "$tool_specified"; then
9681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682 $as_echo "not found" >&6; }
9683           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9684         fi
9685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686 $as_echo "$tool_specified" >&6; }
9687       fi
9688     fi
9689   fi
9690 
9691 
9692 
9693   if test "x$TAIL" = x; then
9694     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9695   fi
9696 
9697 
9698 
9699 
9700 
9701   # Publish this variable in the help.
9702 
9703 
9704   if test "x$TAR" = x; then
9705     # The variable is not set by user, try to locate tool using the code snippet
9706     for ac_prog in tar
9707 do
9708   # Extract the first word of "$ac_prog", so it can be a program name with args.
9709 set dummy $ac_prog; ac_word=$2
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711 $as_echo_n "checking for $ac_word... " >&6; }
9712 if ${ac_cv_path_TAR+:} false; then :
9713   $as_echo_n "(cached) " >&6
9714 else
9715   case $TAR in
9716   [\\/]* | ?:[\\/]*)
9717   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9718   ;;
9719   *)
9720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721 for as_dir in $PATH
9722 do
9723   IFS=$as_save_IFS
9724   test -z "$as_dir" && as_dir=.
9725     for ac_exec_ext in '' $ac_executable_extensions; do
9726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729     break 2
9730   fi
9731 done
9732   done
9733 IFS=$as_save_IFS
9734 
9735   ;;
9736 esac
9737 fi
9738 TAR=$ac_cv_path_TAR
9739 if test -n "$TAR"; then
9740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9741 $as_echo "$TAR" >&6; }
9742 else
9743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744 $as_echo "no" >&6; }
9745 fi
9746 
9747 
9748   test -n "$TAR" && break
9749 done
9750 
9751   else
9752     # The variable is set, but is it from the command line or the environment?
9753 
9754     # Try to remove the string !TAR! from our list.
9755     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9756     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9757       # If it failed, the variable was not from the command line. Ignore it,
9758       # but warn the user (except for BASH, which is always set by the calling BASH).
9759       if test "xTAR" != xBASH; then
9760         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9761 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9762       fi
9763       # Try to locate tool using the code snippet
9764       for ac_prog in tar
9765 do
9766   # Extract the first word of "$ac_prog", so it can be a program name with args.
9767 set dummy $ac_prog; ac_word=$2
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769 $as_echo_n "checking for $ac_word... " >&6; }
9770 if ${ac_cv_path_TAR+:} false; then :
9771   $as_echo_n "(cached) " >&6
9772 else
9773   case $TAR in
9774   [\\/]* | ?:[\\/]*)
9775   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9776   ;;
9777   *)
9778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779 for as_dir in $PATH
9780 do
9781   IFS=$as_save_IFS
9782   test -z "$as_dir" && as_dir=.
9783     for ac_exec_ext in '' $ac_executable_extensions; do
9784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787     break 2
9788   fi
9789 done
9790   done
9791 IFS=$as_save_IFS
9792 
9793   ;;
9794 esac
9795 fi
9796 TAR=$ac_cv_path_TAR
9797 if test -n "$TAR"; then
9798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9799 $as_echo "$TAR" >&6; }
9800 else
9801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802 $as_echo "no" >&6; }
9803 fi
9804 
9805 
9806   test -n "$TAR" && break
9807 done
9808 
9809     else
9810       # If it succeeded, then it was overridden by the user. We will use it
9811       # for the tool.
9812 
9813       # First remove it from the list of overridden variables, so we can test
9814       # for unknown variables in the end.
9815       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9816 
9817       # Check if the provided tool contains a complete path.
9818       tool_specified="$TAR"
9819       tool_basename="${tool_specified##*/}"
9820       if test "x$tool_basename" = "x$tool_specified"; then
9821         # A command without a complete path is provided, search $PATH.
9822         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9823 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9824         # Extract the first word of "$tool_basename", so it can be a program name with args.
9825 set dummy $tool_basename; ac_word=$2
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9827 $as_echo_n "checking for $ac_word... " >&6; }
9828 if ${ac_cv_path_TAR+:} false; then :
9829   $as_echo_n "(cached) " >&6
9830 else
9831   case $TAR in
9832   [\\/]* | ?:[\\/]*)
9833   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9834   ;;
9835   *)
9836   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9837 for as_dir in $PATH
9838 do
9839   IFS=$as_save_IFS
9840   test -z "$as_dir" && as_dir=.
9841     for ac_exec_ext in '' $ac_executable_extensions; do
9842   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9843     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9845     break 2
9846   fi
9847 done
9848   done
9849 IFS=$as_save_IFS
9850 
9851   ;;
9852 esac
9853 fi
9854 TAR=$ac_cv_path_TAR
9855 if test -n "$TAR"; then
9856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9857 $as_echo "$TAR" >&6; }
9858 else
9859   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9860 $as_echo "no" >&6; }
9861 fi
9862 
9863 
9864         if test "x$TAR" = x; then
9865           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9866         fi
9867       else
9868         # Otherwise we believe it is a complete path. Use it as it is.
9869         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9870 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9871         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9872 $as_echo_n "checking for TAR... " >&6; }
9873         if test ! -x "$tool_specified"; then
9874           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9875 $as_echo "not found" >&6; }
9876           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9877         fi
9878         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9879 $as_echo "$tool_specified" >&6; }
9880       fi
9881     fi
9882   fi
9883 
9884 
9885 
9886   if test "x$TAR" = x; then
9887     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9888   fi
9889 
9890 
9891 
9892 
9893 
9894   # Publish this variable in the help.
9895 
9896 
9897   if test "x$TEE" = x; then
9898     # The variable is not set by user, try to locate tool using the code snippet
9899     for ac_prog in tee
9900 do
9901   # Extract the first word of "$ac_prog", so it can be a program name with args.
9902 set dummy $ac_prog; ac_word=$2
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9904 $as_echo_n "checking for $ac_word... " >&6; }
9905 if ${ac_cv_path_TEE+:} false; then :
9906   $as_echo_n "(cached) " >&6
9907 else
9908   case $TEE in
9909   [\\/]* | ?:[\\/]*)
9910   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9911   ;;
9912   *)
9913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9914 for as_dir in $PATH
9915 do
9916   IFS=$as_save_IFS
9917   test -z "$as_dir" && as_dir=.
9918     for ac_exec_ext in '' $ac_executable_extensions; do
9919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9920     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9922     break 2
9923   fi
9924 done
9925   done
9926 IFS=$as_save_IFS
9927 
9928   ;;
9929 esac
9930 fi
9931 TEE=$ac_cv_path_TEE
9932 if test -n "$TEE"; then
9933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9934 $as_echo "$TEE" >&6; }
9935 else
9936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937 $as_echo "no" >&6; }
9938 fi
9939 
9940 
9941   test -n "$TEE" && break
9942 done
9943 
9944   else
9945     # The variable is set, but is it from the command line or the environment?
9946 
9947     # Try to remove the string !TEE! from our list.
9948     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9949     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9950       # If it failed, the variable was not from the command line. Ignore it,
9951       # but warn the user (except for BASH, which is always set by the calling BASH).
9952       if test "xTEE" != xBASH; then
9953         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9954 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9955       fi
9956       # Try to locate tool using the code snippet
9957       for ac_prog in tee
9958 do
9959   # Extract the first word of "$ac_prog", so it can be a program name with args.
9960 set dummy $ac_prog; ac_word=$2
9961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9962 $as_echo_n "checking for $ac_word... " >&6; }
9963 if ${ac_cv_path_TEE+:} false; then :
9964   $as_echo_n "(cached) " >&6
9965 else
9966   case $TEE in
9967   [\\/]* | ?:[\\/]*)
9968   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9969   ;;
9970   *)
9971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9972 for as_dir in $PATH
9973 do
9974   IFS=$as_save_IFS
9975   test -z "$as_dir" && as_dir=.
9976     for ac_exec_ext in '' $ac_executable_extensions; do
9977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9978     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9980     break 2
9981   fi
9982 done
9983   done
9984 IFS=$as_save_IFS
9985 
9986   ;;
9987 esac
9988 fi
9989 TEE=$ac_cv_path_TEE
9990 if test -n "$TEE"; then
9991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9992 $as_echo "$TEE" >&6; }
9993 else
9994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995 $as_echo "no" >&6; }
9996 fi
9997 
9998 
9999   test -n "$TEE" && break
10000 done
10001 
10002     else
10003       # If it succeeded, then it was overridden by the user. We will use it
10004       # for the tool.
10005 
10006       # First remove it from the list of overridden variables, so we can test
10007       # for unknown variables in the end.
10008       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10009 
10010       # Check if the provided tool contains a complete path.
10011       tool_specified="$TEE"
10012       tool_basename="${tool_specified##*/}"
10013       if test "x$tool_basename" = "x$tool_specified"; then
10014         # A command without a complete path is provided, search $PATH.
10015         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10016 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10017         # Extract the first word of "$tool_basename", so it can be a program name with args.
10018 set dummy $tool_basename; ac_word=$2
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020 $as_echo_n "checking for $ac_word... " >&6; }
10021 if ${ac_cv_path_TEE+:} false; then :
10022   $as_echo_n "(cached) " >&6
10023 else
10024   case $TEE in
10025   [\\/]* | ?:[\\/]*)
10026   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10027   ;;
10028   *)
10029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030 for as_dir in $PATH
10031 do
10032   IFS=$as_save_IFS
10033   test -z "$as_dir" && as_dir=.
10034     for ac_exec_ext in '' $ac_executable_extensions; do
10035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038     break 2
10039   fi
10040 done
10041   done
10042 IFS=$as_save_IFS
10043 
10044   ;;
10045 esac
10046 fi
10047 TEE=$ac_cv_path_TEE
10048 if test -n "$TEE"; then
10049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10050 $as_echo "$TEE" >&6; }
10051 else
10052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053 $as_echo "no" >&6; }
10054 fi
10055 
10056 
10057         if test "x$TEE" = x; then
10058           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10059         fi
10060       else
10061         # Otherwise we believe it is a complete path. Use it as it is.
10062         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10063 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10065 $as_echo_n "checking for TEE... " >&6; }
10066         if test ! -x "$tool_specified"; then
10067           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10068 $as_echo "not found" >&6; }
10069           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10070         fi
10071         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10072 $as_echo "$tool_specified" >&6; }
10073       fi
10074     fi
10075   fi
10076 
10077 
10078 
10079   if test "x$TEE" = x; then
10080     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10081   fi
10082 
10083 
10084 
10085 
10086 
10087   # Publish this variable in the help.
10088 
10089 
10090   if test "x$TOUCH" = x; then
10091     # The variable is not set by user, try to locate tool using the code snippet
10092     for ac_prog in touch
10093 do
10094   # Extract the first word of "$ac_prog", so it can be a program name with args.
10095 set dummy $ac_prog; ac_word=$2
10096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097 $as_echo_n "checking for $ac_word... " >&6; }
10098 if ${ac_cv_path_TOUCH+:} false; then :
10099   $as_echo_n "(cached) " >&6
10100 else
10101   case $TOUCH in
10102   [\\/]* | ?:[\\/]*)
10103   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10104   ;;
10105   *)
10106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107 for as_dir in $PATH
10108 do
10109   IFS=$as_save_IFS
10110   test -z "$as_dir" && as_dir=.
10111     for ac_exec_ext in '' $ac_executable_extensions; do
10112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115     break 2
10116   fi
10117 done
10118   done
10119 IFS=$as_save_IFS
10120 
10121   ;;
10122 esac
10123 fi
10124 TOUCH=$ac_cv_path_TOUCH
10125 if test -n "$TOUCH"; then
10126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10127 $as_echo "$TOUCH" >&6; }
10128 else
10129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130 $as_echo "no" >&6; }
10131 fi
10132 
10133 
10134   test -n "$TOUCH" && break
10135 done
10136 
10137   else
10138     # The variable is set, but is it from the command line or the environment?
10139 
10140     # Try to remove the string !TOUCH! from our list.
10141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10143       # If it failed, the variable was not from the command line. Ignore it,
10144       # but warn the user (except for BASH, which is always set by the calling BASH).
10145       if test "xTOUCH" != xBASH; then
10146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10147 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10148       fi
10149       # Try to locate tool using the code snippet
10150       for ac_prog in touch
10151 do
10152   # Extract the first word of "$ac_prog", so it can be a program name with args.
10153 set dummy $ac_prog; ac_word=$2
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155 $as_echo_n "checking for $ac_word... " >&6; }
10156 if ${ac_cv_path_TOUCH+:} false; then :
10157   $as_echo_n "(cached) " >&6
10158 else
10159   case $TOUCH in
10160   [\\/]* | ?:[\\/]*)
10161   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10162   ;;
10163   *)
10164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165 for as_dir in $PATH
10166 do
10167   IFS=$as_save_IFS
10168   test -z "$as_dir" && as_dir=.
10169     for ac_exec_ext in '' $ac_executable_extensions; do
10170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10171     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173     break 2
10174   fi
10175 done
10176   done
10177 IFS=$as_save_IFS
10178 
10179   ;;
10180 esac
10181 fi
10182 TOUCH=$ac_cv_path_TOUCH
10183 if test -n "$TOUCH"; then
10184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10185 $as_echo "$TOUCH" >&6; }
10186 else
10187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188 $as_echo "no" >&6; }
10189 fi
10190 
10191 
10192   test -n "$TOUCH" && break
10193 done
10194 
10195     else
10196       # If it succeeded, then it was overridden by the user. We will use it
10197       # for the tool.
10198 
10199       # First remove it from the list of overridden variables, so we can test
10200       # for unknown variables in the end.
10201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10202 
10203       # Check if the provided tool contains a complete path.
10204       tool_specified="$TOUCH"
10205       tool_basename="${tool_specified##*/}"
10206       if test "x$tool_basename" = "x$tool_specified"; then
10207         # A command without a complete path is provided, search $PATH.
10208         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10209 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10210         # Extract the first word of "$tool_basename", so it can be a program name with args.
10211 set dummy $tool_basename; ac_word=$2
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213 $as_echo_n "checking for $ac_word... " >&6; }
10214 if ${ac_cv_path_TOUCH+:} false; then :
10215   $as_echo_n "(cached) " >&6
10216 else
10217   case $TOUCH in
10218   [\\/]* | ?:[\\/]*)
10219   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10220   ;;
10221   *)
10222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223 for as_dir in $PATH
10224 do
10225   IFS=$as_save_IFS
10226   test -z "$as_dir" && as_dir=.
10227     for ac_exec_ext in '' $ac_executable_extensions; do
10228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231     break 2
10232   fi
10233 done
10234   done
10235 IFS=$as_save_IFS
10236 
10237   ;;
10238 esac
10239 fi
10240 TOUCH=$ac_cv_path_TOUCH
10241 if test -n "$TOUCH"; then
10242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10243 $as_echo "$TOUCH" >&6; }
10244 else
10245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246 $as_echo "no" >&6; }
10247 fi
10248 
10249 
10250         if test "x$TOUCH" = x; then
10251           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10252         fi
10253       else
10254         # Otherwise we believe it is a complete path. Use it as it is.
10255         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10256 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10258 $as_echo_n "checking for TOUCH... " >&6; }
10259         if test ! -x "$tool_specified"; then
10260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10261 $as_echo "not found" >&6; }
10262           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10263         fi
10264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10265 $as_echo "$tool_specified" >&6; }
10266       fi
10267     fi
10268   fi
10269 
10270 
10271 
10272   if test "x$TOUCH" = x; then
10273     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10274   fi
10275 
10276 
10277 
10278 
10279 
10280   # Publish this variable in the help.
10281 
10282 
10283   if test "x$TR" = x; then
10284     # The variable is not set by user, try to locate tool using the code snippet
10285     for ac_prog in tr
10286 do
10287   # Extract the first word of "$ac_prog", so it can be a program name with args.
10288 set dummy $ac_prog; ac_word=$2
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290 $as_echo_n "checking for $ac_word... " >&6; }
10291 if ${ac_cv_path_TR+:} false; then :
10292   $as_echo_n "(cached) " >&6
10293 else
10294   case $TR in
10295   [\\/]* | ?:[\\/]*)
10296   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10297   ;;
10298   *)
10299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10300 for as_dir in $PATH
10301 do
10302   IFS=$as_save_IFS
10303   test -z "$as_dir" && as_dir=.
10304     for ac_exec_ext in '' $ac_executable_extensions; do
10305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10306     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10308     break 2
10309   fi
10310 done
10311   done
10312 IFS=$as_save_IFS
10313 
10314   ;;
10315 esac
10316 fi
10317 TR=$ac_cv_path_TR
10318 if test -n "$TR"; then
10319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10320 $as_echo "$TR" >&6; }
10321 else
10322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323 $as_echo "no" >&6; }
10324 fi
10325 
10326 
10327   test -n "$TR" && break
10328 done
10329 
10330   else
10331     # The variable is set, but is it from the command line or the environment?
10332 
10333     # Try to remove the string !TR! from our list.
10334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10336       # If it failed, the variable was not from the command line. Ignore it,
10337       # but warn the user (except for BASH, which is always set by the calling BASH).
10338       if test "xTR" != xBASH; then
10339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10340 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10341       fi
10342       # Try to locate tool using the code snippet
10343       for ac_prog in tr
10344 do
10345   # Extract the first word of "$ac_prog", so it can be a program name with args.
10346 set dummy $ac_prog; ac_word=$2
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10348 $as_echo_n "checking for $ac_word... " >&6; }
10349 if ${ac_cv_path_TR+:} false; then :
10350   $as_echo_n "(cached) " >&6
10351 else
10352   case $TR in
10353   [\\/]* | ?:[\\/]*)
10354   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10355   ;;
10356   *)
10357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10358 for as_dir in $PATH
10359 do
10360   IFS=$as_save_IFS
10361   test -z "$as_dir" && as_dir=.
10362     for ac_exec_ext in '' $ac_executable_extensions; do
10363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10364     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10366     break 2
10367   fi
10368 done
10369   done
10370 IFS=$as_save_IFS
10371 
10372   ;;
10373 esac
10374 fi
10375 TR=$ac_cv_path_TR
10376 if test -n "$TR"; then
10377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10378 $as_echo "$TR" >&6; }
10379 else
10380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381 $as_echo "no" >&6; }
10382 fi
10383 
10384 
10385   test -n "$TR" && break
10386 done
10387 
10388     else
10389       # If it succeeded, then it was overridden by the user. We will use it
10390       # for the tool.
10391 
10392       # First remove it from the list of overridden variables, so we can test
10393       # for unknown variables in the end.
10394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10395 
10396       # Check if the provided tool contains a complete path.
10397       tool_specified="$TR"
10398       tool_basename="${tool_specified##*/}"
10399       if test "x$tool_basename" = "x$tool_specified"; then
10400         # A command without a complete path is provided, search $PATH.
10401         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10402 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10403         # Extract the first word of "$tool_basename", so it can be a program name with args.
10404 set dummy $tool_basename; ac_word=$2
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10406 $as_echo_n "checking for $ac_word... " >&6; }
10407 if ${ac_cv_path_TR+:} false; then :
10408   $as_echo_n "(cached) " >&6
10409 else
10410   case $TR in
10411   [\\/]* | ?:[\\/]*)
10412   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10413   ;;
10414   *)
10415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10416 for as_dir in $PATH
10417 do
10418   IFS=$as_save_IFS
10419   test -z "$as_dir" && as_dir=.
10420     for ac_exec_ext in '' $ac_executable_extensions; do
10421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10422     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10424     break 2
10425   fi
10426 done
10427   done
10428 IFS=$as_save_IFS
10429 
10430   ;;
10431 esac
10432 fi
10433 TR=$ac_cv_path_TR
10434 if test -n "$TR"; then
10435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10436 $as_echo "$TR" >&6; }
10437 else
10438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439 $as_echo "no" >&6; }
10440 fi
10441 
10442 
10443         if test "x$TR" = x; then
10444           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10445         fi
10446       else
10447         # Otherwise we believe it is a complete path. Use it as it is.
10448         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10449 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10450         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10451 $as_echo_n "checking for TR... " >&6; }
10452         if test ! -x "$tool_specified"; then
10453           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10454 $as_echo "not found" >&6; }
10455           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10456         fi
10457         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10458 $as_echo "$tool_specified" >&6; }
10459       fi
10460     fi
10461   fi
10462 
10463 
10464 
10465   if test "x$TR" = x; then
10466     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10467   fi
10468 
10469 
10470 
10471 
10472 
10473   # Publish this variable in the help.
10474 
10475 
10476   if test "x$UNAME" = x; then
10477     # The variable is not set by user, try to locate tool using the code snippet
10478     for ac_prog in uname
10479 do
10480   # Extract the first word of "$ac_prog", so it can be a program name with args.
10481 set dummy $ac_prog; ac_word=$2
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483 $as_echo_n "checking for $ac_word... " >&6; }
10484 if ${ac_cv_path_UNAME+:} false; then :
10485   $as_echo_n "(cached) " >&6
10486 else
10487   case $UNAME in
10488   [\\/]* | ?:[\\/]*)
10489   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10490   ;;
10491   *)
10492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493 for as_dir in $PATH
10494 do
10495   IFS=$as_save_IFS
10496   test -z "$as_dir" && as_dir=.
10497     for ac_exec_ext in '' $ac_executable_extensions; do
10498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10499     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501     break 2
10502   fi
10503 done
10504   done
10505 IFS=$as_save_IFS
10506 
10507   ;;
10508 esac
10509 fi
10510 UNAME=$ac_cv_path_UNAME
10511 if test -n "$UNAME"; then
10512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10513 $as_echo "$UNAME" >&6; }
10514 else
10515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10516 $as_echo "no" >&6; }
10517 fi
10518 
10519 
10520   test -n "$UNAME" && break
10521 done
10522 
10523   else
10524     # The variable is set, but is it from the command line or the environment?
10525 
10526     # Try to remove the string !UNAME! from our list.
10527     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10528     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10529       # If it failed, the variable was not from the command line. Ignore it,
10530       # but warn the user (except for BASH, which is always set by the calling BASH).
10531       if test "xUNAME" != xBASH; then
10532         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10533 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10534       fi
10535       # Try to locate tool using the code snippet
10536       for ac_prog in uname
10537 do
10538   # Extract the first word of "$ac_prog", so it can be a program name with args.
10539 set dummy $ac_prog; ac_word=$2
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10541 $as_echo_n "checking for $ac_word... " >&6; }
10542 if ${ac_cv_path_UNAME+:} false; then :
10543   $as_echo_n "(cached) " >&6
10544 else
10545   case $UNAME in
10546   [\\/]* | ?:[\\/]*)
10547   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10548   ;;
10549   *)
10550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10551 for as_dir in $PATH
10552 do
10553   IFS=$as_save_IFS
10554   test -z "$as_dir" && as_dir=.
10555     for ac_exec_ext in '' $ac_executable_extensions; do
10556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10557     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10559     break 2
10560   fi
10561 done
10562   done
10563 IFS=$as_save_IFS
10564 
10565   ;;
10566 esac
10567 fi
10568 UNAME=$ac_cv_path_UNAME
10569 if test -n "$UNAME"; then
10570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10571 $as_echo "$UNAME" >&6; }
10572 else
10573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10574 $as_echo "no" >&6; }
10575 fi
10576 
10577 
10578   test -n "$UNAME" && break
10579 done
10580 
10581     else
10582       # If it succeeded, then it was overridden by the user. We will use it
10583       # for the tool.
10584 
10585       # First remove it from the list of overridden variables, so we can test
10586       # for unknown variables in the end.
10587       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10588 
10589       # Check if the provided tool contains a complete path.
10590       tool_specified="$UNAME"
10591       tool_basename="${tool_specified##*/}"
10592       if test "x$tool_basename" = "x$tool_specified"; then
10593         # A command without a complete path is provided, search $PATH.
10594         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10595 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10596         # Extract the first word of "$tool_basename", so it can be a program name with args.
10597 set dummy $tool_basename; ac_word=$2
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10599 $as_echo_n "checking for $ac_word... " >&6; }
10600 if ${ac_cv_path_UNAME+:} false; then :
10601   $as_echo_n "(cached) " >&6
10602 else
10603   case $UNAME in
10604   [\\/]* | ?:[\\/]*)
10605   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10606   ;;
10607   *)
10608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10609 for as_dir in $PATH
10610 do
10611   IFS=$as_save_IFS
10612   test -z "$as_dir" && as_dir=.
10613     for ac_exec_ext in '' $ac_executable_extensions; do
10614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10615     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10617     break 2
10618   fi
10619 done
10620   done
10621 IFS=$as_save_IFS
10622 
10623   ;;
10624 esac
10625 fi
10626 UNAME=$ac_cv_path_UNAME
10627 if test -n "$UNAME"; then
10628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10629 $as_echo "$UNAME" >&6; }
10630 else
10631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632 $as_echo "no" >&6; }
10633 fi
10634 
10635 
10636         if test "x$UNAME" = x; then
10637           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10638         fi
10639       else
10640         # Otherwise we believe it is a complete path. Use it as it is.
10641         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10642 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10644 $as_echo_n "checking for UNAME... " >&6; }
10645         if test ! -x "$tool_specified"; then
10646           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10647 $as_echo "not found" >&6; }
10648           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10649         fi
10650         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10651 $as_echo "$tool_specified" >&6; }
10652       fi
10653     fi
10654   fi
10655 
10656 
10657 
10658   if test "x$UNAME" = x; then
10659     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10660   fi
10661 
10662 
10663 
10664 
10665 
10666   # Publish this variable in the help.
10667 
10668 
10669   if test "x$UNIQ" = x; then
10670     # The variable is not set by user, try to locate tool using the code snippet
10671     for ac_prog in uniq
10672 do
10673   # Extract the first word of "$ac_prog", so it can be a program name with args.
10674 set dummy $ac_prog; ac_word=$2
10675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676 $as_echo_n "checking for $ac_word... " >&6; }
10677 if ${ac_cv_path_UNIQ+:} false; then :
10678   $as_echo_n "(cached) " >&6
10679 else
10680   case $UNIQ in
10681   [\\/]* | ?:[\\/]*)
10682   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10683   ;;
10684   *)
10685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686 for as_dir in $PATH
10687 do
10688   IFS=$as_save_IFS
10689   test -z "$as_dir" && as_dir=.
10690     for ac_exec_ext in '' $ac_executable_extensions; do
10691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694     break 2
10695   fi
10696 done
10697   done
10698 IFS=$as_save_IFS
10699 
10700   ;;
10701 esac
10702 fi
10703 UNIQ=$ac_cv_path_UNIQ
10704 if test -n "$UNIQ"; then
10705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10706 $as_echo "$UNIQ" >&6; }
10707 else
10708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709 $as_echo "no" >&6; }
10710 fi
10711 
10712 
10713   test -n "$UNIQ" && break
10714 done
10715 
10716   else
10717     # The variable is set, but is it from the command line or the environment?
10718 
10719     # Try to remove the string !UNIQ! from our list.
10720     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10721     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722       # If it failed, the variable was not from the command line. Ignore it,
10723       # but warn the user (except for BASH, which is always set by the calling BASH).
10724       if test "xUNIQ" != xBASH; then
10725         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10726 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10727       fi
10728       # Try to locate tool using the code snippet
10729       for ac_prog in uniq
10730 do
10731   # Extract the first word of "$ac_prog", so it can be a program name with args.
10732 set dummy $ac_prog; ac_word=$2
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734 $as_echo_n "checking for $ac_word... " >&6; }
10735 if ${ac_cv_path_UNIQ+:} false; then :
10736   $as_echo_n "(cached) " >&6
10737 else
10738   case $UNIQ in
10739   [\\/]* | ?:[\\/]*)
10740   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10741   ;;
10742   *)
10743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744 for as_dir in $PATH
10745 do
10746   IFS=$as_save_IFS
10747   test -z "$as_dir" && as_dir=.
10748     for ac_exec_ext in '' $ac_executable_extensions; do
10749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752     break 2
10753   fi
10754 done
10755   done
10756 IFS=$as_save_IFS
10757 
10758   ;;
10759 esac
10760 fi
10761 UNIQ=$ac_cv_path_UNIQ
10762 if test -n "$UNIQ"; then
10763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10764 $as_echo "$UNIQ" >&6; }
10765 else
10766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767 $as_echo "no" >&6; }
10768 fi
10769 
10770 
10771   test -n "$UNIQ" && break
10772 done
10773 
10774     else
10775       # If it succeeded, then it was overridden by the user. We will use it
10776       # for the tool.
10777 
10778       # First remove it from the list of overridden variables, so we can test
10779       # for unknown variables in the end.
10780       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781 
10782       # Check if the provided tool contains a complete path.
10783       tool_specified="$UNIQ"
10784       tool_basename="${tool_specified##*/}"
10785       if test "x$tool_basename" = "x$tool_specified"; then
10786         # A command without a complete path is provided, search $PATH.
10787         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10788 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10789         # Extract the first word of "$tool_basename", so it can be a program name with args.
10790 set dummy $tool_basename; ac_word=$2
10791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10792 $as_echo_n "checking for $ac_word... " >&6; }
10793 if ${ac_cv_path_UNIQ+:} false; then :
10794   $as_echo_n "(cached) " >&6
10795 else
10796   case $UNIQ in
10797   [\\/]* | ?:[\\/]*)
10798   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10799   ;;
10800   *)
10801   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10802 for as_dir in $PATH
10803 do
10804   IFS=$as_save_IFS
10805   test -z "$as_dir" && as_dir=.
10806     for ac_exec_ext in '' $ac_executable_extensions; do
10807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10808     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10810     break 2
10811   fi
10812 done
10813   done
10814 IFS=$as_save_IFS
10815 
10816   ;;
10817 esac
10818 fi
10819 UNIQ=$ac_cv_path_UNIQ
10820 if test -n "$UNIQ"; then
10821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10822 $as_echo "$UNIQ" >&6; }
10823 else
10824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10825 $as_echo "no" >&6; }
10826 fi
10827 
10828 
10829         if test "x$UNIQ" = x; then
10830           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10831         fi
10832       else
10833         # Otherwise we believe it is a complete path. Use it as it is.
10834         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10835 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10836         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10837 $as_echo_n "checking for UNIQ... " >&6; }
10838         if test ! -x "$tool_specified"; then
10839           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10840 $as_echo "not found" >&6; }
10841           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10842         fi
10843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10844 $as_echo "$tool_specified" >&6; }
10845       fi
10846     fi
10847   fi
10848 
10849 
10850 
10851   if test "x$UNIQ" = x; then
10852     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10853   fi
10854 
10855 
10856 
10857 
10858 
10859   # Publish this variable in the help.
10860 
10861 
10862   if test "x$WC" = x; then
10863     # The variable is not set by user, try to locate tool using the code snippet
10864     for ac_prog in wc
10865 do
10866   # Extract the first word of "$ac_prog", so it can be a program name with args.
10867 set dummy $ac_prog; ac_word=$2
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10869 $as_echo_n "checking for $ac_word... " >&6; }
10870 if ${ac_cv_path_WC+:} false; then :
10871   $as_echo_n "(cached) " >&6
10872 else
10873   case $WC in
10874   [\\/]* | ?:[\\/]*)
10875   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10876   ;;
10877   *)
10878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10879 for as_dir in $PATH
10880 do
10881   IFS=$as_save_IFS
10882   test -z "$as_dir" && as_dir=.
10883     for ac_exec_ext in '' $ac_executable_extensions; do
10884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10885     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10887     break 2
10888   fi
10889 done
10890   done
10891 IFS=$as_save_IFS
10892 
10893   ;;
10894 esac
10895 fi
10896 WC=$ac_cv_path_WC
10897 if test -n "$WC"; then
10898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10899 $as_echo "$WC" >&6; }
10900 else
10901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10902 $as_echo "no" >&6; }
10903 fi
10904 
10905 
10906   test -n "$WC" && break
10907 done
10908 
10909   else
10910     # The variable is set, but is it from the command line or the environment?
10911 
10912     # Try to remove the string !WC! from our list.
10913     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10914     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10915       # If it failed, the variable was not from the command line. Ignore it,
10916       # but warn the user (except for BASH, which is always set by the calling BASH).
10917       if test "xWC" != xBASH; then
10918         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10919 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10920       fi
10921       # Try to locate tool using the code snippet
10922       for ac_prog in wc
10923 do
10924   # Extract the first word of "$ac_prog", so it can be a program name with args.
10925 set dummy $ac_prog; ac_word=$2
10926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10927 $as_echo_n "checking for $ac_word... " >&6; }
10928 if ${ac_cv_path_WC+:} false; then :
10929   $as_echo_n "(cached) " >&6
10930 else
10931   case $WC in
10932   [\\/]* | ?:[\\/]*)
10933   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10934   ;;
10935   *)
10936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10937 for as_dir in $PATH
10938 do
10939   IFS=$as_save_IFS
10940   test -z "$as_dir" && as_dir=.
10941     for ac_exec_ext in '' $ac_executable_extensions; do
10942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10943     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10945     break 2
10946   fi
10947 done
10948   done
10949 IFS=$as_save_IFS
10950 
10951   ;;
10952 esac
10953 fi
10954 WC=$ac_cv_path_WC
10955 if test -n "$WC"; then
10956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10957 $as_echo "$WC" >&6; }
10958 else
10959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10960 $as_echo "no" >&6; }
10961 fi
10962 
10963 
10964   test -n "$WC" && break
10965 done
10966 
10967     else
10968       # If it succeeded, then it was overridden by the user. We will use it
10969       # for the tool.
10970 
10971       # First remove it from the list of overridden variables, so we can test
10972       # for unknown variables in the end.
10973       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10974 
10975       # Check if the provided tool contains a complete path.
10976       tool_specified="$WC"
10977       tool_basename="${tool_specified##*/}"
10978       if test "x$tool_basename" = "x$tool_specified"; then
10979         # A command without a complete path is provided, search $PATH.
10980         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10981 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10982         # Extract the first word of "$tool_basename", so it can be a program name with args.
10983 set dummy $tool_basename; ac_word=$2
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10985 $as_echo_n "checking for $ac_word... " >&6; }
10986 if ${ac_cv_path_WC+:} false; then :
10987   $as_echo_n "(cached) " >&6
10988 else
10989   case $WC in
10990   [\\/]* | ?:[\\/]*)
10991   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10992   ;;
10993   *)
10994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10995 for as_dir in $PATH
10996 do
10997   IFS=$as_save_IFS
10998   test -z "$as_dir" && as_dir=.
10999     for ac_exec_ext in '' $ac_executable_extensions; do
11000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11001     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11003     break 2
11004   fi
11005 done
11006   done
11007 IFS=$as_save_IFS
11008 
11009   ;;
11010 esac
11011 fi
11012 WC=$ac_cv_path_WC
11013 if test -n "$WC"; then
11014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11015 $as_echo "$WC" >&6; }
11016 else
11017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018 $as_echo "no" >&6; }
11019 fi
11020 
11021 
11022         if test "x$WC" = x; then
11023           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11024         fi
11025       else
11026         # Otherwise we believe it is a complete path. Use it as it is.
11027         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11028 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11029         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11030 $as_echo_n "checking for WC... " >&6; }
11031         if test ! -x "$tool_specified"; then
11032           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11033 $as_echo "not found" >&6; }
11034           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11035         fi
11036         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11037 $as_echo "$tool_specified" >&6; }
11038       fi
11039     fi
11040   fi
11041 
11042 
11043 
11044   if test "x$WC" = x; then
11045     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11046   fi
11047 
11048 
11049 
11050 
11051 
11052   # Publish this variable in the help.
11053 
11054 
11055   if test "x$WHICH" = x; then
11056     # The variable is not set by user, try to locate tool using the code snippet
11057     for ac_prog in which
11058 do
11059   # Extract the first word of "$ac_prog", so it can be a program name with args.
11060 set dummy $ac_prog; ac_word=$2
11061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062 $as_echo_n "checking for $ac_word... " >&6; }
11063 if ${ac_cv_path_WHICH+:} false; then :
11064   $as_echo_n "(cached) " >&6
11065 else
11066   case $WHICH in
11067   [\\/]* | ?:[\\/]*)
11068   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11069   ;;
11070   *)
11071   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072 for as_dir in $PATH
11073 do
11074   IFS=$as_save_IFS
11075   test -z "$as_dir" && as_dir=.
11076     for ac_exec_ext in '' $ac_executable_extensions; do
11077   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11079     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080     break 2
11081   fi
11082 done
11083   done
11084 IFS=$as_save_IFS
11085 
11086   ;;
11087 esac
11088 fi
11089 WHICH=$ac_cv_path_WHICH
11090 if test -n "$WHICH"; then
11091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11092 $as_echo "$WHICH" >&6; }
11093 else
11094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095 $as_echo "no" >&6; }
11096 fi
11097 
11098 
11099   test -n "$WHICH" && break
11100 done
11101 
11102   else
11103     # The variable is set, but is it from the command line or the environment?
11104 
11105     # Try to remove the string !WHICH! from our list.
11106     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11107     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11108       # If it failed, the variable was not from the command line. Ignore it,
11109       # but warn the user (except for BASH, which is always set by the calling BASH).
11110       if test "xWHICH" != xBASH; then
11111         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11112 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11113       fi
11114       # Try to locate tool using the code snippet
11115       for ac_prog in which
11116 do
11117   # Extract the first word of "$ac_prog", so it can be a program name with args.
11118 set dummy $ac_prog; ac_word=$2
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11120 $as_echo_n "checking for $ac_word... " >&6; }
11121 if ${ac_cv_path_WHICH+:} false; then :
11122   $as_echo_n "(cached) " >&6
11123 else
11124   case $WHICH in
11125   [\\/]* | ?:[\\/]*)
11126   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11127   ;;
11128   *)
11129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11130 for as_dir in $PATH
11131 do
11132   IFS=$as_save_IFS
11133   test -z "$as_dir" && as_dir=.
11134     for ac_exec_ext in '' $ac_executable_extensions; do
11135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11136     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11138     break 2
11139   fi
11140 done
11141   done
11142 IFS=$as_save_IFS
11143 
11144   ;;
11145 esac
11146 fi
11147 WHICH=$ac_cv_path_WHICH
11148 if test -n "$WHICH"; then
11149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11150 $as_echo "$WHICH" >&6; }
11151 else
11152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153 $as_echo "no" >&6; }
11154 fi
11155 
11156 
11157   test -n "$WHICH" && break
11158 done
11159 
11160     else
11161       # If it succeeded, then it was overridden by the user. We will use it
11162       # for the tool.
11163 
11164       # First remove it from the list of overridden variables, so we can test
11165       # for unknown variables in the end.
11166       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11167 
11168       # Check if the provided tool contains a complete path.
11169       tool_specified="$WHICH"
11170       tool_basename="${tool_specified##*/}"
11171       if test "x$tool_basename" = "x$tool_specified"; then
11172         # A command without a complete path is provided, search $PATH.
11173         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11174 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11175         # Extract the first word of "$tool_basename", so it can be a program name with args.
11176 set dummy $tool_basename; ac_word=$2
11177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11178 $as_echo_n "checking for $ac_word... " >&6; }
11179 if ${ac_cv_path_WHICH+:} false; then :
11180   $as_echo_n "(cached) " >&6
11181 else
11182   case $WHICH in
11183   [\\/]* | ?:[\\/]*)
11184   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11185   ;;
11186   *)
11187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11188 for as_dir in $PATH
11189 do
11190   IFS=$as_save_IFS
11191   test -z "$as_dir" && as_dir=.
11192     for ac_exec_ext in '' $ac_executable_extensions; do
11193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11194     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11196     break 2
11197   fi
11198 done
11199   done
11200 IFS=$as_save_IFS
11201 
11202   ;;
11203 esac
11204 fi
11205 WHICH=$ac_cv_path_WHICH
11206 if test -n "$WHICH"; then
11207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11208 $as_echo "$WHICH" >&6; }
11209 else
11210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211 $as_echo "no" >&6; }
11212 fi
11213 
11214 
11215         if test "x$WHICH" = x; then
11216           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11217         fi
11218       else
11219         # Otherwise we believe it is a complete path. Use it as it is.
11220         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11221 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11222         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11223 $as_echo_n "checking for WHICH... " >&6; }
11224         if test ! -x "$tool_specified"; then
11225           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11226 $as_echo "not found" >&6; }
11227           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11228         fi
11229         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11230 $as_echo "$tool_specified" >&6; }
11231       fi
11232     fi
11233   fi
11234 
11235 
11236 
11237   if test "x$WHICH" = x; then
11238     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11239   fi
11240 
11241 
11242 
11243 
11244 
11245   # Publish this variable in the help.
11246 
11247 
11248   if test "x$XARGS" = x; then
11249     # The variable is not set by user, try to locate tool using the code snippet
11250     for ac_prog in xargs
11251 do
11252   # Extract the first word of "$ac_prog", so it can be a program name with args.
11253 set dummy $ac_prog; ac_word=$2
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11255 $as_echo_n "checking for $ac_word... " >&6; }
11256 if ${ac_cv_path_XARGS+:} false; then :
11257   $as_echo_n "(cached) " >&6
11258 else
11259   case $XARGS in
11260   [\\/]* | ?:[\\/]*)
11261   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11262   ;;
11263   *)
11264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11265 for as_dir in $PATH
11266 do
11267   IFS=$as_save_IFS
11268   test -z "$as_dir" && as_dir=.
11269     for ac_exec_ext in '' $ac_executable_extensions; do
11270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11271     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11273     break 2
11274   fi
11275 done
11276   done
11277 IFS=$as_save_IFS
11278 
11279   ;;
11280 esac
11281 fi
11282 XARGS=$ac_cv_path_XARGS
11283 if test -n "$XARGS"; then
11284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11285 $as_echo "$XARGS" >&6; }
11286 else
11287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288 $as_echo "no" >&6; }
11289 fi
11290 
11291 
11292   test -n "$XARGS" && break
11293 done
11294 
11295   else
11296     # The variable is set, but is it from the command line or the environment?
11297 
11298     # Try to remove the string !XARGS! from our list.
11299     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11300     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11301       # If it failed, the variable was not from the command line. Ignore it,
11302       # but warn the user (except for BASH, which is always set by the calling BASH).
11303       if test "xXARGS" != xBASH; then
11304         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11305 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11306       fi
11307       # Try to locate tool using the code snippet
11308       for ac_prog in xargs
11309 do
11310   # Extract the first word of "$ac_prog", so it can be a program name with args.
11311 set dummy $ac_prog; ac_word=$2
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11313 $as_echo_n "checking for $ac_word... " >&6; }
11314 if ${ac_cv_path_XARGS+:} false; then :
11315   $as_echo_n "(cached) " >&6
11316 else
11317   case $XARGS in
11318   [\\/]* | ?:[\\/]*)
11319   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11320   ;;
11321   *)
11322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11323 for as_dir in $PATH
11324 do
11325   IFS=$as_save_IFS
11326   test -z "$as_dir" && as_dir=.
11327     for ac_exec_ext in '' $ac_executable_extensions; do
11328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11329     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11331     break 2
11332   fi
11333 done
11334   done
11335 IFS=$as_save_IFS
11336 
11337   ;;
11338 esac
11339 fi
11340 XARGS=$ac_cv_path_XARGS
11341 if test -n "$XARGS"; then
11342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11343 $as_echo "$XARGS" >&6; }
11344 else
11345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346 $as_echo "no" >&6; }
11347 fi
11348 
11349 
11350   test -n "$XARGS" && break
11351 done
11352 
11353     else
11354       # If it succeeded, then it was overridden by the user. We will use it
11355       # for the tool.
11356 
11357       # First remove it from the list of overridden variables, so we can test
11358       # for unknown variables in the end.
11359       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11360 
11361       # Check if the provided tool contains a complete path.
11362       tool_specified="$XARGS"
11363       tool_basename="${tool_specified##*/}"
11364       if test "x$tool_basename" = "x$tool_specified"; then
11365         # A command without a complete path is provided, search $PATH.
11366         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11367 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11368         # Extract the first word of "$tool_basename", so it can be a program name with args.
11369 set dummy $tool_basename; ac_word=$2
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11371 $as_echo_n "checking for $ac_word... " >&6; }
11372 if ${ac_cv_path_XARGS+:} false; then :
11373   $as_echo_n "(cached) " >&6
11374 else
11375   case $XARGS in
11376   [\\/]* | ?:[\\/]*)
11377   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11378   ;;
11379   *)
11380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11381 for as_dir in $PATH
11382 do
11383   IFS=$as_save_IFS
11384   test -z "$as_dir" && as_dir=.
11385     for ac_exec_ext in '' $ac_executable_extensions; do
11386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11387     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11389     break 2
11390   fi
11391 done
11392   done
11393 IFS=$as_save_IFS
11394 
11395   ;;
11396 esac
11397 fi
11398 XARGS=$ac_cv_path_XARGS
11399 if test -n "$XARGS"; then
11400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11401 $as_echo "$XARGS" >&6; }
11402 else
11403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404 $as_echo "no" >&6; }
11405 fi
11406 
11407 
11408         if test "x$XARGS" = x; then
11409           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11410         fi
11411       else
11412         # Otherwise we believe it is a complete path. Use it as it is.
11413         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11414 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11416 $as_echo_n "checking for XARGS... " >&6; }
11417         if test ! -x "$tool_specified"; then
11418           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11419 $as_echo "not found" >&6; }
11420           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11421         fi
11422         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11423 $as_echo "$tool_specified" >&6; }
11424       fi
11425     fi
11426   fi
11427 
11428 
11429 
11430   if test "x$XARGS" = x; then
11431     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11432   fi
11433 
11434 
11435 
11436   # Then required tools that require some special treatment.
11437 
11438 
11439   # Publish this variable in the help.
11440 
11441 
11442   if test "x$AWK" = x; then
11443     # The variable is not set by user, try to locate tool using the code snippet
11444     for ac_prog in gawk mawk nawk awk
11445 do
11446   # Extract the first word of "$ac_prog", so it can be a program name with args.
11447 set dummy $ac_prog; ac_word=$2
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11449 $as_echo_n "checking for $ac_word... " >&6; }
11450 if ${ac_cv_prog_AWK+:} false; then :
11451   $as_echo_n "(cached) " >&6
11452 else
11453   if test -n "$AWK"; then
11454   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11455 else
11456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11457 for as_dir in $PATH
11458 do
11459   IFS=$as_save_IFS
11460   test -z "$as_dir" && as_dir=.
11461     for ac_exec_ext in '' $ac_executable_extensions; do
11462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11463     ac_cv_prog_AWK="$ac_prog"
11464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11465     break 2
11466   fi
11467 done
11468   done
11469 IFS=$as_save_IFS
11470 
11471 fi
11472 fi
11473 AWK=$ac_cv_prog_AWK
11474 if test -n "$AWK"; then
11475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11476 $as_echo "$AWK" >&6; }
11477 else
11478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479 $as_echo "no" >&6; }
11480 fi
11481 
11482 
11483   test -n "$AWK" && break
11484 done
11485 
11486   else
11487     # The variable is set, but is it from the command line or the environment?
11488 
11489     # Try to remove the string !AWK! from our list.
11490     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11491     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11492       # If it failed, the variable was not from the command line. Ignore it,
11493       # but warn the user (except for BASH, which is always set by the calling BASH).
11494       if test "xAWK" != xBASH; then
11495         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11496 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11497       fi
11498       # Try to locate tool using the code snippet
11499       for ac_prog in gawk mawk nawk awk
11500 do
11501   # Extract the first word of "$ac_prog", so it can be a program name with args.
11502 set dummy $ac_prog; ac_word=$2
11503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11504 $as_echo_n "checking for $ac_word... " >&6; }
11505 if ${ac_cv_prog_AWK+:} false; then :
11506   $as_echo_n "(cached) " >&6
11507 else
11508   if test -n "$AWK"; then
11509   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11510 else
11511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11512 for as_dir in $PATH
11513 do
11514   IFS=$as_save_IFS
11515   test -z "$as_dir" && as_dir=.
11516     for ac_exec_ext in '' $ac_executable_extensions; do
11517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11518     ac_cv_prog_AWK="$ac_prog"
11519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11520     break 2
11521   fi
11522 done
11523   done
11524 IFS=$as_save_IFS
11525 
11526 fi
11527 fi
11528 AWK=$ac_cv_prog_AWK
11529 if test -n "$AWK"; then
11530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11531 $as_echo "$AWK" >&6; }
11532 else
11533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534 $as_echo "no" >&6; }
11535 fi
11536 
11537 
11538   test -n "$AWK" && break
11539 done
11540 
11541     else
11542       # If it succeeded, then it was overridden by the user. We will use it
11543       # for the tool.
11544 
11545       # First remove it from the list of overridden variables, so we can test
11546       # for unknown variables in the end.
11547       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11548 
11549       # Check if the provided tool contains a complete path.
11550       tool_specified="$AWK"
11551       tool_basename="${tool_specified##*/}"
11552       if test "x$tool_basename" = "x$tool_specified"; then
11553         # A command without a complete path is provided, search $PATH.
11554         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11555 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11556         # Extract the first word of "$tool_basename", so it can be a program name with args.
11557 set dummy $tool_basename; ac_word=$2
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559 $as_echo_n "checking for $ac_word... " >&6; }
11560 if ${ac_cv_path_AWK+:} false; then :
11561   $as_echo_n "(cached) " >&6
11562 else
11563   case $AWK in
11564   [\\/]* | ?:[\\/]*)
11565   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11566   ;;
11567   *)
11568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569 for as_dir in $PATH
11570 do
11571   IFS=$as_save_IFS
11572   test -z "$as_dir" && as_dir=.
11573     for ac_exec_ext in '' $ac_executable_extensions; do
11574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577     break 2
11578   fi
11579 done
11580   done
11581 IFS=$as_save_IFS
11582 
11583   ;;
11584 esac
11585 fi
11586 AWK=$ac_cv_path_AWK
11587 if test -n "$AWK"; then
11588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11589 $as_echo "$AWK" >&6; }
11590 else
11591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592 $as_echo "no" >&6; }
11593 fi
11594 
11595 
11596         if test "x$AWK" = x; then
11597           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11598         fi
11599       else
11600         # Otherwise we believe it is a complete path. Use it as it is.
11601         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11602 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11604 $as_echo_n "checking for AWK... " >&6; }
11605         if test ! -x "$tool_specified"; then
11606           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11607 $as_echo "not found" >&6; }
11608           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11609         fi
11610         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11611 $as_echo "$tool_specified" >&6; }
11612       fi
11613     fi
11614   fi
11615 
11616 
11617   if test "x$AWK" = x; then
11618     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11619   fi
11620 
11621 
11622 
11623 
11624   # Publish this variable in the help.
11625 
11626 
11627   if test "x$GREP" = x; then
11628     # The variable is not set by user, try to locate tool using the code snippet
11629     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11630 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11631 if ${ac_cv_path_GREP+:} false; then :
11632   $as_echo_n "(cached) " >&6
11633 else
11634   if test -z "$GREP"; then
11635   ac_path_GREP_found=false
11636   # Loop through the user's path and test for each of PROGNAME-LIST
11637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11638 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11639 do
11640   IFS=$as_save_IFS
11641   test -z "$as_dir" && as_dir=.
11642     for ac_prog in grep ggrep; do
11643     for ac_exec_ext in '' $ac_executable_extensions; do
11644       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11645       as_fn_executable_p "$ac_path_GREP" || continue
11646 # Check for GNU ac_path_GREP and select it if it is found.
11647   # Check for GNU $ac_path_GREP
11648 case `"$ac_path_GREP" --version 2>&1` in
11649 *GNU*)
11650   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11651 *)
11652   ac_count=0
11653   $as_echo_n 0123456789 >"conftest.in"
11654   while :
11655   do
11656     cat "conftest.in" "conftest.in" >"conftest.tmp"
11657     mv "conftest.tmp" "conftest.in"
11658     cp "conftest.in" "conftest.nl"
11659     $as_echo 'GREP' >> "conftest.nl"
11660     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11661     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11662     as_fn_arith $ac_count + 1 && ac_count=$as_val
11663     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11664       # Best one so far, save it but keep looking for a better one
11665       ac_cv_path_GREP="$ac_path_GREP"
11666       ac_path_GREP_max=$ac_count
11667     fi
11668     # 10*(2^10) chars as input seems more than enough
11669     test $ac_count -gt 10 && break
11670   done
11671   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11672 esac
11673 
11674       $ac_path_GREP_found && break 3
11675     done
11676   done
11677   done
11678 IFS=$as_save_IFS
11679   if test -z "$ac_cv_path_GREP"; then
11680     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11681   fi
11682 else
11683   ac_cv_path_GREP=$GREP
11684 fi
11685 
11686 fi
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11688 $as_echo "$ac_cv_path_GREP" >&6; }
11689  GREP="$ac_cv_path_GREP"
11690 
11691 
11692   else
11693     # The variable is set, but is it from the command line or the environment?
11694 
11695     # Try to remove the string !GREP! from our list.
11696     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11697     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11698       # If it failed, the variable was not from the command line. Ignore it,
11699       # but warn the user (except for BASH, which is always set by the calling BASH).
11700       if test "xGREP" != xBASH; then
11701         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11702 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11703       fi
11704       # Try to locate tool using the code snippet
11705       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11706 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11707 if ${ac_cv_path_GREP+:} false; then :
11708   $as_echo_n "(cached) " >&6
11709 else
11710   if test -z "$GREP"; then
11711   ac_path_GREP_found=false
11712   # Loop through the user's path and test for each of PROGNAME-LIST
11713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11715 do
11716   IFS=$as_save_IFS
11717   test -z "$as_dir" && as_dir=.
11718     for ac_prog in grep ggrep; do
11719     for ac_exec_ext in '' $ac_executable_extensions; do
11720       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11721       as_fn_executable_p "$ac_path_GREP" || continue
11722 # Check for GNU ac_path_GREP and select it if it is found.
11723   # Check for GNU $ac_path_GREP
11724 case `"$ac_path_GREP" --version 2>&1` in
11725 *GNU*)
11726   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11727 *)
11728   ac_count=0
11729   $as_echo_n 0123456789 >"conftest.in"
11730   while :
11731   do
11732     cat "conftest.in" "conftest.in" >"conftest.tmp"
11733     mv "conftest.tmp" "conftest.in"
11734     cp "conftest.in" "conftest.nl"
11735     $as_echo 'GREP' >> "conftest.nl"
11736     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11737     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11738     as_fn_arith $ac_count + 1 && ac_count=$as_val
11739     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11740       # Best one so far, save it but keep looking for a better one
11741       ac_cv_path_GREP="$ac_path_GREP"
11742       ac_path_GREP_max=$ac_count
11743     fi
11744     # 10*(2^10) chars as input seems more than enough
11745     test $ac_count -gt 10 && break
11746   done
11747   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11748 esac
11749 
11750       $ac_path_GREP_found && break 3
11751     done
11752   done
11753   done
11754 IFS=$as_save_IFS
11755   if test -z "$ac_cv_path_GREP"; then
11756     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11757   fi
11758 else
11759   ac_cv_path_GREP=$GREP
11760 fi
11761 
11762 fi
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11764 $as_echo "$ac_cv_path_GREP" >&6; }
11765  GREP="$ac_cv_path_GREP"
11766 
11767 
11768     else
11769       # If it succeeded, then it was overridden by the user. We will use it
11770       # for the tool.
11771 
11772       # First remove it from the list of overridden variables, so we can test
11773       # for unknown variables in the end.
11774       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11775 
11776       # Check if the provided tool contains a complete path.
11777       tool_specified="$GREP"
11778       tool_basename="${tool_specified##*/}"
11779       if test "x$tool_basename" = "x$tool_specified"; then
11780         # A command without a complete path is provided, search $PATH.
11781         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11782 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11783         # Extract the first word of "$tool_basename", so it can be a program name with args.
11784 set dummy $tool_basename; ac_word=$2
11785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11786 $as_echo_n "checking for $ac_word... " >&6; }
11787 if ${ac_cv_path_GREP+:} false; then :
11788   $as_echo_n "(cached) " >&6
11789 else
11790   case $GREP in
11791   [\\/]* | ?:[\\/]*)
11792   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11793   ;;
11794   *)
11795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11796 for as_dir in $PATH
11797 do
11798   IFS=$as_save_IFS
11799   test -z "$as_dir" && as_dir=.
11800     for ac_exec_ext in '' $ac_executable_extensions; do
11801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11802     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11804     break 2
11805   fi
11806 done
11807   done
11808 IFS=$as_save_IFS
11809 
11810   ;;
11811 esac
11812 fi
11813 GREP=$ac_cv_path_GREP
11814 if test -n "$GREP"; then
11815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11816 $as_echo "$GREP" >&6; }
11817 else
11818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11819 $as_echo "no" >&6; }
11820 fi
11821 
11822 
11823         if test "x$GREP" = x; then
11824           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11825         fi
11826       else
11827         # Otherwise we believe it is a complete path. Use it as it is.
11828         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11829 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11830         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11831 $as_echo_n "checking for GREP... " >&6; }
11832         if test ! -x "$tool_specified"; then
11833           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11834 $as_echo "not found" >&6; }
11835           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11836         fi
11837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11838 $as_echo "$tool_specified" >&6; }
11839       fi
11840     fi
11841   fi
11842 
11843 
11844   if test "x$GREP" = x; then
11845     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11846   fi
11847 
11848 
11849 
11850 
11851   # Publish this variable in the help.
11852 
11853 
11854   if test "x$EGREP" = x; then
11855     # The variable is not set by user, try to locate tool using the code snippet
11856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11857 $as_echo_n "checking for egrep... " >&6; }
11858 if ${ac_cv_path_EGREP+:} false; then :
11859   $as_echo_n "(cached) " >&6
11860 else
11861   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11862    then ac_cv_path_EGREP="$GREP -E"
11863    else
11864      if test -z "$EGREP"; then
11865   ac_path_EGREP_found=false
11866   # Loop through the user's path and test for each of PROGNAME-LIST
11867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11868 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11869 do
11870   IFS=$as_save_IFS
11871   test -z "$as_dir" && as_dir=.
11872     for ac_prog in egrep; do
11873     for ac_exec_ext in '' $ac_executable_extensions; do
11874       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11875       as_fn_executable_p "$ac_path_EGREP" || continue
11876 # Check for GNU ac_path_EGREP and select it if it is found.
11877   # Check for GNU $ac_path_EGREP
11878 case `"$ac_path_EGREP" --version 2>&1` in
11879 *GNU*)
11880   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11881 *)
11882   ac_count=0
11883   $as_echo_n 0123456789 >"conftest.in"
11884   while :
11885   do
11886     cat "conftest.in" "conftest.in" >"conftest.tmp"
11887     mv "conftest.tmp" "conftest.in"
11888     cp "conftest.in" "conftest.nl"
11889     $as_echo 'EGREP' >> "conftest.nl"
11890     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11891     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11892     as_fn_arith $ac_count + 1 && ac_count=$as_val
11893     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11894       # Best one so far, save it but keep looking for a better one
11895       ac_cv_path_EGREP="$ac_path_EGREP"
11896       ac_path_EGREP_max=$ac_count
11897     fi
11898     # 10*(2^10) chars as input seems more than enough
11899     test $ac_count -gt 10 && break
11900   done
11901   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11902 esac
11903 
11904       $ac_path_EGREP_found && break 3
11905     done
11906   done
11907   done
11908 IFS=$as_save_IFS
11909   if test -z "$ac_cv_path_EGREP"; then
11910     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11911   fi
11912 else
11913   ac_cv_path_EGREP=$EGREP
11914 fi
11915 
11916    fi
11917 fi
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11919 $as_echo "$ac_cv_path_EGREP" >&6; }
11920  EGREP="$ac_cv_path_EGREP"
11921 
11922 
11923   else
11924     # The variable is set, but is it from the command line or the environment?
11925 
11926     # Try to remove the string !EGREP! from our list.
11927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11929       # If it failed, the variable was not from the command line. Ignore it,
11930       # but warn the user (except for BASH, which is always set by the calling BASH).
11931       if test "xEGREP" != xBASH; then
11932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11933 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11934       fi
11935       # Try to locate tool using the code snippet
11936       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11937 $as_echo_n "checking for egrep... " >&6; }
11938 if ${ac_cv_path_EGREP+:} false; then :
11939   $as_echo_n "(cached) " >&6
11940 else
11941   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11942    then ac_cv_path_EGREP="$GREP -E"
11943    else
11944      if test -z "$EGREP"; then
11945   ac_path_EGREP_found=false
11946   # Loop through the user's path and test for each of PROGNAME-LIST
11947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11948 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11949 do
11950   IFS=$as_save_IFS
11951   test -z "$as_dir" && as_dir=.
11952     for ac_prog in egrep; do
11953     for ac_exec_ext in '' $ac_executable_extensions; do
11954       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11955       as_fn_executable_p "$ac_path_EGREP" || continue
11956 # Check for GNU ac_path_EGREP and select it if it is found.
11957   # Check for GNU $ac_path_EGREP
11958 case `"$ac_path_EGREP" --version 2>&1` in
11959 *GNU*)
11960   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11961 *)
11962   ac_count=0
11963   $as_echo_n 0123456789 >"conftest.in"
11964   while :
11965   do
11966     cat "conftest.in" "conftest.in" >"conftest.tmp"
11967     mv "conftest.tmp" "conftest.in"
11968     cp "conftest.in" "conftest.nl"
11969     $as_echo 'EGREP' >> "conftest.nl"
11970     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11971     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11972     as_fn_arith $ac_count + 1 && ac_count=$as_val
11973     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11974       # Best one so far, save it but keep looking for a better one
11975       ac_cv_path_EGREP="$ac_path_EGREP"
11976       ac_path_EGREP_max=$ac_count
11977     fi
11978     # 10*(2^10) chars as input seems more than enough
11979     test $ac_count -gt 10 && break
11980   done
11981   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11982 esac
11983 
11984       $ac_path_EGREP_found && break 3
11985     done
11986   done
11987   done
11988 IFS=$as_save_IFS
11989   if test -z "$ac_cv_path_EGREP"; then
11990     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11991   fi
11992 else
11993   ac_cv_path_EGREP=$EGREP
11994 fi
11995 
11996    fi
11997 fi
11998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11999 $as_echo "$ac_cv_path_EGREP" >&6; }
12000  EGREP="$ac_cv_path_EGREP"
12001 
12002 
12003     else
12004       # If it succeeded, then it was overridden by the user. We will use it
12005       # for the tool.
12006 
12007       # First remove it from the list of overridden variables, so we can test
12008       # for unknown variables in the end.
12009       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12010 
12011       # Check if the provided tool contains a complete path.
12012       tool_specified="$EGREP"
12013       tool_basename="${tool_specified##*/}"
12014       if test "x$tool_basename" = "x$tool_specified"; then
12015         # A command without a complete path is provided, search $PATH.
12016         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12017 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12018         # Extract the first word of "$tool_basename", so it can be a program name with args.
12019 set dummy $tool_basename; ac_word=$2
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021 $as_echo_n "checking for $ac_word... " >&6; }
12022 if ${ac_cv_path_EGREP+:} false; then :
12023   $as_echo_n "(cached) " >&6
12024 else
12025   case $EGREP in
12026   [\\/]* | ?:[\\/]*)
12027   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12028   ;;
12029   *)
12030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031 for as_dir in $PATH
12032 do
12033   IFS=$as_save_IFS
12034   test -z "$as_dir" && as_dir=.
12035     for ac_exec_ext in '' $ac_executable_extensions; do
12036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12037     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039     break 2
12040   fi
12041 done
12042   done
12043 IFS=$as_save_IFS
12044 
12045   ;;
12046 esac
12047 fi
12048 EGREP=$ac_cv_path_EGREP
12049 if test -n "$EGREP"; then
12050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12051 $as_echo "$EGREP" >&6; }
12052 else
12053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054 $as_echo "no" >&6; }
12055 fi
12056 
12057 
12058         if test "x$EGREP" = x; then
12059           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12060         fi
12061       else
12062         # Otherwise we believe it is a complete path. Use it as it is.
12063         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12064 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12065         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12066 $as_echo_n "checking for EGREP... " >&6; }
12067         if test ! -x "$tool_specified"; then
12068           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12069 $as_echo "not found" >&6; }
12070           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12071         fi
12072         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12073 $as_echo "$tool_specified" >&6; }
12074       fi
12075     fi
12076   fi
12077 
12078 
12079   if test "x$EGREP" = x; then
12080     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12081   fi
12082 
12083 
12084 
12085 
12086   # Publish this variable in the help.
12087 
12088 
12089   if test "x$FGREP" = x; then
12090     # The variable is not set by user, try to locate tool using the code snippet
12091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12092 $as_echo_n "checking for fgrep... " >&6; }
12093 if ${ac_cv_path_FGREP+:} false; then :
12094   $as_echo_n "(cached) " >&6
12095 else
12096   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12097    then ac_cv_path_FGREP="$GREP -F"
12098    else
12099      if test -z "$FGREP"; then
12100   ac_path_FGREP_found=false
12101   # Loop through the user's path and test for each of PROGNAME-LIST
12102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12103 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12104 do
12105   IFS=$as_save_IFS
12106   test -z "$as_dir" && as_dir=.
12107     for ac_prog in fgrep; do
12108     for ac_exec_ext in '' $ac_executable_extensions; do
12109       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12110       as_fn_executable_p "$ac_path_FGREP" || continue
12111 # Check for GNU ac_path_FGREP and select it if it is found.
12112   # Check for GNU $ac_path_FGREP
12113 case `"$ac_path_FGREP" --version 2>&1` in
12114 *GNU*)
12115   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12116 *)
12117   ac_count=0
12118   $as_echo_n 0123456789 >"conftest.in"
12119   while :
12120   do
12121     cat "conftest.in" "conftest.in" >"conftest.tmp"
12122     mv "conftest.tmp" "conftest.in"
12123     cp "conftest.in" "conftest.nl"
12124     $as_echo 'FGREP' >> "conftest.nl"
12125     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12126     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12127     as_fn_arith $ac_count + 1 && ac_count=$as_val
12128     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12129       # Best one so far, save it but keep looking for a better one
12130       ac_cv_path_FGREP="$ac_path_FGREP"
12131       ac_path_FGREP_max=$ac_count
12132     fi
12133     # 10*(2^10) chars as input seems more than enough
12134     test $ac_count -gt 10 && break
12135   done
12136   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12137 esac
12138 
12139       $ac_path_FGREP_found && break 3
12140     done
12141   done
12142   done
12143 IFS=$as_save_IFS
12144   if test -z "$ac_cv_path_FGREP"; then
12145     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12146   fi
12147 else
12148   ac_cv_path_FGREP=$FGREP
12149 fi
12150 
12151    fi
12152 fi
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12154 $as_echo "$ac_cv_path_FGREP" >&6; }
12155  FGREP="$ac_cv_path_FGREP"
12156 
12157 
12158   else
12159     # The variable is set, but is it from the command line or the environment?
12160 
12161     # Try to remove the string !FGREP! from our list.
12162     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12163     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12164       # If it failed, the variable was not from the command line. Ignore it,
12165       # but warn the user (except for BASH, which is always set by the calling BASH).
12166       if test "xFGREP" != xBASH; then
12167         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12168 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12169       fi
12170       # Try to locate tool using the code snippet
12171       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12172 $as_echo_n "checking for fgrep... " >&6; }
12173 if ${ac_cv_path_FGREP+:} false; then :
12174   $as_echo_n "(cached) " >&6
12175 else
12176   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12177    then ac_cv_path_FGREP="$GREP -F"
12178    else
12179      if test -z "$FGREP"; then
12180   ac_path_FGREP_found=false
12181   # Loop through the user's path and test for each of PROGNAME-LIST
12182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12183 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12184 do
12185   IFS=$as_save_IFS
12186   test -z "$as_dir" && as_dir=.
12187     for ac_prog in fgrep; do
12188     for ac_exec_ext in '' $ac_executable_extensions; do
12189       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12190       as_fn_executable_p "$ac_path_FGREP" || continue
12191 # Check for GNU ac_path_FGREP and select it if it is found.
12192   # Check for GNU $ac_path_FGREP
12193 case `"$ac_path_FGREP" --version 2>&1` in
12194 *GNU*)
12195   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12196 *)
12197   ac_count=0
12198   $as_echo_n 0123456789 >"conftest.in"
12199   while :
12200   do
12201     cat "conftest.in" "conftest.in" >"conftest.tmp"
12202     mv "conftest.tmp" "conftest.in"
12203     cp "conftest.in" "conftest.nl"
12204     $as_echo 'FGREP' >> "conftest.nl"
12205     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12206     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12207     as_fn_arith $ac_count + 1 && ac_count=$as_val
12208     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12209       # Best one so far, save it but keep looking for a better one
12210       ac_cv_path_FGREP="$ac_path_FGREP"
12211       ac_path_FGREP_max=$ac_count
12212     fi
12213     # 10*(2^10) chars as input seems more than enough
12214     test $ac_count -gt 10 && break
12215   done
12216   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12217 esac
12218 
12219       $ac_path_FGREP_found && break 3
12220     done
12221   done
12222   done
12223 IFS=$as_save_IFS
12224   if test -z "$ac_cv_path_FGREP"; then
12225     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12226   fi
12227 else
12228   ac_cv_path_FGREP=$FGREP
12229 fi
12230 
12231    fi
12232 fi
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12234 $as_echo "$ac_cv_path_FGREP" >&6; }
12235  FGREP="$ac_cv_path_FGREP"
12236 
12237 
12238     else
12239       # If it succeeded, then it was overridden by the user. We will use it
12240       # for the tool.
12241 
12242       # First remove it from the list of overridden variables, so we can test
12243       # for unknown variables in the end.
12244       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12245 
12246       # Check if the provided tool contains a complete path.
12247       tool_specified="$FGREP"
12248       tool_basename="${tool_specified##*/}"
12249       if test "x$tool_basename" = "x$tool_specified"; then
12250         # A command without a complete path is provided, search $PATH.
12251         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12252 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12253         # Extract the first word of "$tool_basename", so it can be a program name with args.
12254 set dummy $tool_basename; ac_word=$2
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12256 $as_echo_n "checking for $ac_word... " >&6; }
12257 if ${ac_cv_path_FGREP+:} false; then :
12258   $as_echo_n "(cached) " >&6
12259 else
12260   case $FGREP in
12261   [\\/]* | ?:[\\/]*)
12262   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12263   ;;
12264   *)
12265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12266 for as_dir in $PATH
12267 do
12268   IFS=$as_save_IFS
12269   test -z "$as_dir" && as_dir=.
12270     for ac_exec_ext in '' $ac_executable_extensions; do
12271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12272     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12274     break 2
12275   fi
12276 done
12277   done
12278 IFS=$as_save_IFS
12279 
12280   ;;
12281 esac
12282 fi
12283 FGREP=$ac_cv_path_FGREP
12284 if test -n "$FGREP"; then
12285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12286 $as_echo "$FGREP" >&6; }
12287 else
12288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12289 $as_echo "no" >&6; }
12290 fi
12291 
12292 
12293         if test "x$FGREP" = x; then
12294           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12295         fi
12296       else
12297         # Otherwise we believe it is a complete path. Use it as it is.
12298         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12299 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12300         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12301 $as_echo_n "checking for FGREP... " >&6; }
12302         if test ! -x "$tool_specified"; then
12303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12304 $as_echo "not found" >&6; }
12305           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12306         fi
12307         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12308 $as_echo "$tool_specified" >&6; }
12309       fi
12310     fi
12311   fi
12312 
12313 
12314   if test "x$FGREP" = x; then
12315     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12316   fi
12317 
12318 
12319 
12320 
12321   # Publish this variable in the help.
12322 
12323 
12324   if test "x$SED" = x; then
12325     # The variable is not set by user, try to locate tool using the code snippet
12326     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12327 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12328 if ${ac_cv_path_SED+:} false; then :
12329   $as_echo_n "(cached) " >&6
12330 else
12331             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12332      for ac_i in 1 2 3 4 5 6 7; do
12333        ac_script="$ac_script$as_nl$ac_script"
12334      done
12335      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12336      { ac_script=; unset ac_script;}
12337      if test -z "$SED"; then
12338   ac_path_SED_found=false
12339   # Loop through the user's path and test for each of PROGNAME-LIST
12340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341 for as_dir in $PATH
12342 do
12343   IFS=$as_save_IFS
12344   test -z "$as_dir" && as_dir=.
12345     for ac_prog in sed gsed; do
12346     for ac_exec_ext in '' $ac_executable_extensions; do
12347       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12348       as_fn_executable_p "$ac_path_SED" || continue
12349 # Check for GNU ac_path_SED and select it if it is found.
12350   # Check for GNU $ac_path_SED
12351 case `"$ac_path_SED" --version 2>&1` in
12352 *GNU*)
12353   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12354 *)
12355   ac_count=0
12356   $as_echo_n 0123456789 >"conftest.in"
12357   while :
12358   do
12359     cat "conftest.in" "conftest.in" >"conftest.tmp"
12360     mv "conftest.tmp" "conftest.in"
12361     cp "conftest.in" "conftest.nl"
12362     $as_echo '' >> "conftest.nl"
12363     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12364     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12365     as_fn_arith $ac_count + 1 && ac_count=$as_val
12366     if test $ac_count -gt ${ac_path_SED_max-0}; then
12367       # Best one so far, save it but keep looking for a better one
12368       ac_cv_path_SED="$ac_path_SED"
12369       ac_path_SED_max=$ac_count
12370     fi
12371     # 10*(2^10) chars as input seems more than enough
12372     test $ac_count -gt 10 && break
12373   done
12374   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12375 esac
12376 
12377       $ac_path_SED_found && break 3
12378     done
12379   done
12380   done
12381 IFS=$as_save_IFS
12382   if test -z "$ac_cv_path_SED"; then
12383     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12384   fi
12385 else
12386   ac_cv_path_SED=$SED
12387 fi
12388 
12389 fi
12390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12391 $as_echo "$ac_cv_path_SED" >&6; }
12392  SED="$ac_cv_path_SED"
12393   rm -f conftest.sed
12394 
12395   else
12396     # The variable is set, but is it from the command line or the environment?
12397 
12398     # Try to remove the string !SED! from our list.
12399     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12400     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12401       # If it failed, the variable was not from the command line. Ignore it,
12402       # but warn the user (except for BASH, which is always set by the calling BASH).
12403       if test "xSED" != xBASH; then
12404         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12405 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12406       fi
12407       # Try to locate tool using the code snippet
12408       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12409 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12410 if ${ac_cv_path_SED+:} false; then :
12411   $as_echo_n "(cached) " >&6
12412 else
12413             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12414      for ac_i in 1 2 3 4 5 6 7; do
12415        ac_script="$ac_script$as_nl$ac_script"
12416      done
12417      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12418      { ac_script=; unset ac_script;}
12419      if test -z "$SED"; then
12420   ac_path_SED_found=false
12421   # Loop through the user's path and test for each of PROGNAME-LIST
12422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12423 for as_dir in $PATH
12424 do
12425   IFS=$as_save_IFS
12426   test -z "$as_dir" && as_dir=.
12427     for ac_prog in sed gsed; do
12428     for ac_exec_ext in '' $ac_executable_extensions; do
12429       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12430       as_fn_executable_p "$ac_path_SED" || continue
12431 # Check for GNU ac_path_SED and select it if it is found.
12432   # Check for GNU $ac_path_SED
12433 case `"$ac_path_SED" --version 2>&1` in
12434 *GNU*)
12435   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12436 *)
12437   ac_count=0
12438   $as_echo_n 0123456789 >"conftest.in"
12439   while :
12440   do
12441     cat "conftest.in" "conftest.in" >"conftest.tmp"
12442     mv "conftest.tmp" "conftest.in"
12443     cp "conftest.in" "conftest.nl"
12444     $as_echo '' >> "conftest.nl"
12445     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12446     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12447     as_fn_arith $ac_count + 1 && ac_count=$as_val
12448     if test $ac_count -gt ${ac_path_SED_max-0}; then
12449       # Best one so far, save it but keep looking for a better one
12450       ac_cv_path_SED="$ac_path_SED"
12451       ac_path_SED_max=$ac_count
12452     fi
12453     # 10*(2^10) chars as input seems more than enough
12454     test $ac_count -gt 10 && break
12455   done
12456   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12457 esac
12458 
12459       $ac_path_SED_found && break 3
12460     done
12461   done
12462   done
12463 IFS=$as_save_IFS
12464   if test -z "$ac_cv_path_SED"; then
12465     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12466   fi
12467 else
12468   ac_cv_path_SED=$SED
12469 fi
12470 
12471 fi
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12473 $as_echo "$ac_cv_path_SED" >&6; }
12474  SED="$ac_cv_path_SED"
12475   rm -f conftest.sed
12476 
12477     else
12478       # If it succeeded, then it was overridden by the user. We will use it
12479       # for the tool.
12480 
12481       # First remove it from the list of overridden variables, so we can test
12482       # for unknown variables in the end.
12483       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12484 
12485       # Check if the provided tool contains a complete path.
12486       tool_specified="$SED"
12487       tool_basename="${tool_specified##*/}"
12488       if test "x$tool_basename" = "x$tool_specified"; then
12489         # A command without a complete path is provided, search $PATH.
12490         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12491 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12492         # Extract the first word of "$tool_basename", so it can be a program name with args.
12493 set dummy $tool_basename; ac_word=$2
12494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12495 $as_echo_n "checking for $ac_word... " >&6; }
12496 if ${ac_cv_path_SED+:} false; then :
12497   $as_echo_n "(cached) " >&6
12498 else
12499   case $SED in
12500   [\\/]* | ?:[\\/]*)
12501   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12502   ;;
12503   *)
12504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12505 for as_dir in $PATH
12506 do
12507   IFS=$as_save_IFS
12508   test -z "$as_dir" && as_dir=.
12509     for ac_exec_ext in '' $ac_executable_extensions; do
12510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12511     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12513     break 2
12514   fi
12515 done
12516   done
12517 IFS=$as_save_IFS
12518 
12519   ;;
12520 esac
12521 fi
12522 SED=$ac_cv_path_SED
12523 if test -n "$SED"; then
12524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12525 $as_echo "$SED" >&6; }
12526 else
12527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528 $as_echo "no" >&6; }
12529 fi
12530 
12531 
12532         if test "x$SED" = x; then
12533           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12534         fi
12535       else
12536         # Otherwise we believe it is a complete path. Use it as it is.
12537         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12538 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12539         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12540 $as_echo_n "checking for SED... " >&6; }
12541         if test ! -x "$tool_specified"; then
12542           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12543 $as_echo "not found" >&6; }
12544           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12545         fi
12546         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12547 $as_echo "$tool_specified" >&6; }
12548       fi
12549     fi
12550   fi
12551 
12552 
12553   if test "x$SED" = x; then
12554     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12555   fi
12556 
12557 
12558 
12559   # Always force rm.
12560   RM="$RM -f"
12561 
12562   # pwd behaves differently on various platforms and some don't support the -L flag.
12563   # Always use the bash builtin pwd to get uniform behavior.
12564   THEPWDCMD=pwd
12565 
12566   # These are not required on all platforms
12567 
12568 
12569   # Publish this variable in the help.
12570 
12571 
12572   if test "x$CYGPATH" = x; then
12573     # The variable is not set by user, try to locate tool using the code snippet
12574     for ac_prog in cygpath
12575 do
12576   # Extract the first word of "$ac_prog", so it can be a program name with args.
12577 set dummy $ac_prog; ac_word=$2
12578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579 $as_echo_n "checking for $ac_word... " >&6; }
12580 if ${ac_cv_path_CYGPATH+:} false; then :
12581   $as_echo_n "(cached) " >&6
12582 else
12583   case $CYGPATH in
12584   [\\/]* | ?:[\\/]*)
12585   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12586   ;;
12587   *)
12588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589 for as_dir in $PATH
12590 do
12591   IFS=$as_save_IFS
12592   test -z "$as_dir" && as_dir=.
12593     for ac_exec_ext in '' $ac_executable_extensions; do
12594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597     break 2
12598   fi
12599 done
12600   done
12601 IFS=$as_save_IFS
12602 
12603   ;;
12604 esac
12605 fi
12606 CYGPATH=$ac_cv_path_CYGPATH
12607 if test -n "$CYGPATH"; then
12608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12609 $as_echo "$CYGPATH" >&6; }
12610 else
12611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612 $as_echo "no" >&6; }
12613 fi
12614 
12615 
12616   test -n "$CYGPATH" && break
12617 done
12618 
12619   else
12620     # The variable is set, but is it from the command line or the environment?
12621 
12622     # Try to remove the string !CYGPATH! from our list.
12623     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12624     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12625       # If it failed, the variable was not from the command line. Ignore it,
12626       # but warn the user (except for BASH, which is always set by the calling BASH).
12627       if test "xCYGPATH" != xBASH; then
12628         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12629 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12630       fi
12631       # Try to locate tool using the code snippet
12632       for ac_prog in cygpath
12633 do
12634   # Extract the first word of "$ac_prog", so it can be a program name with args.
12635 set dummy $ac_prog; ac_word=$2
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637 $as_echo_n "checking for $ac_word... " >&6; }
12638 if ${ac_cv_path_CYGPATH+:} false; then :
12639   $as_echo_n "(cached) " >&6
12640 else
12641   case $CYGPATH in
12642   [\\/]* | ?:[\\/]*)
12643   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12644   ;;
12645   *)
12646   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647 for as_dir in $PATH
12648 do
12649   IFS=$as_save_IFS
12650   test -z "$as_dir" && as_dir=.
12651     for ac_exec_ext in '' $ac_executable_extensions; do
12652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655     break 2
12656   fi
12657 done
12658   done
12659 IFS=$as_save_IFS
12660 
12661   ;;
12662 esac
12663 fi
12664 CYGPATH=$ac_cv_path_CYGPATH
12665 if test -n "$CYGPATH"; then
12666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12667 $as_echo "$CYGPATH" >&6; }
12668 else
12669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670 $as_echo "no" >&6; }
12671 fi
12672 
12673 
12674   test -n "$CYGPATH" && break
12675 done
12676 
12677     else
12678       # If it succeeded, then it was overridden by the user. We will use it
12679       # for the tool.
12680 
12681       # First remove it from the list of overridden variables, so we can test
12682       # for unknown variables in the end.
12683       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12684 
12685       # Check if the provided tool contains a complete path.
12686       tool_specified="$CYGPATH"
12687       tool_basename="${tool_specified##*/}"
12688       if test "x$tool_basename" = "x$tool_specified"; then
12689         # A command without a complete path is provided, search $PATH.
12690         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12691 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12692         # Extract the first word of "$tool_basename", so it can be a program name with args.
12693 set dummy $tool_basename; ac_word=$2
12694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12695 $as_echo_n "checking for $ac_word... " >&6; }
12696 if ${ac_cv_path_CYGPATH+:} false; then :
12697   $as_echo_n "(cached) " >&6
12698 else
12699   case $CYGPATH in
12700   [\\/]* | ?:[\\/]*)
12701   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12702   ;;
12703   *)
12704   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12705 for as_dir in $PATH
12706 do
12707   IFS=$as_save_IFS
12708   test -z "$as_dir" && as_dir=.
12709     for ac_exec_ext in '' $ac_executable_extensions; do
12710   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12711     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12713     break 2
12714   fi
12715 done
12716   done
12717 IFS=$as_save_IFS
12718 
12719   ;;
12720 esac
12721 fi
12722 CYGPATH=$ac_cv_path_CYGPATH
12723 if test -n "$CYGPATH"; then
12724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12725 $as_echo "$CYGPATH" >&6; }
12726 else
12727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728 $as_echo "no" >&6; }
12729 fi
12730 
12731 
12732         if test "x$CYGPATH" = x; then
12733           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12734         fi
12735       else
12736         # Otherwise we believe it is a complete path. Use it as it is.
12737         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12738 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12739         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12740 $as_echo_n "checking for CYGPATH... " >&6; }
12741         if test ! -x "$tool_specified"; then
12742           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12743 $as_echo "not found" >&6; }
12744           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12745         fi
12746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12747 $as_echo "$tool_specified" >&6; }
12748       fi
12749     fi
12750   fi
12751 
12752 
12753 
12754 
12755   # Publish this variable in the help.
12756 
12757 
12758   if test "x$READLINK" = x; then
12759     # The variable is not set by user, try to locate tool using the code snippet
12760     for ac_prog in greadlink readlink
12761 do
12762   # Extract the first word of "$ac_prog", so it can be a program name with args.
12763 set dummy $ac_prog; ac_word=$2
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12765 $as_echo_n "checking for $ac_word... " >&6; }
12766 if ${ac_cv_path_READLINK+:} false; then :
12767   $as_echo_n "(cached) " >&6
12768 else
12769   case $READLINK in
12770   [\\/]* | ?:[\\/]*)
12771   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12772   ;;
12773   *)
12774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12775 for as_dir in $PATH
12776 do
12777   IFS=$as_save_IFS
12778   test -z "$as_dir" && as_dir=.
12779     for ac_exec_ext in '' $ac_executable_extensions; do
12780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12781     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12783     break 2
12784   fi
12785 done
12786   done
12787 IFS=$as_save_IFS
12788 
12789   ;;
12790 esac
12791 fi
12792 READLINK=$ac_cv_path_READLINK
12793 if test -n "$READLINK"; then
12794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12795 $as_echo "$READLINK" >&6; }
12796 else
12797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12798 $as_echo "no" >&6; }
12799 fi
12800 
12801 
12802   test -n "$READLINK" && break
12803 done
12804 
12805   else
12806     # The variable is set, but is it from the command line or the environment?
12807 
12808     # Try to remove the string !READLINK! from our list.
12809     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12810     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12811       # If it failed, the variable was not from the command line. Ignore it,
12812       # but warn the user (except for BASH, which is always set by the calling BASH).
12813       if test "xREADLINK" != xBASH; then
12814         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12815 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12816       fi
12817       # Try to locate tool using the code snippet
12818       for ac_prog in greadlink readlink
12819 do
12820   # Extract the first word of "$ac_prog", so it can be a program name with args.
12821 set dummy $ac_prog; ac_word=$2
12822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12823 $as_echo_n "checking for $ac_word... " >&6; }
12824 if ${ac_cv_path_READLINK+:} false; then :
12825   $as_echo_n "(cached) " >&6
12826 else
12827   case $READLINK in
12828   [\\/]* | ?:[\\/]*)
12829   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12830   ;;
12831   *)
12832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12833 for as_dir in $PATH
12834 do
12835   IFS=$as_save_IFS
12836   test -z "$as_dir" && as_dir=.
12837     for ac_exec_ext in '' $ac_executable_extensions; do
12838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12839     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12841     break 2
12842   fi
12843 done
12844   done
12845 IFS=$as_save_IFS
12846 
12847   ;;
12848 esac
12849 fi
12850 READLINK=$ac_cv_path_READLINK
12851 if test -n "$READLINK"; then
12852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12853 $as_echo "$READLINK" >&6; }
12854 else
12855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12856 $as_echo "no" >&6; }
12857 fi
12858 
12859 
12860   test -n "$READLINK" && break
12861 done
12862 
12863     else
12864       # If it succeeded, then it was overridden by the user. We will use it
12865       # for the tool.
12866 
12867       # First remove it from the list of overridden variables, so we can test
12868       # for unknown variables in the end.
12869       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12870 
12871       # Check if the provided tool contains a complete path.
12872       tool_specified="$READLINK"
12873       tool_basename="${tool_specified##*/}"
12874       if test "x$tool_basename" = "x$tool_specified"; then
12875         # A command without a complete path is provided, search $PATH.
12876         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12877 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12878         # Extract the first word of "$tool_basename", so it can be a program name with args.
12879 set dummy $tool_basename; ac_word=$2
12880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12881 $as_echo_n "checking for $ac_word... " >&6; }
12882 if ${ac_cv_path_READLINK+:} false; then :
12883   $as_echo_n "(cached) " >&6
12884 else
12885   case $READLINK in
12886   [\\/]* | ?:[\\/]*)
12887   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12888   ;;
12889   *)
12890   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891 for as_dir in $PATH
12892 do
12893   IFS=$as_save_IFS
12894   test -z "$as_dir" && as_dir=.
12895     for ac_exec_ext in '' $ac_executable_extensions; do
12896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12897     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12899     break 2
12900   fi
12901 done
12902   done
12903 IFS=$as_save_IFS
12904 
12905   ;;
12906 esac
12907 fi
12908 READLINK=$ac_cv_path_READLINK
12909 if test -n "$READLINK"; then
12910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12911 $as_echo "$READLINK" >&6; }
12912 else
12913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12914 $as_echo "no" >&6; }
12915 fi
12916 
12917 
12918         if test "x$READLINK" = x; then
12919           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12920         fi
12921       else
12922         # Otherwise we believe it is a complete path. Use it as it is.
12923         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12924 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12926 $as_echo_n "checking for READLINK... " >&6; }
12927         if test ! -x "$tool_specified"; then
12928           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12929 $as_echo "not found" >&6; }
12930           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12931         fi
12932         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12933 $as_echo "$tool_specified" >&6; }
12934       fi
12935     fi
12936   fi
12937 
12938 
12939 
12940 
12941   # Publish this variable in the help.
12942 
12943 
12944   if test "x$DF" = x; then
12945     # The variable is not set by user, try to locate tool using the code snippet
12946     for ac_prog in df
12947 do
12948   # Extract the first word of "$ac_prog", so it can be a program name with args.
12949 set dummy $ac_prog; ac_word=$2
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12951 $as_echo_n "checking for $ac_word... " >&6; }
12952 if ${ac_cv_path_DF+:} false; then :
12953   $as_echo_n "(cached) " >&6
12954 else
12955   case $DF in
12956   [\\/]* | ?:[\\/]*)
12957   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12958   ;;
12959   *)
12960   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12961 for as_dir in $PATH
12962 do
12963   IFS=$as_save_IFS
12964   test -z "$as_dir" && as_dir=.
12965     for ac_exec_ext in '' $ac_executable_extensions; do
12966   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12967     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12968     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12969     break 2
12970   fi
12971 done
12972   done
12973 IFS=$as_save_IFS
12974 
12975   ;;
12976 esac
12977 fi
12978 DF=$ac_cv_path_DF
12979 if test -n "$DF"; then
12980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12981 $as_echo "$DF" >&6; }
12982 else
12983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12984 $as_echo "no" >&6; }
12985 fi
12986 
12987 
12988   test -n "$DF" && break
12989 done
12990 
12991   else
12992     # The variable is set, but is it from the command line or the environment?
12993 
12994     # Try to remove the string !DF! from our list.
12995     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12996     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12997       # If it failed, the variable was not from the command line. Ignore it,
12998       # but warn the user (except for BASH, which is always set by the calling BASH).
12999       if test "xDF" != xBASH; then
13000         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13001 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13002       fi
13003       # Try to locate tool using the code snippet
13004       for ac_prog in df
13005 do
13006   # Extract the first word of "$ac_prog", so it can be a program name with args.
13007 set dummy $ac_prog; ac_word=$2
13008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13009 $as_echo_n "checking for $ac_word... " >&6; }
13010 if ${ac_cv_path_DF+:} false; then :
13011   $as_echo_n "(cached) " >&6
13012 else
13013   case $DF in
13014   [\\/]* | ?:[\\/]*)
13015   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13016   ;;
13017   *)
13018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13019 for as_dir in $PATH
13020 do
13021   IFS=$as_save_IFS
13022   test -z "$as_dir" && as_dir=.
13023     for ac_exec_ext in '' $ac_executable_extensions; do
13024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13025     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13027     break 2
13028   fi
13029 done
13030   done
13031 IFS=$as_save_IFS
13032 
13033   ;;
13034 esac
13035 fi
13036 DF=$ac_cv_path_DF
13037 if test -n "$DF"; then
13038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13039 $as_echo "$DF" >&6; }
13040 else
13041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042 $as_echo "no" >&6; }
13043 fi
13044 
13045 
13046   test -n "$DF" && break
13047 done
13048 
13049     else
13050       # If it succeeded, then it was overridden by the user. We will use it
13051       # for the tool.
13052 
13053       # First remove it from the list of overridden variables, so we can test
13054       # for unknown variables in the end.
13055       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13056 
13057       # Check if the provided tool contains a complete path.
13058       tool_specified="$DF"
13059       tool_basename="${tool_specified##*/}"
13060       if test "x$tool_basename" = "x$tool_specified"; then
13061         # A command without a complete path is provided, search $PATH.
13062         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13063 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13064         # Extract the first word of "$tool_basename", so it can be a program name with args.
13065 set dummy $tool_basename; ac_word=$2
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067 $as_echo_n "checking for $ac_word... " >&6; }
13068 if ${ac_cv_path_DF+:} false; then :
13069   $as_echo_n "(cached) " >&6
13070 else
13071   case $DF in
13072   [\\/]* | ?:[\\/]*)
13073   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13074   ;;
13075   *)
13076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077 for as_dir in $PATH
13078 do
13079   IFS=$as_save_IFS
13080   test -z "$as_dir" && as_dir=.
13081     for ac_exec_ext in '' $ac_executable_extensions; do
13082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085     break 2
13086   fi
13087 done
13088   done
13089 IFS=$as_save_IFS
13090 
13091   ;;
13092 esac
13093 fi
13094 DF=$ac_cv_path_DF
13095 if test -n "$DF"; then
13096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13097 $as_echo "$DF" >&6; }
13098 else
13099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100 $as_echo "no" >&6; }
13101 fi
13102 
13103 
13104         if test "x$DF" = x; then
13105           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13106         fi
13107       else
13108         # Otherwise we believe it is a complete path. Use it as it is.
13109         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13110 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13112 $as_echo_n "checking for DF... " >&6; }
13113         if test ! -x "$tool_specified"; then
13114           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13115 $as_echo "not found" >&6; }
13116           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13117         fi
13118         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13119 $as_echo "$tool_specified" >&6; }
13120       fi
13121     fi
13122   fi
13123 
13124 
13125 
13126 
13127   # Publish this variable in the help.
13128 
13129 
13130   if test "x$SETFILE" = x; then
13131     # The variable is not set by user, try to locate tool using the code snippet
13132     for ac_prog in SetFile
13133 do
13134   # Extract the first word of "$ac_prog", so it can be a program name with args.
13135 set dummy $ac_prog; ac_word=$2
13136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137 $as_echo_n "checking for $ac_word... " >&6; }
13138 if ${ac_cv_path_SETFILE+:} false; then :
13139   $as_echo_n "(cached) " >&6
13140 else
13141   case $SETFILE in
13142   [\\/]* | ?:[\\/]*)
13143   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13144   ;;
13145   *)
13146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147 for as_dir in $PATH
13148 do
13149   IFS=$as_save_IFS
13150   test -z "$as_dir" && as_dir=.
13151     for ac_exec_ext in '' $ac_executable_extensions; do
13152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155     break 2
13156   fi
13157 done
13158   done
13159 IFS=$as_save_IFS
13160 
13161   ;;
13162 esac
13163 fi
13164 SETFILE=$ac_cv_path_SETFILE
13165 if test -n "$SETFILE"; then
13166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13167 $as_echo "$SETFILE" >&6; }
13168 else
13169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170 $as_echo "no" >&6; }
13171 fi
13172 
13173 
13174   test -n "$SETFILE" && break
13175 done
13176 
13177   else
13178     # The variable is set, but is it from the command line or the environment?
13179 
13180     # Try to remove the string !SETFILE! from our list.
13181     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13182     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13183       # If it failed, the variable was not from the command line. Ignore it,
13184       # but warn the user (except for BASH, which is always set by the calling BASH).
13185       if test "xSETFILE" != xBASH; then
13186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13187 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13188       fi
13189       # Try to locate tool using the code snippet
13190       for ac_prog in SetFile
13191 do
13192   # Extract the first word of "$ac_prog", so it can be a program name with args.
13193 set dummy $ac_prog; ac_word=$2
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13195 $as_echo_n "checking for $ac_word... " >&6; }
13196 if ${ac_cv_path_SETFILE+:} false; then :
13197   $as_echo_n "(cached) " >&6
13198 else
13199   case $SETFILE in
13200   [\\/]* | ?:[\\/]*)
13201   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13202   ;;
13203   *)
13204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13205 for as_dir in $PATH
13206 do
13207   IFS=$as_save_IFS
13208   test -z "$as_dir" && as_dir=.
13209     for ac_exec_ext in '' $ac_executable_extensions; do
13210   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13211     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13213     break 2
13214   fi
13215 done
13216   done
13217 IFS=$as_save_IFS
13218 
13219   ;;
13220 esac
13221 fi
13222 SETFILE=$ac_cv_path_SETFILE
13223 if test -n "$SETFILE"; then
13224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13225 $as_echo "$SETFILE" >&6; }
13226 else
13227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228 $as_echo "no" >&6; }
13229 fi
13230 
13231 
13232   test -n "$SETFILE" && break
13233 done
13234 
13235     else
13236       # If it succeeded, then it was overridden by the user. We will use it
13237       # for the tool.
13238 
13239       # First remove it from the list of overridden variables, so we can test
13240       # for unknown variables in the end.
13241       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13242 
13243       # Check if the provided tool contains a complete path.
13244       tool_specified="$SETFILE"
13245       tool_basename="${tool_specified##*/}"
13246       if test "x$tool_basename" = "x$tool_specified"; then
13247         # A command without a complete path is provided, search $PATH.
13248         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13249 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13250         # Extract the first word of "$tool_basename", so it can be a program name with args.
13251 set dummy $tool_basename; ac_word=$2
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253 $as_echo_n "checking for $ac_word... " >&6; }
13254 if ${ac_cv_path_SETFILE+:} false; then :
13255   $as_echo_n "(cached) " >&6
13256 else
13257   case $SETFILE in
13258   [\\/]* | ?:[\\/]*)
13259   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13260   ;;
13261   *)
13262   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263 for as_dir in $PATH
13264 do
13265   IFS=$as_save_IFS
13266   test -z "$as_dir" && as_dir=.
13267     for ac_exec_ext in '' $ac_executable_extensions; do
13268   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271     break 2
13272   fi
13273 done
13274   done
13275 IFS=$as_save_IFS
13276 
13277   ;;
13278 esac
13279 fi
13280 SETFILE=$ac_cv_path_SETFILE
13281 if test -n "$SETFILE"; then
13282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13283 $as_echo "$SETFILE" >&6; }
13284 else
13285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286 $as_echo "no" >&6; }
13287 fi
13288 
13289 
13290         if test "x$SETFILE" = x; then
13291           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13292         fi
13293       else
13294         # Otherwise we believe it is a complete path. Use it as it is.
13295         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13296 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13298 $as_echo_n "checking for SETFILE... " >&6; }
13299         if test ! -x "$tool_specified"; then
13300           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13301 $as_echo "not found" >&6; }
13302           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13303         fi
13304         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13305 $as_echo "$tool_specified" >&6; }
13306       fi
13307     fi
13308   fi
13309 
13310 
13311 
13312 
13313 # Now we can determine OpenJDK build and target platforms. This is required to
13314 # have early on.
13315 # Make sure we can run config.sub.
13316 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13317   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13318 
13319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13320 $as_echo_n "checking build system type... " >&6; }
13321 if ${ac_cv_build+:} false; then :
13322   $as_echo_n "(cached) " >&6
13323 else
13324   ac_build_alias=$build_alias
13325 test "x$ac_build_alias" = x &&
13326   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13327 test "x$ac_build_alias" = x &&
13328   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13329 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13330   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13331 
13332 fi
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13334 $as_echo "$ac_cv_build" >&6; }
13335 case $ac_cv_build in
13336 *-*-*) ;;
13337 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13338 esac
13339 build=$ac_cv_build
13340 ac_save_IFS=$IFS; IFS='-'
13341 set x $ac_cv_build
13342 shift
13343 build_cpu=$1
13344 build_vendor=$2
13345 shift; shift
13346 # Remember, the first character of IFS is used to create $*,
13347 # except with old shells:
13348 build_os=$*
13349 IFS=$ac_save_IFS
13350 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13351 
13352 
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13354 $as_echo_n "checking host system type... " >&6; }
13355 if ${ac_cv_host+:} false; then :
13356   $as_echo_n "(cached) " >&6
13357 else
13358   if test "x$host_alias" = x; then
13359   ac_cv_host=$ac_cv_build
13360 else
13361   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13362     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13363 fi
13364 
13365 fi
13366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13367 $as_echo "$ac_cv_host" >&6; }
13368 case $ac_cv_host in
13369 *-*-*) ;;
13370 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13371 esac
13372 host=$ac_cv_host
13373 ac_save_IFS=$IFS; IFS='-'
13374 set x $ac_cv_host
13375 shift
13376 host_cpu=$1
13377 host_vendor=$2
13378 shift; shift
13379 # Remember, the first character of IFS is used to create $*,
13380 # except with old shells:
13381 host_os=$*
13382 IFS=$ac_save_IFS
13383 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13384 
13385 
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13387 $as_echo_n "checking target system type... " >&6; }
13388 if ${ac_cv_target+:} false; then :
13389   $as_echo_n "(cached) " >&6
13390 else
13391   if test "x$target_alias" = x; then
13392   ac_cv_target=$ac_cv_host
13393 else
13394   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13395     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13396 fi
13397 
13398 fi
13399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13400 $as_echo "$ac_cv_target" >&6; }
13401 case $ac_cv_target in
13402 *-*-*) ;;
13403 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13404 esac
13405 target=$ac_cv_target
13406 ac_save_IFS=$IFS; IFS='-'
13407 set x $ac_cv_target
13408 shift
13409 target_cpu=$1
13410 target_vendor=$2
13411 shift; shift
13412 # Remember, the first character of IFS is used to create $*,
13413 # except with old shells:
13414 target_os=$*
13415 IFS=$ac_save_IFS
13416 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13417 
13418 
13419 # The aliases save the names the user supplied, while $host etc.
13420 # will get canonicalized.
13421 test -n "$target_alias" &&
13422   test "$program_prefix$program_suffix$program_transform_name" = \
13423     NONENONEs,x,x, &&
13424   program_prefix=${target_alias}-
13425 
13426   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13427   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13428   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13429   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13430   # to use the configure naming style.
13431 
13432 
13433 
13434 
13435 
13436   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13437   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13438   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13439   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13440   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13441   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13442 
13443 
13444 
13445   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13446 
13447   case "$build_os" in
13448     *linux*)
13449       VAR_OS=linux
13450       VAR_OS_API=posix
13451       VAR_OS_ENV=linux
13452       ;;
13453     *solaris*)
13454       VAR_OS=solaris
13455       VAR_OS_API=posix
13456       VAR_OS_ENV=solaris
13457       ;;
13458     *darwin*)
13459       VAR_OS=macosx
13460       VAR_OS_API=posix
13461       VAR_OS_ENV=macosx
13462       ;;
13463     *bsd*)
13464       VAR_OS=bsd
13465       VAR_OS_API=posix
13466       VAR_OS_ENV=bsd
13467       ;;
13468     *cygwin*)
13469       VAR_OS=windows
13470       VAR_OS_API=winapi
13471       VAR_OS_ENV=windows.cygwin
13472       ;;
13473     *mingw*)
13474       VAR_OS=windows
13475       VAR_OS_API=winapi
13476       VAR_OS_ENV=windows.msys
13477       ;;
13478     *aix*)
13479       VAR_OS=aix
13480       VAR_OS_API=posix
13481       VAR_OS_ENV=aix
13482       ;;
13483     *)
13484       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13485       ;;
13486   esac
13487 
13488 
13489   # First argument is the cpu name from the trip/quad
13490   case "$build_cpu" in
13491     x86_64)
13492       VAR_CPU=x86_64
13493       VAR_CPU_ARCH=x86
13494       VAR_CPU_BITS=64
13495       VAR_CPU_ENDIAN=little
13496       ;;
13497     i?86)
13498       VAR_CPU=x86
13499       VAR_CPU_ARCH=x86
13500       VAR_CPU_BITS=32
13501       VAR_CPU_ENDIAN=little
13502       ;;
13503     arm*)
13504       VAR_CPU=arm
13505       VAR_CPU_ARCH=arm
13506       VAR_CPU_BITS=32
13507       VAR_CPU_ENDIAN=little
13508       ;;
13509     powerpc)
13510       VAR_CPU=ppc
13511       VAR_CPU_ARCH=ppc
13512       VAR_CPU_BITS=32
13513       VAR_CPU_ENDIAN=big
13514       ;;
13515     powerpc64)
13516       VAR_CPU=ppc64
13517       VAR_CPU_ARCH=ppc
13518       VAR_CPU_BITS=64
13519       VAR_CPU_ENDIAN=big
13520       ;;
13521     powerpc64le)
13522       VAR_CPU=ppc64
13523       VAR_CPU_ARCH=ppc
13524       VAR_CPU_BITS=64
13525       VAR_CPU_ENDIAN=little
13526       ;;
13527     s390)
13528       VAR_CPU=s390
13529       VAR_CPU_ARCH=s390
13530       VAR_CPU_BITS=32
13531       VAR_CPU_ENDIAN=big
13532       ;;
13533     s390x)
13534       VAR_CPU=s390x
13535       VAR_CPU_ARCH=s390
13536       VAR_CPU_BITS=64
13537       VAR_CPU_ENDIAN=big
13538       ;;
13539     sparc)
13540       VAR_CPU=sparc
13541       VAR_CPU_ARCH=sparc
13542       VAR_CPU_BITS=32
13543       VAR_CPU_ENDIAN=big
13544       ;;
13545     sparcv9)
13546       VAR_CPU=sparcv9
13547       VAR_CPU_ARCH=sparc
13548       VAR_CPU_BITS=64
13549       VAR_CPU_ENDIAN=big
13550       ;;
13551     *)
13552       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13553       ;;
13554   esac
13555 
13556   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13557   OPENJDK_BUILD_OS="$VAR_OS"
13558   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13559   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13560   OPENJDK_BUILD_CPU="$VAR_CPU"
13561   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13562   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13563   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13564 
13565 
13566 
13567 
13568 
13569 
13570 
13571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13572 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13574 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13575 
13576   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13577 
13578   case "$host_os" in
13579     *linux*)
13580       VAR_OS=linux
13581       VAR_OS_API=posix
13582       VAR_OS_ENV=linux
13583       ;;
13584     *solaris*)
13585       VAR_OS=solaris
13586       VAR_OS_API=posix
13587       VAR_OS_ENV=solaris
13588       ;;
13589     *darwin*)
13590       VAR_OS=macosx
13591       VAR_OS_API=posix
13592       VAR_OS_ENV=macosx
13593       ;;
13594     *bsd*)
13595       VAR_OS=bsd
13596       VAR_OS_API=posix
13597       VAR_OS_ENV=bsd
13598       ;;
13599     *cygwin*)
13600       VAR_OS=windows
13601       VAR_OS_API=winapi
13602       VAR_OS_ENV=windows.cygwin
13603       ;;
13604     *mingw*)
13605       VAR_OS=windows
13606       VAR_OS_API=winapi
13607       VAR_OS_ENV=windows.msys
13608       ;;
13609     *aix*)
13610       VAR_OS=aix
13611       VAR_OS_API=posix
13612       VAR_OS_ENV=aix
13613       ;;
13614     *)
13615       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13616       ;;
13617   esac
13618 
13619 
13620   # First argument is the cpu name from the trip/quad
13621   case "$host_cpu" in
13622     x86_64)
13623       VAR_CPU=x86_64
13624       VAR_CPU_ARCH=x86
13625       VAR_CPU_BITS=64
13626       VAR_CPU_ENDIAN=little
13627       ;;
13628     i?86)
13629       VAR_CPU=x86
13630       VAR_CPU_ARCH=x86
13631       VAR_CPU_BITS=32
13632       VAR_CPU_ENDIAN=little
13633       ;;
13634     arm*)
13635       VAR_CPU=arm
13636       VAR_CPU_ARCH=arm
13637       VAR_CPU_BITS=32
13638       VAR_CPU_ENDIAN=little
13639       ;;
13640     powerpc)
13641       VAR_CPU=ppc
13642       VAR_CPU_ARCH=ppc
13643       VAR_CPU_BITS=32
13644       VAR_CPU_ENDIAN=big
13645       ;;
13646     powerpc64)
13647       VAR_CPU=ppc64
13648       VAR_CPU_ARCH=ppc
13649       VAR_CPU_BITS=64
13650       VAR_CPU_ENDIAN=big
13651       ;;
13652     powerpc64le)
13653       VAR_CPU=ppc64
13654       VAR_CPU_ARCH=ppc
13655       VAR_CPU_BITS=64
13656       VAR_CPU_ENDIAN=little
13657       ;;
13658     s390)
13659       VAR_CPU=s390
13660       VAR_CPU_ARCH=s390
13661       VAR_CPU_BITS=32
13662       VAR_CPU_ENDIAN=big
13663       ;;
13664     s390x)
13665       VAR_CPU=s390x
13666       VAR_CPU_ARCH=s390
13667       VAR_CPU_BITS=64
13668       VAR_CPU_ENDIAN=big
13669       ;;
13670     sparc)
13671       VAR_CPU=sparc
13672       VAR_CPU_ARCH=sparc
13673       VAR_CPU_BITS=32
13674       VAR_CPU_ENDIAN=big
13675       ;;
13676     sparcv9)
13677       VAR_CPU=sparcv9
13678       VAR_CPU_ARCH=sparc
13679       VAR_CPU_BITS=64
13680       VAR_CPU_ENDIAN=big
13681       ;;
13682     *)
13683       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13684       ;;
13685   esac
13686 
13687   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13688   OPENJDK_TARGET_OS="$VAR_OS"
13689   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13690   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13691   OPENJDK_TARGET_CPU="$VAR_CPU"
13692   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13693   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13694   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13695 
13696 
13697 
13698 
13699 
13700 
13701 
13702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13703 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13705 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13706 
13707 
13708 
13709 # Check whether --with-target-bits was given.
13710 if test "${with_target_bits+set}" = set; then :
13711   withval=$with_target_bits;
13712 fi
13713 
13714 
13715   # We have three types of compiles:
13716   # native  == normal compilation, target system == build system
13717   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13718   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13719   #
13720   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13721     # We're doing a proper cross-compilation
13722     COMPILE_TYPE="cross"
13723   else
13724     COMPILE_TYPE="native"
13725   fi
13726 
13727   if test "x$with_target_bits" != x; then
13728     if test "x$COMPILE_TYPE" = "xcross"; then
13729       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13730     fi
13731 
13732     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13733       # A reduced build is requested
13734       COMPILE_TYPE="reduced"
13735       OPENJDK_TARGET_CPU_BITS=32
13736       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13737         OPENJDK_TARGET_CPU=x86
13738       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13739         OPENJDK_TARGET_CPU=sparc
13740       else
13741         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13742       fi
13743     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13744       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
13745     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13746       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13747 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13748     else
13749       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13750     fi
13751   fi
13752 
13753 
13754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13755 $as_echo_n "checking compilation type... " >&6; }
13756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13757 $as_echo "$COMPILE_TYPE" >&6; }
13758 
13759 
13760   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13761     REQUIRED_OS_NAME=SunOS
13762     REQUIRED_OS_VERSION=5.10
13763   fi
13764   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13765     REQUIRED_OS_NAME=Linux
13766     REQUIRED_OS_VERSION=2.6
13767   fi
13768   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13769     REQUIRED_OS_NAME=Windows
13770     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13771       REQUIRED_OS_VERSION=5.2
13772     else
13773       REQUIRED_OS_VERSION=5.1
13774     fi
13775   fi
13776   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13777     REQUIRED_OS_NAME=Darwin
13778     REQUIRED_OS_VERSION=11.2
13779   fi
13780 
13781 
13782 
13783 
13784 
13785   # Also store the legacy naming of the cpu.
13786   # Ie i586 and amd64 instead of x86 and x86_64
13787   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13788   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13789     OPENJDK_TARGET_CPU_LEGACY="i586"
13790   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13791     # On all platforms except MacOSX replace x86_64 with amd64.
13792     OPENJDK_TARGET_CPU_LEGACY="amd64"
13793   fi
13794 
13795 
13796   # And the second legacy naming of the cpu.
13797   # Ie i386 and amd64 instead of x86 and x86_64.
13798   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13799   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13800     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13801   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13802     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13803   fi
13804 
13805 
13806   # This is the name of the cpu (but using i386 and amd64 instead of
13807   # x86 and x86_64, respectively), preceeded by a /, to be used when
13808   # locating libraries. On macosx, it's empty, though.
13809   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13810   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13811     OPENJDK_TARGET_CPU_LIBDIR=""
13812   fi
13813 
13814 
13815   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13816   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13817   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13818   OPENJDK_TARGET_CPU_ISADIR=""
13819   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13820     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13821       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13822     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13823       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13824     fi
13825   fi
13826 
13827 
13828   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13829   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13830   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13831     # On linux only, we replace x86 with i386.
13832     OPENJDK_TARGET_CPU_OSARCH="i386"
13833   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13834     # On all platforms except macosx, we replace x86_64 with amd64.
13835     OPENJDK_TARGET_CPU_OSARCH="amd64"
13836   fi
13837 
13838 
13839   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13840   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13841     OPENJDK_TARGET_CPU_JLI="i386"
13842   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13843     # On all platforms except macosx, we replace x86_64 with amd64.
13844     OPENJDK_TARGET_CPU_JLI="amd64"
13845   fi
13846   # Now setup the -D flags for building libjli.
13847   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13848   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13849     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13850       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13851     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13852       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13853     fi
13854   fi
13855 
13856 
13857   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13858   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13859     OPENJDK_TARGET_OS_API_DIR="solaris"
13860   fi
13861   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13862     OPENJDK_TARGET_OS_API_DIR="windows"
13863   fi
13864 
13865 
13866   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13867       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13868   else
13869       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13870   fi
13871 
13872 
13873   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13874     A_LP64="LP64:="
13875     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13876     # unpack200.exe
13877     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13878       ADD_LP64="-D_LP64=1"
13879     fi
13880   fi
13881   LP64=$A_LP64
13882 
13883 
13884   if test "x$COMPILE_TYPE" = "xcross"; then
13885     # FIXME: ... or should this include reduced builds..?
13886     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13887   else
13888     DEFINE_CROSS_COMPILE_ARCH=""
13889   fi
13890 
13891 
13892   # ZERO_ARCHDEF is used to enable architecture-specific code
13893   case "${OPENJDK_TARGET_CPU}" in
13894     ppc*)    ZERO_ARCHDEF=PPC   ;;
13895     s390*)   ZERO_ARCHDEF=S390  ;;
13896     sparc*)  ZERO_ARCHDEF=SPARC ;;
13897     x86_64*) ZERO_ARCHDEF=AMD64 ;;
13898     x86)     ZERO_ARCHDEF=IA32  ;;
13899     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13900   esac
13901 
13902 
13903 
13904 
13905 # Continue setting up basic stuff. Most remaining code require fundamental tools.
13906 
13907   # Save the current directory this script was started from
13908   CURDIR="$PWD"
13909 
13910   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13911     PATH_SEP=";"
13912 
13913   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13914   if test $SRC_ROOT_LENGTH -gt 100; then
13915     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13916   fi
13917 
13918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13919     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13920 $as_echo_n "checking cygwin release... " >&6; }
13921     CYGWIN_VERSION=`$UNAME -r`
13922     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13923 $as_echo "$CYGWIN_VERSION" >&6; }
13924     WINDOWS_ENV_VENDOR='cygwin'
13925     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13926 
13927     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13928     if test "x$CYGWIN_VERSION_OK" = x; then
13929       { $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
13930 $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;}
13931       as_fn_error $? "Cannot continue" "$LINENO" 5
13932     fi
13933     if test "x$CYGPATH" = x; then
13934       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13935     fi
13936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13937 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13938     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13939     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13940     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13941     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13942     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13943 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
13944     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13945     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13946     if test "x$test_cygdrive_prefix" = x; then
13947       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13948     fi
13949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13951 $as_echo_n "checking msys release... " >&6; }
13952     MSYS_VERSION=`$UNAME -r`
13953     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13954 $as_echo "$MSYS_VERSION" >&6; }
13955 
13956     WINDOWS_ENV_VENDOR='msys'
13957     WINDOWS_ENV_VERSION="$MSYS_VERSION"
13958 
13959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13960 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
13961     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13962     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13963 
13964   windows_path="$MSYS_ROOT_PATH"
13965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13966     unix_path=`$CYGPATH -u "$windows_path"`
13967     MSYS_ROOT_PATH="$unix_path"
13968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13970     MSYS_ROOT_PATH="$unix_path"
13971   fi
13972 
13973     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13974 $as_echo "$MSYS_ROOT_PATH" >&6; }
13975     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13976   else
13977     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13978   fi
13979 
13980   # Test if windows or unix (cygwin/msys) find is first in path.
13981   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13982 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13983   FIND_BINARY_OUTPUT=`find --version 2>&1`
13984   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13985     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13986 $as_echo "unix style" >&6; }
13987   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13988     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13989 $as_echo "Windows" >&6; }
13990     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13991 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13992     { $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
13993 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13994     as_fn_error $? "Cannot continue" "$LINENO" 5
13995   else
13996     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13997 $as_echo "unknown" >&6; }
13998     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13999 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14000   fi
14001 
14002   else
14003     PATH_SEP=":"
14004   fi
14005 
14006 
14007   # We get the top-level directory from the supporting wrappers.
14008   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14009 $as_echo_n "checking for top-level directory... " >&6; }
14010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14011 $as_echo "$TOPDIR" >&6; }
14012 
14013 
14014   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14015 
14016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14017 
14018   # Input might be given as Windows format, start by converting to
14019   # unix format.
14020   path="$CURDIR"
14021   new_path=`$CYGPATH -u "$path"`
14022 
14023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14026   # "foo.exe" is OK but "foo" is an error.
14027   #
14028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14029   # It is also a way to make sure we got the proper file name for the real test later on.
14030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14031   if test "x$test_shortpath" = x; then
14032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14033 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14034     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14035   fi
14036 
14037   # Call helper function which possibly converts this using DOS-style short mode.
14038   # If so, the updated path is stored in $new_path.
14039 
14040   input_path="$new_path"
14041   # Check if we need to convert this using DOS-style short mode. If the path
14042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14043   # take no chances and rewrite it.
14044   # Note: m4 eats our [], so we need to use [ and ] instead.
14045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14046   if test "x$has_forbidden_chars" != x; then
14047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14051       # Going to short mode and back again did indeed matter. Since short mode is
14052       # case insensitive, let's make it lowercase to improve readability.
14053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14054       # Now convert it back to Unix-stile (cygpath)
14055       input_path=`$CYGPATH -u "$shortmode_path"`
14056       new_path="$input_path"
14057     fi
14058   fi
14059 
14060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14061   if test "x$test_cygdrive_prefix" = x; then
14062     # As a simple fix, exclude /usr/bin since it's not a real path.
14063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14065       # a path prefixed by /cygdrive for fixpath to work.
14066       new_path="$CYGWIN_ROOT_PATH$input_path"
14067     fi
14068   fi
14069 
14070 
14071   if test "x$path" != "x$new_path"; then
14072     CURDIR="$new_path"
14073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14074 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14075   fi
14076 
14077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14078 
14079   path="$CURDIR"
14080   has_colon=`$ECHO $path | $GREP ^.:`
14081   new_path="$path"
14082   if test "x$has_colon" = x; then
14083     # Not in mixed or Windows style, start by that.
14084     new_path=`cmd //c echo $path`
14085   fi
14086 
14087 
14088   input_path="$new_path"
14089   # Check if we need to convert this using DOS-style short mode. If the path
14090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14091   # take no chances and rewrite it.
14092   # Note: m4 eats our [], so we need to use [ and ] instead.
14093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14094   if test "x$has_forbidden_chars" != x; then
14095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14097   fi
14098 
14099 
14100   windows_path="$new_path"
14101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14102     unix_path=`$CYGPATH -u "$windows_path"`
14103     new_path="$unix_path"
14104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14106     new_path="$unix_path"
14107   fi
14108 
14109   if test "x$path" != "x$new_path"; then
14110     CURDIR="$new_path"
14111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14112 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14113   fi
14114 
14115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14117 
14118   else
14119     # We're on a posix platform. Hooray! :)
14120     path="$CURDIR"
14121     has_space=`$ECHO "$path" | $GREP " "`
14122     if test "x$has_space" != x; then
14123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14124 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14125       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14126     fi
14127 
14128     # Use eval to expand a potential ~
14129     eval path="$path"
14130     if test ! -f "$path" && test ! -d "$path"; then
14131       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14132     fi
14133 
14134     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14135   fi
14136 
14137 
14138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14139 
14140   # Input might be given as Windows format, start by converting to
14141   # unix format.
14142   path="$TOPDIR"
14143   new_path=`$CYGPATH -u "$path"`
14144 
14145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14148   # "foo.exe" is OK but "foo" is an error.
14149   #
14150   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14151   # It is also a way to make sure we got the proper file name for the real test later on.
14152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14153   if test "x$test_shortpath" = x; then
14154     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14155 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14156     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14157   fi
14158 
14159   # Call helper function which possibly converts this using DOS-style short mode.
14160   # If so, the updated path is stored in $new_path.
14161 
14162   input_path="$new_path"
14163   # Check if we need to convert this using DOS-style short mode. If the path
14164   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14165   # take no chances and rewrite it.
14166   # Note: m4 eats our [], so we need to use [ and ] instead.
14167   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14168   if test "x$has_forbidden_chars" != x; then
14169     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14170     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14171     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14172     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14173       # Going to short mode and back again did indeed matter. Since short mode is
14174       # case insensitive, let's make it lowercase to improve readability.
14175       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14176       # Now convert it back to Unix-stile (cygpath)
14177       input_path=`$CYGPATH -u "$shortmode_path"`
14178       new_path="$input_path"
14179     fi
14180   fi
14181 
14182   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14183   if test "x$test_cygdrive_prefix" = x; then
14184     # As a simple fix, exclude /usr/bin since it's not a real path.
14185     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14186       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14187       # a path prefixed by /cygdrive for fixpath to work.
14188       new_path="$CYGWIN_ROOT_PATH$input_path"
14189     fi
14190   fi
14191 
14192 
14193   if test "x$path" != "x$new_path"; then
14194     TOPDIR="$new_path"
14195     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14196 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14197   fi
14198 
14199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14200 
14201   path="$TOPDIR"
14202   has_colon=`$ECHO $path | $GREP ^.:`
14203   new_path="$path"
14204   if test "x$has_colon" = x; then
14205     # Not in mixed or Windows style, start by that.
14206     new_path=`cmd //c echo $path`
14207   fi
14208 
14209 
14210   input_path="$new_path"
14211   # Check if we need to convert this using DOS-style short mode. If the path
14212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14213   # take no chances and rewrite it.
14214   # Note: m4 eats our [], so we need to use [ and ] instead.
14215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14216   if test "x$has_forbidden_chars" != x; then
14217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14218     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14219   fi
14220 
14221 
14222   windows_path="$new_path"
14223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14224     unix_path=`$CYGPATH -u "$windows_path"`
14225     new_path="$unix_path"
14226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14228     new_path="$unix_path"
14229   fi
14230 
14231   if test "x$path" != "x$new_path"; then
14232     TOPDIR="$new_path"
14233     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14234 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14235   fi
14236 
14237   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14238   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14239 
14240   else
14241     # We're on a posix platform. Hooray! :)
14242     path="$TOPDIR"
14243     has_space=`$ECHO "$path" | $GREP " "`
14244     if test "x$has_space" != x; then
14245       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14246 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14247       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14248     fi
14249 
14250     # Use eval to expand a potential ~
14251     eval path="$path"
14252     if test ! -f "$path" && test ! -d "$path"; then
14253       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14254     fi
14255 
14256     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14257   fi
14258 
14259   # SRC_ROOT is a traditional alias for TOPDIR.
14260   SRC_ROOT=$TOPDIR
14261 
14262   # Locate the directory of this script.
14263   AUTOCONF_DIR=$TOPDIR/common/autoconf
14264 
14265 
14266   # Setup default logging of stdout and stderr to build.log in the output root.
14267   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14268   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14269   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14270 
14271 
14272 
14273 
14274 
14275 # Check if it's a pure open build or if custom sources are to be used.
14276 
14277   # Check whether --enable-openjdk-only was given.
14278 if test "${enable_openjdk_only+set}" = set; then :
14279   enableval=$enable_openjdk_only;
14280 else
14281   enable_openjdk_only="no"
14282 fi
14283 
14284 
14285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14286 $as_echo_n "checking for presence of closed sources... " >&6; }
14287   if test -d "$SRC_ROOT/jdk/src/closed"; then
14288     CLOSED_SOURCE_PRESENT=yes
14289   else
14290     CLOSED_SOURCE_PRESENT=no
14291   fi
14292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14293 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14294 
14295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14296 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14297   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14299 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14300 
14301   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14302     OPENJDK=true
14303     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14304       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14305 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14306     fi
14307   else
14308     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14309       OPENJDK=true
14310     else
14311       OPENJDK=false
14312     fi
14313   fi
14314 
14315   if test "x$OPENJDK" = "xtrue"; then
14316     SET_OPENJDK="OPENJDK=true"
14317   fi
14318 
14319 
14320 
14321   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14322   # the IncludeCustomExtension macro.
14323 
14324 
14325 # Check whether --with-custom-make-dir was given.
14326 if test "${with_custom_make_dir+set}" = set; then :
14327   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
14328 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14329 fi
14330 
14331 
14332 
14333 
14334 # These are needed to be able to create a configuration name (and thus the output directory)
14335 
14336   ###############################################################################
14337   #
14338   # Check which variant of the JDK that we want to build.
14339   # Currently we have:
14340   #    normal:   standard edition
14341   # but the custom make system may add other variants
14342   #
14343   # Effectively the JDK variant gives a name to a specific set of
14344   # modules to compile into the JDK. In the future, these modules
14345   # might even be Jigsaw modules.
14346   #
14347   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14348 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14349 
14350 # Check whether --with-jdk-variant was given.
14351 if test "${with_jdk_variant+set}" = set; then :
14352   withval=$with_jdk_variant;
14353 fi
14354 
14355 
14356   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14357     JDK_VARIANT="normal"
14358   else
14359     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14360   fi
14361 
14362 
14363 
14364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14365 $as_echo "$JDK_VARIANT" >&6; }
14366 
14367 
14368 ###############################################################################
14369 #
14370 # Check which interpreter of the JVM we want to build.
14371 # Currently we have:
14372 #    template: Template interpreter (the default)
14373 #    cpp     : C++ interpreter
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14375 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14376 
14377 # Check whether --with-jvm-interpreter was given.
14378 if test "${with_jvm_interpreter+set}" = set; then :
14379   withval=$with_jvm_interpreter;
14380 fi
14381 
14382 
14383 if test "x$with_jvm_interpreter" = x; then
14384      with_jvm_interpreter="template"
14385 fi
14386 
14387 JVM_INTERPRETER="$with_jvm_interpreter"
14388 
14389 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14390    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14391 fi
14392 
14393 
14394 
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14396 $as_echo "$with_jvm_interpreter" >&6; }
14397 
14398 
14399 
14400   ###############################################################################
14401   #
14402   # Check which variants of the JVM that we want to build.
14403   # Currently we have:
14404   #    server: normal interpreter and a tiered C1/C2 compiler
14405   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14406   #    minimal1: reduced form of client with optional VM services and features stripped out
14407   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14408   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14409   #    zero: no machine code interpreter, no compiler
14410   #    zeroshark: zero interpreter and shark/llvm compiler backend
14411 #    core: interpreter only, no compiler (only works on some platforms)
14412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14413 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14414 
14415 # Check whether --with-jvm-variants was given.
14416 if test "${with_jvm_variants+set}" = set; then :
14417   withval=$with_jvm_variants;
14418 fi
14419 
14420 
14421   if test "x$with_jvm_variants" = x; then
14422     with_jvm_variants="server"
14423   fi
14424 
14425   JVM_VARIANTS=",$with_jvm_variants,"
14426   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,//'`
14427 
14428   if test "x$TEST_VARIANTS" != "x,"; then
14429      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14430   fi
14431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14432 $as_echo "$with_jvm_variants" >&6; }
14433 
14434   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14435   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14436   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14437   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14438   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14439   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14440   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14441 
14442   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14443     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14444       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14445     fi
14446   fi
14447   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14448     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14449       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14450     fi
14451   fi
14452   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14453     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14454       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14455     fi
14456   fi
14457 
14458   # Replace the commas with AND for use in the build directory name.
14459   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14460   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/'`
14461   if test "x$COUNT_VARIANTS" != "x,1"; then
14462     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14463   else
14464     BUILDING_MULTIPLE_JVM_VARIANTS=no
14465   fi
14466 
14467 
14468 
14469 
14470 
14471 
14472 
14473 
14474 
14475 
14476   INCLUDE_SA=true
14477   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14478     INCLUDE_SA=false
14479   fi
14480   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14481     INCLUDE_SA=false
14482   fi
14483   if test "x$VAR_CPU" = xppc64 ; then
14484     INCLUDE_SA=false
14485   fi
14486 
14487 
14488   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14489     MACOSX_UNIVERSAL="true"
14490   fi
14491 
14492 
14493 
14494 
14495   ###############################################################################
14496   #
14497   # Set the debug level
14498   #    release: no debug information, all optimizations, no asserts.
14499   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14500   #    fastdebug: debug information (-g), all optimizations, all asserts
14501   #    slowdebug: debug information (-g), no optimizations, all asserts
14502   #
14503   DEBUG_LEVEL="release"
14504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14505 $as_echo_n "checking which debug level to use... " >&6; }
14506   # Check whether --enable-debug was given.
14507 if test "${enable_debug+set}" = set; then :
14508   enableval=$enable_debug;
14509         ENABLE_DEBUG="${enableval}"
14510         DEBUG_LEVEL="fastdebug"
14511 
14512 else
14513   ENABLE_DEBUG="no"
14514 fi
14515 
14516 
14517 
14518 # Check whether --with-debug-level was given.
14519 if test "${with_debug_level+set}" = set; then :
14520   withval=$with_debug_level;
14521         DEBUG_LEVEL="${withval}"
14522         if test "x$ENABLE_DEBUG" = xyes; then
14523           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14524         fi
14525 
14526 fi
14527 
14528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14529 $as_echo "$DEBUG_LEVEL" >&6; }
14530 
14531   if test "x$DEBUG_LEVEL" != xrelease && \
14532       test "x$DEBUG_LEVEL" != xoptimized && \
14533       test "x$DEBUG_LEVEL" != xfastdebug && \
14534       test "x$DEBUG_LEVEL" != xslowdebug; then
14535     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14536   fi
14537 
14538 
14539   ###############################################################################
14540   #
14541   # Setup legacy vars/targets and new vars to deal with different debug levels.
14542   #
14543 
14544   case $DEBUG_LEVEL in
14545     release )
14546       VARIANT="OPT"
14547       FASTDEBUG="false"
14548       DEBUG_CLASSFILES="false"
14549       BUILD_VARIANT_RELEASE=""
14550       HOTSPOT_DEBUG_LEVEL="product"
14551       HOTSPOT_EXPORT="product"
14552       ;;
14553     fastdebug )
14554       VARIANT="DBG"
14555       FASTDEBUG="true"
14556       DEBUG_CLASSFILES="true"
14557       BUILD_VARIANT_RELEASE="-fastdebug"
14558       HOTSPOT_DEBUG_LEVEL="fastdebug"
14559       HOTSPOT_EXPORT="fastdebug"
14560       ;;
14561     slowdebug )
14562       VARIANT="DBG"
14563       FASTDEBUG="false"
14564       DEBUG_CLASSFILES="true"
14565       BUILD_VARIANT_RELEASE="-debug"
14566       HOTSPOT_DEBUG_LEVEL="jvmg"
14567       HOTSPOT_EXPORT="debug"
14568       ;;
14569     optimized )
14570       VARIANT="OPT"
14571       FASTDEBUG="false"
14572       DEBUG_CLASSFILES="false"
14573       BUILD_VARIANT_RELEASE="-optimized"
14574       HOTSPOT_DEBUG_LEVEL="optimized"
14575       HOTSPOT_EXPORT="optimized"
14576       ;;
14577   esac
14578 
14579   # The debug level 'optimized' is a little special because it is currently only
14580   # applicable to the HotSpot build where it means to build a completely
14581   # optimized version of the VM without any debugging code (like for the
14582   # 'release' debug level which is called 'product' in the HotSpot build) but
14583   # with the exception that it can contain additional code which is otherwise
14584   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14585   # test new and/or experimental features which are not intended for customer
14586   # shipment. Because these new features need to be tested and benchmarked in
14587   # real world scenarios, we want to build the containing JDK at the 'release'
14588   # debug level.
14589   if test "x$DEBUG_LEVEL" = xoptimized; then
14590     DEBUG_LEVEL="release"
14591   fi
14592 
14593   #####
14594   # Generate the legacy makefile targets for hotspot.
14595   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14596   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14597   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14598   # But until then ...
14599   HOTSPOT_TARGET=""
14600 
14601   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14602     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14603   fi
14604 
14605   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14606     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14607   fi
14608 
14609   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14610     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14611   fi
14612 
14613   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14614     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14615   fi
14616 
14617   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14618     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14619   fi
14620 
14621   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14622     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14623   fi
14624 
14625   if test "x$JVM_VARIANT_CORE" = xtrue; then
14626     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14627   fi
14628 
14629   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14630 
14631   # On Macosx universal binaries are produced, but they only contain
14632   # 64 bit intel. This invalidates control of which jvms are built
14633   # from configure, but only server is valid anyway. Fix this
14634   # when hotspot makefiles are rewritten.
14635   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14636     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14637   fi
14638 
14639   #####
14640 
14641 
14642 
14643 
14644 
14645 
14646 
14647 
14648 # With basic setup done, call the custom early hook.
14649 
14650 
14651 # Check if we have devkits, extra paths or sysroot set.
14652 
14653 
14654 # Check whether --with-devkit was given.
14655 if test "${with_devkit+set}" = set; then :
14656   withval=$with_devkit;
14657 
14658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14659 
14660   # Input might be given as Windows format, start by converting to
14661   # unix format.
14662   path="$with_devkit"
14663   new_path=`$CYGPATH -u "$path"`
14664 
14665   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14666   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14667   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14668   # "foo.exe" is OK but "foo" is an error.
14669   #
14670   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14671   # It is also a way to make sure we got the proper file name for the real test later on.
14672   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14673   if test "x$test_shortpath" = x; then
14674     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14675 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14676     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14677   fi
14678 
14679   # Call helper function which possibly converts this using DOS-style short mode.
14680   # If so, the updated path is stored in $new_path.
14681 
14682   input_path="$new_path"
14683   # Check if we need to convert this using DOS-style short mode. If the path
14684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14685   # take no chances and rewrite it.
14686   # Note: m4 eats our [], so we need to use [ and ] instead.
14687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14688   if test "x$has_forbidden_chars" != x; then
14689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14693       # Going to short mode and back again did indeed matter. Since short mode is
14694       # case insensitive, let's make it lowercase to improve readability.
14695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14696       # Now convert it back to Unix-stile (cygpath)
14697       input_path=`$CYGPATH -u "$shortmode_path"`
14698       new_path="$input_path"
14699     fi
14700   fi
14701 
14702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14703   if test "x$test_cygdrive_prefix" = x; then
14704     # As a simple fix, exclude /usr/bin since it's not a real path.
14705     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14707       # a path prefixed by /cygdrive for fixpath to work.
14708       new_path="$CYGWIN_ROOT_PATH$input_path"
14709     fi
14710   fi
14711 
14712 
14713   if test "x$path" != "x$new_path"; then
14714     with_devkit="$new_path"
14715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14716 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14717   fi
14718 
14719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14720 
14721   path="$with_devkit"
14722   has_colon=`$ECHO $path | $GREP ^.:`
14723   new_path="$path"
14724   if test "x$has_colon" = x; then
14725     # Not in mixed or Windows style, start by that.
14726     new_path=`cmd //c echo $path`
14727   fi
14728 
14729 
14730   input_path="$new_path"
14731   # Check if we need to convert this using DOS-style short mode. If the path
14732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733   # take no chances and rewrite it.
14734   # Note: m4 eats our [], so we need to use [ and ] instead.
14735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14736   if test "x$has_forbidden_chars" != x; then
14737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14739   fi
14740 
14741 
14742   windows_path="$new_path"
14743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14744     unix_path=`$CYGPATH -u "$windows_path"`
14745     new_path="$unix_path"
14746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14748     new_path="$unix_path"
14749   fi
14750 
14751   if test "x$path" != "x$new_path"; then
14752     with_devkit="$new_path"
14753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14754 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14755   fi
14756 
14757   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14758   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14759 
14760   else
14761     # We're on a posix platform. Hooray! :)
14762     path="$with_devkit"
14763     has_space=`$ECHO "$path" | $GREP " "`
14764     if test "x$has_space" != x; then
14765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14766 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14767       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14768     fi
14769 
14770     # Use eval to expand a potential ~
14771     eval path="$path"
14772     if test ! -f "$path" && test ! -d "$path"; then
14773       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14774     fi
14775 
14776     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14777   fi
14778 
14779         DEVKIT_ROOT="$with_devkit"
14780         # Check for a meta data info file in the root of the devkit
14781         if test -f "$DEVKIT_ROOT/devkit.info"; then
14782           # This potentially sets the following:
14783           # DEVKIT_NAME: A descriptive name of the devkit
14784           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14785           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14786           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14787           . $DEVKIT_ROOT/devkit.info
14788         fi
14789 
14790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14791 $as_echo_n "checking for devkit... " >&6; }
14792         if test "x$DEVKIT_NAME" != x; then
14793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14794 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14795         else
14796           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14797 $as_echo "$DEVKIT_ROOT" >&6; }
14798         fi
14799 
14800         if test "x$DEVKIT_EXTRA_PATH" != x; then
14801 
14802   if test "x$DEVKIT_EXTRA_PATH" != x; then
14803     if test "x$EXTRA_PATH" = x; then
14804       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14805     else
14806       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14807     fi
14808   fi
14809 
14810         fi
14811 
14812         # Fallback default of just /bin if DEVKIT_PATH is not defined
14813         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14814           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14815         fi
14816 
14817   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14818     if test "x$TOOLCHAIN_PATH" = x; then
14819       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14820     else
14821       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14822     fi
14823   fi
14824 
14825 
14826         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14827         # places for backwards compatiblity.
14828         if test "x$DEVKIT_SYSROOT" != x; then
14829           SYSROOT="$DEVKIT_SYSROOT"
14830         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14831           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14832         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14833           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14834         fi
14835 
14836 
14837 fi
14838 
14839 
14840   # You can force the sysroot if the sysroot encoded into the compiler tools
14841   # is not correct.
14842 
14843 # Check whether --with-sys-root was given.
14844 if test "${with_sys_root+set}" = set; then :
14845   withval=$with_sys_root; SYSROOT=$with_sys_root
14846 
14847 fi
14848 
14849 
14850 
14851 # Check whether --with-sysroot was given.
14852 if test "${with_sysroot+set}" = set; then :
14853   withval=$with_sysroot; SYSROOT=$with_sysroot
14854 
14855 fi
14856 
14857 
14858 
14859 # Check whether --with-tools-dir was given.
14860 if test "${with_tools_dir+set}" = set; then :
14861   withval=$with_tools_dir;
14862   if test "x$with_tools_dir" != x; then
14863     if test "x$TOOLCHAIN_PATH" = x; then
14864       TOOLCHAIN_PATH="$with_tools_dir"
14865     else
14866       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14867     fi
14868   fi
14869 
14870 
14871 fi
14872 
14873 
14874 
14875 # Check whether --with-toolchain-path was given.
14876 if test "${with_toolchain_path+set}" = set; then :
14877   withval=$with_toolchain_path;
14878   if test "x$with_toolchain_path" != x; then
14879     if test "x$TOOLCHAIN_PATH" = x; then
14880       TOOLCHAIN_PATH="$with_toolchain_path"
14881     else
14882       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14883     fi
14884   fi
14885 
14886 
14887 fi
14888 
14889 
14890 
14891 # Check whether --with-extra-path was given.
14892 if test "${with_extra_path+set}" = set; then :
14893   withval=$with_extra_path;
14894   if test "x$with_extra_path" != x; then
14895     if test "x$EXTRA_PATH" = x; then
14896       EXTRA_PATH="$with_extra_path"
14897     else
14898       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14899     fi
14900   fi
14901 
14902 
14903 fi
14904 
14905 
14906   # Prepend the extra path to the global path
14907 
14908   if test "x$EXTRA_PATH" != x; then
14909     if test "x$PATH" = x; then
14910       PATH="$EXTRA_PATH"
14911     else
14912       PATH="$EXTRA_PATH:$PATH"
14913     fi
14914   fi
14915 
14916 
14917   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14918     # Add extra search paths on solaris for utilities like ar and as etc...
14919     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14920   fi
14921 
14922   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14923 $as_echo_n "checking for sysroot... " >&6; }
14924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14925 $as_echo "$SYSROOT" >&6; }
14926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14927 $as_echo_n "checking for toolchain path... " >&6; }
14928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14929 $as_echo "$TOOLCHAIN_PATH" >&6; }
14930   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14931 $as_echo_n "checking for extra path... " >&6; }
14932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14933 $as_echo "$EXTRA_PATH" >&6; }
14934 
14935 
14936 # To properly create a configuration name, we need to have the OpenJDK target
14937 # and options (variants and debug level) parsed.
14938 
14939 
14940 
14941 # Check whether --with-conf-name was given.
14942 if test "${with_conf_name+set}" = set; then :
14943   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14944 fi
14945 
14946 
14947   # Test from where we are running configure, in or outside of src root.
14948   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14949 $as_echo_n "checking where to store configuration... " >&6; }
14950   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14951       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14952       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14953     # We are running configure from the src root.
14954     # Create a default ./build/target-variant-debuglevel output root.
14955     if test "x${CONF_NAME}" = x; then
14956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14957 $as_echo "in default location" >&6; }
14958       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14959     else
14960       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14961 $as_echo "in build directory with custom name" >&6; }
14962     fi
14963     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14964     $MKDIR -p "$OUTPUT_ROOT"
14965     if test ! -d "$OUTPUT_ROOT"; then
14966       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14967     fi
14968   else
14969     # We are running configure from outside of the src dir.
14970     # Then use the current directory as output dir!
14971     # If configuration is situated in normal build directory, just use the build
14972     # directory name as configuration name, otherwise use the complete path.
14973     if test "x${CONF_NAME}" = x; then
14974       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14975     fi
14976     OUTPUT_ROOT="$CURDIR"
14977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14978 $as_echo "in current directory" >&6; }
14979 
14980     # WARNING: This might be a bad thing to do. You need to be sure you want to
14981     # have a configuration in this directory. Do some sanity checks!
14982 
14983     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14984       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14985       # other files
14986       files_present=`$LS $OUTPUT_ROOT`
14987       # Configure has already touched config.log and confdefs.h in the current dir when this check
14988       # is performed.
14989       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14990       | $TR -d '\n'`
14991       if test "x$filtered_files" != x; then
14992         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14993 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
14994         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14995 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14996         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14997 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14998         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14999 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15000         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15001 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15002         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15003 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15004         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15005 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15006         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15007       fi
15008     fi
15009   fi
15010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15011 $as_echo_n "checking what configuration name to use... " >&6; }
15012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15013 $as_echo "$CONF_NAME" >&6; }
15014 
15015 
15016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15017 
15018   # Input might be given as Windows format, start by converting to
15019   # unix format.
15020   path="$OUTPUT_ROOT"
15021   new_path=`$CYGPATH -u "$path"`
15022 
15023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15026   # "foo.exe" is OK but "foo" is an error.
15027   #
15028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15029   # It is also a way to make sure we got the proper file name for the real test later on.
15030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15031   if test "x$test_shortpath" = x; then
15032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15033 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15034     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15035   fi
15036 
15037   # Call helper function which possibly converts this using DOS-style short mode.
15038   # If so, the updated path is stored in $new_path.
15039 
15040   input_path="$new_path"
15041   # Check if we need to convert this using DOS-style short mode. If the path
15042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15043   # take no chances and rewrite it.
15044   # Note: m4 eats our [], so we need to use [ and ] instead.
15045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15046   if test "x$has_forbidden_chars" != x; then
15047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15051       # Going to short mode and back again did indeed matter. Since short mode is
15052       # case insensitive, let's make it lowercase to improve readability.
15053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054       # Now convert it back to Unix-stile (cygpath)
15055       input_path=`$CYGPATH -u "$shortmode_path"`
15056       new_path="$input_path"
15057     fi
15058   fi
15059 
15060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15061   if test "x$test_cygdrive_prefix" = x; then
15062     # As a simple fix, exclude /usr/bin since it's not a real path.
15063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15065       # a path prefixed by /cygdrive for fixpath to work.
15066       new_path="$CYGWIN_ROOT_PATH$input_path"
15067     fi
15068   fi
15069 
15070 
15071   if test "x$path" != "x$new_path"; then
15072     OUTPUT_ROOT="$new_path"
15073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15074 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15075   fi
15076 
15077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15078 
15079   path="$OUTPUT_ROOT"
15080   has_colon=`$ECHO $path | $GREP ^.:`
15081   new_path="$path"
15082   if test "x$has_colon" = x; then
15083     # Not in mixed or Windows style, start by that.
15084     new_path=`cmd //c echo $path`
15085   fi
15086 
15087 
15088   input_path="$new_path"
15089   # Check if we need to convert this using DOS-style short mode. If the path
15090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15091   # take no chances and rewrite it.
15092   # Note: m4 eats our [], so we need to use [ and ] instead.
15093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15094   if test "x$has_forbidden_chars" != x; then
15095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15097   fi
15098 
15099 
15100   windows_path="$new_path"
15101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15102     unix_path=`$CYGPATH -u "$windows_path"`
15103     new_path="$unix_path"
15104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15106     new_path="$unix_path"
15107   fi
15108 
15109   if test "x$path" != "x$new_path"; then
15110     OUTPUT_ROOT="$new_path"
15111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15112 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15113   fi
15114 
15115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15117 
15118   else
15119     # We're on a posix platform. Hooray! :)
15120     path="$OUTPUT_ROOT"
15121     has_space=`$ECHO "$path" | $GREP " "`
15122     if test "x$has_space" != x; then
15123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15124 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15125       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15126     fi
15127 
15128     # Use eval to expand a potential ~
15129     eval path="$path"
15130     if test ! -f "$path" && test ! -d "$path"; then
15131       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15132     fi
15133 
15134     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15135   fi
15136 
15137 
15138   SPEC=$OUTPUT_ROOT/spec.gmk
15139 
15140   CONF_NAME=$CONF_NAME
15141 
15142   OUTPUT_ROOT=$OUTPUT_ROOT
15143 
15144 
15145   # Most of the probed defines are put into config.h
15146   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15147 
15148   # The spec.gmk file contains all variables for the make system.
15149   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15150 
15151   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15152   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15153 
15154   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15155   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15156 
15157   # The compare.sh is used to compare the build output to other builds.
15158   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15159 
15160   # Spec.sh is currently used by compare-objects.sh
15161   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15162 
15163   # The generated Makefile knows where the spec.gmk is and where the source is.
15164   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15165   # which will look for generated configurations
15166   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15167 
15168 
15169 
15170 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15171 
15172   for ac_prog in apt-get yum port pkgutil pkgadd
15173 do
15174   # Extract the first word of "$ac_prog", so it can be a program name with args.
15175 set dummy $ac_prog; ac_word=$2
15176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15177 $as_echo_n "checking for $ac_word... " >&6; }
15178 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15179   $as_echo_n "(cached) " >&6
15180 else
15181   if test -n "$PKGHANDLER"; then
15182   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15183 else
15184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15185 for as_dir in $PATH
15186 do
15187   IFS=$as_save_IFS
15188   test -z "$as_dir" && as_dir=.
15189     for ac_exec_ext in '' $ac_executable_extensions; do
15190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15191     ac_cv_prog_PKGHANDLER="$ac_prog"
15192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15193     break 2
15194   fi
15195 done
15196   done
15197 IFS=$as_save_IFS
15198 
15199 fi
15200 fi
15201 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15202 if test -n "$PKGHANDLER"; then
15203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15204 $as_echo "$PKGHANDLER" >&6; }
15205 else
15206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207 $as_echo "no" >&6; }
15208 fi
15209 
15210 
15211   test -n "$PKGHANDLER" && break
15212 done
15213 
15214 
15215 
15216 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15217 
15218 
15219   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15220   if test "x$MAKE" != x; then
15221     # User has supplied a make, test it.
15222     if test ! -f "$MAKE"; then
15223       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15224     fi
15225 
15226   MAKE_CANDIDATE=""$MAKE""
15227   DESCRIPTION="user supplied MAKE=$MAKE"
15228   if test "x$MAKE_CANDIDATE" != x; then
15229     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15230 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15231     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15232     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15233     if test "x$IS_GNU_MAKE" = x; then
15234       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15235 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15236     else
15237       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15238       if test "x$IS_MODERN_MAKE" = x; then
15239         { $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
15240 $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;}
15241       else
15242         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15243           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15244             MAKE_EXPECTED_ENV='cygwin'
15245           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15246             MAKE_EXPECTED_ENV='msys'
15247           else
15248             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15249           fi
15250           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15251           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15252         else
15253           # Not relevant for non-Windows
15254           IS_MAKE_CORRECT_ENV=true
15255         fi
15256         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15257           { $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
15258 $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;}
15259         else
15260           FOUND_MAKE=$MAKE_CANDIDATE
15261 
15262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15263 
15264   # First separate the path from the arguments. This will split at the first
15265   # space.
15266   complete="$FOUND_MAKE"
15267   path="${complete%% *}"
15268   tmp="$complete EOL"
15269   arguments="${tmp#* }"
15270 
15271   # Input might be given as Windows format, start by converting to
15272   # unix format.
15273   new_path=`$CYGPATH -u "$path"`
15274 
15275   # Now try to locate executable using which
15276   new_path=`$WHICH "$new_path" 2> /dev/null`
15277   # bat and cmd files are not always considered executable in cygwin causing which
15278   # to not find them
15279   if test "x$new_path" = x \
15280       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15281       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15282     new_path=`$CYGPATH -u "$path"`
15283   fi
15284   if test "x$new_path" = x; then
15285     # Oops. Which didn't find the executable.
15286     # The splitting of arguments from the executable at a space might have been incorrect,
15287     # since paths with space are more likely in Windows. Give it another try with the whole
15288     # argument.
15289     path="$complete"
15290     arguments="EOL"
15291     new_path=`$CYGPATH -u "$path"`
15292     new_path=`$WHICH "$new_path" 2> /dev/null`
15293     # bat and cmd files are not always considered executable in cygwin causing which
15294     # to not find them
15295     if test "x$new_path" = x \
15296         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15297         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15298       new_path=`$CYGPATH -u "$path"`
15299     fi
15300     if test "x$new_path" = x; then
15301       # It's still not found. Now this is an unrecoverable error.
15302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15303 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15304       has_space=`$ECHO "$complete" | $GREP " "`
15305       if test "x$has_space" != x; then
15306         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15307 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15308       fi
15309       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15310     fi
15311   fi
15312 
15313   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15314   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15315   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15316   # "foo.exe" is OK but "foo" is an error.
15317   #
15318   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15319   # It is also a way to make sure we got the proper file name for the real test later on.
15320   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15321   if test "x$test_shortpath" = x; then
15322     # Short path failed, file does not exist as specified.
15323     # Try adding .exe or .cmd
15324     if test -f "${new_path}.exe"; then
15325       input_to_shortpath="${new_path}.exe"
15326     elif test -f "${new_path}.cmd"; then
15327       input_to_shortpath="${new_path}.cmd"
15328     else
15329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15330 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15331       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15332 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15333       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15334     fi
15335   else
15336     input_to_shortpath="$new_path"
15337   fi
15338 
15339   # Call helper function which possibly converts this using DOS-style short mode.
15340   # If so, the updated path is stored in $new_path.
15341   new_path="$input_to_shortpath"
15342 
15343   input_path="$input_to_shortpath"
15344   # Check if we need to convert this using DOS-style short mode. If the path
15345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15346   # take no chances and rewrite it.
15347   # Note: m4 eats our [], so we need to use [ and ] instead.
15348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15349   if test "x$has_forbidden_chars" != x; then
15350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15354       # Going to short mode and back again did indeed matter. Since short mode is
15355       # case insensitive, let's make it lowercase to improve readability.
15356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15357       # Now convert it back to Unix-stile (cygpath)
15358       input_path=`$CYGPATH -u "$shortmode_path"`
15359       new_path="$input_path"
15360     fi
15361   fi
15362 
15363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15364   if test "x$test_cygdrive_prefix" = x; then
15365     # As a simple fix, exclude /usr/bin since it's not a real path.
15366     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15368       # a path prefixed by /cygdrive for fixpath to work.
15369       new_path="$CYGWIN_ROOT_PATH$input_path"
15370     fi
15371   fi
15372 
15373   # remove trailing .exe if any
15374   new_path="${new_path/%.exe/}"
15375 
15376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15377 
15378   # First separate the path from the arguments. This will split at the first
15379   # space.
15380   complete="$FOUND_MAKE"
15381   path="${complete%% *}"
15382   tmp="$complete EOL"
15383   arguments="${tmp#* }"
15384 
15385   # Input might be given as Windows format, start by converting to
15386   # unix format.
15387   new_path="$path"
15388 
15389   windows_path="$new_path"
15390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15391     unix_path=`$CYGPATH -u "$windows_path"`
15392     new_path="$unix_path"
15393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15395     new_path="$unix_path"
15396   fi
15397 
15398 
15399   # Now try to locate executable using which
15400   new_path=`$WHICH "$new_path" 2> /dev/null`
15401 
15402   if test "x$new_path" = x; then
15403     # Oops. Which didn't find the executable.
15404     # The splitting of arguments from the executable at a space might have been incorrect,
15405     # since paths with space are more likely in Windows. Give it another try with the whole
15406     # argument.
15407     path="$complete"
15408     arguments="EOL"
15409     new_path="$path"
15410 
15411   windows_path="$new_path"
15412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15413     unix_path=`$CYGPATH -u "$windows_path"`
15414     new_path="$unix_path"
15415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15417     new_path="$unix_path"
15418   fi
15419 
15420 
15421     new_path=`$WHICH "$new_path" 2> /dev/null`
15422 
15423     if test "x$new_path" = x; then
15424       # It's still not found. Now this is an unrecoverable error.
15425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15426 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15427       has_space=`$ECHO "$complete" | $GREP " "`
15428       if test "x$has_space" != x; then
15429         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15430 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15431       fi
15432       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15433     fi
15434   fi
15435 
15436   # Now new_path has a complete unix path to the binary
15437   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15438     # Keep paths in /bin as-is, but remove trailing .exe if any
15439     new_path="${new_path/%.exe/}"
15440     # Do not save /bin paths to all_fixpath_prefixes!
15441   else
15442     # Not in mixed or Windows style, start by that.
15443     new_path=`cmd //c echo $new_path`
15444 
15445   input_path="$new_path"
15446   # Check if we need to convert this using DOS-style short mode. If the path
15447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15448   # take no chances and rewrite it.
15449   # Note: m4 eats our [], so we need to use [ and ] instead.
15450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15451   if test "x$has_forbidden_chars" != x; then
15452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15453     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15454   fi
15455 
15456     # Output is in $new_path
15457 
15458   windows_path="$new_path"
15459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15460     unix_path=`$CYGPATH -u "$windows_path"`
15461     new_path="$unix_path"
15462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15464     new_path="$unix_path"
15465   fi
15466 
15467     # remove trailing .exe if any
15468     new_path="${new_path/%.exe/}"
15469 
15470     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15471     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15472   fi
15473 
15474   else
15475     # We're on a posix platform. Hooray! :)
15476     # First separate the path from the arguments. This will split at the first
15477     # space.
15478     complete="$FOUND_MAKE"
15479     path="${complete%% *}"
15480     tmp="$complete EOL"
15481     arguments="${tmp#* }"
15482 
15483     # Cannot rely on the command "which" here since it doesn't always work.
15484     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15485     if test -z "$is_absolute_path"; then
15486       # Path to executable is not absolute. Find it.
15487       IFS_save="$IFS"
15488       IFS=:
15489       for p in $PATH; do
15490         if test -f "$p/$path" && test -x "$p/$path"; then
15491           new_path="$p/$path"
15492           break
15493         fi
15494       done
15495       IFS="$IFS_save"
15496     else
15497       # This is an absolute path, we can use it without further modifications.
15498       new_path="$path"
15499     fi
15500 
15501     if test "x$new_path" = x; then
15502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15503 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15504       has_space=`$ECHO "$complete" | $GREP " "`
15505       if test "x$has_space" != x; then
15506         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15507 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15508       fi
15509       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15510     fi
15511   fi
15512 
15513   # Now join together the path and the arguments once again
15514   if test "x$arguments" != xEOL; then
15515     new_complete="$new_path ${arguments% *}"
15516   else
15517     new_complete="$new_path"
15518   fi
15519 
15520   if test "x$complete" != "x$new_complete"; then
15521     FOUND_MAKE="$new_complete"
15522     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15523 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15524   fi
15525 
15526         fi
15527       fi
15528     fi
15529   fi
15530 
15531     if test "x$FOUND_MAKE" = x; then
15532       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15533     fi
15534   else
15535     # Try our hardest to locate a correct version of GNU make
15536     for ac_prog in gmake
15537 do
15538   # Extract the first word of "$ac_prog", so it can be a program name with args.
15539 set dummy $ac_prog; ac_word=$2
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15541 $as_echo_n "checking for $ac_word... " >&6; }
15542 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15543   $as_echo_n "(cached) " >&6
15544 else
15545   case $CHECK_GMAKE in
15546   [\\/]* | ?:[\\/]*)
15547   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15548   ;;
15549   *)
15550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15551 for as_dir in $PATH
15552 do
15553   IFS=$as_save_IFS
15554   test -z "$as_dir" && as_dir=.
15555     for ac_exec_ext in '' $ac_executable_extensions; do
15556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15557     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15559     break 2
15560   fi
15561 done
15562   done
15563 IFS=$as_save_IFS
15564 
15565   ;;
15566 esac
15567 fi
15568 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15569 if test -n "$CHECK_GMAKE"; then
15570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15571 $as_echo "$CHECK_GMAKE" >&6; }
15572 else
15573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15574 $as_echo "no" >&6; }
15575 fi
15576 
15577 
15578   test -n "$CHECK_GMAKE" && break
15579 done
15580 
15581 
15582   MAKE_CANDIDATE=""$CHECK_GMAKE""
15583   DESCRIPTION="gmake in PATH"
15584   if test "x$MAKE_CANDIDATE" != x; then
15585     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15586 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15587     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15588     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15589     if test "x$IS_GNU_MAKE" = x; then
15590       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15591 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15592     else
15593       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15594       if test "x$IS_MODERN_MAKE" = x; then
15595         { $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
15596 $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;}
15597       else
15598         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15599           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15600             MAKE_EXPECTED_ENV='cygwin'
15601           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15602             MAKE_EXPECTED_ENV='msys'
15603           else
15604             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15605           fi
15606           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15607           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15608         else
15609           # Not relevant for non-Windows
15610           IS_MAKE_CORRECT_ENV=true
15611         fi
15612         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15613           { $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
15614 $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;}
15615         else
15616           FOUND_MAKE=$MAKE_CANDIDATE
15617 
15618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15619 
15620   # First separate the path from the arguments. This will split at the first
15621   # space.
15622   complete="$FOUND_MAKE"
15623   path="${complete%% *}"
15624   tmp="$complete EOL"
15625   arguments="${tmp#* }"
15626 
15627   # Input might be given as Windows format, start by converting to
15628   # unix format.
15629   new_path=`$CYGPATH -u "$path"`
15630 
15631   # Now try to locate executable using which
15632   new_path=`$WHICH "$new_path" 2> /dev/null`
15633   # bat and cmd files are not always considered executable in cygwin causing which
15634   # to not find them
15635   if test "x$new_path" = x \
15636       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15637       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15638     new_path=`$CYGPATH -u "$path"`
15639   fi
15640   if test "x$new_path" = x; then
15641     # Oops. Which didn't find the executable.
15642     # The splitting of arguments from the executable at a space might have been incorrect,
15643     # since paths with space are more likely in Windows. Give it another try with the whole
15644     # argument.
15645     path="$complete"
15646     arguments="EOL"
15647     new_path=`$CYGPATH -u "$path"`
15648     new_path=`$WHICH "$new_path" 2> /dev/null`
15649     # bat and cmd files are not always considered executable in cygwin causing which
15650     # to not find them
15651     if test "x$new_path" = x \
15652         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15653         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15654       new_path=`$CYGPATH -u "$path"`
15655     fi
15656     if test "x$new_path" = x; then
15657       # It's still not found. Now this is an unrecoverable error.
15658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15659 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15660       has_space=`$ECHO "$complete" | $GREP " "`
15661       if test "x$has_space" != x; then
15662         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15663 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15664       fi
15665       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15666     fi
15667   fi
15668 
15669   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15670   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15671   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15672   # "foo.exe" is OK but "foo" is an error.
15673   #
15674   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15675   # It is also a way to make sure we got the proper file name for the real test later on.
15676   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15677   if test "x$test_shortpath" = x; then
15678     # Short path failed, file does not exist as specified.
15679     # Try adding .exe or .cmd
15680     if test -f "${new_path}.exe"; then
15681       input_to_shortpath="${new_path}.exe"
15682     elif test -f "${new_path}.cmd"; then
15683       input_to_shortpath="${new_path}.cmd"
15684     else
15685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15686 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15687       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15688 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15689       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15690     fi
15691   else
15692     input_to_shortpath="$new_path"
15693   fi
15694 
15695   # Call helper function which possibly converts this using DOS-style short mode.
15696   # If so, the updated path is stored in $new_path.
15697   new_path="$input_to_shortpath"
15698 
15699   input_path="$input_to_shortpath"
15700   # Check if we need to convert this using DOS-style short mode. If the path
15701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15702   # take no chances and rewrite it.
15703   # Note: m4 eats our [], so we need to use [ and ] instead.
15704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15705   if test "x$has_forbidden_chars" != x; then
15706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15707     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15708     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15709     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15710       # Going to short mode and back again did indeed matter. Since short mode is
15711       # case insensitive, let's make it lowercase to improve readability.
15712       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15713       # Now convert it back to Unix-stile (cygpath)
15714       input_path=`$CYGPATH -u "$shortmode_path"`
15715       new_path="$input_path"
15716     fi
15717   fi
15718 
15719   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15720   if test "x$test_cygdrive_prefix" = x; then
15721     # As a simple fix, exclude /usr/bin since it's not a real path.
15722     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15723       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15724       # a path prefixed by /cygdrive for fixpath to work.
15725       new_path="$CYGWIN_ROOT_PATH$input_path"
15726     fi
15727   fi
15728 
15729   # remove trailing .exe if any
15730   new_path="${new_path/%.exe/}"
15731 
15732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15733 
15734   # First separate the path from the arguments. This will split at the first
15735   # space.
15736   complete="$FOUND_MAKE"
15737   path="${complete%% *}"
15738   tmp="$complete EOL"
15739   arguments="${tmp#* }"
15740 
15741   # Input might be given as Windows format, start by converting to
15742   # unix format.
15743   new_path="$path"
15744 
15745   windows_path="$new_path"
15746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15747     unix_path=`$CYGPATH -u "$windows_path"`
15748     new_path="$unix_path"
15749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15751     new_path="$unix_path"
15752   fi
15753 
15754 
15755   # Now try to locate executable using which
15756   new_path=`$WHICH "$new_path" 2> /dev/null`
15757 
15758   if test "x$new_path" = x; then
15759     # Oops. Which didn't find the executable.
15760     # The splitting of arguments from the executable at a space might have been incorrect,
15761     # since paths with space are more likely in Windows. Give it another try with the whole
15762     # argument.
15763     path="$complete"
15764     arguments="EOL"
15765     new_path="$path"
15766 
15767   windows_path="$new_path"
15768   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15769     unix_path=`$CYGPATH -u "$windows_path"`
15770     new_path="$unix_path"
15771   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15772     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15773     new_path="$unix_path"
15774   fi
15775 
15776 
15777     new_path=`$WHICH "$new_path" 2> /dev/null`
15778 
15779     if test "x$new_path" = x; then
15780       # It's still not found. Now this is an unrecoverable error.
15781       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15782 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15783       has_space=`$ECHO "$complete" | $GREP " "`
15784       if test "x$has_space" != x; then
15785         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15786 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15787       fi
15788       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15789     fi
15790   fi
15791 
15792   # Now new_path has a complete unix path to the binary
15793   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15794     # Keep paths in /bin as-is, but remove trailing .exe if any
15795     new_path="${new_path/%.exe/}"
15796     # Do not save /bin paths to all_fixpath_prefixes!
15797   else
15798     # Not in mixed or Windows style, start by that.
15799     new_path=`cmd //c echo $new_path`
15800 
15801   input_path="$new_path"
15802   # Check if we need to convert this using DOS-style short mode. If the path
15803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15804   # take no chances and rewrite it.
15805   # Note: m4 eats our [], so we need to use [ and ] instead.
15806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15807   if test "x$has_forbidden_chars" != x; then
15808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15809     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15810   fi
15811 
15812     # Output is in $new_path
15813 
15814   windows_path="$new_path"
15815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15816     unix_path=`$CYGPATH -u "$windows_path"`
15817     new_path="$unix_path"
15818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15820     new_path="$unix_path"
15821   fi
15822 
15823     # remove trailing .exe if any
15824     new_path="${new_path/%.exe/}"
15825 
15826     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15827     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15828   fi
15829 
15830   else
15831     # We're on a posix platform. Hooray! :)
15832     # First separate the path from the arguments. This will split at the first
15833     # space.
15834     complete="$FOUND_MAKE"
15835     path="${complete%% *}"
15836     tmp="$complete EOL"
15837     arguments="${tmp#* }"
15838 
15839     # Cannot rely on the command "which" here since it doesn't always work.
15840     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15841     if test -z "$is_absolute_path"; then
15842       # Path to executable is not absolute. Find it.
15843       IFS_save="$IFS"
15844       IFS=:
15845       for p in $PATH; do
15846         if test -f "$p/$path" && test -x "$p/$path"; then
15847           new_path="$p/$path"
15848           break
15849         fi
15850       done
15851       IFS="$IFS_save"
15852     else
15853       # This is an absolute path, we can use it without further modifications.
15854       new_path="$path"
15855     fi
15856 
15857     if test "x$new_path" = x; then
15858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15859 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15860       has_space=`$ECHO "$complete" | $GREP " "`
15861       if test "x$has_space" != x; then
15862         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15863 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15864       fi
15865       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15866     fi
15867   fi
15868 
15869   # Now join together the path and the arguments once again
15870   if test "x$arguments" != xEOL; then
15871     new_complete="$new_path ${arguments% *}"
15872   else
15873     new_complete="$new_path"
15874   fi
15875 
15876   if test "x$complete" != "x$new_complete"; then
15877     FOUND_MAKE="$new_complete"
15878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15879 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15880   fi
15881 
15882         fi
15883       fi
15884     fi
15885   fi
15886 
15887 
15888     if test "x$FOUND_MAKE" = x; then
15889       for ac_prog in make
15890 do
15891   # Extract the first word of "$ac_prog", so it can be a program name with args.
15892 set dummy $ac_prog; ac_word=$2
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15894 $as_echo_n "checking for $ac_word... " >&6; }
15895 if ${ac_cv_path_CHECK_MAKE+:} false; then :
15896   $as_echo_n "(cached) " >&6
15897 else
15898   case $CHECK_MAKE in
15899   [\\/]* | ?:[\\/]*)
15900   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15901   ;;
15902   *)
15903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15904 for as_dir in $PATH
15905 do
15906   IFS=$as_save_IFS
15907   test -z "$as_dir" && as_dir=.
15908     for ac_exec_ext in '' $ac_executable_extensions; do
15909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15910     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15912     break 2
15913   fi
15914 done
15915   done
15916 IFS=$as_save_IFS
15917 
15918   ;;
15919 esac
15920 fi
15921 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15922 if test -n "$CHECK_MAKE"; then
15923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15924 $as_echo "$CHECK_MAKE" >&6; }
15925 else
15926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15927 $as_echo "no" >&6; }
15928 fi
15929 
15930 
15931   test -n "$CHECK_MAKE" && break
15932 done
15933 
15934 
15935   MAKE_CANDIDATE=""$CHECK_MAKE""
15936   DESCRIPTION="make in PATH"
15937   if test "x$MAKE_CANDIDATE" != x; then
15938     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15939 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15940     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15941     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15942     if test "x$IS_GNU_MAKE" = x; then
15943       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15944 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15945     else
15946       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15947       if test "x$IS_MODERN_MAKE" = x; then
15948         { $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
15949 $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;}
15950       else
15951         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15952           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953             MAKE_EXPECTED_ENV='cygwin'
15954           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955             MAKE_EXPECTED_ENV='msys'
15956           else
15957             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15958           fi
15959           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15960           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15961         else
15962           # Not relevant for non-Windows
15963           IS_MAKE_CORRECT_ENV=true
15964         fi
15965         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15966           { $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
15967 $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;}
15968         else
15969           FOUND_MAKE=$MAKE_CANDIDATE
15970 
15971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15972 
15973   # First separate the path from the arguments. This will split at the first
15974   # space.
15975   complete="$FOUND_MAKE"
15976   path="${complete%% *}"
15977   tmp="$complete EOL"
15978   arguments="${tmp#* }"
15979 
15980   # Input might be given as Windows format, start by converting to
15981   # unix format.
15982   new_path=`$CYGPATH -u "$path"`
15983 
15984   # Now try to locate executable using which
15985   new_path=`$WHICH "$new_path" 2> /dev/null`
15986   # bat and cmd files are not always considered executable in cygwin causing which
15987   # to not find them
15988   if test "x$new_path" = x \
15989       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15990       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15991     new_path=`$CYGPATH -u "$path"`
15992   fi
15993   if test "x$new_path" = x; then
15994     # Oops. Which didn't find the executable.
15995     # The splitting of arguments from the executable at a space might have been incorrect,
15996     # since paths with space are more likely in Windows. Give it another try with the whole
15997     # argument.
15998     path="$complete"
15999     arguments="EOL"
16000     new_path=`$CYGPATH -u "$path"`
16001     new_path=`$WHICH "$new_path" 2> /dev/null`
16002     # bat and cmd files are not always considered executable in cygwin causing which
16003     # to not find them
16004     if test "x$new_path" = x \
16005         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16006         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16007       new_path=`$CYGPATH -u "$path"`
16008     fi
16009     if test "x$new_path" = x; then
16010       # It's still not found. Now this is an unrecoverable error.
16011       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16012 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16013       has_space=`$ECHO "$complete" | $GREP " "`
16014       if test "x$has_space" != x; then
16015         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16016 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16017       fi
16018       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16019     fi
16020   fi
16021 
16022   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16023   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16024   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16025   # "foo.exe" is OK but "foo" is an error.
16026   #
16027   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16028   # It is also a way to make sure we got the proper file name for the real test later on.
16029   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16030   if test "x$test_shortpath" = x; then
16031     # Short path failed, file does not exist as specified.
16032     # Try adding .exe or .cmd
16033     if test -f "${new_path}.exe"; then
16034       input_to_shortpath="${new_path}.exe"
16035     elif test -f "${new_path}.cmd"; then
16036       input_to_shortpath="${new_path}.cmd"
16037     else
16038       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16039 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16040       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16041 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16042       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16043     fi
16044   else
16045     input_to_shortpath="$new_path"
16046   fi
16047 
16048   # Call helper function which possibly converts this using DOS-style short mode.
16049   # If so, the updated path is stored in $new_path.
16050   new_path="$input_to_shortpath"
16051 
16052   input_path="$input_to_shortpath"
16053   # Check if we need to convert this using DOS-style short mode. If the path
16054   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16055   # take no chances and rewrite it.
16056   # Note: m4 eats our [], so we need to use [ and ] instead.
16057   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16058   if test "x$has_forbidden_chars" != x; then
16059     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16060     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16061     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16062     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16063       # Going to short mode and back again did indeed matter. Since short mode is
16064       # case insensitive, let's make it lowercase to improve readability.
16065       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16066       # Now convert it back to Unix-stile (cygpath)
16067       input_path=`$CYGPATH -u "$shortmode_path"`
16068       new_path="$input_path"
16069     fi
16070   fi
16071 
16072   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16073   if test "x$test_cygdrive_prefix" = x; then
16074     # As a simple fix, exclude /usr/bin since it's not a real path.
16075     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16076       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16077       # a path prefixed by /cygdrive for fixpath to work.
16078       new_path="$CYGWIN_ROOT_PATH$input_path"
16079     fi
16080   fi
16081 
16082   # remove trailing .exe if any
16083   new_path="${new_path/%.exe/}"
16084 
16085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16086 
16087   # First separate the path from the arguments. This will split at the first
16088   # space.
16089   complete="$FOUND_MAKE"
16090   path="${complete%% *}"
16091   tmp="$complete EOL"
16092   arguments="${tmp#* }"
16093 
16094   # Input might be given as Windows format, start by converting to
16095   # unix format.
16096   new_path="$path"
16097 
16098   windows_path="$new_path"
16099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16100     unix_path=`$CYGPATH -u "$windows_path"`
16101     new_path="$unix_path"
16102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16104     new_path="$unix_path"
16105   fi
16106 
16107 
16108   # Now try to locate executable using which
16109   new_path=`$WHICH "$new_path" 2> /dev/null`
16110 
16111   if test "x$new_path" = x; then
16112     # Oops. Which didn't find the executable.
16113     # The splitting of arguments from the executable at a space might have been incorrect,
16114     # since paths with space are more likely in Windows. Give it another try with the whole
16115     # argument.
16116     path="$complete"
16117     arguments="EOL"
16118     new_path="$path"
16119 
16120   windows_path="$new_path"
16121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16122     unix_path=`$CYGPATH -u "$windows_path"`
16123     new_path="$unix_path"
16124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16126     new_path="$unix_path"
16127   fi
16128 
16129 
16130     new_path=`$WHICH "$new_path" 2> /dev/null`
16131 
16132     if test "x$new_path" = x; then
16133       # It's still not found. Now this is an unrecoverable error.
16134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16135 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16136       has_space=`$ECHO "$complete" | $GREP " "`
16137       if test "x$has_space" != x; then
16138         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16140       fi
16141       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16142     fi
16143   fi
16144 
16145   # Now new_path has a complete unix path to the binary
16146   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16147     # Keep paths in /bin as-is, but remove trailing .exe if any
16148     new_path="${new_path/%.exe/}"
16149     # Do not save /bin paths to all_fixpath_prefixes!
16150   else
16151     # Not in mixed or Windows style, start by that.
16152     new_path=`cmd //c echo $new_path`
16153 
16154   input_path="$new_path"
16155   # Check if we need to convert this using DOS-style short mode. If the path
16156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16157   # take no chances and rewrite it.
16158   # Note: m4 eats our [], so we need to use [ and ] instead.
16159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16160   if test "x$has_forbidden_chars" != x; then
16161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16162     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16163   fi
16164 
16165     # Output is in $new_path
16166 
16167   windows_path="$new_path"
16168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16169     unix_path=`$CYGPATH -u "$windows_path"`
16170     new_path="$unix_path"
16171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16172     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16173     new_path="$unix_path"
16174   fi
16175 
16176     # remove trailing .exe if any
16177     new_path="${new_path/%.exe/}"
16178 
16179     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16180     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16181   fi
16182 
16183   else
16184     # We're on a posix platform. Hooray! :)
16185     # First separate the path from the arguments. This will split at the first
16186     # space.
16187     complete="$FOUND_MAKE"
16188     path="${complete%% *}"
16189     tmp="$complete EOL"
16190     arguments="${tmp#* }"
16191 
16192     # Cannot rely on the command "which" here since it doesn't always work.
16193     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16194     if test -z "$is_absolute_path"; then
16195       # Path to executable is not absolute. Find it.
16196       IFS_save="$IFS"
16197       IFS=:
16198       for p in $PATH; do
16199         if test -f "$p/$path" && test -x "$p/$path"; then
16200           new_path="$p/$path"
16201           break
16202         fi
16203       done
16204       IFS="$IFS_save"
16205     else
16206       # This is an absolute path, we can use it without further modifications.
16207       new_path="$path"
16208     fi
16209 
16210     if test "x$new_path" = x; then
16211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16212 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16213       has_space=`$ECHO "$complete" | $GREP " "`
16214       if test "x$has_space" != x; then
16215         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16216 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16217       fi
16218       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16219     fi
16220   fi
16221 
16222   # Now join together the path and the arguments once again
16223   if test "x$arguments" != xEOL; then
16224     new_complete="$new_path ${arguments% *}"
16225   else
16226     new_complete="$new_path"
16227   fi
16228 
16229   if test "x$complete" != "x$new_complete"; then
16230     FOUND_MAKE="$new_complete"
16231     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16232 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16233   fi
16234 
16235         fi
16236       fi
16237     fi
16238   fi
16239 
16240     fi
16241 
16242     if test "x$FOUND_MAKE" = x; then
16243       if test "x$TOOLCHAIN_PATH" != x; then
16244         # We have a toolchain path, check that as well before giving up.
16245         OLD_PATH=$PATH
16246         PATH=$TOOLCHAIN_PATH:$PATH
16247         for ac_prog in gmake
16248 do
16249   # Extract the first word of "$ac_prog", so it can be a program name with args.
16250 set dummy $ac_prog; ac_word=$2
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16252 $as_echo_n "checking for $ac_word... " >&6; }
16253 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16254   $as_echo_n "(cached) " >&6
16255 else
16256   case $CHECK_TOOLSDIR_GMAKE in
16257   [\\/]* | ?:[\\/]*)
16258   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16259   ;;
16260   *)
16261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16262 for as_dir in $PATH
16263 do
16264   IFS=$as_save_IFS
16265   test -z "$as_dir" && as_dir=.
16266     for ac_exec_ext in '' $ac_executable_extensions; do
16267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16268     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16270     break 2
16271   fi
16272 done
16273   done
16274 IFS=$as_save_IFS
16275 
16276   ;;
16277 esac
16278 fi
16279 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16280 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16282 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16283 else
16284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16285 $as_echo "no" >&6; }
16286 fi
16287 
16288 
16289   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16290 done
16291 
16292 
16293   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16294   DESCRIPTION="gmake in tools-dir"
16295   if test "x$MAKE_CANDIDATE" != x; then
16296     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16297 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16298     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16299     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16300     if test "x$IS_GNU_MAKE" = x; then
16301       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16302 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16303     else
16304       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16305       if test "x$IS_MODERN_MAKE" = x; then
16306         { $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
16307 $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;}
16308       else
16309         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16310           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16311             MAKE_EXPECTED_ENV='cygwin'
16312           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16313             MAKE_EXPECTED_ENV='msys'
16314           else
16315             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16316           fi
16317           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16318           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16319         else
16320           # Not relevant for non-Windows
16321           IS_MAKE_CORRECT_ENV=true
16322         fi
16323         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16324           { $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
16325 $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;}
16326         else
16327           FOUND_MAKE=$MAKE_CANDIDATE
16328 
16329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16330 
16331   # First separate the path from the arguments. This will split at the first
16332   # space.
16333   complete="$FOUND_MAKE"
16334   path="${complete%% *}"
16335   tmp="$complete EOL"
16336   arguments="${tmp#* }"
16337 
16338   # Input might be given as Windows format, start by converting to
16339   # unix format.
16340   new_path=`$CYGPATH -u "$path"`
16341 
16342   # Now try to locate executable using which
16343   new_path=`$WHICH "$new_path" 2> /dev/null`
16344   # bat and cmd files are not always considered executable in cygwin causing which
16345   # to not find them
16346   if test "x$new_path" = x \
16347       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16348       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16349     new_path=`$CYGPATH -u "$path"`
16350   fi
16351   if test "x$new_path" = x; then
16352     # Oops. Which didn't find the executable.
16353     # The splitting of arguments from the executable at a space might have been incorrect,
16354     # since paths with space are more likely in Windows. Give it another try with the whole
16355     # argument.
16356     path="$complete"
16357     arguments="EOL"
16358     new_path=`$CYGPATH -u "$path"`
16359     new_path=`$WHICH "$new_path" 2> /dev/null`
16360     # bat and cmd files are not always considered executable in cygwin causing which
16361     # to not find them
16362     if test "x$new_path" = x \
16363         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16364         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16365       new_path=`$CYGPATH -u "$path"`
16366     fi
16367     if test "x$new_path" = x; then
16368       # It's still not found. Now this is an unrecoverable error.
16369       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16370 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16371       has_space=`$ECHO "$complete" | $GREP " "`
16372       if test "x$has_space" != x; then
16373         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16374 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16375       fi
16376       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16377     fi
16378   fi
16379 
16380   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16381   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16382   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16383   # "foo.exe" is OK but "foo" is an error.
16384   #
16385   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16386   # It is also a way to make sure we got the proper file name for the real test later on.
16387   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16388   if test "x$test_shortpath" = x; then
16389     # Short path failed, file does not exist as specified.
16390     # Try adding .exe or .cmd
16391     if test -f "${new_path}.exe"; then
16392       input_to_shortpath="${new_path}.exe"
16393     elif test -f "${new_path}.cmd"; then
16394       input_to_shortpath="${new_path}.cmd"
16395     else
16396       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16397 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16398       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16399 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16400       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16401     fi
16402   else
16403     input_to_shortpath="$new_path"
16404   fi
16405 
16406   # Call helper function which possibly converts this using DOS-style short mode.
16407   # If so, the updated path is stored in $new_path.
16408   new_path="$input_to_shortpath"
16409 
16410   input_path="$input_to_shortpath"
16411   # Check if we need to convert this using DOS-style short mode. If the path
16412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16413   # take no chances and rewrite it.
16414   # Note: m4 eats our [], so we need to use [ and ] instead.
16415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16416   if test "x$has_forbidden_chars" != x; then
16417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16418     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16419     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16420     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16421       # Going to short mode and back again did indeed matter. Since short mode is
16422       # case insensitive, let's make it lowercase to improve readability.
16423       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16424       # Now convert it back to Unix-stile (cygpath)
16425       input_path=`$CYGPATH -u "$shortmode_path"`
16426       new_path="$input_path"
16427     fi
16428   fi
16429 
16430   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16431   if test "x$test_cygdrive_prefix" = x; then
16432     # As a simple fix, exclude /usr/bin since it's not a real path.
16433     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16434       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16435       # a path prefixed by /cygdrive for fixpath to work.
16436       new_path="$CYGWIN_ROOT_PATH$input_path"
16437     fi
16438   fi
16439 
16440   # remove trailing .exe if any
16441   new_path="${new_path/%.exe/}"
16442 
16443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16444 
16445   # First separate the path from the arguments. This will split at the first
16446   # space.
16447   complete="$FOUND_MAKE"
16448   path="${complete%% *}"
16449   tmp="$complete EOL"
16450   arguments="${tmp#* }"
16451 
16452   # Input might be given as Windows format, start by converting to
16453   # unix format.
16454   new_path="$path"
16455 
16456   windows_path="$new_path"
16457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16458     unix_path=`$CYGPATH -u "$windows_path"`
16459     new_path="$unix_path"
16460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16462     new_path="$unix_path"
16463   fi
16464 
16465 
16466   # Now try to locate executable using which
16467   new_path=`$WHICH "$new_path" 2> /dev/null`
16468 
16469   if test "x$new_path" = x; then
16470     # Oops. Which didn't find the executable.
16471     # The splitting of arguments from the executable at a space might have been incorrect,
16472     # since paths with space are more likely in Windows. Give it another try with the whole
16473     # argument.
16474     path="$complete"
16475     arguments="EOL"
16476     new_path="$path"
16477 
16478   windows_path="$new_path"
16479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480     unix_path=`$CYGPATH -u "$windows_path"`
16481     new_path="$unix_path"
16482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484     new_path="$unix_path"
16485   fi
16486 
16487 
16488     new_path=`$WHICH "$new_path" 2> /dev/null`
16489 
16490     if test "x$new_path" = x; then
16491       # It's still not found. Now this is an unrecoverable error.
16492       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16493 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16494       has_space=`$ECHO "$complete" | $GREP " "`
16495       if test "x$has_space" != x; then
16496         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16497 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16498       fi
16499       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16500     fi
16501   fi
16502 
16503   # Now new_path has a complete unix path to the binary
16504   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16505     # Keep paths in /bin as-is, but remove trailing .exe if any
16506     new_path="${new_path/%.exe/}"
16507     # Do not save /bin paths to all_fixpath_prefixes!
16508   else
16509     # Not in mixed or Windows style, start by that.
16510     new_path=`cmd //c echo $new_path`
16511 
16512   input_path="$new_path"
16513   # Check if we need to convert this using DOS-style short mode. If the path
16514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16515   # take no chances and rewrite it.
16516   # Note: m4 eats our [], so we need to use [ and ] instead.
16517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16518   if test "x$has_forbidden_chars" != x; then
16519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16520     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16521   fi
16522 
16523     # Output is in $new_path
16524 
16525   windows_path="$new_path"
16526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16527     unix_path=`$CYGPATH -u "$windows_path"`
16528     new_path="$unix_path"
16529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16530     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16531     new_path="$unix_path"
16532   fi
16533 
16534     # remove trailing .exe if any
16535     new_path="${new_path/%.exe/}"
16536 
16537     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16538     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16539   fi
16540 
16541   else
16542     # We're on a posix platform. Hooray! :)
16543     # First separate the path from the arguments. This will split at the first
16544     # space.
16545     complete="$FOUND_MAKE"
16546     path="${complete%% *}"
16547     tmp="$complete EOL"
16548     arguments="${tmp#* }"
16549 
16550     # Cannot rely on the command "which" here since it doesn't always work.
16551     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16552     if test -z "$is_absolute_path"; then
16553       # Path to executable is not absolute. Find it.
16554       IFS_save="$IFS"
16555       IFS=:
16556       for p in $PATH; do
16557         if test -f "$p/$path" && test -x "$p/$path"; then
16558           new_path="$p/$path"
16559           break
16560         fi
16561       done
16562       IFS="$IFS_save"
16563     else
16564       # This is an absolute path, we can use it without further modifications.
16565       new_path="$path"
16566     fi
16567 
16568     if test "x$new_path" = x; then
16569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16570 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16571       has_space=`$ECHO "$complete" | $GREP " "`
16572       if test "x$has_space" != x; then
16573         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16574 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16575       fi
16576       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16577     fi
16578   fi
16579 
16580   # Now join together the path and the arguments once again
16581   if test "x$arguments" != xEOL; then
16582     new_complete="$new_path ${arguments% *}"
16583   else
16584     new_complete="$new_path"
16585   fi
16586 
16587   if test "x$complete" != "x$new_complete"; then
16588     FOUND_MAKE="$new_complete"
16589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16590 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16591   fi
16592 
16593         fi
16594       fi
16595     fi
16596   fi
16597 
16598         if test "x$FOUND_MAKE" = x; then
16599           for ac_prog in make
16600 do
16601   # Extract the first word of "$ac_prog", so it can be a program name with args.
16602 set dummy $ac_prog; ac_word=$2
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16604 $as_echo_n "checking for $ac_word... " >&6; }
16605 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16606   $as_echo_n "(cached) " >&6
16607 else
16608   case $CHECK_TOOLSDIR_MAKE in
16609   [\\/]* | ?:[\\/]*)
16610   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16611   ;;
16612   *)
16613   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16614 for as_dir in $PATH
16615 do
16616   IFS=$as_save_IFS
16617   test -z "$as_dir" && as_dir=.
16618     for ac_exec_ext in '' $ac_executable_extensions; do
16619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16620     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16622     break 2
16623   fi
16624 done
16625   done
16626 IFS=$as_save_IFS
16627 
16628   ;;
16629 esac
16630 fi
16631 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16632 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16634 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16635 else
16636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16637 $as_echo "no" >&6; }
16638 fi
16639 
16640 
16641   test -n "$CHECK_TOOLSDIR_MAKE" && break
16642 done
16643 
16644 
16645   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16646   DESCRIPTION="make in tools-dir"
16647   if test "x$MAKE_CANDIDATE" != x; then
16648     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16649 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16650     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16651     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16652     if test "x$IS_GNU_MAKE" = x; then
16653       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16654 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16655     else
16656       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16657       if test "x$IS_MODERN_MAKE" = x; then
16658         { $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
16659 $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;}
16660       else
16661         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16662           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16663             MAKE_EXPECTED_ENV='cygwin'
16664           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665             MAKE_EXPECTED_ENV='msys'
16666           else
16667             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16668           fi
16669           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16670           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16671         else
16672           # Not relevant for non-Windows
16673           IS_MAKE_CORRECT_ENV=true
16674         fi
16675         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16676           { $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
16677 $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;}
16678         else
16679           FOUND_MAKE=$MAKE_CANDIDATE
16680 
16681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16682 
16683   # First separate the path from the arguments. This will split at the first
16684   # space.
16685   complete="$FOUND_MAKE"
16686   path="${complete%% *}"
16687   tmp="$complete EOL"
16688   arguments="${tmp#* }"
16689 
16690   # Input might be given as Windows format, start by converting to
16691   # unix format.
16692   new_path=`$CYGPATH -u "$path"`
16693 
16694   # Now try to locate executable using which
16695   new_path=`$WHICH "$new_path" 2> /dev/null`
16696   # bat and cmd files are not always considered executable in cygwin causing which
16697   # to not find them
16698   if test "x$new_path" = x \
16699       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16700       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16701     new_path=`$CYGPATH -u "$path"`
16702   fi
16703   if test "x$new_path" = x; then
16704     # Oops. Which didn't find the executable.
16705     # The splitting of arguments from the executable at a space might have been incorrect,
16706     # since paths with space are more likely in Windows. Give it another try with the whole
16707     # argument.
16708     path="$complete"
16709     arguments="EOL"
16710     new_path=`$CYGPATH -u "$path"`
16711     new_path=`$WHICH "$new_path" 2> /dev/null`
16712     # bat and cmd files are not always considered executable in cygwin causing which
16713     # to not find them
16714     if test "x$new_path" = x \
16715         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16716         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16717       new_path=`$CYGPATH -u "$path"`
16718     fi
16719     if test "x$new_path" = x; then
16720       # It's still not found. Now this is an unrecoverable error.
16721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16722 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16723       has_space=`$ECHO "$complete" | $GREP " "`
16724       if test "x$has_space" != x; then
16725         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16726 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16727       fi
16728       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16729     fi
16730   fi
16731 
16732   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16733   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16734   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16735   # "foo.exe" is OK but "foo" is an error.
16736   #
16737   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16738   # It is also a way to make sure we got the proper file name for the real test later on.
16739   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16740   if test "x$test_shortpath" = x; then
16741     # Short path failed, file does not exist as specified.
16742     # Try adding .exe or .cmd
16743     if test -f "${new_path}.exe"; then
16744       input_to_shortpath="${new_path}.exe"
16745     elif test -f "${new_path}.cmd"; then
16746       input_to_shortpath="${new_path}.cmd"
16747     else
16748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16749 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16750       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16751 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16752       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16753     fi
16754   else
16755     input_to_shortpath="$new_path"
16756   fi
16757 
16758   # Call helper function which possibly converts this using DOS-style short mode.
16759   # If so, the updated path is stored in $new_path.
16760   new_path="$input_to_shortpath"
16761 
16762   input_path="$input_to_shortpath"
16763   # Check if we need to convert this using DOS-style short mode. If the path
16764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16765   # take no chances and rewrite it.
16766   # Note: m4 eats our [], so we need to use [ and ] instead.
16767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16768   if test "x$has_forbidden_chars" != x; then
16769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16770     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16771     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16772     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16773       # Going to short mode and back again did indeed matter. Since short mode is
16774       # case insensitive, let's make it lowercase to improve readability.
16775       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16776       # Now convert it back to Unix-stile (cygpath)
16777       input_path=`$CYGPATH -u "$shortmode_path"`
16778       new_path="$input_path"
16779     fi
16780   fi
16781 
16782   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16783   if test "x$test_cygdrive_prefix" = x; then
16784     # As a simple fix, exclude /usr/bin since it's not a real path.
16785     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16786       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16787       # a path prefixed by /cygdrive for fixpath to work.
16788       new_path="$CYGWIN_ROOT_PATH$input_path"
16789     fi
16790   fi
16791 
16792   # remove trailing .exe if any
16793   new_path="${new_path/%.exe/}"
16794 
16795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16796 
16797   # First separate the path from the arguments. This will split at the first
16798   # space.
16799   complete="$FOUND_MAKE"
16800   path="${complete%% *}"
16801   tmp="$complete EOL"
16802   arguments="${tmp#* }"
16803 
16804   # Input might be given as Windows format, start by converting to
16805   # unix format.
16806   new_path="$path"
16807 
16808   windows_path="$new_path"
16809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810     unix_path=`$CYGPATH -u "$windows_path"`
16811     new_path="$unix_path"
16812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16813     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16814     new_path="$unix_path"
16815   fi
16816 
16817 
16818   # Now try to locate executable using which
16819   new_path=`$WHICH "$new_path" 2> /dev/null`
16820 
16821   if test "x$new_path" = x; then
16822     # Oops. Which didn't find the executable.
16823     # The splitting of arguments from the executable at a space might have been incorrect,
16824     # since paths with space are more likely in Windows. Give it another try with the whole
16825     # argument.
16826     path="$complete"
16827     arguments="EOL"
16828     new_path="$path"
16829 
16830   windows_path="$new_path"
16831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16832     unix_path=`$CYGPATH -u "$windows_path"`
16833     new_path="$unix_path"
16834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16836     new_path="$unix_path"
16837   fi
16838 
16839 
16840     new_path=`$WHICH "$new_path" 2> /dev/null`
16841 
16842     if test "x$new_path" = x; then
16843       # It's still not found. Now this is an unrecoverable error.
16844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16845 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16846       has_space=`$ECHO "$complete" | $GREP " "`
16847       if test "x$has_space" != x; then
16848         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16849 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16850       fi
16851       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16852     fi
16853   fi
16854 
16855   # Now new_path has a complete unix path to the binary
16856   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16857     # Keep paths in /bin as-is, but remove trailing .exe if any
16858     new_path="${new_path/%.exe/}"
16859     # Do not save /bin paths to all_fixpath_prefixes!
16860   else
16861     # Not in mixed or Windows style, start by that.
16862     new_path=`cmd //c echo $new_path`
16863 
16864   input_path="$new_path"
16865   # Check if we need to convert this using DOS-style short mode. If the path
16866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16867   # take no chances and rewrite it.
16868   # Note: m4 eats our [], so we need to use [ and ] instead.
16869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16870   if test "x$has_forbidden_chars" != x; then
16871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16872     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16873   fi
16874 
16875     # Output is in $new_path
16876 
16877   windows_path="$new_path"
16878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16879     unix_path=`$CYGPATH -u "$windows_path"`
16880     new_path="$unix_path"
16881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16883     new_path="$unix_path"
16884   fi
16885 
16886     # remove trailing .exe if any
16887     new_path="${new_path/%.exe/}"
16888 
16889     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16890     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16891   fi
16892 
16893   else
16894     # We're on a posix platform. Hooray! :)
16895     # First separate the path from the arguments. This will split at the first
16896     # space.
16897     complete="$FOUND_MAKE"
16898     path="${complete%% *}"
16899     tmp="$complete EOL"
16900     arguments="${tmp#* }"
16901 
16902     # Cannot rely on the command "which" here since it doesn't always work.
16903     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16904     if test -z "$is_absolute_path"; then
16905       # Path to executable is not absolute. Find it.
16906       IFS_save="$IFS"
16907       IFS=:
16908       for p in $PATH; do
16909         if test -f "$p/$path" && test -x "$p/$path"; then
16910           new_path="$p/$path"
16911           break
16912         fi
16913       done
16914       IFS="$IFS_save"
16915     else
16916       # This is an absolute path, we can use it without further modifications.
16917       new_path="$path"
16918     fi
16919 
16920     if test "x$new_path" = x; then
16921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16922 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16923       has_space=`$ECHO "$complete" | $GREP " "`
16924       if test "x$has_space" != x; then
16925         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16926 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16927       fi
16928       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16929     fi
16930   fi
16931 
16932   # Now join together the path and the arguments once again
16933   if test "x$arguments" != xEOL; then
16934     new_complete="$new_path ${arguments% *}"
16935   else
16936     new_complete="$new_path"
16937   fi
16938 
16939   if test "x$complete" != "x$new_complete"; then
16940     FOUND_MAKE="$new_complete"
16941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16942 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16943   fi
16944 
16945         fi
16946       fi
16947     fi
16948   fi
16949 
16950         fi
16951         PATH=$OLD_PATH
16952       fi
16953     fi
16954 
16955     if test "x$FOUND_MAKE" = x; then
16956       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
16957     fi
16958   fi
16959 
16960   MAKE=$FOUND_MAKE
16961 
16962   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16963 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16964 
16965 
16966 
16967   # Test if find supports -delete
16968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16969 $as_echo_n "checking if find supports -delete... " >&6; }
16970   FIND_DELETE="-delete"
16971 
16972   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16973 
16974   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16975 
16976   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16977   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16978     # No, it does not.
16979     rm $DELETEDIR/TestIfFindSupportsDelete
16980     FIND_DELETE="-exec rm \{\} \+"
16981     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16982 $as_echo "no" >&6; }
16983   else
16984     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16985 $as_echo "yes" >&6; }
16986   fi
16987   rmdir $DELETEDIR
16988 
16989 
16990 
16991   # These tools might not be installed by default,
16992   # need hint on how to install them.
16993 
16994 
16995 
16996   # Publish this variable in the help.
16997 
16998 
16999   if test "x$UNZIP" = x; then
17000     # The variable is not set by user, try to locate tool using the code snippet
17001     for ac_prog in unzip
17002 do
17003   # Extract the first word of "$ac_prog", so it can be a program name with args.
17004 set dummy $ac_prog; ac_word=$2
17005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17006 $as_echo_n "checking for $ac_word... " >&6; }
17007 if ${ac_cv_path_UNZIP+:} false; then :
17008   $as_echo_n "(cached) " >&6
17009 else
17010   case $UNZIP in
17011   [\\/]* | ?:[\\/]*)
17012   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17013   ;;
17014   *)
17015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17016 for as_dir in $PATH
17017 do
17018   IFS=$as_save_IFS
17019   test -z "$as_dir" && as_dir=.
17020     for ac_exec_ext in '' $ac_executable_extensions; do
17021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17022     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17024     break 2
17025   fi
17026 done
17027   done
17028 IFS=$as_save_IFS
17029 
17030   ;;
17031 esac
17032 fi
17033 UNZIP=$ac_cv_path_UNZIP
17034 if test -n "$UNZIP"; then
17035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17036 $as_echo "$UNZIP" >&6; }
17037 else
17038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17039 $as_echo "no" >&6; }
17040 fi
17041 
17042 
17043   test -n "$UNZIP" && break
17044 done
17045 
17046   else
17047     # The variable is set, but is it from the command line or the environment?
17048 
17049     # Try to remove the string !UNZIP! from our list.
17050     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17051     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17052       # If it failed, the variable was not from the command line. Ignore it,
17053       # but warn the user (except for BASH, which is always set by the calling BASH).
17054       if test "xUNZIP" != xBASH; then
17055         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17056 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17057       fi
17058       # Try to locate tool using the code snippet
17059       for ac_prog in unzip
17060 do
17061   # Extract the first word of "$ac_prog", so it can be a program name with args.
17062 set dummy $ac_prog; ac_word=$2
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17064 $as_echo_n "checking for $ac_word... " >&6; }
17065 if ${ac_cv_path_UNZIP+:} false; then :
17066   $as_echo_n "(cached) " >&6
17067 else
17068   case $UNZIP in
17069   [\\/]* | ?:[\\/]*)
17070   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17071   ;;
17072   *)
17073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17074 for as_dir in $PATH
17075 do
17076   IFS=$as_save_IFS
17077   test -z "$as_dir" && as_dir=.
17078     for ac_exec_ext in '' $ac_executable_extensions; do
17079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17080     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17082     break 2
17083   fi
17084 done
17085   done
17086 IFS=$as_save_IFS
17087 
17088   ;;
17089 esac
17090 fi
17091 UNZIP=$ac_cv_path_UNZIP
17092 if test -n "$UNZIP"; then
17093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17094 $as_echo "$UNZIP" >&6; }
17095 else
17096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17097 $as_echo "no" >&6; }
17098 fi
17099 
17100 
17101   test -n "$UNZIP" && break
17102 done
17103 
17104     else
17105       # If it succeeded, then it was overridden by the user. We will use it
17106       # for the tool.
17107 
17108       # First remove it from the list of overridden variables, so we can test
17109       # for unknown variables in the end.
17110       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17111 
17112       # Check if the provided tool contains a complete path.
17113       tool_specified="$UNZIP"
17114       tool_basename="${tool_specified##*/}"
17115       if test "x$tool_basename" = "x$tool_specified"; then
17116         # A command without a complete path is provided, search $PATH.
17117         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17118 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17119         # Extract the first word of "$tool_basename", so it can be a program name with args.
17120 set dummy $tool_basename; ac_word=$2
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17122 $as_echo_n "checking for $ac_word... " >&6; }
17123 if ${ac_cv_path_UNZIP+:} false; then :
17124   $as_echo_n "(cached) " >&6
17125 else
17126   case $UNZIP in
17127   [\\/]* | ?:[\\/]*)
17128   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17129   ;;
17130   *)
17131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17132 for as_dir in $PATH
17133 do
17134   IFS=$as_save_IFS
17135   test -z "$as_dir" && as_dir=.
17136     for ac_exec_ext in '' $ac_executable_extensions; do
17137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17138     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17140     break 2
17141   fi
17142 done
17143   done
17144 IFS=$as_save_IFS
17145 
17146   ;;
17147 esac
17148 fi
17149 UNZIP=$ac_cv_path_UNZIP
17150 if test -n "$UNZIP"; then
17151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17152 $as_echo "$UNZIP" >&6; }
17153 else
17154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17155 $as_echo "no" >&6; }
17156 fi
17157 
17158 
17159         if test "x$UNZIP" = x; then
17160           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17161         fi
17162       else
17163         # Otherwise we believe it is a complete path. Use it as it is.
17164         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17165 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17166         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17167 $as_echo_n "checking for UNZIP... " >&6; }
17168         if test ! -x "$tool_specified"; then
17169           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17170 $as_echo "not found" >&6; }
17171           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17172         fi
17173         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17174 $as_echo "$tool_specified" >&6; }
17175       fi
17176     fi
17177   fi
17178 
17179 
17180 
17181   if test "x$UNZIP" = x; then
17182     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17183   fi
17184 
17185 
17186 
17187 
17188 
17189   # Publish this variable in the help.
17190 
17191 
17192   if test "x$ZIP" = x; then
17193     # The variable is not set by user, try to locate tool using the code snippet
17194     for ac_prog in zip
17195 do
17196   # Extract the first word of "$ac_prog", so it can be a program name with args.
17197 set dummy $ac_prog; ac_word=$2
17198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17199 $as_echo_n "checking for $ac_word... " >&6; }
17200 if ${ac_cv_path_ZIP+:} false; then :
17201   $as_echo_n "(cached) " >&6
17202 else
17203   case $ZIP in
17204   [\\/]* | ?:[\\/]*)
17205   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17206   ;;
17207   *)
17208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17209 for as_dir in $PATH
17210 do
17211   IFS=$as_save_IFS
17212   test -z "$as_dir" && as_dir=.
17213     for ac_exec_ext in '' $ac_executable_extensions; do
17214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17215     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17217     break 2
17218   fi
17219 done
17220   done
17221 IFS=$as_save_IFS
17222 
17223   ;;
17224 esac
17225 fi
17226 ZIP=$ac_cv_path_ZIP
17227 if test -n "$ZIP"; then
17228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17229 $as_echo "$ZIP" >&6; }
17230 else
17231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17232 $as_echo "no" >&6; }
17233 fi
17234 
17235 
17236   test -n "$ZIP" && break
17237 done
17238 
17239   else
17240     # The variable is set, but is it from the command line or the environment?
17241 
17242     # Try to remove the string !ZIP! from our list.
17243     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17244     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17245       # If it failed, the variable was not from the command line. Ignore it,
17246       # but warn the user (except for BASH, which is always set by the calling BASH).
17247       if test "xZIP" != xBASH; then
17248         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17249 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17250       fi
17251       # Try to locate tool using the code snippet
17252       for ac_prog in zip
17253 do
17254   # Extract the first word of "$ac_prog", so it can be a program name with args.
17255 set dummy $ac_prog; ac_word=$2
17256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17257 $as_echo_n "checking for $ac_word... " >&6; }
17258 if ${ac_cv_path_ZIP+:} false; then :
17259   $as_echo_n "(cached) " >&6
17260 else
17261   case $ZIP in
17262   [\\/]* | ?:[\\/]*)
17263   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17264   ;;
17265   *)
17266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17267 for as_dir in $PATH
17268 do
17269   IFS=$as_save_IFS
17270   test -z "$as_dir" && as_dir=.
17271     for ac_exec_ext in '' $ac_executable_extensions; do
17272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17273     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17275     break 2
17276   fi
17277 done
17278   done
17279 IFS=$as_save_IFS
17280 
17281   ;;
17282 esac
17283 fi
17284 ZIP=$ac_cv_path_ZIP
17285 if test -n "$ZIP"; then
17286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17287 $as_echo "$ZIP" >&6; }
17288 else
17289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17290 $as_echo "no" >&6; }
17291 fi
17292 
17293 
17294   test -n "$ZIP" && break
17295 done
17296 
17297     else
17298       # If it succeeded, then it was overridden by the user. We will use it
17299       # for the tool.
17300 
17301       # First remove it from the list of overridden variables, so we can test
17302       # for unknown variables in the end.
17303       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17304 
17305       # Check if the provided tool contains a complete path.
17306       tool_specified="$ZIP"
17307       tool_basename="${tool_specified##*/}"
17308       if test "x$tool_basename" = "x$tool_specified"; then
17309         # A command without a complete path is provided, search $PATH.
17310         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17311 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17312         # Extract the first word of "$tool_basename", so it can be a program name with args.
17313 set dummy $tool_basename; ac_word=$2
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17315 $as_echo_n "checking for $ac_word... " >&6; }
17316 if ${ac_cv_path_ZIP+:} false; then :
17317   $as_echo_n "(cached) " >&6
17318 else
17319   case $ZIP in
17320   [\\/]* | ?:[\\/]*)
17321   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17322   ;;
17323   *)
17324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17325 for as_dir in $PATH
17326 do
17327   IFS=$as_save_IFS
17328   test -z "$as_dir" && as_dir=.
17329     for ac_exec_ext in '' $ac_executable_extensions; do
17330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17331     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17333     break 2
17334   fi
17335 done
17336   done
17337 IFS=$as_save_IFS
17338 
17339   ;;
17340 esac
17341 fi
17342 ZIP=$ac_cv_path_ZIP
17343 if test -n "$ZIP"; then
17344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17345 $as_echo "$ZIP" >&6; }
17346 else
17347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348 $as_echo "no" >&6; }
17349 fi
17350 
17351 
17352         if test "x$ZIP" = x; then
17353           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17354         fi
17355       else
17356         # Otherwise we believe it is a complete path. Use it as it is.
17357         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17358 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17359         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17360 $as_echo_n "checking for ZIP... " >&6; }
17361         if test ! -x "$tool_specified"; then
17362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17363 $as_echo "not found" >&6; }
17364           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17365         fi
17366         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17367 $as_echo "$tool_specified" >&6; }
17368       fi
17369     fi
17370   fi
17371 
17372 
17373 
17374   if test "x$ZIP" = x; then
17375     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17376   fi
17377 
17378 
17379 
17380   # Non-required basic tools
17381 
17382 
17383 
17384   # Publish this variable in the help.
17385 
17386 
17387   if test "x$LDD" = x; then
17388     # The variable is not set by user, try to locate tool using the code snippet
17389     for ac_prog in ldd
17390 do
17391   # Extract the first word of "$ac_prog", so it can be a program name with args.
17392 set dummy $ac_prog; ac_word=$2
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17394 $as_echo_n "checking for $ac_word... " >&6; }
17395 if ${ac_cv_path_LDD+:} false; then :
17396   $as_echo_n "(cached) " >&6
17397 else
17398   case $LDD in
17399   [\\/]* | ?:[\\/]*)
17400   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17401   ;;
17402   *)
17403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17404 for as_dir in $PATH
17405 do
17406   IFS=$as_save_IFS
17407   test -z "$as_dir" && as_dir=.
17408     for ac_exec_ext in '' $ac_executable_extensions; do
17409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17410     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17412     break 2
17413   fi
17414 done
17415   done
17416 IFS=$as_save_IFS
17417 
17418   ;;
17419 esac
17420 fi
17421 LDD=$ac_cv_path_LDD
17422 if test -n "$LDD"; then
17423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17424 $as_echo "$LDD" >&6; }
17425 else
17426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17427 $as_echo "no" >&6; }
17428 fi
17429 
17430 
17431   test -n "$LDD" && break
17432 done
17433 
17434   else
17435     # The variable is set, but is it from the command line or the environment?
17436 
17437     # Try to remove the string !LDD! from our list.
17438     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17439     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17440       # If it failed, the variable was not from the command line. Ignore it,
17441       # but warn the user (except for BASH, which is always set by the calling BASH).
17442       if test "xLDD" != xBASH; then
17443         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17444 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17445       fi
17446       # Try to locate tool using the code snippet
17447       for ac_prog in ldd
17448 do
17449   # Extract the first word of "$ac_prog", so it can be a program name with args.
17450 set dummy $ac_prog; ac_word=$2
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17452 $as_echo_n "checking for $ac_word... " >&6; }
17453 if ${ac_cv_path_LDD+:} false; then :
17454   $as_echo_n "(cached) " >&6
17455 else
17456   case $LDD in
17457   [\\/]* | ?:[\\/]*)
17458   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17459   ;;
17460   *)
17461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17462 for as_dir in $PATH
17463 do
17464   IFS=$as_save_IFS
17465   test -z "$as_dir" && as_dir=.
17466     for ac_exec_ext in '' $ac_executable_extensions; do
17467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17468     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17470     break 2
17471   fi
17472 done
17473   done
17474 IFS=$as_save_IFS
17475 
17476   ;;
17477 esac
17478 fi
17479 LDD=$ac_cv_path_LDD
17480 if test -n "$LDD"; then
17481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17482 $as_echo "$LDD" >&6; }
17483 else
17484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17485 $as_echo "no" >&6; }
17486 fi
17487 
17488 
17489   test -n "$LDD" && break
17490 done
17491 
17492     else
17493       # If it succeeded, then it was overridden by the user. We will use it
17494       # for the tool.
17495 
17496       # First remove it from the list of overridden variables, so we can test
17497       # for unknown variables in the end.
17498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17499 
17500       # Check if the provided tool contains a complete path.
17501       tool_specified="$LDD"
17502       tool_basename="${tool_specified##*/}"
17503       if test "x$tool_basename" = "x$tool_specified"; then
17504         # A command without a complete path is provided, search $PATH.
17505         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17506 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17507         # Extract the first word of "$tool_basename", so it can be a program name with args.
17508 set dummy $tool_basename; ac_word=$2
17509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17510 $as_echo_n "checking for $ac_word... " >&6; }
17511 if ${ac_cv_path_LDD+:} false; then :
17512   $as_echo_n "(cached) " >&6
17513 else
17514   case $LDD in
17515   [\\/]* | ?:[\\/]*)
17516   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17517   ;;
17518   *)
17519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17520 for as_dir in $PATH
17521 do
17522   IFS=$as_save_IFS
17523   test -z "$as_dir" && as_dir=.
17524     for ac_exec_ext in '' $ac_executable_extensions; do
17525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17526     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17528     break 2
17529   fi
17530 done
17531   done
17532 IFS=$as_save_IFS
17533 
17534   ;;
17535 esac
17536 fi
17537 LDD=$ac_cv_path_LDD
17538 if test -n "$LDD"; then
17539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17540 $as_echo "$LDD" >&6; }
17541 else
17542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17543 $as_echo "no" >&6; }
17544 fi
17545 
17546 
17547         if test "x$LDD" = x; then
17548           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17549         fi
17550       else
17551         # Otherwise we believe it is a complete path. Use it as it is.
17552         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17553 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17555 $as_echo_n "checking for LDD... " >&6; }
17556         if test ! -x "$tool_specified"; then
17557           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17558 $as_echo "not found" >&6; }
17559           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17560         fi
17561         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17562 $as_echo "$tool_specified" >&6; }
17563       fi
17564     fi
17565   fi
17566 
17567 
17568   if test "x$LDD" = "x"; then
17569     # List shared lib dependencies is used for
17570     # debug output and checking for forbidden dependencies.
17571     # We can build without it.
17572     LDD="true"
17573   fi
17574 
17575 
17576   # Publish this variable in the help.
17577 
17578 
17579   if test "x$OTOOL" = x; then
17580     # The variable is not set by user, try to locate tool using the code snippet
17581     for ac_prog in otool
17582 do
17583   # Extract the first word of "$ac_prog", so it can be a program name with args.
17584 set dummy $ac_prog; ac_word=$2
17585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17586 $as_echo_n "checking for $ac_word... " >&6; }
17587 if ${ac_cv_path_OTOOL+:} false; then :
17588   $as_echo_n "(cached) " >&6
17589 else
17590   case $OTOOL in
17591   [\\/]* | ?:[\\/]*)
17592   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17593   ;;
17594   *)
17595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17596 for as_dir in $PATH
17597 do
17598   IFS=$as_save_IFS
17599   test -z "$as_dir" && as_dir=.
17600     for ac_exec_ext in '' $ac_executable_extensions; do
17601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17602     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17604     break 2
17605   fi
17606 done
17607   done
17608 IFS=$as_save_IFS
17609 
17610   ;;
17611 esac
17612 fi
17613 OTOOL=$ac_cv_path_OTOOL
17614 if test -n "$OTOOL"; then
17615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17616 $as_echo "$OTOOL" >&6; }
17617 else
17618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17619 $as_echo "no" >&6; }
17620 fi
17621 
17622 
17623   test -n "$OTOOL" && break
17624 done
17625 
17626   else
17627     # The variable is set, but is it from the command line or the environment?
17628 
17629     # Try to remove the string !OTOOL! from our list.
17630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17632       # If it failed, the variable was not from the command line. Ignore it,
17633       # but warn the user (except for BASH, which is always set by the calling BASH).
17634       if test "xOTOOL" != xBASH; then
17635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17636 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17637       fi
17638       # Try to locate tool using the code snippet
17639       for ac_prog in otool
17640 do
17641   # Extract the first word of "$ac_prog", so it can be a program name with args.
17642 set dummy $ac_prog; ac_word=$2
17643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17644 $as_echo_n "checking for $ac_word... " >&6; }
17645 if ${ac_cv_path_OTOOL+:} false; then :
17646   $as_echo_n "(cached) " >&6
17647 else
17648   case $OTOOL in
17649   [\\/]* | ?:[\\/]*)
17650   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17651   ;;
17652   *)
17653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17654 for as_dir in $PATH
17655 do
17656   IFS=$as_save_IFS
17657   test -z "$as_dir" && as_dir=.
17658     for ac_exec_ext in '' $ac_executable_extensions; do
17659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17660     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17662     break 2
17663   fi
17664 done
17665   done
17666 IFS=$as_save_IFS
17667 
17668   ;;
17669 esac
17670 fi
17671 OTOOL=$ac_cv_path_OTOOL
17672 if test -n "$OTOOL"; then
17673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17674 $as_echo "$OTOOL" >&6; }
17675 else
17676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17677 $as_echo "no" >&6; }
17678 fi
17679 
17680 
17681   test -n "$OTOOL" && break
17682 done
17683 
17684     else
17685       # If it succeeded, then it was overridden by the user. We will use it
17686       # for the tool.
17687 
17688       # First remove it from the list of overridden variables, so we can test
17689       # for unknown variables in the end.
17690       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17691 
17692       # Check if the provided tool contains a complete path.
17693       tool_specified="$OTOOL"
17694       tool_basename="${tool_specified##*/}"
17695       if test "x$tool_basename" = "x$tool_specified"; then
17696         # A command without a complete path is provided, search $PATH.
17697         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17698 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17699         # Extract the first word of "$tool_basename", so it can be a program name with args.
17700 set dummy $tool_basename; ac_word=$2
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17702 $as_echo_n "checking for $ac_word... " >&6; }
17703 if ${ac_cv_path_OTOOL+:} false; then :
17704   $as_echo_n "(cached) " >&6
17705 else
17706   case $OTOOL in
17707   [\\/]* | ?:[\\/]*)
17708   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17709   ;;
17710   *)
17711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17712 for as_dir in $PATH
17713 do
17714   IFS=$as_save_IFS
17715   test -z "$as_dir" && as_dir=.
17716     for ac_exec_ext in '' $ac_executable_extensions; do
17717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17718     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17720     break 2
17721   fi
17722 done
17723   done
17724 IFS=$as_save_IFS
17725 
17726   ;;
17727 esac
17728 fi
17729 OTOOL=$ac_cv_path_OTOOL
17730 if test -n "$OTOOL"; then
17731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17732 $as_echo "$OTOOL" >&6; }
17733 else
17734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735 $as_echo "no" >&6; }
17736 fi
17737 
17738 
17739         if test "x$OTOOL" = x; then
17740           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17741         fi
17742       else
17743         # Otherwise we believe it is a complete path. Use it as it is.
17744         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17745 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17746         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17747 $as_echo_n "checking for OTOOL... " >&6; }
17748         if test ! -x "$tool_specified"; then
17749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17750 $as_echo "not found" >&6; }
17751           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17752         fi
17753         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17754 $as_echo "$tool_specified" >&6; }
17755       fi
17756     fi
17757   fi
17758 
17759 
17760   if test "x$OTOOL" = "x"; then
17761     OTOOL="true"
17762   fi
17763 
17764 
17765   # Publish this variable in the help.
17766 
17767 
17768   if test "x$READELF" = x; then
17769     # The variable is not set by user, try to locate tool using the code snippet
17770     for ac_prog in greadelf readelf
17771 do
17772   # Extract the first word of "$ac_prog", so it can be a program name with args.
17773 set dummy $ac_prog; ac_word=$2
17774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17775 $as_echo_n "checking for $ac_word... " >&6; }
17776 if ${ac_cv_path_READELF+:} false; then :
17777   $as_echo_n "(cached) " >&6
17778 else
17779   case $READELF in
17780   [\\/]* | ?:[\\/]*)
17781   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17782   ;;
17783   *)
17784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17785 for as_dir in $PATH
17786 do
17787   IFS=$as_save_IFS
17788   test -z "$as_dir" && as_dir=.
17789     for ac_exec_ext in '' $ac_executable_extensions; do
17790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17791     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17793     break 2
17794   fi
17795 done
17796   done
17797 IFS=$as_save_IFS
17798 
17799   ;;
17800 esac
17801 fi
17802 READELF=$ac_cv_path_READELF
17803 if test -n "$READELF"; then
17804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17805 $as_echo "$READELF" >&6; }
17806 else
17807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17808 $as_echo "no" >&6; }
17809 fi
17810 
17811 
17812   test -n "$READELF" && break
17813 done
17814 
17815   else
17816     # The variable is set, but is it from the command line or the environment?
17817 
17818     # Try to remove the string !READELF! from our list.
17819     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17820     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17821       # If it failed, the variable was not from the command line. Ignore it,
17822       # but warn the user (except for BASH, which is always set by the calling BASH).
17823       if test "xREADELF" != xBASH; then
17824         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17825 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17826       fi
17827       # Try to locate tool using the code snippet
17828       for ac_prog in greadelf readelf
17829 do
17830   # Extract the first word of "$ac_prog", so it can be a program name with args.
17831 set dummy $ac_prog; ac_word=$2
17832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17833 $as_echo_n "checking for $ac_word... " >&6; }
17834 if ${ac_cv_path_READELF+:} false; then :
17835   $as_echo_n "(cached) " >&6
17836 else
17837   case $READELF in
17838   [\\/]* | ?:[\\/]*)
17839   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17840   ;;
17841   *)
17842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17843 for as_dir in $PATH
17844 do
17845   IFS=$as_save_IFS
17846   test -z "$as_dir" && as_dir=.
17847     for ac_exec_ext in '' $ac_executable_extensions; do
17848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17849     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17851     break 2
17852   fi
17853 done
17854   done
17855 IFS=$as_save_IFS
17856 
17857   ;;
17858 esac
17859 fi
17860 READELF=$ac_cv_path_READELF
17861 if test -n "$READELF"; then
17862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17863 $as_echo "$READELF" >&6; }
17864 else
17865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17866 $as_echo "no" >&6; }
17867 fi
17868 
17869 
17870   test -n "$READELF" && break
17871 done
17872 
17873     else
17874       # If it succeeded, then it was overridden by the user. We will use it
17875       # for the tool.
17876 
17877       # First remove it from the list of overridden variables, so we can test
17878       # for unknown variables in the end.
17879       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17880 
17881       # Check if the provided tool contains a complete path.
17882       tool_specified="$READELF"
17883       tool_basename="${tool_specified##*/}"
17884       if test "x$tool_basename" = "x$tool_specified"; then
17885         # A command without a complete path is provided, search $PATH.
17886         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17887 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17888         # Extract the first word of "$tool_basename", so it can be a program name with args.
17889 set dummy $tool_basename; ac_word=$2
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17891 $as_echo_n "checking for $ac_word... " >&6; }
17892 if ${ac_cv_path_READELF+:} false; then :
17893   $as_echo_n "(cached) " >&6
17894 else
17895   case $READELF in
17896   [\\/]* | ?:[\\/]*)
17897   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17898   ;;
17899   *)
17900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17901 for as_dir in $PATH
17902 do
17903   IFS=$as_save_IFS
17904   test -z "$as_dir" && as_dir=.
17905     for ac_exec_ext in '' $ac_executable_extensions; do
17906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17907     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17909     break 2
17910   fi
17911 done
17912   done
17913 IFS=$as_save_IFS
17914 
17915   ;;
17916 esac
17917 fi
17918 READELF=$ac_cv_path_READELF
17919 if test -n "$READELF"; then
17920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17921 $as_echo "$READELF" >&6; }
17922 else
17923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17924 $as_echo "no" >&6; }
17925 fi
17926 
17927 
17928         if test "x$READELF" = x; then
17929           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17930         fi
17931       else
17932         # Otherwise we believe it is a complete path. Use it as it is.
17933         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17934 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17935         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17936 $as_echo_n "checking for READELF... " >&6; }
17937         if test ! -x "$tool_specified"; then
17938           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17939 $as_echo "not found" >&6; }
17940           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17941         fi
17942         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17943 $as_echo "$tool_specified" >&6; }
17944       fi
17945     fi
17946   fi
17947 
17948 
17949 
17950 
17951   # Publish this variable in the help.
17952 
17953 
17954   if test "x$HG" = x; then
17955     # The variable is not set by user, try to locate tool using the code snippet
17956     for ac_prog in hg
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_HG+:} false; then :
17963   $as_echo_n "(cached) " >&6
17964 else
17965   case $HG in
17966   [\\/]* | ?:[\\/]*)
17967   ac_cv_path_HG="$HG" # 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_HG="$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 HG=$ac_cv_path_HG
17989 if test -n "$HG"; then
17990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17991 $as_echo "$HG" >&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 "$HG" && 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 !HG! from our list.
18005     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
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 "xHG" != xBASH; then
18010         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18011 $as_echo "$as_me: WARNING: Ignoring value of HG 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 hg
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_HG+:} false; then :
18021   $as_echo_n "(cached) " >&6
18022 else
18023   case $HG in
18024   [\\/]* | ?:[\\/]*)
18025   ac_cv_path_HG="$HG" # 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_HG="$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 HG=$ac_cv_path_HG
18047 if test -n "$HG"; then
18048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18049 $as_echo "$HG" >&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 "$HG" && 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="$HG"
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 HG=$tool_basename" >&5
18073 $as_echo "$as_me: Will search for user supplied tool HG=$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_HG+:} false; then :
18079   $as_echo_n "(cached) " >&6
18080 else
18081   case $HG in
18082   [\\/]* | ?:[\\/]*)
18083   ac_cv_path_HG="$HG" # 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_HG="$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 HG=$ac_cv_path_HG
18105 if test -n "$HG"; then
18106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18107 $as_echo "$HG" >&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$HG" = 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 HG=$tool_specified" >&5
18120 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18121         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18122 $as_echo_n "checking for HG... " >&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 HG=$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 
18136 
18137   # Publish this variable in the help.
18138 
18139 
18140   if test "x$STAT" = x; then
18141     # The variable is not set by user, try to locate tool using the code snippet
18142     for ac_prog in stat
18143 do
18144   # Extract the first word of "$ac_prog", so it can be a program name with args.
18145 set dummy $ac_prog; ac_word=$2
18146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18147 $as_echo_n "checking for $ac_word... " >&6; }
18148 if ${ac_cv_path_STAT+:} false; then :
18149   $as_echo_n "(cached) " >&6
18150 else
18151   case $STAT in
18152   [\\/]* | ?:[\\/]*)
18153   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18154   ;;
18155   *)
18156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18157 for as_dir in $PATH
18158 do
18159   IFS=$as_save_IFS
18160   test -z "$as_dir" && as_dir=.
18161     for ac_exec_ext in '' $ac_executable_extensions; do
18162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18163     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18165     break 2
18166   fi
18167 done
18168   done
18169 IFS=$as_save_IFS
18170 
18171   ;;
18172 esac
18173 fi
18174 STAT=$ac_cv_path_STAT
18175 if test -n "$STAT"; then
18176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18177 $as_echo "$STAT" >&6; }
18178 else
18179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18180 $as_echo "no" >&6; }
18181 fi
18182 
18183 
18184   test -n "$STAT" && break
18185 done
18186 
18187   else
18188     # The variable is set, but is it from the command line or the environment?
18189 
18190     # Try to remove the string !STAT! from our list.
18191     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18192     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18193       # If it failed, the variable was not from the command line. Ignore it,
18194       # but warn the user (except for BASH, which is always set by the calling BASH).
18195       if test "xSTAT" != xBASH; then
18196         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18197 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18198       fi
18199       # Try to locate tool using the code snippet
18200       for ac_prog in stat
18201 do
18202   # Extract the first word of "$ac_prog", so it can be a program name with args.
18203 set dummy $ac_prog; ac_word=$2
18204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18205 $as_echo_n "checking for $ac_word... " >&6; }
18206 if ${ac_cv_path_STAT+:} false; then :
18207   $as_echo_n "(cached) " >&6
18208 else
18209   case $STAT in
18210   [\\/]* | ?:[\\/]*)
18211   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18212   ;;
18213   *)
18214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18215 for as_dir in $PATH
18216 do
18217   IFS=$as_save_IFS
18218   test -z "$as_dir" && as_dir=.
18219     for ac_exec_ext in '' $ac_executable_extensions; do
18220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18221     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18223     break 2
18224   fi
18225 done
18226   done
18227 IFS=$as_save_IFS
18228 
18229   ;;
18230 esac
18231 fi
18232 STAT=$ac_cv_path_STAT
18233 if test -n "$STAT"; then
18234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18235 $as_echo "$STAT" >&6; }
18236 else
18237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18238 $as_echo "no" >&6; }
18239 fi
18240 
18241 
18242   test -n "$STAT" && break
18243 done
18244 
18245     else
18246       # If it succeeded, then it was overridden by the user. We will use it
18247       # for the tool.
18248 
18249       # First remove it from the list of overridden variables, so we can test
18250       # for unknown variables in the end.
18251       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18252 
18253       # Check if the provided tool contains a complete path.
18254       tool_specified="$STAT"
18255       tool_basename="${tool_specified##*/}"
18256       if test "x$tool_basename" = "x$tool_specified"; then
18257         # A command without a complete path is provided, search $PATH.
18258         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18259 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18260         # Extract the first word of "$tool_basename", so it can be a program name with args.
18261 set dummy $tool_basename; ac_word=$2
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18263 $as_echo_n "checking for $ac_word... " >&6; }
18264 if ${ac_cv_path_STAT+:} false; then :
18265   $as_echo_n "(cached) " >&6
18266 else
18267   case $STAT in
18268   [\\/]* | ?:[\\/]*)
18269   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18270   ;;
18271   *)
18272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18273 for as_dir in $PATH
18274 do
18275   IFS=$as_save_IFS
18276   test -z "$as_dir" && as_dir=.
18277     for ac_exec_ext in '' $ac_executable_extensions; do
18278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18279     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18281     break 2
18282   fi
18283 done
18284   done
18285 IFS=$as_save_IFS
18286 
18287   ;;
18288 esac
18289 fi
18290 STAT=$ac_cv_path_STAT
18291 if test -n "$STAT"; then
18292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18293 $as_echo "$STAT" >&6; }
18294 else
18295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18296 $as_echo "no" >&6; }
18297 fi
18298 
18299 
18300         if test "x$STAT" = x; then
18301           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18302         fi
18303       else
18304         # Otherwise we believe it is a complete path. Use it as it is.
18305         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18306 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18307         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18308 $as_echo_n "checking for STAT... " >&6; }
18309         if test ! -x "$tool_specified"; then
18310           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18311 $as_echo "not found" >&6; }
18312           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18313         fi
18314         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18315 $as_echo "$tool_specified" >&6; }
18316       fi
18317     fi
18318   fi
18319 
18320 
18321 
18322 
18323   # Publish this variable in the help.
18324 
18325 
18326   if test "x$TIME" = x; then
18327     # The variable is not set by user, try to locate tool using the code snippet
18328     for ac_prog in time
18329 do
18330   # Extract the first word of "$ac_prog", so it can be a program name with args.
18331 set dummy $ac_prog; ac_word=$2
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18333 $as_echo_n "checking for $ac_word... " >&6; }
18334 if ${ac_cv_path_TIME+:} false; then :
18335   $as_echo_n "(cached) " >&6
18336 else
18337   case $TIME in
18338   [\\/]* | ?:[\\/]*)
18339   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18340   ;;
18341   *)
18342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18343 for as_dir in $PATH
18344 do
18345   IFS=$as_save_IFS
18346   test -z "$as_dir" && as_dir=.
18347     for ac_exec_ext in '' $ac_executable_extensions; do
18348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18349     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18351     break 2
18352   fi
18353 done
18354   done
18355 IFS=$as_save_IFS
18356 
18357   ;;
18358 esac
18359 fi
18360 TIME=$ac_cv_path_TIME
18361 if test -n "$TIME"; then
18362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18363 $as_echo "$TIME" >&6; }
18364 else
18365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18366 $as_echo "no" >&6; }
18367 fi
18368 
18369 
18370   test -n "$TIME" && break
18371 done
18372 
18373   else
18374     # The variable is set, but is it from the command line or the environment?
18375 
18376     # Try to remove the string !TIME! from our list.
18377     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18378     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18379       # If it failed, the variable was not from the command line. Ignore it,
18380       # but warn the user (except for BASH, which is always set by the calling BASH).
18381       if test "xTIME" != xBASH; then
18382         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18383 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18384       fi
18385       # Try to locate tool using the code snippet
18386       for ac_prog in time
18387 do
18388   # Extract the first word of "$ac_prog", so it can be a program name with args.
18389 set dummy $ac_prog; ac_word=$2
18390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18391 $as_echo_n "checking for $ac_word... " >&6; }
18392 if ${ac_cv_path_TIME+:} false; then :
18393   $as_echo_n "(cached) " >&6
18394 else
18395   case $TIME in
18396   [\\/]* | ?:[\\/]*)
18397   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18398   ;;
18399   *)
18400   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18401 for as_dir in $PATH
18402 do
18403   IFS=$as_save_IFS
18404   test -z "$as_dir" && as_dir=.
18405     for ac_exec_ext in '' $ac_executable_extensions; do
18406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18407     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18409     break 2
18410   fi
18411 done
18412   done
18413 IFS=$as_save_IFS
18414 
18415   ;;
18416 esac
18417 fi
18418 TIME=$ac_cv_path_TIME
18419 if test -n "$TIME"; then
18420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18421 $as_echo "$TIME" >&6; }
18422 else
18423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18424 $as_echo "no" >&6; }
18425 fi
18426 
18427 
18428   test -n "$TIME" && break
18429 done
18430 
18431     else
18432       # If it succeeded, then it was overridden by the user. We will use it
18433       # for the tool.
18434 
18435       # First remove it from the list of overridden variables, so we can test
18436       # for unknown variables in the end.
18437       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18438 
18439       # Check if the provided tool contains a complete path.
18440       tool_specified="$TIME"
18441       tool_basename="${tool_specified##*/}"
18442       if test "x$tool_basename" = "x$tool_specified"; then
18443         # A command without a complete path is provided, search $PATH.
18444         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18445 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18446         # Extract the first word of "$tool_basename", so it can be a program name with args.
18447 set dummy $tool_basename; ac_word=$2
18448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18449 $as_echo_n "checking for $ac_word... " >&6; }
18450 if ${ac_cv_path_TIME+:} false; then :
18451   $as_echo_n "(cached) " >&6
18452 else
18453   case $TIME in
18454   [\\/]* | ?:[\\/]*)
18455   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18456   ;;
18457   *)
18458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18459 for as_dir in $PATH
18460 do
18461   IFS=$as_save_IFS
18462   test -z "$as_dir" && as_dir=.
18463     for ac_exec_ext in '' $ac_executable_extensions; do
18464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18465     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18467     break 2
18468   fi
18469 done
18470   done
18471 IFS=$as_save_IFS
18472 
18473   ;;
18474 esac
18475 fi
18476 TIME=$ac_cv_path_TIME
18477 if test -n "$TIME"; then
18478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18479 $as_echo "$TIME" >&6; }
18480 else
18481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18482 $as_echo "no" >&6; }
18483 fi
18484 
18485 
18486         if test "x$TIME" = x; then
18487           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18488         fi
18489       else
18490         # Otherwise we believe it is a complete path. Use it as it is.
18491         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18492 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18494 $as_echo_n "checking for TIME... " >&6; }
18495         if test ! -x "$tool_specified"; then
18496           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18497 $as_echo "not found" >&6; }
18498           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18499         fi
18500         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18501 $as_echo "$tool_specified" >&6; }
18502       fi
18503     fi
18504   fi
18505 
18506 
18507   # Check if it's GNU time
18508   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18509   if test "x$IS_GNU_TIME" != x; then
18510     IS_GNU_TIME=yes
18511   else
18512     IS_GNU_TIME=no
18513   fi
18514 
18515 
18516   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18517 
18518 
18519 
18520   # Publish this variable in the help.
18521 
18522 
18523   if test "x$COMM" = x; then
18524     # The variable is not set by user, try to locate tool using the code snippet
18525     for ac_prog in comm
18526 do
18527   # Extract the first word of "$ac_prog", so it can be a program name with args.
18528 set dummy $ac_prog; ac_word=$2
18529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18530 $as_echo_n "checking for $ac_word... " >&6; }
18531 if ${ac_cv_path_COMM+:} false; then :
18532   $as_echo_n "(cached) " >&6
18533 else
18534   case $COMM in
18535   [\\/]* | ?:[\\/]*)
18536   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18537   ;;
18538   *)
18539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18540 for as_dir in $PATH
18541 do
18542   IFS=$as_save_IFS
18543   test -z "$as_dir" && as_dir=.
18544     for ac_exec_ext in '' $ac_executable_extensions; do
18545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18546     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18548     break 2
18549   fi
18550 done
18551   done
18552 IFS=$as_save_IFS
18553 
18554   ;;
18555 esac
18556 fi
18557 COMM=$ac_cv_path_COMM
18558 if test -n "$COMM"; then
18559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18560 $as_echo "$COMM" >&6; }
18561 else
18562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18563 $as_echo "no" >&6; }
18564 fi
18565 
18566 
18567   test -n "$COMM" && break
18568 done
18569 
18570   else
18571     # The variable is set, but is it from the command line or the environment?
18572 
18573     # Try to remove the string !COMM! from our list.
18574     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18575     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18576       # If it failed, the variable was not from the command line. Ignore it,
18577       # but warn the user (except for BASH, which is always set by the calling BASH).
18578       if test "xCOMM" != xBASH; then
18579         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18580 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18581       fi
18582       # Try to locate tool using the code snippet
18583       for ac_prog in comm
18584 do
18585   # Extract the first word of "$ac_prog", so it can be a program name with args.
18586 set dummy $ac_prog; ac_word=$2
18587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588 $as_echo_n "checking for $ac_word... " >&6; }
18589 if ${ac_cv_path_COMM+:} false; then :
18590   $as_echo_n "(cached) " >&6
18591 else
18592   case $COMM in
18593   [\\/]* | ?:[\\/]*)
18594   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18595   ;;
18596   *)
18597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598 for as_dir in $PATH
18599 do
18600   IFS=$as_save_IFS
18601   test -z "$as_dir" && as_dir=.
18602     for ac_exec_ext in '' $ac_executable_extensions; do
18603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18604     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606     break 2
18607   fi
18608 done
18609   done
18610 IFS=$as_save_IFS
18611 
18612   ;;
18613 esac
18614 fi
18615 COMM=$ac_cv_path_COMM
18616 if test -n "$COMM"; then
18617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18618 $as_echo "$COMM" >&6; }
18619 else
18620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621 $as_echo "no" >&6; }
18622 fi
18623 
18624 
18625   test -n "$COMM" && break
18626 done
18627 
18628     else
18629       # If it succeeded, then it was overridden by the user. We will use it
18630       # for the tool.
18631 
18632       # First remove it from the list of overridden variables, so we can test
18633       # for unknown variables in the end.
18634       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18635 
18636       # Check if the provided tool contains a complete path.
18637       tool_specified="$COMM"
18638       tool_basename="${tool_specified##*/}"
18639       if test "x$tool_basename" = "x$tool_specified"; then
18640         # A command without a complete path is provided, search $PATH.
18641         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18642 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18643         # Extract the first word of "$tool_basename", so it can be a program name with args.
18644 set dummy $tool_basename; ac_word=$2
18645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18646 $as_echo_n "checking for $ac_word... " >&6; }
18647 if ${ac_cv_path_COMM+:} false; then :
18648   $as_echo_n "(cached) " >&6
18649 else
18650   case $COMM in
18651   [\\/]* | ?:[\\/]*)
18652   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18653   ;;
18654   *)
18655   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18656 for as_dir in $PATH
18657 do
18658   IFS=$as_save_IFS
18659   test -z "$as_dir" && as_dir=.
18660     for ac_exec_ext in '' $ac_executable_extensions; do
18661   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18662     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18663     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18664     break 2
18665   fi
18666 done
18667   done
18668 IFS=$as_save_IFS
18669 
18670   ;;
18671 esac
18672 fi
18673 COMM=$ac_cv_path_COMM
18674 if test -n "$COMM"; then
18675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18676 $as_echo "$COMM" >&6; }
18677 else
18678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18679 $as_echo "no" >&6; }
18680 fi
18681 
18682 
18683         if test "x$COMM" = x; then
18684           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18685         fi
18686       else
18687         # Otherwise we believe it is a complete path. Use it as it is.
18688         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18689 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18691 $as_echo_n "checking for COMM... " >&6; }
18692         if test ! -x "$tool_specified"; then
18693           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18694 $as_echo "not found" >&6; }
18695           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18696         fi
18697         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18698 $as_echo "$tool_specified" >&6; }
18699       fi
18700     fi
18701   fi
18702 
18703 
18704 
18705   if test "x$COMM" = x; then
18706     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18707   fi
18708 
18709 
18710   fi
18711 
18712   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18713 
18714 
18715 
18716   # Publish this variable in the help.
18717 
18718 
18719   if test "x$DSYMUTIL" = x; then
18720     # The variable is not set by user, try to locate tool using the code snippet
18721     for ac_prog in dsymutil
18722 do
18723   # Extract the first word of "$ac_prog", so it can be a program name with args.
18724 set dummy $ac_prog; ac_word=$2
18725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18726 $as_echo_n "checking for $ac_word... " >&6; }
18727 if ${ac_cv_path_DSYMUTIL+:} false; then :
18728   $as_echo_n "(cached) " >&6
18729 else
18730   case $DSYMUTIL in
18731   [\\/]* | ?:[\\/]*)
18732   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18733   ;;
18734   *)
18735   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18736 for as_dir in $PATH
18737 do
18738   IFS=$as_save_IFS
18739   test -z "$as_dir" && as_dir=.
18740     for ac_exec_ext in '' $ac_executable_extensions; do
18741   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18742     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18743     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18744     break 2
18745   fi
18746 done
18747   done
18748 IFS=$as_save_IFS
18749 
18750   ;;
18751 esac
18752 fi
18753 DSYMUTIL=$ac_cv_path_DSYMUTIL
18754 if test -n "$DSYMUTIL"; then
18755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18756 $as_echo "$DSYMUTIL" >&6; }
18757 else
18758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18759 $as_echo "no" >&6; }
18760 fi
18761 
18762 
18763   test -n "$DSYMUTIL" && break
18764 done
18765 
18766   else
18767     # The variable is set, but is it from the command line or the environment?
18768 
18769     # Try to remove the string !DSYMUTIL! from our list.
18770     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18771     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18772       # If it failed, the variable was not from the command line. Ignore it,
18773       # but warn the user (except for BASH, which is always set by the calling BASH).
18774       if test "xDSYMUTIL" != xBASH; then
18775         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18776 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18777       fi
18778       # Try to locate tool using the code snippet
18779       for ac_prog in dsymutil
18780 do
18781   # Extract the first word of "$ac_prog", so it can be a program name with args.
18782 set dummy $ac_prog; ac_word=$2
18783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18784 $as_echo_n "checking for $ac_word... " >&6; }
18785 if ${ac_cv_path_DSYMUTIL+:} false; then :
18786   $as_echo_n "(cached) " >&6
18787 else
18788   case $DSYMUTIL in
18789   [\\/]* | ?:[\\/]*)
18790   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18791   ;;
18792   *)
18793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18794 for as_dir in $PATH
18795 do
18796   IFS=$as_save_IFS
18797   test -z "$as_dir" && as_dir=.
18798     for ac_exec_ext in '' $ac_executable_extensions; do
18799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18800     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18802     break 2
18803   fi
18804 done
18805   done
18806 IFS=$as_save_IFS
18807 
18808   ;;
18809 esac
18810 fi
18811 DSYMUTIL=$ac_cv_path_DSYMUTIL
18812 if test -n "$DSYMUTIL"; then
18813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18814 $as_echo "$DSYMUTIL" >&6; }
18815 else
18816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18817 $as_echo "no" >&6; }
18818 fi
18819 
18820 
18821   test -n "$DSYMUTIL" && break
18822 done
18823 
18824     else
18825       # If it succeeded, then it was overridden by the user. We will use it
18826       # for the tool.
18827 
18828       # First remove it from the list of overridden variables, so we can test
18829       # for unknown variables in the end.
18830       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18831 
18832       # Check if the provided tool contains a complete path.
18833       tool_specified="$DSYMUTIL"
18834       tool_basename="${tool_specified##*/}"
18835       if test "x$tool_basename" = "x$tool_specified"; then
18836         # A command without a complete path is provided, search $PATH.
18837         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18838 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18839         # Extract the first word of "$tool_basename", so it can be a program name with args.
18840 set dummy $tool_basename; ac_word=$2
18841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18842 $as_echo_n "checking for $ac_word... " >&6; }
18843 if ${ac_cv_path_DSYMUTIL+:} false; then :
18844   $as_echo_n "(cached) " >&6
18845 else
18846   case $DSYMUTIL in
18847   [\\/]* | ?:[\\/]*)
18848   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18849   ;;
18850   *)
18851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18852 for as_dir in $PATH
18853 do
18854   IFS=$as_save_IFS
18855   test -z "$as_dir" && as_dir=.
18856     for ac_exec_ext in '' $ac_executable_extensions; do
18857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18858     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18860     break 2
18861   fi
18862 done
18863   done
18864 IFS=$as_save_IFS
18865 
18866   ;;
18867 esac
18868 fi
18869 DSYMUTIL=$ac_cv_path_DSYMUTIL
18870 if test -n "$DSYMUTIL"; then
18871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18872 $as_echo "$DSYMUTIL" >&6; }
18873 else
18874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18875 $as_echo "no" >&6; }
18876 fi
18877 
18878 
18879         if test "x$DSYMUTIL" = x; then
18880           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18881         fi
18882       else
18883         # Otherwise we believe it is a complete path. Use it as it is.
18884         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18885 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18886         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18887 $as_echo_n "checking for DSYMUTIL... " >&6; }
18888         if test ! -x "$tool_specified"; then
18889           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18890 $as_echo "not found" >&6; }
18891           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18892         fi
18893         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18894 $as_echo "$tool_specified" >&6; }
18895       fi
18896     fi
18897   fi
18898 
18899 
18900 
18901   if test "x$DSYMUTIL" = x; then
18902     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18903   fi
18904 
18905 
18906 
18907 
18908 
18909   # Publish this variable in the help.
18910 
18911 
18912   if test "x$XATTR" = x; then
18913     # The variable is not set by user, try to locate tool using the code snippet
18914     for ac_prog in xattr
18915 do
18916   # Extract the first word of "$ac_prog", so it can be a program name with args.
18917 set dummy $ac_prog; ac_word=$2
18918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18919 $as_echo_n "checking for $ac_word... " >&6; }
18920 if ${ac_cv_path_XATTR+:} false; then :
18921   $as_echo_n "(cached) " >&6
18922 else
18923   case $XATTR in
18924   [\\/]* | ?:[\\/]*)
18925   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18926   ;;
18927   *)
18928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18929 for as_dir in $PATH
18930 do
18931   IFS=$as_save_IFS
18932   test -z "$as_dir" && as_dir=.
18933     for ac_exec_ext in '' $ac_executable_extensions; do
18934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18935     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18937     break 2
18938   fi
18939 done
18940   done
18941 IFS=$as_save_IFS
18942 
18943   ;;
18944 esac
18945 fi
18946 XATTR=$ac_cv_path_XATTR
18947 if test -n "$XATTR"; then
18948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18949 $as_echo "$XATTR" >&6; }
18950 else
18951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18952 $as_echo "no" >&6; }
18953 fi
18954 
18955 
18956   test -n "$XATTR" && break
18957 done
18958 
18959   else
18960     # The variable is set, but is it from the command line or the environment?
18961 
18962     # Try to remove the string !XATTR! from our list.
18963     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18964     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18965       # If it failed, the variable was not from the command line. Ignore it,
18966       # but warn the user (except for BASH, which is always set by the calling BASH).
18967       if test "xXATTR" != xBASH; then
18968         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18969 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18970       fi
18971       # Try to locate tool using the code snippet
18972       for ac_prog in xattr
18973 do
18974   # Extract the first word of "$ac_prog", so it can be a program name with args.
18975 set dummy $ac_prog; ac_word=$2
18976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18977 $as_echo_n "checking for $ac_word... " >&6; }
18978 if ${ac_cv_path_XATTR+:} false; then :
18979   $as_echo_n "(cached) " >&6
18980 else
18981   case $XATTR in
18982   [\\/]* | ?:[\\/]*)
18983   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18984   ;;
18985   *)
18986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18987 for as_dir in $PATH
18988 do
18989   IFS=$as_save_IFS
18990   test -z "$as_dir" && as_dir=.
18991     for ac_exec_ext in '' $ac_executable_extensions; do
18992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18993     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18995     break 2
18996   fi
18997 done
18998   done
18999 IFS=$as_save_IFS
19000 
19001   ;;
19002 esac
19003 fi
19004 XATTR=$ac_cv_path_XATTR
19005 if test -n "$XATTR"; then
19006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19007 $as_echo "$XATTR" >&6; }
19008 else
19009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19010 $as_echo "no" >&6; }
19011 fi
19012 
19013 
19014   test -n "$XATTR" && break
19015 done
19016 
19017     else
19018       # If it succeeded, then it was overridden by the user. We will use it
19019       # for the tool.
19020 
19021       # First remove it from the list of overridden variables, so we can test
19022       # for unknown variables in the end.
19023       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19024 
19025       # Check if the provided tool contains a complete path.
19026       tool_specified="$XATTR"
19027       tool_basename="${tool_specified##*/}"
19028       if test "x$tool_basename" = "x$tool_specified"; then
19029         # A command without a complete path is provided, search $PATH.
19030         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19031 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19032         # Extract the first word of "$tool_basename", so it can be a program name with args.
19033 set dummy $tool_basename; ac_word=$2
19034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19035 $as_echo_n "checking for $ac_word... " >&6; }
19036 if ${ac_cv_path_XATTR+:} false; then :
19037   $as_echo_n "(cached) " >&6
19038 else
19039   case $XATTR in
19040   [\\/]* | ?:[\\/]*)
19041   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19042   ;;
19043   *)
19044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045 for as_dir in $PATH
19046 do
19047   IFS=$as_save_IFS
19048   test -z "$as_dir" && as_dir=.
19049     for ac_exec_ext in '' $ac_executable_extensions; do
19050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19051     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053     break 2
19054   fi
19055 done
19056   done
19057 IFS=$as_save_IFS
19058 
19059   ;;
19060 esac
19061 fi
19062 XATTR=$ac_cv_path_XATTR
19063 if test -n "$XATTR"; then
19064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19065 $as_echo "$XATTR" >&6; }
19066 else
19067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19068 $as_echo "no" >&6; }
19069 fi
19070 
19071 
19072         if test "x$XATTR" = x; then
19073           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19074         fi
19075       else
19076         # Otherwise we believe it is a complete path. Use it as it is.
19077         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19078 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19079         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19080 $as_echo_n "checking for XATTR... " >&6; }
19081         if test ! -x "$tool_specified"; then
19082           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19083 $as_echo "not found" >&6; }
19084           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19085         fi
19086         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19087 $as_echo "$tool_specified" >&6; }
19088       fi
19089     fi
19090   fi
19091 
19092 
19093 
19094   if test "x$XATTR" = x; then
19095     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19096   fi
19097 
19098 
19099 
19100 
19101   # Publish this variable in the help.
19102 
19103 
19104   if test "x$CODESIGN" = x; then
19105     # The variable is not set by user, try to locate tool using the code snippet
19106     for ac_prog in codesign
19107 do
19108   # Extract the first word of "$ac_prog", so it can be a program name with args.
19109 set dummy $ac_prog; ac_word=$2
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19111 $as_echo_n "checking for $ac_word... " >&6; }
19112 if ${ac_cv_path_CODESIGN+:} false; then :
19113   $as_echo_n "(cached) " >&6
19114 else
19115   case $CODESIGN in
19116   [\\/]* | ?:[\\/]*)
19117   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19118   ;;
19119   *)
19120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19121 for as_dir in $PATH
19122 do
19123   IFS=$as_save_IFS
19124   test -z "$as_dir" && as_dir=.
19125     for ac_exec_ext in '' $ac_executable_extensions; do
19126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19127     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19129     break 2
19130   fi
19131 done
19132   done
19133 IFS=$as_save_IFS
19134 
19135   ;;
19136 esac
19137 fi
19138 CODESIGN=$ac_cv_path_CODESIGN
19139 if test -n "$CODESIGN"; then
19140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19141 $as_echo "$CODESIGN" >&6; }
19142 else
19143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19144 $as_echo "no" >&6; }
19145 fi
19146 
19147 
19148   test -n "$CODESIGN" && break
19149 done
19150 
19151   else
19152     # The variable is set, but is it from the command line or the environment?
19153 
19154     # Try to remove the string !CODESIGN! from our list.
19155     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19156     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19157       # If it failed, the variable was not from the command line. Ignore it,
19158       # but warn the user (except for BASH, which is always set by the calling BASH).
19159       if test "xCODESIGN" != xBASH; then
19160         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19161 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19162       fi
19163       # Try to locate tool using the code snippet
19164       for ac_prog in codesign
19165 do
19166   # Extract the first word of "$ac_prog", so it can be a program name with args.
19167 set dummy $ac_prog; ac_word=$2
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19169 $as_echo_n "checking for $ac_word... " >&6; }
19170 if ${ac_cv_path_CODESIGN+:} false; then :
19171   $as_echo_n "(cached) " >&6
19172 else
19173   case $CODESIGN in
19174   [\\/]* | ?:[\\/]*)
19175   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19176   ;;
19177   *)
19178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19179 for as_dir in $PATH
19180 do
19181   IFS=$as_save_IFS
19182   test -z "$as_dir" && as_dir=.
19183     for ac_exec_ext in '' $ac_executable_extensions; do
19184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19185     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19187     break 2
19188   fi
19189 done
19190   done
19191 IFS=$as_save_IFS
19192 
19193   ;;
19194 esac
19195 fi
19196 CODESIGN=$ac_cv_path_CODESIGN
19197 if test -n "$CODESIGN"; then
19198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19199 $as_echo "$CODESIGN" >&6; }
19200 else
19201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19202 $as_echo "no" >&6; }
19203 fi
19204 
19205 
19206   test -n "$CODESIGN" && break
19207 done
19208 
19209     else
19210       # If it succeeded, then it was overridden by the user. We will use it
19211       # for the tool.
19212 
19213       # First remove it from the list of overridden variables, so we can test
19214       # for unknown variables in the end.
19215       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19216 
19217       # Check if the provided tool contains a complete path.
19218       tool_specified="$CODESIGN"
19219       tool_basename="${tool_specified##*/}"
19220       if test "x$tool_basename" = "x$tool_specified"; then
19221         # A command without a complete path is provided, search $PATH.
19222         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19223 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19224         # Extract the first word of "$tool_basename", so it can be a program name with args.
19225 set dummy $tool_basename; ac_word=$2
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19227 $as_echo_n "checking for $ac_word... " >&6; }
19228 if ${ac_cv_path_CODESIGN+:} false; then :
19229   $as_echo_n "(cached) " >&6
19230 else
19231   case $CODESIGN in
19232   [\\/]* | ?:[\\/]*)
19233   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19234   ;;
19235   *)
19236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19237 for as_dir in $PATH
19238 do
19239   IFS=$as_save_IFS
19240   test -z "$as_dir" && as_dir=.
19241     for ac_exec_ext in '' $ac_executable_extensions; do
19242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19243     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19245     break 2
19246   fi
19247 done
19248   done
19249 IFS=$as_save_IFS
19250 
19251   ;;
19252 esac
19253 fi
19254 CODESIGN=$ac_cv_path_CODESIGN
19255 if test -n "$CODESIGN"; then
19256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19257 $as_echo "$CODESIGN" >&6; }
19258 else
19259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19260 $as_echo "no" >&6; }
19261 fi
19262 
19263 
19264         if test "x$CODESIGN" = x; then
19265           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19266         fi
19267       else
19268         # Otherwise we believe it is a complete path. Use it as it is.
19269         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19270 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19271         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19272 $as_echo_n "checking for CODESIGN... " >&6; }
19273         if test ! -x "$tool_specified"; then
19274           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19275 $as_echo "not found" >&6; }
19276           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19277         fi
19278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19279 $as_echo "$tool_specified" >&6; }
19280       fi
19281     fi
19282   fi
19283 
19284 
19285     if test "x$CODESIGN" != "x"; then
19286       # Verify that the openjdk_codesign certificate is present
19287       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19288 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19289       rm -f codesign-testfile
19290       touch codesign-testfile
19291       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19292       rm -f codesign-testfile
19293       if test "x$CODESIGN" = x; then
19294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19295 $as_echo "no" >&6; }
19296       else
19297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19298 $as_echo "yes" >&6; }
19299       fi
19300     fi
19301   fi
19302 
19303 
19304 # Check if pkg-config is available.
19305 
19306 
19307 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19308         if test -n "$ac_tool_prefix"; then
19309   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19310 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19312 $as_echo_n "checking for $ac_word... " >&6; }
19313 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19314   $as_echo_n "(cached) " >&6
19315 else
19316   case $PKG_CONFIG in
19317   [\\/]* | ?:[\\/]*)
19318   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19319   ;;
19320   *)
19321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19322 for as_dir in $PATH
19323 do
19324   IFS=$as_save_IFS
19325   test -z "$as_dir" && as_dir=.
19326     for ac_exec_ext in '' $ac_executable_extensions; do
19327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19328     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19330     break 2
19331   fi
19332 done
19333   done
19334 IFS=$as_save_IFS
19335 
19336   ;;
19337 esac
19338 fi
19339 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19340 if test -n "$PKG_CONFIG"; then
19341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19342 $as_echo "$PKG_CONFIG" >&6; }
19343 else
19344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19345 $as_echo "no" >&6; }
19346 fi
19347 
19348 
19349 fi
19350 if test -z "$ac_cv_path_PKG_CONFIG"; then
19351   ac_pt_PKG_CONFIG=$PKG_CONFIG
19352   # Extract the first word of "pkg-config", so it can be a program name with args.
19353 set dummy pkg-config; ac_word=$2
19354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19355 $as_echo_n "checking for $ac_word... " >&6; }
19356 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19357   $as_echo_n "(cached) " >&6
19358 else
19359   case $ac_pt_PKG_CONFIG in
19360   [\\/]* | ?:[\\/]*)
19361   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19362   ;;
19363   *)
19364   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19365 for as_dir in $PATH
19366 do
19367   IFS=$as_save_IFS
19368   test -z "$as_dir" && as_dir=.
19369     for ac_exec_ext in '' $ac_executable_extensions; do
19370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19371     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19373     break 2
19374   fi
19375 done
19376   done
19377 IFS=$as_save_IFS
19378 
19379   ;;
19380 esac
19381 fi
19382 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19383 if test -n "$ac_pt_PKG_CONFIG"; then
19384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19385 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19386 else
19387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19388 $as_echo "no" >&6; }
19389 fi
19390 
19391   if test "x$ac_pt_PKG_CONFIG" = x; then
19392     PKG_CONFIG=""
19393   else
19394     case $cross_compiling:$ac_tool_warned in
19395 yes:)
19396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19397 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19398 ac_tool_warned=yes ;;
19399 esac
19400     PKG_CONFIG=$ac_pt_PKG_CONFIG
19401   fi
19402 else
19403   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19404 fi
19405 
19406 fi
19407 if test -n "$PKG_CONFIG"; then
19408         _pkg_min_version=0.9.0
19409         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19410 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19411         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19412                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19413 $as_echo "yes" >&6; }
19414         else
19415                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19416 $as_echo "no" >&6; }
19417                 PKG_CONFIG=""
19418         fi
19419 
19420 fi
19421 
19422 # After basic tools have been setup, we can check build os specific details.
19423 
19424   ###############################################################################
19425 
19426   # Note that this is the build platform OS version!
19427 
19428   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19429   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19430   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19431   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19432 
19433 
19434 
19435 
19436 
19437 # Setup builddeps, for automatic downloading of tools we need.
19438 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19439 # boot-jdk setup, but we need to have basic tools setup first.
19440 
19441 
19442 # Check whether --with-builddeps-conf was given.
19443 if test "${with_builddeps_conf+set}" = set; then :
19444   withval=$with_builddeps_conf;
19445 fi
19446 
19447 
19448 
19449 # Check whether --with-builddeps-server was given.
19450 if test "${with_builddeps_server+set}" = set; then :
19451   withval=$with_builddeps_server;
19452 fi
19453 
19454 
19455 
19456 # Check whether --with-builddeps-dir was given.
19457 if test "${with_builddeps_dir+set}" = set; then :
19458   withval=$with_builddeps_dir;
19459 else
19460   with_builddeps_dir=/localhome/builddeps
19461 fi
19462 
19463 
19464 
19465 # Check whether --with-builddeps-group was given.
19466 if test "${with_builddeps_group+set}" = set; then :
19467   withval=$with_builddeps_group;
19468 fi
19469 
19470 
19471 
19472 
19473   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19474     if test "x$with_builddeps_conf" != x; then
19475       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19476 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19477       builddepsfile=$with_builddeps_conf
19478       if test -s $builddepsfile; then
19479         . $builddepsfile
19480         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19481 $as_echo "loaded!" >&6; }
19482       else
19483         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19484       fi
19485     else
19486       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19487 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19488       builddepsfile=`mktemp`
19489       touch $builddepsfile
19490       # Put all found confs into a single file.
19491       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19492       # Source the file to acquire the variables
19493       if test -s $builddepsfile; then
19494         . $builddepsfile
19495         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19496 $as_echo "found at least one!" >&6; }
19497       else
19498         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19499       fi
19500     fi
19501     # Create build and target names that use _ instead of "-" and ".".
19502     # This is necessary to use them in variable names.
19503     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19504     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19505     # Extract rewrite information for build and target
19506     eval rewritten_build=\${REWRITE_${build_var}}
19507     if test "x$rewritten_build" = x; then
19508       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19509       echo Build stays the same $rewritten_build
19510     else
19511       echo Rewriting build for builddeps into $rewritten_build
19512     fi
19513     eval rewritten_target=\${REWRITE_${target_var}}
19514     if test "x$rewritten_target" = x; then
19515       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19516       echo Target stays the same $rewritten_target
19517     else
19518       echo Rewriting target for builddeps into $rewritten_target
19519     fi
19520     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19521     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19522   fi
19523   for ac_prog in 7z unzip
19524 do
19525   # Extract the first word of "$ac_prog", so it can be a program name with args.
19526 set dummy $ac_prog; ac_word=$2
19527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19528 $as_echo_n "checking for $ac_word... " >&6; }
19529 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19530   $as_echo_n "(cached) " >&6
19531 else
19532   if test -n "$BDEPS_UNZIP"; then
19533   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19534 else
19535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19536 for as_dir in $PATH
19537 do
19538   IFS=$as_save_IFS
19539   test -z "$as_dir" && as_dir=.
19540     for ac_exec_ext in '' $ac_executable_extensions; do
19541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19542     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19544     break 2
19545   fi
19546 done
19547   done
19548 IFS=$as_save_IFS
19549 
19550 fi
19551 fi
19552 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19553 if test -n "$BDEPS_UNZIP"; then
19554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19555 $as_echo "$BDEPS_UNZIP" >&6; }
19556 else
19557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19558 $as_echo "no" >&6; }
19559 fi
19560 
19561 
19562   test -n "$BDEPS_UNZIP" && break
19563 done
19564 
19565   if test "x$BDEPS_UNZIP" = x7z; then
19566     BDEPS_UNZIP="7z x"
19567   fi
19568 
19569   for ac_prog in wget lftp ftp
19570 do
19571   # Extract the first word of "$ac_prog", so it can be a program name with args.
19572 set dummy $ac_prog; ac_word=$2
19573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19574 $as_echo_n "checking for $ac_word... " >&6; }
19575 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19576   $as_echo_n "(cached) " >&6
19577 else
19578   if test -n "$BDEPS_FTP"; then
19579   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19580 else
19581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19582 for as_dir in $PATH
19583 do
19584   IFS=$as_save_IFS
19585   test -z "$as_dir" && as_dir=.
19586     for ac_exec_ext in '' $ac_executable_extensions; do
19587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19588     ac_cv_prog_BDEPS_FTP="$ac_prog"
19589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19590     break 2
19591   fi
19592 done
19593   done
19594 IFS=$as_save_IFS
19595 
19596 fi
19597 fi
19598 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19599 if test -n "$BDEPS_FTP"; then
19600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19601 $as_echo "$BDEPS_FTP" >&6; }
19602 else
19603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19604 $as_echo "no" >&6; }
19605 fi
19606 
19607 
19608   test -n "$BDEPS_FTP" && break
19609 done
19610 
19611 
19612 
19613 ###############################################################################
19614 #
19615 # Determine OpenJDK variants, options and version numbers.
19616 #
19617 ###############################################################################
19618 
19619 # We need build & target for this.
19620 
19621 
19622   ###############################################################################
19623   #
19624   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19625   # We always build headless support.
19626   #
19627   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19628 $as_echo_n "checking headful support... " >&6; }
19629   # Check whether --enable-headful was given.
19630 if test "${enable_headful+set}" = set; then :
19631   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19632 else
19633   SUPPORT_HEADFUL=yes
19634 fi
19635 
19636 
19637   SUPPORT_HEADLESS=yes
19638   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19639 
19640   if test "x$SUPPORT_HEADFUL" = xyes; then
19641     # We are building both headful and headless.
19642     headful_msg="include support for both headful and headless"
19643   fi
19644 
19645   if test "x$SUPPORT_HEADFUL" = xno; then
19646     # Thus we are building headless only.
19647     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19648     headful_msg="headless only"
19649   fi
19650 
19651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19652 $as_echo "$headful_msg" >&6; }
19653 
19654 
19655 
19656 
19657 
19658   # Control wether Hotspot runs Queens test after build.
19659   # Check whether --enable-hotspot-test-in-build was given.
19660 if test "${enable_hotspot_test_in_build+set}" = set; then :
19661   enableval=$enable_hotspot_test_in_build;
19662 else
19663   enable_hotspot_test_in_build=no
19664 fi
19665 
19666   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19667     TEST_IN_BUILD=true
19668   else
19669     TEST_IN_BUILD=false
19670   fi
19671 
19672 
19673   ###############################################################################
19674   #
19675   # Choose cacerts source file
19676   #
19677 
19678 # Check whether --with-cacerts-file was given.
19679 if test "${with_cacerts_file+set}" = set; then :
19680   withval=$with_cacerts_file;
19681 fi
19682 
19683   if test "x$with_cacerts_file" != x; then
19684     CACERTS_FILE=$with_cacerts_file
19685   else
19686     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19687   fi
19688 
19689 
19690   ###############################################################################
19691   #
19692   # Enable or disable unlimited crypto
19693   #
19694   # Check whether --enable-unlimited-crypto was given.
19695 if test "${enable_unlimited_crypto+set}" = set; then :
19696   enableval=$enable_unlimited_crypto;
19697 else
19698   enable_unlimited_crypto=no
19699 fi
19700 
19701   if test "x$enable_unlimited_crypto" = "xyes"; then
19702     UNLIMITED_CRYPTO=true
19703   else
19704     UNLIMITED_CRYPTO=false
19705   fi
19706 
19707 
19708   ###############################################################################
19709   #
19710   # Enable or disable the elliptic curve crypto implementation
19711   #
19712 
19713 
19714   ###############################################################################
19715   #
19716   # --enable-rmiconnector-iiop
19717   #
19718   # Check whether --enable-rmiconnector-iiop was given.
19719 if test "${enable_rmiconnector_iiop+set}" = set; then :
19720   enableval=$enable_rmiconnector_iiop;
19721 fi
19722 
19723   if test "x$enable_rmiconnector_iiop" = "xyes"; then
19724     RMICONNECTOR_IIOP=true
19725   else
19726     RMICONNECTOR_IIOP=false
19727   fi
19728 
19729 
19730   ###############################################################################
19731   #
19732   # Compress jars
19733   #
19734   COMPRESS_JARS=false
19735 
19736 
19737 
19738 
19739   # Source the version numbers
19740   . $AUTOCONF_DIR/version-numbers
19741 
19742   # Get the settings from parameters
19743 
19744 # Check whether --with-milestone was given.
19745 if test "${with_milestone+set}" = set; then :
19746   withval=$with_milestone;
19747 fi
19748 
19749   if test "x$with_milestone" = xyes; then
19750     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19751   elif test "x$with_milestone" != x; then
19752     MILESTONE="$with_milestone"
19753   fi
19754   if test "x$MILESTONE" = x; then
19755     MILESTONE=internal
19756   fi
19757 
19758 
19759 # Check whether --with-update-version was given.
19760 if test "${with_update_version+set}" = set; then :
19761   withval=$with_update_version;
19762 fi
19763 
19764   if test "x$with_update_version" = xyes; then
19765     as_fn_error $? "Update version must have a value" "$LINENO" 5
19766   elif test "x$with_update_version" != x; then
19767     JDK_UPDATE_VERSION="$with_update_version"
19768     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19769     # to a bug in expr (which reduces it to just X). To work around this, we
19770     # always add a 0 to one digit update versions.
19771     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19772       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19773     fi
19774   fi
19775 
19776 
19777 # Check whether --with-user-release-suffix was given.
19778 if test "${with_user_release_suffix+set}" = set; then :
19779   withval=$with_user_release_suffix;
19780 fi
19781 
19782   if test "x$with_user_release_suffix" = xyes; then
19783     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19784   elif test "x$with_user_release_suffix" != x; then
19785     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19786   fi
19787 
19788 
19789 # Check whether --with-build-number was given.
19790 if test "${with_build_number+set}" = set; then :
19791   withval=$with_build_number;
19792 fi
19793 
19794   if test "x$with_build_number" = xyes; then
19795     as_fn_error $? "Build number must have a value" "$LINENO" 5
19796   elif test "x$with_build_number" != x; then
19797     JDK_BUILD_NUMBER="$with_build_number"
19798   fi
19799   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19800   if test "x$JDK_BUILD_NUMBER" = x; then
19801     JDK_BUILD_NUMBER=b00
19802     if test "x$USER_RELEASE_SUFFIX" = x; then
19803       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19804       # Avoid [:alnum:] since it depends on the locale.
19805       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19806       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19807     fi
19808   fi
19809 
19810   # Now set the JDK version, milestone, build number etc.
19811 
19812 
19813 
19814 
19815 
19816 
19817 
19818 
19819 
19820 
19821 
19822 
19823 
19824 
19825 
19826   COPYRIGHT_YEAR=`date +'%Y'`
19827 
19828 
19829   if test "x$JDK_UPDATE_VERSION" != x; then
19830     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19831   else
19832     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19833   fi
19834 
19835 
19836   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19837 
19838 
19839 
19840 ###############################################################################
19841 #
19842 # Setup BootJDK, used to bootstrap the build.
19843 #
19844 ###############################################################################
19845 
19846 
19847   BOOT_JDK_FOUND=no
19848 
19849 # Check whether --with-boot-jdk was given.
19850 if test "${with_boot_jdk+set}" = set; then :
19851   withval=$with_boot_jdk;
19852 fi
19853 
19854 
19855   # We look for the Boot JDK through various means, going from more certain to
19856   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19857   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19858   # must check if this is indeed valid; otherwise we'll continue looking.
19859 
19860   # Test: Is bootjdk explicitely set by command line arguments?
19861 
19862   if test "x$BOOT_JDK_FOUND" = xno; then
19863     # Now execute the test
19864 
19865   if test "x$with_boot_jdk" != x; then
19866     BOOT_JDK=$with_boot_jdk
19867     BOOT_JDK_FOUND=maybe
19868     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19869 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19870   fi
19871 
19872 
19873     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19874     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19875       # Do we have a bin/java?
19876       if test ! -x "$BOOT_JDK/bin/java"; then
19877         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19879         BOOT_JDK_FOUND=no
19880       else
19881         # Do we have a bin/javac?
19882         if test ! -x "$BOOT_JDK/bin/javac"; then
19883           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19884 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19885           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19886 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19887           BOOT_JDK_FOUND=no
19888         else
19889           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19890           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19891             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19892 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19893             BOOT_JDK_FOUND=no
19894           else
19895             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19896             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19897 
19898             # Extra M4 quote needed to protect [] in grep expression.
19899             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19900             if test "x$FOUND_CORRECT_VERSION" = x; then
19901               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19903               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19904 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19905               BOOT_JDK_FOUND=no
19906             else
19907               # We're done! :-)
19908               BOOT_JDK_FOUND=yes
19909 
19910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19911 
19912   # Input might be given as Windows format, start by converting to
19913   # unix format.
19914   path="$BOOT_JDK"
19915   new_path=`$CYGPATH -u "$path"`
19916 
19917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19920   # "foo.exe" is OK but "foo" is an error.
19921   #
19922   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19923   # It is also a way to make sure we got the proper file name for the real test later on.
19924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19925   if test "x$test_shortpath" = x; then
19926     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19927 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19928     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19929   fi
19930 
19931   # Call helper function which possibly converts this using DOS-style short mode.
19932   # If so, the updated path is stored in $new_path.
19933 
19934   input_path="$new_path"
19935   # Check if we need to convert this using DOS-style short mode. If the path
19936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19937   # take no chances and rewrite it.
19938   # Note: m4 eats our [], so we need to use [ and ] instead.
19939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19940   if test "x$has_forbidden_chars" != x; then
19941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19945       # Going to short mode and back again did indeed matter. Since short mode is
19946       # case insensitive, let's make it lowercase to improve readability.
19947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19948       # Now convert it back to Unix-stile (cygpath)
19949       input_path=`$CYGPATH -u "$shortmode_path"`
19950       new_path="$input_path"
19951     fi
19952   fi
19953 
19954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19955   if test "x$test_cygdrive_prefix" = x; then
19956     # As a simple fix, exclude /usr/bin since it's not a real path.
19957     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19959       # a path prefixed by /cygdrive for fixpath to work.
19960       new_path="$CYGWIN_ROOT_PATH$input_path"
19961     fi
19962   fi
19963 
19964 
19965   if test "x$path" != "x$new_path"; then
19966     BOOT_JDK="$new_path"
19967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19968 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19969   fi
19970 
19971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19972 
19973   path="$BOOT_JDK"
19974   has_colon=`$ECHO $path | $GREP ^.:`
19975   new_path="$path"
19976   if test "x$has_colon" = x; then
19977     # Not in mixed or Windows style, start by that.
19978     new_path=`cmd //c echo $path`
19979   fi
19980 
19981 
19982   input_path="$new_path"
19983   # Check if we need to convert this using DOS-style short mode. If the path
19984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19985   # take no chances and rewrite it.
19986   # Note: m4 eats our [], so we need to use [ and ] instead.
19987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19988   if test "x$has_forbidden_chars" != x; then
19989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19991   fi
19992 
19993 
19994   windows_path="$new_path"
19995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19996     unix_path=`$CYGPATH -u "$windows_path"`
19997     new_path="$unix_path"
19998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20000     new_path="$unix_path"
20001   fi
20002 
20003   if test "x$path" != "x$new_path"; then
20004     BOOT_JDK="$new_path"
20005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20006 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20007   fi
20008 
20009   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20010   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20011 
20012   else
20013     # We're on a posix platform. Hooray! :)
20014     path="$BOOT_JDK"
20015     has_space=`$ECHO "$path" | $GREP " "`
20016     if test "x$has_space" != x; then
20017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20018 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20019       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20020     fi
20021 
20022     # Use eval to expand a potential ~
20023     eval path="$path"
20024     if test ! -f "$path" && test ! -d "$path"; then
20025       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20026     fi
20027 
20028     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20029   fi
20030 
20031               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20032 $as_echo_n "checking for Boot JDK... " >&6; }
20033               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20034 $as_echo "$BOOT_JDK" >&6; }
20035               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20036 $as_echo_n "checking Boot JDK version... " >&6; }
20037               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20038               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20039 $as_echo "$BOOT_JDK_VERSION" >&6; }
20040             fi # end check jdk version
20041           fi # end check rt.jar
20042         fi # end check javac
20043       fi # end check java
20044     fi # end check boot jdk found
20045   fi
20046 
20047   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20048     # Having specified an argument which is incorrect will produce an instant failure;
20049     # we should not go on looking
20050     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20051   fi
20052 
20053   # Test: Is bootjdk available from builddeps?
20054 
20055   if test "x$BOOT_JDK_FOUND" = xno; then
20056     # Now execute the test
20057 
20058 
20059 
20060   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20061     # Source the builddeps file again, to make sure it uses the latest variables!
20062     . $builddepsfile
20063     # Look for a target and build machine specific resource!
20064     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20065     if test "x$resource" = x; then
20066       # Ok, lets instead look for a target specific resource
20067       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20068     fi
20069     if test "x$resource" = x; then
20070       # Ok, lets instead look for a build specific resource
20071       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20072     fi
20073     if test "x$resource" = x; then
20074       # Ok, lets instead look for a generic resource
20075       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20076       resource=${builddep_bootjdk}
20077     fi
20078     if test "x$resource" != x; then
20079       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20080 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20081       # If the resource in the builddeps.conf file is an existing directory,
20082       # for example /java/linux/cups
20083       if test -d ${resource}; then
20084         depdir=${resource}
20085       else
20086 
20087   # bootjdk is for example mymodule
20088   # $resource is for example libs/general/libmymod_1_2_3.zip
20089   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20090   # $with_builddeps_dir is for example /localhome/builddeps
20091   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20092   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20093   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20094   filename=`basename $resource`
20095   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20096   filebase=${filename%%.*}
20097   extension=${filename#*.}
20098   installdir=$with_builddeps_dir/$filebase
20099   if test ! -f $installdir/$filename.unpacked; then
20100     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20101 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20102     if test ! -d $installdir; then
20103       mkdir -p $installdir
20104     fi
20105     if test ! -d $installdir; then
20106       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20107     fi
20108     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20109     touch $tmpfile
20110     if test ! -f $tmpfile; then
20111       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20112     fi
20113 
20114   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20115   # $tmpfile is the local file name for the downloaded file.
20116   VALID_TOOL=no
20117   if test "x$BDEPS_FTP" = xwget; then
20118     VALID_TOOL=yes
20119     wget -O $tmpfile $with_builddeps_server/$resource
20120   fi
20121   if test "x$BDEPS_FTP" = xlftp; then
20122     VALID_TOOL=yes
20123     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20124   fi
20125   if test "x$BDEPS_FTP" = xftp; then
20126     VALID_TOOL=yes
20127     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20128     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20129     FTPUSERPWD=${FTPSERVER%%@*}
20130     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20131       FTPUSER=${userpwd%%:*}
20132       FTPPWD=${userpwd#*@}
20133       FTPSERVER=${FTPSERVER#*@}
20134     else
20135       FTPUSER=ftp
20136       FTPPWD=ftp
20137     fi
20138     # the "pass" command does not work on some
20139     # ftp clients (read ftp.exe) but if it works,
20140     # passive mode is better!
20141     ( \
20142         echo "user $FTPUSER $FTPPWD"        ; \
20143         echo "pass"                         ; \
20144         echo "bin"                          ; \
20145         echo "get $FTPPATH $tmpfile"              ; \
20146     ) | ftp -in $FTPSERVER
20147   fi
20148   if test "x$VALID_TOOL" != xyes; then
20149     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20150   fi
20151 
20152     mv $tmpfile $installdir/$filename
20153     if test ! -s $installdir/$filename; then
20154       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20155     fi
20156     case "$extension" in
20157       zip)  echo "Unzipping $installdir/$filename..."
20158         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20159         ;;
20160       tar.gz) echo "Untaring $installdir/$filename..."
20161         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20162         ;;
20163       tgz) echo "Untaring $installdir/$filename..."
20164         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20165         ;;
20166       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20167         ;;
20168     esac
20169   fi
20170   if test -f $installdir/$filename.unpacked; then
20171     depdir=$installdir
20172   fi
20173 
20174       fi
20175       # Source the builddeps file again, because in the previous command, the depdir
20176       # was updated to point at the current build dependency install directory.
20177       . $builddepsfile
20178       # Now extract variables from the builddeps.conf files.
20179       theroot=${builddep_bootjdk_ROOT}
20180       thecflags=${builddep_bootjdk_CFLAGS}
20181       thelibs=${builddep_bootjdk_LIBS}
20182       if test "x$depdir" = x; then
20183         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20184       fi
20185       BOOT_JDK=$depdir
20186       if test "x$theroot" != x; then
20187         BOOT_JDK="$theroot"
20188       fi
20189       if test "x$thecflags" != x; then
20190         BOOT_JDK_CFLAGS="$thecflags"
20191       fi
20192       if test "x$thelibs" != x; then
20193         BOOT_JDK_LIBS="$thelibs"
20194       fi
20195       BOOT_JDK_FOUND=maybe
20196       else BOOT_JDK_FOUND=no
20197 
20198     fi
20199     else BOOT_JDK_FOUND=no
20200 
20201   fi
20202 
20203 
20204 
20205     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20206     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20207       # Do we have a bin/java?
20208       if test ! -x "$BOOT_JDK/bin/java"; then
20209         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20210 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20211         BOOT_JDK_FOUND=no
20212       else
20213         # Do we have a bin/javac?
20214         if test ! -x "$BOOT_JDK/bin/javac"; then
20215           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20216 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20217           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20218 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20219           BOOT_JDK_FOUND=no
20220         else
20221           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20222           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20223             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20224 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20225             BOOT_JDK_FOUND=no
20226           else
20227             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20228             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20229 
20230             # Extra M4 quote needed to protect [] in grep expression.
20231             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20232             if test "x$FOUND_CORRECT_VERSION" = x; then
20233               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20234 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20235               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20236 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20237               BOOT_JDK_FOUND=no
20238             else
20239               # We're done! :-)
20240               BOOT_JDK_FOUND=yes
20241 
20242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20243 
20244   # Input might be given as Windows format, start by converting to
20245   # unix format.
20246   path="$BOOT_JDK"
20247   new_path=`$CYGPATH -u "$path"`
20248 
20249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20252   # "foo.exe" is OK but "foo" is an error.
20253   #
20254   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20255   # It is also a way to make sure we got the proper file name for the real test later on.
20256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20257   if test "x$test_shortpath" = x; then
20258     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20259 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20260     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20261   fi
20262 
20263   # Call helper function which possibly converts this using DOS-style short mode.
20264   # If so, the updated path is stored in $new_path.
20265 
20266   input_path="$new_path"
20267   # Check if we need to convert this using DOS-style short mode. If the path
20268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20269   # take no chances and rewrite it.
20270   # Note: m4 eats our [], so we need to use [ and ] instead.
20271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20272   if test "x$has_forbidden_chars" != x; then
20273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20277       # Going to short mode and back again did indeed matter. Since short mode is
20278       # case insensitive, let's make it lowercase to improve readability.
20279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20280       # Now convert it back to Unix-stile (cygpath)
20281       input_path=`$CYGPATH -u "$shortmode_path"`
20282       new_path="$input_path"
20283     fi
20284   fi
20285 
20286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20287   if test "x$test_cygdrive_prefix" = x; then
20288     # As a simple fix, exclude /usr/bin since it's not a real path.
20289     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20291       # a path prefixed by /cygdrive for fixpath to work.
20292       new_path="$CYGWIN_ROOT_PATH$input_path"
20293     fi
20294   fi
20295 
20296 
20297   if test "x$path" != "x$new_path"; then
20298     BOOT_JDK="$new_path"
20299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20300 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20301   fi
20302 
20303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20304 
20305   path="$BOOT_JDK"
20306   has_colon=`$ECHO $path | $GREP ^.:`
20307   new_path="$path"
20308   if test "x$has_colon" = x; then
20309     # Not in mixed or Windows style, start by that.
20310     new_path=`cmd //c echo $path`
20311   fi
20312 
20313 
20314   input_path="$new_path"
20315   # Check if we need to convert this using DOS-style short mode. If the path
20316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20317   # take no chances and rewrite it.
20318   # Note: m4 eats our [], so we need to use [ and ] instead.
20319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20320   if test "x$has_forbidden_chars" != x; then
20321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20323   fi
20324 
20325 
20326   windows_path="$new_path"
20327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20328     unix_path=`$CYGPATH -u "$windows_path"`
20329     new_path="$unix_path"
20330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20332     new_path="$unix_path"
20333   fi
20334 
20335   if test "x$path" != "x$new_path"; then
20336     BOOT_JDK="$new_path"
20337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20338 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20339   fi
20340 
20341   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20342   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20343 
20344   else
20345     # We're on a posix platform. Hooray! :)
20346     path="$BOOT_JDK"
20347     has_space=`$ECHO "$path" | $GREP " "`
20348     if test "x$has_space" != x; then
20349       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20350 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20351       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20352     fi
20353 
20354     # Use eval to expand a potential ~
20355     eval path="$path"
20356     if test ! -f "$path" && test ! -d "$path"; then
20357       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20358     fi
20359 
20360     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20361   fi
20362 
20363               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20364 $as_echo_n "checking for Boot JDK... " >&6; }
20365               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20366 $as_echo "$BOOT_JDK" >&6; }
20367               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20368 $as_echo_n "checking Boot JDK version... " >&6; }
20369               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20370               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20371 $as_echo "$BOOT_JDK_VERSION" >&6; }
20372             fi # end check jdk version
20373           fi # end check rt.jar
20374         fi # end check javac
20375       fi # end check java
20376     fi # end check boot jdk found
20377   fi
20378 
20379 
20380   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20381 
20382   if test "x$BOOT_JDK_FOUND" = xno; then
20383     # Now execute the test
20384 
20385   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20386     # First check at user selected default
20387 
20388   if test "x$BOOT_JDK_FOUND" = xno; then
20389     # Now execute the test
20390 
20391   if test -x /usr/libexec/java_home; then
20392     BOOT_JDK=`/usr/libexec/java_home `
20393     BOOT_JDK_FOUND=maybe
20394     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20395 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20396   fi
20397 
20398 
20399     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20400     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20401       # Do we have a bin/java?
20402       if test ! -x "$BOOT_JDK/bin/java"; then
20403         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20404 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20405         BOOT_JDK_FOUND=no
20406       else
20407         # Do we have a bin/javac?
20408         if test ! -x "$BOOT_JDK/bin/javac"; then
20409           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20410 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20411           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20412 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20413           BOOT_JDK_FOUND=no
20414         else
20415           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20416           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20417             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20419             BOOT_JDK_FOUND=no
20420           else
20421             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20422             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20423 
20424             # Extra M4 quote needed to protect [] in grep expression.
20425             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20426             if test "x$FOUND_CORRECT_VERSION" = x; then
20427               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20428 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20429               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20430 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20431               BOOT_JDK_FOUND=no
20432             else
20433               # We're done! :-)
20434               BOOT_JDK_FOUND=yes
20435 
20436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20437 
20438   # Input might be given as Windows format, start by converting to
20439   # unix format.
20440   path="$BOOT_JDK"
20441   new_path=`$CYGPATH -u "$path"`
20442 
20443   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20444   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20445   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20446   # "foo.exe" is OK but "foo" is an error.
20447   #
20448   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20449   # It is also a way to make sure we got the proper file name for the real test later on.
20450   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20451   if test "x$test_shortpath" = x; then
20452     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20453 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20454     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20455   fi
20456 
20457   # Call helper function which possibly converts this using DOS-style short mode.
20458   # If so, the updated path is stored in $new_path.
20459 
20460   input_path="$new_path"
20461   # Check if we need to convert this using DOS-style short mode. If the path
20462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20463   # take no chances and rewrite it.
20464   # Note: m4 eats our [], so we need to use [ and ] instead.
20465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20466   if test "x$has_forbidden_chars" != x; then
20467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20468     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20469     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20470     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20471       # Going to short mode and back again did indeed matter. Since short mode is
20472       # case insensitive, let's make it lowercase to improve readability.
20473       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20474       # Now convert it back to Unix-stile (cygpath)
20475       input_path=`$CYGPATH -u "$shortmode_path"`
20476       new_path="$input_path"
20477     fi
20478   fi
20479 
20480   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20481   if test "x$test_cygdrive_prefix" = x; then
20482     # As a simple fix, exclude /usr/bin since it's not a real path.
20483     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20484       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20485       # a path prefixed by /cygdrive for fixpath to work.
20486       new_path="$CYGWIN_ROOT_PATH$input_path"
20487     fi
20488   fi
20489 
20490 
20491   if test "x$path" != "x$new_path"; then
20492     BOOT_JDK="$new_path"
20493     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20494 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20495   fi
20496 
20497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498 
20499   path="$BOOT_JDK"
20500   has_colon=`$ECHO $path | $GREP ^.:`
20501   new_path="$path"
20502   if test "x$has_colon" = x; then
20503     # Not in mixed or Windows style, start by that.
20504     new_path=`cmd //c echo $path`
20505   fi
20506 
20507 
20508   input_path="$new_path"
20509   # Check if we need to convert this using DOS-style short mode. If the path
20510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20511   # take no chances and rewrite it.
20512   # Note: m4 eats our [], so we need to use [ and ] instead.
20513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20514   if test "x$has_forbidden_chars" != x; then
20515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20516     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20517   fi
20518 
20519 
20520   windows_path="$new_path"
20521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20522     unix_path=`$CYGPATH -u "$windows_path"`
20523     new_path="$unix_path"
20524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20526     new_path="$unix_path"
20527   fi
20528 
20529   if test "x$path" != "x$new_path"; then
20530     BOOT_JDK="$new_path"
20531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20532 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20533   fi
20534 
20535   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20536   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20537 
20538   else
20539     # We're on a posix platform. Hooray! :)
20540     path="$BOOT_JDK"
20541     has_space=`$ECHO "$path" | $GREP " "`
20542     if test "x$has_space" != x; then
20543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20544 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20545       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20546     fi
20547 
20548     # Use eval to expand a potential ~
20549     eval path="$path"
20550     if test ! -f "$path" && test ! -d "$path"; then
20551       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20552     fi
20553 
20554     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20555   fi
20556 
20557               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20558 $as_echo_n "checking for Boot JDK... " >&6; }
20559               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20560 $as_echo "$BOOT_JDK" >&6; }
20561               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20562 $as_echo_n "checking Boot JDK version... " >&6; }
20563               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20564               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20565 $as_echo "$BOOT_JDK_VERSION" >&6; }
20566             fi # end check jdk version
20567           fi # end check rt.jar
20568         fi # end check javac
20569       fi # end check java
20570     fi # end check boot jdk found
20571   fi
20572 
20573     # If that did not work out (e.g. too old), try explicit versions instead
20574 
20575   if test "x$BOOT_JDK_FOUND" = xno; then
20576     # Now execute the test
20577 
20578   if test -x /usr/libexec/java_home; then
20579     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20580     BOOT_JDK_FOUND=maybe
20581     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20582 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20583   fi
20584 
20585 
20586     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20587     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20588       # Do we have a bin/java?
20589       if test ! -x "$BOOT_JDK/bin/java"; then
20590         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20591 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20592         BOOT_JDK_FOUND=no
20593       else
20594         # Do we have a bin/javac?
20595         if test ! -x "$BOOT_JDK/bin/javac"; then
20596           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20597 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20598           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20599 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20600           BOOT_JDK_FOUND=no
20601         else
20602           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20603           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20604             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20605 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20606             BOOT_JDK_FOUND=no
20607           else
20608             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20609             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20610 
20611             # Extra M4 quote needed to protect [] in grep expression.
20612             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20613             if test "x$FOUND_CORRECT_VERSION" = x; then
20614               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20615 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20616               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20617 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20618               BOOT_JDK_FOUND=no
20619             else
20620               # We're done! :-)
20621               BOOT_JDK_FOUND=yes
20622 
20623   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20624 
20625   # Input might be given as Windows format, start by converting to
20626   # unix format.
20627   path="$BOOT_JDK"
20628   new_path=`$CYGPATH -u "$path"`
20629 
20630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20633   # "foo.exe" is OK but "foo" is an error.
20634   #
20635   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20636   # It is also a way to make sure we got the proper file name for the real test later on.
20637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20638   if test "x$test_shortpath" = x; then
20639     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20640 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20641     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20642   fi
20643 
20644   # Call helper function which possibly converts this using DOS-style short mode.
20645   # If so, the updated path is stored in $new_path.
20646 
20647   input_path="$new_path"
20648   # Check if we need to convert this using DOS-style short mode. If the path
20649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20650   # take no chances and rewrite it.
20651   # Note: m4 eats our [], so we need to use [ and ] instead.
20652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20653   if test "x$has_forbidden_chars" != x; then
20654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20655     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20656     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20657     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20658       # Going to short mode and back again did indeed matter. Since short mode is
20659       # case insensitive, let's make it lowercase to improve readability.
20660       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20661       # Now convert it back to Unix-stile (cygpath)
20662       input_path=`$CYGPATH -u "$shortmode_path"`
20663       new_path="$input_path"
20664     fi
20665   fi
20666 
20667   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20668   if test "x$test_cygdrive_prefix" = x; then
20669     # As a simple fix, exclude /usr/bin since it's not a real path.
20670     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20671       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20672       # a path prefixed by /cygdrive for fixpath to work.
20673       new_path="$CYGWIN_ROOT_PATH$input_path"
20674     fi
20675   fi
20676 
20677 
20678   if test "x$path" != "x$new_path"; then
20679     BOOT_JDK="$new_path"
20680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20681 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20682   fi
20683 
20684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20685 
20686   path="$BOOT_JDK"
20687   has_colon=`$ECHO $path | $GREP ^.:`
20688   new_path="$path"
20689   if test "x$has_colon" = x; then
20690     # Not in mixed or Windows style, start by that.
20691     new_path=`cmd //c echo $path`
20692   fi
20693 
20694 
20695   input_path="$new_path"
20696   # Check if we need to convert this using DOS-style short mode. If the path
20697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20698   # take no chances and rewrite it.
20699   # Note: m4 eats our [], so we need to use [ and ] instead.
20700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20701   if test "x$has_forbidden_chars" != x; then
20702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20703     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20704   fi
20705 
20706 
20707   windows_path="$new_path"
20708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20709     unix_path=`$CYGPATH -u "$windows_path"`
20710     new_path="$unix_path"
20711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20713     new_path="$unix_path"
20714   fi
20715 
20716   if test "x$path" != "x$new_path"; then
20717     BOOT_JDK="$new_path"
20718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20719 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20720   fi
20721 
20722   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20723   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20724 
20725   else
20726     # We're on a posix platform. Hooray! :)
20727     path="$BOOT_JDK"
20728     has_space=`$ECHO "$path" | $GREP " "`
20729     if test "x$has_space" != x; then
20730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20732       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20733     fi
20734 
20735     # Use eval to expand a potential ~
20736     eval path="$path"
20737     if test ! -f "$path" && test ! -d "$path"; then
20738       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20739     fi
20740 
20741     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20742   fi
20743 
20744               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20745 $as_echo_n "checking for Boot JDK... " >&6; }
20746               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20747 $as_echo "$BOOT_JDK" >&6; }
20748               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20749 $as_echo_n "checking Boot JDK version... " >&6; }
20750               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20751               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20752 $as_echo "$BOOT_JDK_VERSION" >&6; }
20753             fi # end check jdk version
20754           fi # end check rt.jar
20755         fi # end check javac
20756       fi # end check java
20757     fi # end check boot jdk found
20758   fi
20759 
20760 
20761   if test "x$BOOT_JDK_FOUND" = xno; then
20762     # Now execute the test
20763 
20764   if test -x /usr/libexec/java_home; then
20765     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20766     BOOT_JDK_FOUND=maybe
20767     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20768 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20769   fi
20770 
20771 
20772     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20773     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20774       # Do we have a bin/java?
20775       if test ! -x "$BOOT_JDK/bin/java"; then
20776         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20777 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20778         BOOT_JDK_FOUND=no
20779       else
20780         # Do we have a bin/javac?
20781         if test ! -x "$BOOT_JDK/bin/javac"; then
20782           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20783 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20784           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20785 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20786           BOOT_JDK_FOUND=no
20787         else
20788           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20789           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20790             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20791 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20792             BOOT_JDK_FOUND=no
20793           else
20794             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20795             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20796 
20797             # Extra M4 quote needed to protect [] in grep expression.
20798             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20799             if test "x$FOUND_CORRECT_VERSION" = x; then
20800               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20802               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20803 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20804               BOOT_JDK_FOUND=no
20805             else
20806               # We're done! :-)
20807               BOOT_JDK_FOUND=yes
20808 
20809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20810 
20811   # Input might be given as Windows format, start by converting to
20812   # unix format.
20813   path="$BOOT_JDK"
20814   new_path=`$CYGPATH -u "$path"`
20815 
20816   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20817   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20818   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20819   # "foo.exe" is OK but "foo" is an error.
20820   #
20821   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20822   # It is also a way to make sure we got the proper file name for the real test later on.
20823   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20824   if test "x$test_shortpath" = x; then
20825     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20826 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20827     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20828   fi
20829 
20830   # Call helper function which possibly converts this using DOS-style short mode.
20831   # If so, the updated path is stored in $new_path.
20832 
20833   input_path="$new_path"
20834   # Check if we need to convert this using DOS-style short mode. If the path
20835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20836   # take no chances and rewrite it.
20837   # Note: m4 eats our [], so we need to use [ and ] instead.
20838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20839   if test "x$has_forbidden_chars" != x; then
20840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20841     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20842     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20843     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20844       # Going to short mode and back again did indeed matter. Since short mode is
20845       # case insensitive, let's make it lowercase to improve readability.
20846       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20847       # Now convert it back to Unix-stile (cygpath)
20848       input_path=`$CYGPATH -u "$shortmode_path"`
20849       new_path="$input_path"
20850     fi
20851   fi
20852 
20853   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20854   if test "x$test_cygdrive_prefix" = x; then
20855     # As a simple fix, exclude /usr/bin since it's not a real path.
20856     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20857       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20858       # a path prefixed by /cygdrive for fixpath to work.
20859       new_path="$CYGWIN_ROOT_PATH$input_path"
20860     fi
20861   fi
20862 
20863 
20864   if test "x$path" != "x$new_path"; then
20865     BOOT_JDK="$new_path"
20866     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20867 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20868   fi
20869 
20870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20871 
20872   path="$BOOT_JDK"
20873   has_colon=`$ECHO $path | $GREP ^.:`
20874   new_path="$path"
20875   if test "x$has_colon" = x; then
20876     # Not in mixed or Windows style, start by that.
20877     new_path=`cmd //c echo $path`
20878   fi
20879 
20880 
20881   input_path="$new_path"
20882   # Check if we need to convert this using DOS-style short mode. If the path
20883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20884   # take no chances and rewrite it.
20885   # Note: m4 eats our [], so we need to use [ and ] instead.
20886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20887   if test "x$has_forbidden_chars" != x; then
20888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20889     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20890   fi
20891 
20892 
20893   windows_path="$new_path"
20894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20895     unix_path=`$CYGPATH -u "$windows_path"`
20896     new_path="$unix_path"
20897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20899     new_path="$unix_path"
20900   fi
20901 
20902   if test "x$path" != "x$new_path"; then
20903     BOOT_JDK="$new_path"
20904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20905 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20906   fi
20907 
20908   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20909   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20910 
20911   else
20912     # We're on a posix platform. Hooray! :)
20913     path="$BOOT_JDK"
20914     has_space=`$ECHO "$path" | $GREP " "`
20915     if test "x$has_space" != x; then
20916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20918       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20919     fi
20920 
20921     # Use eval to expand a potential ~
20922     eval path="$path"
20923     if test ! -f "$path" && test ! -d "$path"; then
20924       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20925     fi
20926 
20927     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20928   fi
20929 
20930               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20931 $as_echo_n "checking for Boot JDK... " >&6; }
20932               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20933 $as_echo "$BOOT_JDK" >&6; }
20934               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20935 $as_echo_n "checking Boot JDK version... " >&6; }
20936               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20937               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20938 $as_echo "$BOOT_JDK_VERSION" >&6; }
20939             fi # end check jdk version
20940           fi # end check rt.jar
20941         fi # end check javac
20942       fi # end check java
20943     fi # end check boot jdk found
20944   fi
20945 
20946 
20947   if test "x$BOOT_JDK_FOUND" = xno; then
20948     # Now execute the test
20949 
20950   if test -x /usr/libexec/java_home; then
20951     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20952     BOOT_JDK_FOUND=maybe
20953     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20954 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20955   fi
20956 
20957 
20958     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20959     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20960       # Do we have a bin/java?
20961       if test ! -x "$BOOT_JDK/bin/java"; then
20962         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20964         BOOT_JDK_FOUND=no
20965       else
20966         # Do we have a bin/javac?
20967         if test ! -x "$BOOT_JDK/bin/javac"; then
20968           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20969 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20970           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20971 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20972           BOOT_JDK_FOUND=no
20973         else
20974           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20975           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20976             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20977 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20978             BOOT_JDK_FOUND=no
20979           else
20980             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20981             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20982 
20983             # Extra M4 quote needed to protect [] in grep expression.
20984             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20985             if test "x$FOUND_CORRECT_VERSION" = x; then
20986               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20988               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20989 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20990               BOOT_JDK_FOUND=no
20991             else
20992               # We're done! :-)
20993               BOOT_JDK_FOUND=yes
20994 
20995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20996 
20997   # Input might be given as Windows format, start by converting to
20998   # unix format.
20999   path="$BOOT_JDK"
21000   new_path=`$CYGPATH -u "$path"`
21001 
21002   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21003   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21004   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21005   # "foo.exe" is OK but "foo" is an error.
21006   #
21007   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21008   # It is also a way to make sure we got the proper file name for the real test later on.
21009   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21010   if test "x$test_shortpath" = x; then
21011     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21012 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21013     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21014   fi
21015 
21016   # Call helper function which possibly converts this using DOS-style short mode.
21017   # If so, the updated path is stored in $new_path.
21018 
21019   input_path="$new_path"
21020   # Check if we need to convert this using DOS-style short mode. If the path
21021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21022   # take no chances and rewrite it.
21023   # Note: m4 eats our [], so we need to use [ and ] instead.
21024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21025   if test "x$has_forbidden_chars" != x; then
21026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21027     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21028     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21029     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21030       # Going to short mode and back again did indeed matter. Since short mode is
21031       # case insensitive, let's make it lowercase to improve readability.
21032       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21033       # Now convert it back to Unix-stile (cygpath)
21034       input_path=`$CYGPATH -u "$shortmode_path"`
21035       new_path="$input_path"
21036     fi
21037   fi
21038 
21039   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21040   if test "x$test_cygdrive_prefix" = x; then
21041     # As a simple fix, exclude /usr/bin since it's not a real path.
21042     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21043       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21044       # a path prefixed by /cygdrive for fixpath to work.
21045       new_path="$CYGWIN_ROOT_PATH$input_path"
21046     fi
21047   fi
21048 
21049 
21050   if test "x$path" != "x$new_path"; then
21051     BOOT_JDK="$new_path"
21052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21053 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21054   fi
21055 
21056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21057 
21058   path="$BOOT_JDK"
21059   has_colon=`$ECHO $path | $GREP ^.:`
21060   new_path="$path"
21061   if test "x$has_colon" = x; then
21062     # Not in mixed or Windows style, start by that.
21063     new_path=`cmd //c echo $path`
21064   fi
21065 
21066 
21067   input_path="$new_path"
21068   # Check if we need to convert this using DOS-style short mode. If the path
21069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21070   # take no chances and rewrite it.
21071   # Note: m4 eats our [], so we need to use [ and ] instead.
21072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21073   if test "x$has_forbidden_chars" != x; then
21074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21076   fi
21077 
21078 
21079   windows_path="$new_path"
21080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21081     unix_path=`$CYGPATH -u "$windows_path"`
21082     new_path="$unix_path"
21083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21085     new_path="$unix_path"
21086   fi
21087 
21088   if test "x$path" != "x$new_path"; then
21089     BOOT_JDK="$new_path"
21090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21091 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21092   fi
21093 
21094   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21095   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21096 
21097   else
21098     # We're on a posix platform. Hooray! :)
21099     path="$BOOT_JDK"
21100     has_space=`$ECHO "$path" | $GREP " "`
21101     if test "x$has_space" != x; then
21102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21103 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21104       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21105     fi
21106 
21107     # Use eval to expand a potential ~
21108     eval path="$path"
21109     if test ! -f "$path" && test ! -d "$path"; then
21110       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21111     fi
21112 
21113     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21114   fi
21115 
21116               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21117 $as_echo_n "checking for Boot JDK... " >&6; }
21118               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21119 $as_echo "$BOOT_JDK" >&6; }
21120               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21121 $as_echo_n "checking Boot JDK version... " >&6; }
21122               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21123               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21124 $as_echo "$BOOT_JDK_VERSION" >&6; }
21125             fi # end check jdk version
21126           fi # end check rt.jar
21127         fi # end check javac
21128       fi # end check java
21129     fi # end check boot jdk found
21130   fi
21131 
21132   fi
21133 
21134 
21135     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21136     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21137       # Do we have a bin/java?
21138       if test ! -x "$BOOT_JDK/bin/java"; then
21139         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21141         BOOT_JDK_FOUND=no
21142       else
21143         # Do we have a bin/javac?
21144         if test ! -x "$BOOT_JDK/bin/javac"; then
21145           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21146 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21147           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21148 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21149           BOOT_JDK_FOUND=no
21150         else
21151           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21152           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21153             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21154 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21155             BOOT_JDK_FOUND=no
21156           else
21157             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21158             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21159 
21160             # Extra M4 quote needed to protect [] in grep expression.
21161             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21162             if test "x$FOUND_CORRECT_VERSION" = x; then
21163               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21164 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21165               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21166 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21167               BOOT_JDK_FOUND=no
21168             else
21169               # We're done! :-)
21170               BOOT_JDK_FOUND=yes
21171 
21172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21173 
21174   # Input might be given as Windows format, start by converting to
21175   # unix format.
21176   path="$BOOT_JDK"
21177   new_path=`$CYGPATH -u "$path"`
21178 
21179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21182   # "foo.exe" is OK but "foo" is an error.
21183   #
21184   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21185   # It is also a way to make sure we got the proper file name for the real test later on.
21186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21187   if test "x$test_shortpath" = x; then
21188     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21189 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21190     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21191   fi
21192 
21193   # Call helper function which possibly converts this using DOS-style short mode.
21194   # If so, the updated path is stored in $new_path.
21195 
21196   input_path="$new_path"
21197   # Check if we need to convert this using DOS-style short mode. If the path
21198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21199   # take no chances and rewrite it.
21200   # Note: m4 eats our [], so we need to use [ and ] instead.
21201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21202   if test "x$has_forbidden_chars" != x; then
21203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21204     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21205     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21206     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21207       # Going to short mode and back again did indeed matter. Since short mode is
21208       # case insensitive, let's make it lowercase to improve readability.
21209       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21210       # Now convert it back to Unix-stile (cygpath)
21211       input_path=`$CYGPATH -u "$shortmode_path"`
21212       new_path="$input_path"
21213     fi
21214   fi
21215 
21216   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21217   if test "x$test_cygdrive_prefix" = x; then
21218     # As a simple fix, exclude /usr/bin since it's not a real path.
21219     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21220       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21221       # a path prefixed by /cygdrive for fixpath to work.
21222       new_path="$CYGWIN_ROOT_PATH$input_path"
21223     fi
21224   fi
21225 
21226 
21227   if test "x$path" != "x$new_path"; then
21228     BOOT_JDK="$new_path"
21229     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21230 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21231   fi
21232 
21233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21234 
21235   path="$BOOT_JDK"
21236   has_colon=`$ECHO $path | $GREP ^.:`
21237   new_path="$path"
21238   if test "x$has_colon" = x; then
21239     # Not in mixed or Windows style, start by that.
21240     new_path=`cmd //c echo $path`
21241   fi
21242 
21243 
21244   input_path="$new_path"
21245   # Check if we need to convert this using DOS-style short mode. If the path
21246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21247   # take no chances and rewrite it.
21248   # Note: m4 eats our [], so we need to use [ and ] instead.
21249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21250   if test "x$has_forbidden_chars" != x; then
21251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21252     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21253   fi
21254 
21255 
21256   windows_path="$new_path"
21257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21258     unix_path=`$CYGPATH -u "$windows_path"`
21259     new_path="$unix_path"
21260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21262     new_path="$unix_path"
21263   fi
21264 
21265   if test "x$path" != "x$new_path"; then
21266     BOOT_JDK="$new_path"
21267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21269   fi
21270 
21271   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21272   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21273 
21274   else
21275     # We're on a posix platform. Hooray! :)
21276     path="$BOOT_JDK"
21277     has_space=`$ECHO "$path" | $GREP " "`
21278     if test "x$has_space" != x; then
21279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21280 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21281       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21282     fi
21283 
21284     # Use eval to expand a potential ~
21285     eval path="$path"
21286     if test ! -f "$path" && test ! -d "$path"; then
21287       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21288     fi
21289 
21290     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21291   fi
21292 
21293               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21294 $as_echo_n "checking for Boot JDK... " >&6; }
21295               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21296 $as_echo "$BOOT_JDK" >&6; }
21297               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21298 $as_echo_n "checking Boot JDK version... " >&6; }
21299               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21300               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21301 $as_echo "$BOOT_JDK_VERSION" >&6; }
21302             fi # end check jdk version
21303           fi # end check rt.jar
21304         fi # end check javac
21305       fi # end check java
21306     fi # end check boot jdk found
21307   fi
21308 
21309 
21310   # Test: Is $JAVA_HOME set?
21311 
21312   if test "x$BOOT_JDK_FOUND" = xno; then
21313     # Now execute the test
21314 
21315   if test "x$JAVA_HOME" != x; then
21316     JAVA_HOME_PROCESSED="$JAVA_HOME"
21317 
21318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21319 
21320   # Input might be given as Windows format, start by converting to
21321   # unix format.
21322   path="$JAVA_HOME_PROCESSED"
21323   new_path=`$CYGPATH -u "$path"`
21324 
21325   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21326   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21327   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21328   # "foo.exe" is OK but "foo" is an error.
21329   #
21330   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21331   # It is also a way to make sure we got the proper file name for the real test later on.
21332   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21333   if test "x$test_shortpath" = x; then
21334     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21335 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21336     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21337   fi
21338 
21339   # Call helper function which possibly converts this using DOS-style short mode.
21340   # If so, the updated path is stored in $new_path.
21341 
21342   input_path="$new_path"
21343   # Check if we need to convert this using DOS-style short mode. If the path
21344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21345   # take no chances and rewrite it.
21346   # Note: m4 eats our [], so we need to use [ and ] instead.
21347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21348   if test "x$has_forbidden_chars" != x; then
21349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21350     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21351     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21352     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21353       # Going to short mode and back again did indeed matter. Since short mode is
21354       # case insensitive, let's make it lowercase to improve readability.
21355       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21356       # Now convert it back to Unix-stile (cygpath)
21357       input_path=`$CYGPATH -u "$shortmode_path"`
21358       new_path="$input_path"
21359     fi
21360   fi
21361 
21362   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21363   if test "x$test_cygdrive_prefix" = x; then
21364     # As a simple fix, exclude /usr/bin since it's not a real path.
21365     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21366       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21367       # a path prefixed by /cygdrive for fixpath to work.
21368       new_path="$CYGWIN_ROOT_PATH$input_path"
21369     fi
21370   fi
21371 
21372 
21373   if test "x$path" != "x$new_path"; then
21374     JAVA_HOME_PROCESSED="$new_path"
21375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21376 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21377   fi
21378 
21379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21380 
21381   path="$JAVA_HOME_PROCESSED"
21382   has_colon=`$ECHO $path | $GREP ^.:`
21383   new_path="$path"
21384   if test "x$has_colon" = x; then
21385     # Not in mixed or Windows style, start by that.
21386     new_path=`cmd //c echo $path`
21387   fi
21388 
21389 
21390   input_path="$new_path"
21391   # Check if we need to convert this using DOS-style short mode. If the path
21392   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21393   # take no chances and rewrite it.
21394   # Note: m4 eats our [], so we need to use [ and ] instead.
21395   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21396   if test "x$has_forbidden_chars" != x; then
21397     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21398     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21399   fi
21400 
21401 
21402   windows_path="$new_path"
21403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21404     unix_path=`$CYGPATH -u "$windows_path"`
21405     new_path="$unix_path"
21406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21408     new_path="$unix_path"
21409   fi
21410 
21411   if test "x$path" != "x$new_path"; then
21412     JAVA_HOME_PROCESSED="$new_path"
21413     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21414 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21415   fi
21416 
21417   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21418   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21419 
21420   else
21421     # We're on a posix platform. Hooray! :)
21422     path="$JAVA_HOME_PROCESSED"
21423     has_space=`$ECHO "$path" | $GREP " "`
21424     if test "x$has_space" != x; then
21425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21426 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21427       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21428     fi
21429 
21430     # Use eval to expand a potential ~
21431     eval path="$path"
21432     if test ! -f "$path" && test ! -d "$path"; then
21433       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21434     fi
21435 
21436     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21437   fi
21438 
21439     if test ! -d "$JAVA_HOME_PROCESSED"; then
21440       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21441 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21442     else
21443       # Aha, the user has set a JAVA_HOME
21444       # let us use that as the Boot JDK.
21445       BOOT_JDK="$JAVA_HOME_PROCESSED"
21446       BOOT_JDK_FOUND=maybe
21447       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21448 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21449     fi
21450   fi
21451 
21452 
21453     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21454     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21455       # Do we have a bin/java?
21456       if test ! -x "$BOOT_JDK/bin/java"; then
21457         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21459         BOOT_JDK_FOUND=no
21460       else
21461         # Do we have a bin/javac?
21462         if test ! -x "$BOOT_JDK/bin/javac"; then
21463           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21465           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21466 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21467           BOOT_JDK_FOUND=no
21468         else
21469           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21470           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21471             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21472 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21473             BOOT_JDK_FOUND=no
21474           else
21475             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21476             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21477 
21478             # Extra M4 quote needed to protect [] in grep expression.
21479             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21480             if test "x$FOUND_CORRECT_VERSION" = x; then
21481               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21482 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21483               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21484 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21485               BOOT_JDK_FOUND=no
21486             else
21487               # We're done! :-)
21488               BOOT_JDK_FOUND=yes
21489 
21490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21491 
21492   # Input might be given as Windows format, start by converting to
21493   # unix format.
21494   path="$BOOT_JDK"
21495   new_path=`$CYGPATH -u "$path"`
21496 
21497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21500   # "foo.exe" is OK but "foo" is an error.
21501   #
21502   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21503   # It is also a way to make sure we got the proper file name for the real test later on.
21504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21505   if test "x$test_shortpath" = x; then
21506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21507 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21508     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21509   fi
21510 
21511   # Call helper function which possibly converts this using DOS-style short mode.
21512   # If so, the updated path is stored in $new_path.
21513 
21514   input_path="$new_path"
21515   # Check if we need to convert this using DOS-style short mode. If the path
21516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21517   # take no chances and rewrite it.
21518   # Note: m4 eats our [], so we need to use [ and ] instead.
21519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21520   if test "x$has_forbidden_chars" != x; then
21521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21522     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21523     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21524     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21525       # Going to short mode and back again did indeed matter. Since short mode is
21526       # case insensitive, let's make it lowercase to improve readability.
21527       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21528       # Now convert it back to Unix-stile (cygpath)
21529       input_path=`$CYGPATH -u "$shortmode_path"`
21530       new_path="$input_path"
21531     fi
21532   fi
21533 
21534   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21535   if test "x$test_cygdrive_prefix" = x; then
21536     # As a simple fix, exclude /usr/bin since it's not a real path.
21537     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21538       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21539       # a path prefixed by /cygdrive for fixpath to work.
21540       new_path="$CYGWIN_ROOT_PATH$input_path"
21541     fi
21542   fi
21543 
21544 
21545   if test "x$path" != "x$new_path"; then
21546     BOOT_JDK="$new_path"
21547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21549   fi
21550 
21551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21552 
21553   path="$BOOT_JDK"
21554   has_colon=`$ECHO $path | $GREP ^.:`
21555   new_path="$path"
21556   if test "x$has_colon" = x; then
21557     # Not in mixed or Windows style, start by that.
21558     new_path=`cmd //c echo $path`
21559   fi
21560 
21561 
21562   input_path="$new_path"
21563   # Check if we need to convert this using DOS-style short mode. If the path
21564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21565   # take no chances and rewrite it.
21566   # Note: m4 eats our [], so we need to use [ and ] instead.
21567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21568   if test "x$has_forbidden_chars" != x; then
21569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21570     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21571   fi
21572 
21573 
21574   windows_path="$new_path"
21575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21576     unix_path=`$CYGPATH -u "$windows_path"`
21577     new_path="$unix_path"
21578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21580     new_path="$unix_path"
21581   fi
21582 
21583   if test "x$path" != "x$new_path"; then
21584     BOOT_JDK="$new_path"
21585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21586 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21587   fi
21588 
21589   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21590   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21591 
21592   else
21593     # We're on a posix platform. Hooray! :)
21594     path="$BOOT_JDK"
21595     has_space=`$ECHO "$path" | $GREP " "`
21596     if test "x$has_space" != x; then
21597       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21598 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21599       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21600     fi
21601 
21602     # Use eval to expand a potential ~
21603     eval path="$path"
21604     if test ! -f "$path" && test ! -d "$path"; then
21605       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21606     fi
21607 
21608     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21609   fi
21610 
21611               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21612 $as_echo_n "checking for Boot JDK... " >&6; }
21613               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21614 $as_echo "$BOOT_JDK" >&6; }
21615               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21616 $as_echo_n "checking Boot JDK version... " >&6; }
21617               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21618               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21619 $as_echo "$BOOT_JDK_VERSION" >&6; }
21620             fi # end check jdk version
21621           fi # end check rt.jar
21622         fi # end check javac
21623       fi # end check java
21624     fi # end check boot jdk found
21625   fi
21626 
21627 
21628   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21629 
21630   if test "x$BOOT_JDK_FOUND" = xno; then
21631     # Now execute the test
21632 
21633   # Extract the first word of "javac", so it can be a program name with args.
21634 set dummy javac; ac_word=$2
21635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21636 $as_echo_n "checking for $ac_word... " >&6; }
21637 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21638   $as_echo_n "(cached) " >&6
21639 else
21640   case $JAVAC_CHECK in
21641   [\\/]* | ?:[\\/]*)
21642   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21643   ;;
21644   *)
21645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21646 for as_dir in $PATH
21647 do
21648   IFS=$as_save_IFS
21649   test -z "$as_dir" && as_dir=.
21650     for ac_exec_ext in '' $ac_executable_extensions; do
21651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21652     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21654     break 2
21655   fi
21656 done
21657   done
21658 IFS=$as_save_IFS
21659 
21660   ;;
21661 esac
21662 fi
21663 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21664 if test -n "$JAVAC_CHECK"; then
21665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21666 $as_echo "$JAVAC_CHECK" >&6; }
21667 else
21668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21669 $as_echo "no" >&6; }
21670 fi
21671 
21672 
21673   # Extract the first word of "java", so it can be a program name with args.
21674 set dummy java; ac_word=$2
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21676 $as_echo_n "checking for $ac_word... " >&6; }
21677 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21678   $as_echo_n "(cached) " >&6
21679 else
21680   case $JAVA_CHECK in
21681   [\\/]* | ?:[\\/]*)
21682   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21683   ;;
21684   *)
21685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21686 for as_dir in $PATH
21687 do
21688   IFS=$as_save_IFS
21689   test -z "$as_dir" && as_dir=.
21690     for ac_exec_ext in '' $ac_executable_extensions; do
21691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21692     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21694     break 2
21695   fi
21696 done
21697   done
21698 IFS=$as_save_IFS
21699 
21700   ;;
21701 esac
21702 fi
21703 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21704 if test -n "$JAVA_CHECK"; then
21705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21706 $as_echo "$JAVA_CHECK" >&6; }
21707 else
21708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21709 $as_echo "no" >&6; }
21710 fi
21711 
21712 
21713   BINARY="$JAVAC_CHECK"
21714   if test "x$JAVAC_CHECK" = x; then
21715     BINARY="$JAVA_CHECK"
21716   fi
21717   if test "x$BINARY" != x; then
21718     # So there is a java(c) binary, it might be part of a JDK.
21719     # Lets find the JDK/JRE directory by following symbolic links.
21720     # Linux/GNU systems often have links from /usr/bin/java to
21721     # /etc/alternatives/java to the real JDK binary.
21722 
21723   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21724     # Follow a chain of symbolic links. Use readlink
21725     # where it exists, else fall back to horribly
21726     # complicated shell code.
21727     if test "x$READLINK_TESTED" != yes; then
21728       # On MacOSX there is a readlink tool with a different
21729       # purpose than the GNU readlink tool. Check the found readlink.
21730       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21731       if test "x$ISGNU" = x; then
21732         # A readlink that we do not know how to use.
21733         # Are there other non-GNU readlinks out there?
21734         READLINK_TESTED=yes
21735         READLINK=
21736       fi
21737     fi
21738 
21739     if test "x$READLINK" != x; then
21740       BINARY=`$READLINK -f $BINARY`
21741     else
21742       # Save the current directory for restoring afterwards
21743       STARTDIR=$PWD
21744       COUNTER=0
21745       sym_link_dir=`$DIRNAME $BINARY`
21746       sym_link_file=`$BASENAME $BINARY`
21747       cd $sym_link_dir
21748       # Use -P flag to resolve symlinks in directories.
21749       cd `$THEPWDCMD -P`
21750       sym_link_dir=`$THEPWDCMD -P`
21751       # Resolve file symlinks
21752       while test $COUNTER -lt 20; do
21753         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21754         if test "x$ISLINK" == x; then
21755           # This is not a symbolic link! We are done!
21756           break
21757         fi
21758         # Again resolve directory symlinks since the target of the just found
21759         # link could be in a different directory
21760         cd `$DIRNAME $ISLINK`
21761         sym_link_dir=`$THEPWDCMD -P`
21762         sym_link_file=`$BASENAME $ISLINK`
21763         let COUNTER=COUNTER+1
21764       done
21765       cd $STARTDIR
21766       BINARY=$sym_link_dir/$sym_link_file
21767     fi
21768   fi
21769 
21770     BOOT_JDK=`dirname "$BINARY"`
21771     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21772     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21773       # Looks like we found ourselves an JDK
21774       BOOT_JDK_FOUND=maybe
21775       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21776 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21777     fi
21778   fi
21779 
21780 
21781     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21782     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21783       # Do we have a bin/java?
21784       if test ! -x "$BOOT_JDK/bin/java"; then
21785         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21786 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21787         BOOT_JDK_FOUND=no
21788       else
21789         # Do we have a bin/javac?
21790         if test ! -x "$BOOT_JDK/bin/javac"; then
21791           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21792 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21793           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21794 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21795           BOOT_JDK_FOUND=no
21796         else
21797           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21798           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21799             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21801             BOOT_JDK_FOUND=no
21802           else
21803             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21804             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21805 
21806             # Extra M4 quote needed to protect [] in grep expression.
21807             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21808             if test "x$FOUND_CORRECT_VERSION" = x; then
21809               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21811               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21812 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21813               BOOT_JDK_FOUND=no
21814             else
21815               # We're done! :-)
21816               BOOT_JDK_FOUND=yes
21817 
21818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21819 
21820   # Input might be given as Windows format, start by converting to
21821   # unix format.
21822   path="$BOOT_JDK"
21823   new_path=`$CYGPATH -u "$path"`
21824 
21825   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21826   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21827   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21828   # "foo.exe" is OK but "foo" is an error.
21829   #
21830   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21831   # It is also a way to make sure we got the proper file name for the real test later on.
21832   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21833   if test "x$test_shortpath" = x; then
21834     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21835 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21836     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21837   fi
21838 
21839   # Call helper function which possibly converts this using DOS-style short mode.
21840   # If so, the updated path is stored in $new_path.
21841 
21842   input_path="$new_path"
21843   # Check if we need to convert this using DOS-style short mode. If the path
21844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21845   # take no chances and rewrite it.
21846   # Note: m4 eats our [], so we need to use [ and ] instead.
21847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21848   if test "x$has_forbidden_chars" != x; then
21849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21850     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21851     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21852     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21853       # Going to short mode and back again did indeed matter. Since short mode is
21854       # case insensitive, let's make it lowercase to improve readability.
21855       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21856       # Now convert it back to Unix-stile (cygpath)
21857       input_path=`$CYGPATH -u "$shortmode_path"`
21858       new_path="$input_path"
21859     fi
21860   fi
21861 
21862   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21863   if test "x$test_cygdrive_prefix" = x; then
21864     # As a simple fix, exclude /usr/bin since it's not a real path.
21865     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21866       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21867       # a path prefixed by /cygdrive for fixpath to work.
21868       new_path="$CYGWIN_ROOT_PATH$input_path"
21869     fi
21870   fi
21871 
21872 
21873   if test "x$path" != "x$new_path"; then
21874     BOOT_JDK="$new_path"
21875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21877   fi
21878 
21879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21880 
21881   path="$BOOT_JDK"
21882   has_colon=`$ECHO $path | $GREP ^.:`
21883   new_path="$path"
21884   if test "x$has_colon" = x; then
21885     # Not in mixed or Windows style, start by that.
21886     new_path=`cmd //c echo $path`
21887   fi
21888 
21889 
21890   input_path="$new_path"
21891   # Check if we need to convert this using DOS-style short mode. If the path
21892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21893   # take no chances and rewrite it.
21894   # Note: m4 eats our [], so we need to use [ and ] instead.
21895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21896   if test "x$has_forbidden_chars" != x; then
21897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21898     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21899   fi
21900 
21901 
21902   windows_path="$new_path"
21903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21904     unix_path=`$CYGPATH -u "$windows_path"`
21905     new_path="$unix_path"
21906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21908     new_path="$unix_path"
21909   fi
21910 
21911   if test "x$path" != "x$new_path"; then
21912     BOOT_JDK="$new_path"
21913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21914 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21915   fi
21916 
21917   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21918   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21919 
21920   else
21921     # We're on a posix platform. Hooray! :)
21922     path="$BOOT_JDK"
21923     has_space=`$ECHO "$path" | $GREP " "`
21924     if test "x$has_space" != x; then
21925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21926 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21927       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21928     fi
21929 
21930     # Use eval to expand a potential ~
21931     eval path="$path"
21932     if test ! -f "$path" && test ! -d "$path"; then
21933       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21934     fi
21935 
21936     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21937   fi
21938 
21939               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21940 $as_echo_n "checking for Boot JDK... " >&6; }
21941               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21942 $as_echo "$BOOT_JDK" >&6; }
21943               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21944 $as_echo_n "checking Boot JDK version... " >&6; }
21945               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21946               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21947 $as_echo "$BOOT_JDK_VERSION" >&6; }
21948             fi # end check jdk version
21949           fi # end check rt.jar
21950         fi # end check javac
21951       fi # end check java
21952     fi # end check boot jdk found
21953   fi
21954 
21955 
21956   # Test: Is there a JDK installed in default, well-known locations?
21957 
21958   if test "x$BOOT_JDK_FOUND" = xno; then
21959     # Now execute the test
21960 
21961   if test "x$OPENJDK_TARGET_OS" = xwindows; then
21962 
21963   if test "x$BOOT_JDK_FOUND" = xno; then
21964     # Now execute the test
21965 
21966   if test "x$ProgramW6432" != x; then
21967     VIRTUAL_DIR="$ProgramW6432/Java"
21968 
21969   windows_path="$VIRTUAL_DIR"
21970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21971     unix_path=`$CYGPATH -u "$windows_path"`
21972     VIRTUAL_DIR="$unix_path"
21973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21975     VIRTUAL_DIR="$unix_path"
21976   fi
21977 
21978 
21979   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21980   BOOT_JDK_SUFFIX=""
21981   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21982   if test "x$ALL_JDKS_FOUND" != x; then
21983     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21984 
21985   if test "x$BOOT_JDK_FOUND" = xno; then
21986     # Now execute the test
21987 
21988         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21989         if test -d "$BOOT_JDK"; then
21990           BOOT_JDK_FOUND=maybe
21991           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21992 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21993         fi
21994 
21995 
21996     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21997     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21998       # Do we have a bin/java?
21999       if test ! -x "$BOOT_JDK/bin/java"; then
22000         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22002         BOOT_JDK_FOUND=no
22003       else
22004         # Do we have a bin/javac?
22005         if test ! -x "$BOOT_JDK/bin/javac"; then
22006           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22007 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22008           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22009 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22010           BOOT_JDK_FOUND=no
22011         else
22012           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22013           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22014             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22015 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22016             BOOT_JDK_FOUND=no
22017           else
22018             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22019             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22020 
22021             # Extra M4 quote needed to protect [] in grep expression.
22022             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22023             if test "x$FOUND_CORRECT_VERSION" = x; then
22024               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22026               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22027 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22028               BOOT_JDK_FOUND=no
22029             else
22030               # We're done! :-)
22031               BOOT_JDK_FOUND=yes
22032 
22033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22034 
22035   # Input might be given as Windows format, start by converting to
22036   # unix format.
22037   path="$BOOT_JDK"
22038   new_path=`$CYGPATH -u "$path"`
22039 
22040   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22041   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22042   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22043   # "foo.exe" is OK but "foo" is an error.
22044   #
22045   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22046   # It is also a way to make sure we got the proper file name for the real test later on.
22047   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22048   if test "x$test_shortpath" = x; then
22049     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22050 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22051     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22052   fi
22053 
22054   # Call helper function which possibly converts this using DOS-style short mode.
22055   # If so, the updated path is stored in $new_path.
22056 
22057   input_path="$new_path"
22058   # Check if we need to convert this using DOS-style short mode. If the path
22059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22060   # take no chances and rewrite it.
22061   # Note: m4 eats our [], so we need to use [ and ] instead.
22062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22063   if test "x$has_forbidden_chars" != x; then
22064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22065     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22066     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22067     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22068       # Going to short mode and back again did indeed matter. Since short mode is
22069       # case insensitive, let's make it lowercase to improve readability.
22070       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22071       # Now convert it back to Unix-stile (cygpath)
22072       input_path=`$CYGPATH -u "$shortmode_path"`
22073       new_path="$input_path"
22074     fi
22075   fi
22076 
22077   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22078   if test "x$test_cygdrive_prefix" = x; then
22079     # As a simple fix, exclude /usr/bin since it's not a real path.
22080     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22081       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22082       # a path prefixed by /cygdrive for fixpath to work.
22083       new_path="$CYGWIN_ROOT_PATH$input_path"
22084     fi
22085   fi
22086 
22087 
22088   if test "x$path" != "x$new_path"; then
22089     BOOT_JDK="$new_path"
22090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22091 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22092   fi
22093 
22094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22095 
22096   path="$BOOT_JDK"
22097   has_colon=`$ECHO $path | $GREP ^.:`
22098   new_path="$path"
22099   if test "x$has_colon" = x; then
22100     # Not in mixed or Windows style, start by that.
22101     new_path=`cmd //c echo $path`
22102   fi
22103 
22104 
22105   input_path="$new_path"
22106   # Check if we need to convert this using DOS-style short mode. If the path
22107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22108   # take no chances and rewrite it.
22109   # Note: m4 eats our [], so we need to use [ and ] instead.
22110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22111   if test "x$has_forbidden_chars" != x; then
22112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22113     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22114   fi
22115 
22116 
22117   windows_path="$new_path"
22118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22119     unix_path=`$CYGPATH -u "$windows_path"`
22120     new_path="$unix_path"
22121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22123     new_path="$unix_path"
22124   fi
22125 
22126   if test "x$path" != "x$new_path"; then
22127     BOOT_JDK="$new_path"
22128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22129 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22130   fi
22131 
22132   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22133   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22134 
22135   else
22136     # We're on a posix platform. Hooray! :)
22137     path="$BOOT_JDK"
22138     has_space=`$ECHO "$path" | $GREP " "`
22139     if test "x$has_space" != x; then
22140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22142       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22143     fi
22144 
22145     # Use eval to expand a potential ~
22146     eval path="$path"
22147     if test ! -f "$path" && test ! -d "$path"; then
22148       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22149     fi
22150 
22151     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22152   fi
22153 
22154               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22155 $as_echo_n "checking for Boot JDK... " >&6; }
22156               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22157 $as_echo "$BOOT_JDK" >&6; }
22158               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22159 $as_echo_n "checking Boot JDK version... " >&6; }
22160               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22161               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22162 $as_echo "$BOOT_JDK_VERSION" >&6; }
22163             fi # end check jdk version
22164           fi # end check rt.jar
22165         fi # end check javac
22166       fi # end check java
22167     fi # end check boot jdk found
22168   fi
22169 
22170     done
22171   fi
22172 
22173   fi
22174 
22175 
22176     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22177     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22178       # Do we have a bin/java?
22179       if test ! -x "$BOOT_JDK/bin/java"; then
22180         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22182         BOOT_JDK_FOUND=no
22183       else
22184         # Do we have a bin/javac?
22185         if test ! -x "$BOOT_JDK/bin/javac"; then
22186           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22188           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22190           BOOT_JDK_FOUND=no
22191         else
22192           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22193           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22194             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22196             BOOT_JDK_FOUND=no
22197           else
22198             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22199             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22200 
22201             # Extra M4 quote needed to protect [] in grep expression.
22202             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22203             if test "x$FOUND_CORRECT_VERSION" = x; then
22204               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22205 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22206               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22207 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22208               BOOT_JDK_FOUND=no
22209             else
22210               # We're done! :-)
22211               BOOT_JDK_FOUND=yes
22212 
22213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22214 
22215   # Input might be given as Windows format, start by converting to
22216   # unix format.
22217   path="$BOOT_JDK"
22218   new_path=`$CYGPATH -u "$path"`
22219 
22220   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22221   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22222   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22223   # "foo.exe" is OK but "foo" is an error.
22224   #
22225   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22226   # It is also a way to make sure we got the proper file name for the real test later on.
22227   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22228   if test "x$test_shortpath" = x; then
22229     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22230 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22231     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22232   fi
22233 
22234   # Call helper function which possibly converts this using DOS-style short mode.
22235   # If so, the updated path is stored in $new_path.
22236 
22237   input_path="$new_path"
22238   # Check if we need to convert this using DOS-style short mode. If the path
22239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22240   # take no chances and rewrite it.
22241   # Note: m4 eats our [], so we need to use [ and ] instead.
22242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22243   if test "x$has_forbidden_chars" != x; then
22244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22245     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22246     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22247     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22248       # Going to short mode and back again did indeed matter. Since short mode is
22249       # case insensitive, let's make it lowercase to improve readability.
22250       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22251       # Now convert it back to Unix-stile (cygpath)
22252       input_path=`$CYGPATH -u "$shortmode_path"`
22253       new_path="$input_path"
22254     fi
22255   fi
22256 
22257   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22258   if test "x$test_cygdrive_prefix" = x; then
22259     # As a simple fix, exclude /usr/bin since it's not a real path.
22260     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22261       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22262       # a path prefixed by /cygdrive for fixpath to work.
22263       new_path="$CYGWIN_ROOT_PATH$input_path"
22264     fi
22265   fi
22266 
22267 
22268   if test "x$path" != "x$new_path"; then
22269     BOOT_JDK="$new_path"
22270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22271 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22272   fi
22273 
22274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22275 
22276   path="$BOOT_JDK"
22277   has_colon=`$ECHO $path | $GREP ^.:`
22278   new_path="$path"
22279   if test "x$has_colon" = x; then
22280     # Not in mixed or Windows style, start by that.
22281     new_path=`cmd //c echo $path`
22282   fi
22283 
22284 
22285   input_path="$new_path"
22286   # Check if we need to convert this using DOS-style short mode. If the path
22287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22288   # take no chances and rewrite it.
22289   # Note: m4 eats our [], so we need to use [ and ] instead.
22290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22291   if test "x$has_forbidden_chars" != x; then
22292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22294   fi
22295 
22296 
22297   windows_path="$new_path"
22298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22299     unix_path=`$CYGPATH -u "$windows_path"`
22300     new_path="$unix_path"
22301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22303     new_path="$unix_path"
22304   fi
22305 
22306   if test "x$path" != "x$new_path"; then
22307     BOOT_JDK="$new_path"
22308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22309 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22310   fi
22311 
22312   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22313   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22314 
22315   else
22316     # We're on a posix platform. Hooray! :)
22317     path="$BOOT_JDK"
22318     has_space=`$ECHO "$path" | $GREP " "`
22319     if test "x$has_space" != x; then
22320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22322       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22323     fi
22324 
22325     # Use eval to expand a potential ~
22326     eval path="$path"
22327     if test ! -f "$path" && test ! -d "$path"; then
22328       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22329     fi
22330 
22331     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22332   fi
22333 
22334               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22335 $as_echo_n "checking for Boot JDK... " >&6; }
22336               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22337 $as_echo "$BOOT_JDK" >&6; }
22338               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22339 $as_echo_n "checking Boot JDK version... " >&6; }
22340               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22341               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22342 $as_echo "$BOOT_JDK_VERSION" >&6; }
22343             fi # end check jdk version
22344           fi # end check rt.jar
22345         fi # end check javac
22346       fi # end check java
22347     fi # end check boot jdk found
22348   fi
22349 
22350 
22351   if test "x$BOOT_JDK_FOUND" = xno; then
22352     # Now execute the test
22353 
22354   if test "x$PROGRAMW6432" != x; then
22355     VIRTUAL_DIR="$PROGRAMW6432/Java"
22356 
22357   windows_path="$VIRTUAL_DIR"
22358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22359     unix_path=`$CYGPATH -u "$windows_path"`
22360     VIRTUAL_DIR="$unix_path"
22361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22363     VIRTUAL_DIR="$unix_path"
22364   fi
22365 
22366 
22367   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22368   BOOT_JDK_SUFFIX=""
22369   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22370   if test "x$ALL_JDKS_FOUND" != x; then
22371     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22372 
22373   if test "x$BOOT_JDK_FOUND" = xno; then
22374     # Now execute the test
22375 
22376         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22377         if test -d "$BOOT_JDK"; then
22378           BOOT_JDK_FOUND=maybe
22379           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22380 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22381         fi
22382 
22383 
22384     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22385     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22386       # Do we have a bin/java?
22387       if test ! -x "$BOOT_JDK/bin/java"; then
22388         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22389 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22390         BOOT_JDK_FOUND=no
22391       else
22392         # Do we have a bin/javac?
22393         if test ! -x "$BOOT_JDK/bin/javac"; then
22394           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22395 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22396           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22397 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22398           BOOT_JDK_FOUND=no
22399         else
22400           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22401           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22402             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22403 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22404             BOOT_JDK_FOUND=no
22405           else
22406             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22407             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22408 
22409             # Extra M4 quote needed to protect [] in grep expression.
22410             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22411             if test "x$FOUND_CORRECT_VERSION" = x; then
22412               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22413 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22414               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22415 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22416               BOOT_JDK_FOUND=no
22417             else
22418               # We're done! :-)
22419               BOOT_JDK_FOUND=yes
22420 
22421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22422 
22423   # Input might be given as Windows format, start by converting to
22424   # unix format.
22425   path="$BOOT_JDK"
22426   new_path=`$CYGPATH -u "$path"`
22427 
22428   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22429   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22430   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22431   # "foo.exe" is OK but "foo" is an error.
22432   #
22433   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22434   # It is also a way to make sure we got the proper file name for the real test later on.
22435   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22436   if test "x$test_shortpath" = x; then
22437     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22438 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22439     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22440   fi
22441 
22442   # Call helper function which possibly converts this using DOS-style short mode.
22443   # If so, the updated path is stored in $new_path.
22444 
22445   input_path="$new_path"
22446   # Check if we need to convert this using DOS-style short mode. If the path
22447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22448   # take no chances and rewrite it.
22449   # Note: m4 eats our [], so we need to use [ and ] instead.
22450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22451   if test "x$has_forbidden_chars" != x; then
22452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22456       # Going to short mode and back again did indeed matter. Since short mode is
22457       # case insensitive, let's make it lowercase to improve readability.
22458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22459       # Now convert it back to Unix-stile (cygpath)
22460       input_path=`$CYGPATH -u "$shortmode_path"`
22461       new_path="$input_path"
22462     fi
22463   fi
22464 
22465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22466   if test "x$test_cygdrive_prefix" = x; then
22467     # As a simple fix, exclude /usr/bin since it's not a real path.
22468     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22470       # a path prefixed by /cygdrive for fixpath to work.
22471       new_path="$CYGWIN_ROOT_PATH$input_path"
22472     fi
22473   fi
22474 
22475 
22476   if test "x$path" != "x$new_path"; then
22477     BOOT_JDK="$new_path"
22478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22479 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22480   fi
22481 
22482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22483 
22484   path="$BOOT_JDK"
22485   has_colon=`$ECHO $path | $GREP ^.:`
22486   new_path="$path"
22487   if test "x$has_colon" = x; then
22488     # Not in mixed or Windows style, start by that.
22489     new_path=`cmd //c echo $path`
22490   fi
22491 
22492 
22493   input_path="$new_path"
22494   # Check if we need to convert this using DOS-style short mode. If the path
22495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22496   # take no chances and rewrite it.
22497   # Note: m4 eats our [], so we need to use [ and ] instead.
22498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22499   if test "x$has_forbidden_chars" != x; then
22500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22501     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22502   fi
22503 
22504 
22505   windows_path="$new_path"
22506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22507     unix_path=`$CYGPATH -u "$windows_path"`
22508     new_path="$unix_path"
22509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22511     new_path="$unix_path"
22512   fi
22513 
22514   if test "x$path" != "x$new_path"; then
22515     BOOT_JDK="$new_path"
22516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22517 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22518   fi
22519 
22520   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22521   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22522 
22523   else
22524     # We're on a posix platform. Hooray! :)
22525     path="$BOOT_JDK"
22526     has_space=`$ECHO "$path" | $GREP " "`
22527     if test "x$has_space" != x; then
22528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22529 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22530       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22531     fi
22532 
22533     # Use eval to expand a potential ~
22534     eval path="$path"
22535     if test ! -f "$path" && test ! -d "$path"; then
22536       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22537     fi
22538 
22539     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22540   fi
22541 
22542               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22543 $as_echo_n "checking for Boot JDK... " >&6; }
22544               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22545 $as_echo "$BOOT_JDK" >&6; }
22546               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22547 $as_echo_n "checking Boot JDK version... " >&6; }
22548               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22549               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22550 $as_echo "$BOOT_JDK_VERSION" >&6; }
22551             fi # end check jdk version
22552           fi # end check rt.jar
22553         fi # end check javac
22554       fi # end check java
22555     fi # end check boot jdk found
22556   fi
22557 
22558     done
22559   fi
22560 
22561   fi
22562 
22563 
22564     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22565     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22566       # Do we have a bin/java?
22567       if test ! -x "$BOOT_JDK/bin/java"; then
22568         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22569 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22570         BOOT_JDK_FOUND=no
22571       else
22572         # Do we have a bin/javac?
22573         if test ! -x "$BOOT_JDK/bin/javac"; then
22574           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22575 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22576           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22577 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22578           BOOT_JDK_FOUND=no
22579         else
22580           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22581           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22582             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22583 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22584             BOOT_JDK_FOUND=no
22585           else
22586             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22587             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22588 
22589             # Extra M4 quote needed to protect [] in grep expression.
22590             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22591             if test "x$FOUND_CORRECT_VERSION" = x; then
22592               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22593 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22594               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22595 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22596               BOOT_JDK_FOUND=no
22597             else
22598               # We're done! :-)
22599               BOOT_JDK_FOUND=yes
22600 
22601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22602 
22603   # Input might be given as Windows format, start by converting to
22604   # unix format.
22605   path="$BOOT_JDK"
22606   new_path=`$CYGPATH -u "$path"`
22607 
22608   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22609   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22610   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22611   # "foo.exe" is OK but "foo" is an error.
22612   #
22613   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22614   # It is also a way to make sure we got the proper file name for the real test later on.
22615   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22616   if test "x$test_shortpath" = x; then
22617     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22618 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22619     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22620   fi
22621 
22622   # Call helper function which possibly converts this using DOS-style short mode.
22623   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22634     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22635     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22636       # Going to short mode and back again did indeed matter. Since short mode is
22637       # case insensitive, let's make it lowercase to improve readability.
22638       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22639       # Now convert it back to Unix-stile (cygpath)
22640       input_path=`$CYGPATH -u "$shortmode_path"`
22641       new_path="$input_path"
22642     fi
22643   fi
22644 
22645   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22646   if test "x$test_cygdrive_prefix" = x; then
22647     # As a simple fix, exclude /usr/bin since it's not a real path.
22648     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22649       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22650       # a path prefixed by /cygdrive for fixpath to work.
22651       new_path="$CYGWIN_ROOT_PATH$input_path"
22652     fi
22653   fi
22654 
22655 
22656   if test "x$path" != "x$new_path"; then
22657     BOOT_JDK="$new_path"
22658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22659 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22660   fi
22661 
22662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663 
22664   path="$BOOT_JDK"
22665   has_colon=`$ECHO $path | $GREP ^.:`
22666   new_path="$path"
22667   if test "x$has_colon" = x; then
22668     # Not in mixed or Windows style, start by that.
22669     new_path=`cmd //c echo $path`
22670   fi
22671 
22672 
22673   input_path="$new_path"
22674   # Check if we need to convert this using DOS-style short mode. If the path
22675   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22676   # take no chances and rewrite it.
22677   # Note: m4 eats our [], so we need to use [ and ] instead.
22678   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22679   if test "x$has_forbidden_chars" != x; then
22680     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22681     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22682   fi
22683 
22684 
22685   windows_path="$new_path"
22686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22687     unix_path=`$CYGPATH -u "$windows_path"`
22688     new_path="$unix_path"
22689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22691     new_path="$unix_path"
22692   fi
22693 
22694   if test "x$path" != "x$new_path"; then
22695     BOOT_JDK="$new_path"
22696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22697 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22698   fi
22699 
22700   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22701   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22702 
22703   else
22704     # We're on a posix platform. Hooray! :)
22705     path="$BOOT_JDK"
22706     has_space=`$ECHO "$path" | $GREP " "`
22707     if test "x$has_space" != x; then
22708       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22709 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22710       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22711     fi
22712 
22713     # Use eval to expand a potential ~
22714     eval path="$path"
22715     if test ! -f "$path" && test ! -d "$path"; then
22716       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22717     fi
22718 
22719     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22720   fi
22721 
22722               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22723 $as_echo_n "checking for Boot JDK... " >&6; }
22724               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22725 $as_echo "$BOOT_JDK" >&6; }
22726               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22727 $as_echo_n "checking Boot JDK version... " >&6; }
22728               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22729               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22730 $as_echo "$BOOT_JDK_VERSION" >&6; }
22731             fi # end check jdk version
22732           fi # end check rt.jar
22733         fi # end check javac
22734       fi # end check java
22735     fi # end check boot jdk found
22736   fi
22737 
22738 
22739   if test "x$BOOT_JDK_FOUND" = xno; then
22740     # Now execute the test
22741 
22742   if test "x$PROGRAMFILES" != x; then
22743     VIRTUAL_DIR="$PROGRAMFILES/Java"
22744 
22745   windows_path="$VIRTUAL_DIR"
22746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22747     unix_path=`$CYGPATH -u "$windows_path"`
22748     VIRTUAL_DIR="$unix_path"
22749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22751     VIRTUAL_DIR="$unix_path"
22752   fi
22753 
22754 
22755   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22756   BOOT_JDK_SUFFIX=""
22757   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22758   if test "x$ALL_JDKS_FOUND" != x; then
22759     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22760 
22761   if test "x$BOOT_JDK_FOUND" = xno; then
22762     # Now execute the test
22763 
22764         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22765         if test -d "$BOOT_JDK"; then
22766           BOOT_JDK_FOUND=maybe
22767           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22768 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22769         fi
22770 
22771 
22772     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22773     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22774       # Do we have a bin/java?
22775       if test ! -x "$BOOT_JDK/bin/java"; then
22776         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22777 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22778         BOOT_JDK_FOUND=no
22779       else
22780         # Do we have a bin/javac?
22781         if test ! -x "$BOOT_JDK/bin/javac"; then
22782           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22783 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22784           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22785 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22786           BOOT_JDK_FOUND=no
22787         else
22788           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22789           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22790             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22791 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22792             BOOT_JDK_FOUND=no
22793           else
22794             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22795             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22796 
22797             # Extra M4 quote needed to protect [] in grep expression.
22798             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22799             if test "x$FOUND_CORRECT_VERSION" = x; then
22800               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22802               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22803 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22804               BOOT_JDK_FOUND=no
22805             else
22806               # We're done! :-)
22807               BOOT_JDK_FOUND=yes
22808 
22809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22810 
22811   # Input might be given as Windows format, start by converting to
22812   # unix format.
22813   path="$BOOT_JDK"
22814   new_path=`$CYGPATH -u "$path"`
22815 
22816   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22817   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22818   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22819   # "foo.exe" is OK but "foo" is an error.
22820   #
22821   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22822   # It is also a way to make sure we got the proper file name for the real test later on.
22823   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22824   if test "x$test_shortpath" = x; then
22825     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22826 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22827     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22828   fi
22829 
22830   # Call helper function which possibly converts this using DOS-style short mode.
22831   # If so, the updated path is stored in $new_path.
22832 
22833   input_path="$new_path"
22834   # Check if we need to convert this using DOS-style short mode. If the path
22835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22836   # take no chances and rewrite it.
22837   # Note: m4 eats our [], so we need to use [ and ] instead.
22838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22839   if test "x$has_forbidden_chars" != x; then
22840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22841     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22842     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22843     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22844       # Going to short mode and back again did indeed matter. Since short mode is
22845       # case insensitive, let's make it lowercase to improve readability.
22846       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22847       # Now convert it back to Unix-stile (cygpath)
22848       input_path=`$CYGPATH -u "$shortmode_path"`
22849       new_path="$input_path"
22850     fi
22851   fi
22852 
22853   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22854   if test "x$test_cygdrive_prefix" = x; then
22855     # As a simple fix, exclude /usr/bin since it's not a real path.
22856     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22857       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22858       # a path prefixed by /cygdrive for fixpath to work.
22859       new_path="$CYGWIN_ROOT_PATH$input_path"
22860     fi
22861   fi
22862 
22863 
22864   if test "x$path" != "x$new_path"; then
22865     BOOT_JDK="$new_path"
22866     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22867 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22868   fi
22869 
22870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22871 
22872   path="$BOOT_JDK"
22873   has_colon=`$ECHO $path | $GREP ^.:`
22874   new_path="$path"
22875   if test "x$has_colon" = x; then
22876     # Not in mixed or Windows style, start by that.
22877     new_path=`cmd //c echo $path`
22878   fi
22879 
22880 
22881   input_path="$new_path"
22882   # Check if we need to convert this using DOS-style short mode. If the path
22883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22884   # take no chances and rewrite it.
22885   # Note: m4 eats our [], so we need to use [ and ] instead.
22886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22887   if test "x$has_forbidden_chars" != x; then
22888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22889     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22890   fi
22891 
22892 
22893   windows_path="$new_path"
22894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22895     unix_path=`$CYGPATH -u "$windows_path"`
22896     new_path="$unix_path"
22897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22899     new_path="$unix_path"
22900   fi
22901 
22902   if test "x$path" != "x$new_path"; then
22903     BOOT_JDK="$new_path"
22904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22905 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22906   fi
22907 
22908   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22909   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22910 
22911   else
22912     # We're on a posix platform. Hooray! :)
22913     path="$BOOT_JDK"
22914     has_space=`$ECHO "$path" | $GREP " "`
22915     if test "x$has_space" != x; then
22916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22918       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22919     fi
22920 
22921     # Use eval to expand a potential ~
22922     eval path="$path"
22923     if test ! -f "$path" && test ! -d "$path"; then
22924       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22925     fi
22926 
22927     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22928   fi
22929 
22930               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22931 $as_echo_n "checking for Boot JDK... " >&6; }
22932               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22933 $as_echo "$BOOT_JDK" >&6; }
22934               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22935 $as_echo_n "checking Boot JDK version... " >&6; }
22936               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22937               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22938 $as_echo "$BOOT_JDK_VERSION" >&6; }
22939             fi # end check jdk version
22940           fi # end check rt.jar
22941         fi # end check javac
22942       fi # end check java
22943     fi # end check boot jdk found
22944   fi
22945 
22946     done
22947   fi
22948 
22949   fi
22950 
22951 
22952     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22953     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22954       # Do we have a bin/java?
22955       if test ! -x "$BOOT_JDK/bin/java"; then
22956         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22958         BOOT_JDK_FOUND=no
22959       else
22960         # Do we have a bin/javac?
22961         if test ! -x "$BOOT_JDK/bin/javac"; then
22962           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22964           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22965 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22966           BOOT_JDK_FOUND=no
22967         else
22968           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22969           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22970             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22972             BOOT_JDK_FOUND=no
22973           else
22974             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22975             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22976 
22977             # Extra M4 quote needed to protect [] in grep expression.
22978             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22979             if test "x$FOUND_CORRECT_VERSION" = x; then
22980               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22982               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22983 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22984               BOOT_JDK_FOUND=no
22985             else
22986               # We're done! :-)
22987               BOOT_JDK_FOUND=yes
22988 
22989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22990 
22991   # Input might be given as Windows format, start by converting to
22992   # unix format.
22993   path="$BOOT_JDK"
22994   new_path=`$CYGPATH -u "$path"`
22995 
22996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22999   # "foo.exe" is OK but "foo" is an error.
23000   #
23001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23002   # It is also a way to make sure we got the proper file name for the real test later on.
23003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23004   if test "x$test_shortpath" = x; then
23005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23008   fi
23009 
23010   # Call helper function which possibly converts this using DOS-style short mode.
23011   # If so, the updated path is stored in $new_path.
23012 
23013   input_path="$new_path"
23014   # Check if we need to convert this using DOS-style short mode. If the path
23015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23016   # take no chances and rewrite it.
23017   # Note: m4 eats our [], so we need to use [ and ] instead.
23018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23019   if test "x$has_forbidden_chars" != x; then
23020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23024       # Going to short mode and back again did indeed matter. Since short mode is
23025       # case insensitive, let's make it lowercase to improve readability.
23026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23027       # Now convert it back to Unix-stile (cygpath)
23028       input_path=`$CYGPATH -u "$shortmode_path"`
23029       new_path="$input_path"
23030     fi
23031   fi
23032 
23033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23034   if test "x$test_cygdrive_prefix" = x; then
23035     # As a simple fix, exclude /usr/bin since it's not a real path.
23036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23038       # a path prefixed by /cygdrive for fixpath to work.
23039       new_path="$CYGWIN_ROOT_PATH$input_path"
23040     fi
23041   fi
23042 
23043 
23044   if test "x$path" != "x$new_path"; then
23045     BOOT_JDK="$new_path"
23046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23048   fi
23049 
23050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23051 
23052   path="$BOOT_JDK"
23053   has_colon=`$ECHO $path | $GREP ^.:`
23054   new_path="$path"
23055   if test "x$has_colon" = x; then
23056     # Not in mixed or Windows style, start by that.
23057     new_path=`cmd //c echo $path`
23058   fi
23059 
23060 
23061   input_path="$new_path"
23062   # Check if we need to convert this using DOS-style short mode. If the path
23063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23064   # take no chances and rewrite it.
23065   # Note: m4 eats our [], so we need to use [ and ] instead.
23066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23067   if test "x$has_forbidden_chars" != x; then
23068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23070   fi
23071 
23072 
23073   windows_path="$new_path"
23074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23075     unix_path=`$CYGPATH -u "$windows_path"`
23076     new_path="$unix_path"
23077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23079     new_path="$unix_path"
23080   fi
23081 
23082   if test "x$path" != "x$new_path"; then
23083     BOOT_JDK="$new_path"
23084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23086   fi
23087 
23088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23090 
23091   else
23092     # We're on a posix platform. Hooray! :)
23093     path="$BOOT_JDK"
23094     has_space=`$ECHO "$path" | $GREP " "`
23095     if test "x$has_space" != x; then
23096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23098       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23099     fi
23100 
23101     # Use eval to expand a potential ~
23102     eval path="$path"
23103     if test ! -f "$path" && test ! -d "$path"; then
23104       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23105     fi
23106 
23107     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23108   fi
23109 
23110               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23111 $as_echo_n "checking for Boot JDK... " >&6; }
23112               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23113 $as_echo "$BOOT_JDK" >&6; }
23114               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23115 $as_echo_n "checking Boot JDK version... " >&6; }
23116               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23117               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23118 $as_echo "$BOOT_JDK_VERSION" >&6; }
23119             fi # end check jdk version
23120           fi # end check rt.jar
23121         fi # end check javac
23122       fi # end check java
23123     fi # end check boot jdk found
23124   fi
23125 
23126 
23127   if test "x$BOOT_JDK_FOUND" = xno; then
23128     # Now execute the test
23129 
23130   if test "x$ProgramFiles" != x; then
23131     VIRTUAL_DIR="$ProgramFiles/Java"
23132 
23133   windows_path="$VIRTUAL_DIR"
23134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23135     unix_path=`$CYGPATH -u "$windows_path"`
23136     VIRTUAL_DIR="$unix_path"
23137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23139     VIRTUAL_DIR="$unix_path"
23140   fi
23141 
23142 
23143   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23144   BOOT_JDK_SUFFIX=""
23145   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23146   if test "x$ALL_JDKS_FOUND" != x; then
23147     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23148 
23149   if test "x$BOOT_JDK_FOUND" = xno; then
23150     # Now execute the test
23151 
23152         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23153         if test -d "$BOOT_JDK"; then
23154           BOOT_JDK_FOUND=maybe
23155           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23156 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23157         fi
23158 
23159 
23160     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23161     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23162       # Do we have a bin/java?
23163       if test ! -x "$BOOT_JDK/bin/java"; then
23164         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23165 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23166         BOOT_JDK_FOUND=no
23167       else
23168         # Do we have a bin/javac?
23169         if test ! -x "$BOOT_JDK/bin/javac"; then
23170           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23171 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23172           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23173 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23174           BOOT_JDK_FOUND=no
23175         else
23176           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23177           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23178             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23180             BOOT_JDK_FOUND=no
23181           else
23182             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23183             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23184 
23185             # Extra M4 quote needed to protect [] in grep expression.
23186             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23187             if test "x$FOUND_CORRECT_VERSION" = x; then
23188               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23189 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23190               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23191 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23192               BOOT_JDK_FOUND=no
23193             else
23194               # We're done! :-)
23195               BOOT_JDK_FOUND=yes
23196 
23197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23198 
23199   # Input might be given as Windows format, start by converting to
23200   # unix format.
23201   path="$BOOT_JDK"
23202   new_path=`$CYGPATH -u "$path"`
23203 
23204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23207   # "foo.exe" is OK but "foo" is an error.
23208   #
23209   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23210   # It is also a way to make sure we got the proper file name for the real test later on.
23211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23212   if test "x$test_shortpath" = x; then
23213     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23214 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23215     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23216   fi
23217 
23218   # Call helper function which possibly converts this using DOS-style short mode.
23219   # If so, the updated path is stored in $new_path.
23220 
23221   input_path="$new_path"
23222   # Check if we need to convert this using DOS-style short mode. If the path
23223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23224   # take no chances and rewrite it.
23225   # Note: m4 eats our [], so we need to use [ and ] instead.
23226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23227   if test "x$has_forbidden_chars" != x; then
23228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23229     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23230     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23231     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23232       # Going to short mode and back again did indeed matter. Since short mode is
23233       # case insensitive, let's make it lowercase to improve readability.
23234       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23235       # Now convert it back to Unix-stile (cygpath)
23236       input_path=`$CYGPATH -u "$shortmode_path"`
23237       new_path="$input_path"
23238     fi
23239   fi
23240 
23241   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23242   if test "x$test_cygdrive_prefix" = x; then
23243     # As a simple fix, exclude /usr/bin since it's not a real path.
23244     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23245       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23246       # a path prefixed by /cygdrive for fixpath to work.
23247       new_path="$CYGWIN_ROOT_PATH$input_path"
23248     fi
23249   fi
23250 
23251 
23252   if test "x$path" != "x$new_path"; then
23253     BOOT_JDK="$new_path"
23254     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23255 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23256   fi
23257 
23258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23259 
23260   path="$BOOT_JDK"
23261   has_colon=`$ECHO $path | $GREP ^.:`
23262   new_path="$path"
23263   if test "x$has_colon" = x; then
23264     # Not in mixed or Windows style, start by that.
23265     new_path=`cmd //c echo $path`
23266   fi
23267 
23268 
23269   input_path="$new_path"
23270   # Check if we need to convert this using DOS-style short mode. If the path
23271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23272   # take no chances and rewrite it.
23273   # Note: m4 eats our [], so we need to use [ and ] instead.
23274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23275   if test "x$has_forbidden_chars" != x; then
23276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23278   fi
23279 
23280 
23281   windows_path="$new_path"
23282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23283     unix_path=`$CYGPATH -u "$windows_path"`
23284     new_path="$unix_path"
23285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23287     new_path="$unix_path"
23288   fi
23289 
23290   if test "x$path" != "x$new_path"; then
23291     BOOT_JDK="$new_path"
23292     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23293 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23294   fi
23295 
23296   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23297   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23298 
23299   else
23300     # We're on a posix platform. Hooray! :)
23301     path="$BOOT_JDK"
23302     has_space=`$ECHO "$path" | $GREP " "`
23303     if test "x$has_space" != x; then
23304       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23305 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23306       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23307     fi
23308 
23309     # Use eval to expand a potential ~
23310     eval path="$path"
23311     if test ! -f "$path" && test ! -d "$path"; then
23312       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23313     fi
23314 
23315     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23316   fi
23317 
23318               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23319 $as_echo_n "checking for Boot JDK... " >&6; }
23320               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23321 $as_echo "$BOOT_JDK" >&6; }
23322               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23323 $as_echo_n "checking Boot JDK version... " >&6; }
23324               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23325               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23326 $as_echo "$BOOT_JDK_VERSION" >&6; }
23327             fi # end check jdk version
23328           fi # end check rt.jar
23329         fi # end check javac
23330       fi # end check java
23331     fi # end check boot jdk found
23332   fi
23333 
23334     done
23335   fi
23336 
23337   fi
23338 
23339 
23340     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23341     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23342       # Do we have a bin/java?
23343       if test ! -x "$BOOT_JDK/bin/java"; then
23344         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23346         BOOT_JDK_FOUND=no
23347       else
23348         # Do we have a bin/javac?
23349         if test ! -x "$BOOT_JDK/bin/javac"; then
23350           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23351 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23352           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23353 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23354           BOOT_JDK_FOUND=no
23355         else
23356           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23357           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23358             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23360             BOOT_JDK_FOUND=no
23361           else
23362             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23363             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23364 
23365             # Extra M4 quote needed to protect [] in grep expression.
23366             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23367             if test "x$FOUND_CORRECT_VERSION" = x; then
23368               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23370               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23371 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23372               BOOT_JDK_FOUND=no
23373             else
23374               # We're done! :-)
23375               BOOT_JDK_FOUND=yes
23376 
23377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23378 
23379   # Input might be given as Windows format, start by converting to
23380   # unix format.
23381   path="$BOOT_JDK"
23382   new_path=`$CYGPATH -u "$path"`
23383 
23384   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23385   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23386   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23387   # "foo.exe" is OK but "foo" is an error.
23388   #
23389   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23390   # It is also a way to make sure we got the proper file name for the real test later on.
23391   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23392   if test "x$test_shortpath" = x; then
23393     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23394 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23395     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23396   fi
23397 
23398   # Call helper function which possibly converts this using DOS-style short mode.
23399   # If so, the updated path is stored in $new_path.
23400 
23401   input_path="$new_path"
23402   # Check if we need to convert this using DOS-style short mode. If the path
23403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23404   # take no chances and rewrite it.
23405   # Note: m4 eats our [], so we need to use [ and ] instead.
23406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23407   if test "x$has_forbidden_chars" != x; then
23408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23409     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23410     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23411     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23412       # Going to short mode and back again did indeed matter. Since short mode is
23413       # case insensitive, let's make it lowercase to improve readability.
23414       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23415       # Now convert it back to Unix-stile (cygpath)
23416       input_path=`$CYGPATH -u "$shortmode_path"`
23417       new_path="$input_path"
23418     fi
23419   fi
23420 
23421   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23422   if test "x$test_cygdrive_prefix" = x; then
23423     # As a simple fix, exclude /usr/bin since it's not a real path.
23424     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23425       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23426       # a path prefixed by /cygdrive for fixpath to work.
23427       new_path="$CYGWIN_ROOT_PATH$input_path"
23428     fi
23429   fi
23430 
23431 
23432   if test "x$path" != "x$new_path"; then
23433     BOOT_JDK="$new_path"
23434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23435 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23436   fi
23437 
23438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23439 
23440   path="$BOOT_JDK"
23441   has_colon=`$ECHO $path | $GREP ^.:`
23442   new_path="$path"
23443   if test "x$has_colon" = x; then
23444     # Not in mixed or Windows style, start by that.
23445     new_path=`cmd //c echo $path`
23446   fi
23447 
23448 
23449   input_path="$new_path"
23450   # Check if we need to convert this using DOS-style short mode. If the path
23451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23452   # take no chances and rewrite it.
23453   # Note: m4 eats our [], so we need to use [ and ] instead.
23454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23455   if test "x$has_forbidden_chars" != x; then
23456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23457     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23458   fi
23459 
23460 
23461   windows_path="$new_path"
23462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23463     unix_path=`$CYGPATH -u "$windows_path"`
23464     new_path="$unix_path"
23465   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23466     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23467     new_path="$unix_path"
23468   fi
23469 
23470   if test "x$path" != "x$new_path"; then
23471     BOOT_JDK="$new_path"
23472     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23473 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23474   fi
23475 
23476   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23477   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23478 
23479   else
23480     # We're on a posix platform. Hooray! :)
23481     path="$BOOT_JDK"
23482     has_space=`$ECHO "$path" | $GREP " "`
23483     if test "x$has_space" != x; then
23484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23485 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23486       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23487     fi
23488 
23489     # Use eval to expand a potential ~
23490     eval path="$path"
23491     if test ! -f "$path" && test ! -d "$path"; then
23492       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23493     fi
23494 
23495     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23496   fi
23497 
23498               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23499 $as_echo_n "checking for Boot JDK... " >&6; }
23500               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23501 $as_echo "$BOOT_JDK" >&6; }
23502               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23503 $as_echo_n "checking Boot JDK version... " >&6; }
23504               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23505               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23506 $as_echo "$BOOT_JDK_VERSION" >&6; }
23507             fi # end check jdk version
23508           fi # end check rt.jar
23509         fi # end check javac
23510       fi # end check java
23511     fi # end check boot jdk found
23512   fi
23513 
23514 
23515   if test "x$BOOT_JDK_FOUND" = xno; then
23516     # Now execute the test
23517 
23518   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23519   BOOT_JDK_SUFFIX=""
23520   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23521   if test "x$ALL_JDKS_FOUND" != x; then
23522     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23523 
23524   if test "x$BOOT_JDK_FOUND" = xno; then
23525     # Now execute the test
23526 
23527         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23528         if test -d "$BOOT_JDK"; then
23529           BOOT_JDK_FOUND=maybe
23530           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23531 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23532         fi
23533 
23534 
23535     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23536     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23537       # Do we have a bin/java?
23538       if test ! -x "$BOOT_JDK/bin/java"; then
23539         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23541         BOOT_JDK_FOUND=no
23542       else
23543         # Do we have a bin/javac?
23544         if test ! -x "$BOOT_JDK/bin/javac"; then
23545           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23546 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23547           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23548 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23549           BOOT_JDK_FOUND=no
23550         else
23551           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23552           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23553             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23554 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23555             BOOT_JDK_FOUND=no
23556           else
23557             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23558             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23559 
23560             # Extra M4 quote needed to protect [] in grep expression.
23561             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23562             if test "x$FOUND_CORRECT_VERSION" = x; then
23563               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23565               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23566 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23567               BOOT_JDK_FOUND=no
23568             else
23569               # We're done! :-)
23570               BOOT_JDK_FOUND=yes
23571 
23572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23573 
23574   # Input might be given as Windows format, start by converting to
23575   # unix format.
23576   path="$BOOT_JDK"
23577   new_path=`$CYGPATH -u "$path"`
23578 
23579   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23580   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23581   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23582   # "foo.exe" is OK but "foo" is an error.
23583   #
23584   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23585   # It is also a way to make sure we got the proper file name for the real test later on.
23586   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23587   if test "x$test_shortpath" = x; then
23588     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23589 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23590     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23591   fi
23592 
23593   # Call helper function which possibly converts this using DOS-style short mode.
23594   # If so, the updated path is stored in $new_path.
23595 
23596   input_path="$new_path"
23597   # Check if we need to convert this using DOS-style short mode. If the path
23598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23599   # take no chances and rewrite it.
23600   # Note: m4 eats our [], so we need to use [ and ] instead.
23601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23602   if test "x$has_forbidden_chars" != x; then
23603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23604     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23605     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23606     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23607       # Going to short mode and back again did indeed matter. Since short mode is
23608       # case insensitive, let's make it lowercase to improve readability.
23609       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23610       # Now convert it back to Unix-stile (cygpath)
23611       input_path=`$CYGPATH -u "$shortmode_path"`
23612       new_path="$input_path"
23613     fi
23614   fi
23615 
23616   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23617   if test "x$test_cygdrive_prefix" = x; then
23618     # As a simple fix, exclude /usr/bin since it's not a real path.
23619     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23620       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23621       # a path prefixed by /cygdrive for fixpath to work.
23622       new_path="$CYGWIN_ROOT_PATH$input_path"
23623     fi
23624   fi
23625 
23626 
23627   if test "x$path" != "x$new_path"; then
23628     BOOT_JDK="$new_path"
23629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23630 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23631   fi
23632 
23633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23634 
23635   path="$BOOT_JDK"
23636   has_colon=`$ECHO $path | $GREP ^.:`
23637   new_path="$path"
23638   if test "x$has_colon" = x; then
23639     # Not in mixed or Windows style, start by that.
23640     new_path=`cmd //c echo $path`
23641   fi
23642 
23643 
23644   input_path="$new_path"
23645   # Check if we need to convert this using DOS-style short mode. If the path
23646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23647   # take no chances and rewrite it.
23648   # Note: m4 eats our [], so we need to use [ and ] instead.
23649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23650   if test "x$has_forbidden_chars" != x; then
23651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23653   fi
23654 
23655 
23656   windows_path="$new_path"
23657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658     unix_path=`$CYGPATH -u "$windows_path"`
23659     new_path="$unix_path"
23660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23662     new_path="$unix_path"
23663   fi
23664 
23665   if test "x$path" != "x$new_path"; then
23666     BOOT_JDK="$new_path"
23667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23668 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23669   fi
23670 
23671   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23672   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23673 
23674   else
23675     # We're on a posix platform. Hooray! :)
23676     path="$BOOT_JDK"
23677     has_space=`$ECHO "$path" | $GREP " "`
23678     if test "x$has_space" != x; then
23679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23680 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23681       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23682     fi
23683 
23684     # Use eval to expand a potential ~
23685     eval path="$path"
23686     if test ! -f "$path" && test ! -d "$path"; then
23687       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23688     fi
23689 
23690     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23691   fi
23692 
23693               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23694 $as_echo_n "checking for Boot JDK... " >&6; }
23695               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23696 $as_echo "$BOOT_JDK" >&6; }
23697               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23698 $as_echo_n "checking Boot JDK version... " >&6; }
23699               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23700               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23701 $as_echo "$BOOT_JDK_VERSION" >&6; }
23702             fi # end check jdk version
23703           fi # end check rt.jar
23704         fi # end check javac
23705       fi # end check java
23706     fi # end check boot jdk found
23707   fi
23708 
23709     done
23710   fi
23711 
23712 
23713     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23714     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23715       # Do we have a bin/java?
23716       if test ! -x "$BOOT_JDK/bin/java"; then
23717         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23719         BOOT_JDK_FOUND=no
23720       else
23721         # Do we have a bin/javac?
23722         if test ! -x "$BOOT_JDK/bin/javac"; then
23723           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23725           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23726 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23727           BOOT_JDK_FOUND=no
23728         else
23729           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23730           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23731             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23733             BOOT_JDK_FOUND=no
23734           else
23735             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23736             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23737 
23738             # Extra M4 quote needed to protect [] in grep expression.
23739             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23740             if test "x$FOUND_CORRECT_VERSION" = x; then
23741               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23743               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23744 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23745               BOOT_JDK_FOUND=no
23746             else
23747               # We're done! :-)
23748               BOOT_JDK_FOUND=yes
23749 
23750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23751 
23752   # Input might be given as Windows format, start by converting to
23753   # unix format.
23754   path="$BOOT_JDK"
23755   new_path=`$CYGPATH -u "$path"`
23756 
23757   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23758   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23759   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23760   # "foo.exe" is OK but "foo" is an error.
23761   #
23762   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23763   # It is also a way to make sure we got the proper file name for the real test later on.
23764   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23765   if test "x$test_shortpath" = x; then
23766     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23767 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23768     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23769   fi
23770 
23771   # Call helper function which possibly converts this using DOS-style short mode.
23772   # If so, the updated path is stored in $new_path.
23773 
23774   input_path="$new_path"
23775   # Check if we need to convert this using DOS-style short mode. If the path
23776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23777   # take no chances and rewrite it.
23778   # Note: m4 eats our [], so we need to use [ and ] instead.
23779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23780   if test "x$has_forbidden_chars" != x; then
23781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23782     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23783     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23784     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23785       # Going to short mode and back again did indeed matter. Since short mode is
23786       # case insensitive, let's make it lowercase to improve readability.
23787       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23788       # Now convert it back to Unix-stile (cygpath)
23789       input_path=`$CYGPATH -u "$shortmode_path"`
23790       new_path="$input_path"
23791     fi
23792   fi
23793 
23794   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23795   if test "x$test_cygdrive_prefix" = x; then
23796     # As a simple fix, exclude /usr/bin since it's not a real path.
23797     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23798       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23799       # a path prefixed by /cygdrive for fixpath to work.
23800       new_path="$CYGWIN_ROOT_PATH$input_path"
23801     fi
23802   fi
23803 
23804 
23805   if test "x$path" != "x$new_path"; then
23806     BOOT_JDK="$new_path"
23807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23808 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23809   fi
23810 
23811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23812 
23813   path="$BOOT_JDK"
23814   has_colon=`$ECHO $path | $GREP ^.:`
23815   new_path="$path"
23816   if test "x$has_colon" = x; then
23817     # Not in mixed or Windows style, start by that.
23818     new_path=`cmd //c echo $path`
23819   fi
23820 
23821 
23822   input_path="$new_path"
23823   # Check if we need to convert this using DOS-style short mode. If the path
23824   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825   # take no chances and rewrite it.
23826   # Note: m4 eats our [], so we need to use [ and ] instead.
23827   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23828   if test "x$has_forbidden_chars" != x; then
23829     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831   fi
23832 
23833 
23834   windows_path="$new_path"
23835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23836     unix_path=`$CYGPATH -u "$windows_path"`
23837     new_path="$unix_path"
23838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23840     new_path="$unix_path"
23841   fi
23842 
23843   if test "x$path" != "x$new_path"; then
23844     BOOT_JDK="$new_path"
23845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23846 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23847   fi
23848 
23849   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23850   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23851 
23852   else
23853     # We're on a posix platform. Hooray! :)
23854     path="$BOOT_JDK"
23855     has_space=`$ECHO "$path" | $GREP " "`
23856     if test "x$has_space" != x; then
23857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23858 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23859       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23860     fi
23861 
23862     # Use eval to expand a potential ~
23863     eval path="$path"
23864     if test ! -f "$path" && test ! -d "$path"; then
23865       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23866     fi
23867 
23868     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23869   fi
23870 
23871               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23872 $as_echo_n "checking for Boot JDK... " >&6; }
23873               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23874 $as_echo "$BOOT_JDK" >&6; }
23875               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23876 $as_echo_n "checking Boot JDK version... " >&6; }
23877               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23878               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23879 $as_echo "$BOOT_JDK_VERSION" >&6; }
23880             fi # end check jdk version
23881           fi # end check rt.jar
23882         fi # end check javac
23883       fi # end check java
23884     fi # end check boot jdk found
23885   fi
23886 
23887   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23888 
23889   if test "x$BOOT_JDK_FOUND" = xno; then
23890     # Now execute the test
23891 
23892   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23893   BOOT_JDK_SUFFIX="/Contents/Home"
23894   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23895   if test "x$ALL_JDKS_FOUND" != x; then
23896     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23897 
23898   if test "x$BOOT_JDK_FOUND" = xno; then
23899     # Now execute the test
23900 
23901         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23902         if test -d "$BOOT_JDK"; then
23903           BOOT_JDK_FOUND=maybe
23904           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23905 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23906         fi
23907 
23908 
23909     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23910     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23911       # Do we have a bin/java?
23912       if test ! -x "$BOOT_JDK/bin/java"; then
23913         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23914 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23915         BOOT_JDK_FOUND=no
23916       else
23917         # Do we have a bin/javac?
23918         if test ! -x "$BOOT_JDK/bin/javac"; then
23919           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23920 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23921           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23922 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23923           BOOT_JDK_FOUND=no
23924         else
23925           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23926           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23927             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23929             BOOT_JDK_FOUND=no
23930           else
23931             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23932             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23933 
23934             # Extra M4 quote needed to protect [] in grep expression.
23935             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23936             if test "x$FOUND_CORRECT_VERSION" = x; then
23937               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23938 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23939               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23940 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23941               BOOT_JDK_FOUND=no
23942             else
23943               # We're done! :-)
23944               BOOT_JDK_FOUND=yes
23945 
23946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23947 
23948   # Input might be given as Windows format, start by converting to
23949   # unix format.
23950   path="$BOOT_JDK"
23951   new_path=`$CYGPATH -u "$path"`
23952 
23953   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23954   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23955   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23956   # "foo.exe" is OK but "foo" is an error.
23957   #
23958   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23959   # It is also a way to make sure we got the proper file name for the real test later on.
23960   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23961   if test "x$test_shortpath" = x; then
23962     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23964     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23965   fi
23966 
23967   # Call helper function which possibly converts this using DOS-style short mode.
23968   # If so, the updated path is stored in $new_path.
23969 
23970   input_path="$new_path"
23971   # Check if we need to convert this using DOS-style short mode. If the path
23972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23973   # take no chances and rewrite it.
23974   # Note: m4 eats our [], so we need to use [ and ] instead.
23975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23976   if test "x$has_forbidden_chars" != x; then
23977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23981       # Going to short mode and back again did indeed matter. Since short mode is
23982       # case insensitive, let's make it lowercase to improve readability.
23983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23984       # Now convert it back to Unix-stile (cygpath)
23985       input_path=`$CYGPATH -u "$shortmode_path"`
23986       new_path="$input_path"
23987     fi
23988   fi
23989 
23990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23991   if test "x$test_cygdrive_prefix" = x; then
23992     # As a simple fix, exclude /usr/bin since it's not a real path.
23993     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23995       # a path prefixed by /cygdrive for fixpath to work.
23996       new_path="$CYGWIN_ROOT_PATH$input_path"
23997     fi
23998   fi
23999 
24000 
24001   if test "x$path" != "x$new_path"; then
24002     BOOT_JDK="$new_path"
24003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24004 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24005   fi
24006 
24007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24008 
24009   path="$BOOT_JDK"
24010   has_colon=`$ECHO $path | $GREP ^.:`
24011   new_path="$path"
24012   if test "x$has_colon" = x; then
24013     # Not in mixed or Windows style, start by that.
24014     new_path=`cmd //c echo $path`
24015   fi
24016 
24017 
24018   input_path="$new_path"
24019   # Check if we need to convert this using DOS-style short mode. If the path
24020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24021   # take no chances and rewrite it.
24022   # Note: m4 eats our [], so we need to use [ and ] instead.
24023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24024   if test "x$has_forbidden_chars" != x; then
24025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24027   fi
24028 
24029 
24030   windows_path="$new_path"
24031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24032     unix_path=`$CYGPATH -u "$windows_path"`
24033     new_path="$unix_path"
24034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24036     new_path="$unix_path"
24037   fi
24038 
24039   if test "x$path" != "x$new_path"; then
24040     BOOT_JDK="$new_path"
24041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24042 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24043   fi
24044 
24045   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24046   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24047 
24048   else
24049     # We're on a posix platform. Hooray! :)
24050     path="$BOOT_JDK"
24051     has_space=`$ECHO "$path" | $GREP " "`
24052     if test "x$has_space" != x; then
24053       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24054 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24055       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24056     fi
24057 
24058     # Use eval to expand a potential ~
24059     eval path="$path"
24060     if test ! -f "$path" && test ! -d "$path"; then
24061       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24062     fi
24063 
24064     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24065   fi
24066 
24067               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24068 $as_echo_n "checking for Boot JDK... " >&6; }
24069               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24070 $as_echo "$BOOT_JDK" >&6; }
24071               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24072 $as_echo_n "checking Boot JDK version... " >&6; }
24073               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24074               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24075 $as_echo "$BOOT_JDK_VERSION" >&6; }
24076             fi # end check jdk version
24077           fi # end check rt.jar
24078         fi # end check javac
24079       fi # end check java
24080     fi # end check boot jdk found
24081   fi
24082 
24083     done
24084   fi
24085 
24086 
24087     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24088     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24089       # Do we have a bin/java?
24090       if test ! -x "$BOOT_JDK/bin/java"; then
24091         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24093         BOOT_JDK_FOUND=no
24094       else
24095         # Do we have a bin/javac?
24096         if test ! -x "$BOOT_JDK/bin/javac"; then
24097           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24099           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24100 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24101           BOOT_JDK_FOUND=no
24102         else
24103           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24104           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24105             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24106 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24107             BOOT_JDK_FOUND=no
24108           else
24109             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24110             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24111 
24112             # Extra M4 quote needed to protect [] in grep expression.
24113             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24114             if test "x$FOUND_CORRECT_VERSION" = x; then
24115               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24116 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24117               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24118 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24119               BOOT_JDK_FOUND=no
24120             else
24121               # We're done! :-)
24122               BOOT_JDK_FOUND=yes
24123 
24124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24125 
24126   # Input might be given as Windows format, start by converting to
24127   # unix format.
24128   path="$BOOT_JDK"
24129   new_path=`$CYGPATH -u "$path"`
24130 
24131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24134   # "foo.exe" is OK but "foo" is an error.
24135   #
24136   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24137   # It is also a way to make sure we got the proper file name for the real test later on.
24138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24139   if test "x$test_shortpath" = x; then
24140     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24142     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24143   fi
24144 
24145   # Call helper function which possibly converts this using DOS-style short mode.
24146   # If so, the updated path is stored in $new_path.
24147 
24148   input_path="$new_path"
24149   # Check if we need to convert this using DOS-style short mode. If the path
24150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24151   # take no chances and rewrite it.
24152   # Note: m4 eats our [], so we need to use [ and ] instead.
24153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24154   if test "x$has_forbidden_chars" != x; then
24155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24159       # Going to short mode and back again did indeed matter. Since short mode is
24160       # case insensitive, let's make it lowercase to improve readability.
24161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24162       # Now convert it back to Unix-stile (cygpath)
24163       input_path=`$CYGPATH -u "$shortmode_path"`
24164       new_path="$input_path"
24165     fi
24166   fi
24167 
24168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24169   if test "x$test_cygdrive_prefix" = x; then
24170     # As a simple fix, exclude /usr/bin since it's not a real path.
24171     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24173       # a path prefixed by /cygdrive for fixpath to work.
24174       new_path="$CYGWIN_ROOT_PATH$input_path"
24175     fi
24176   fi
24177 
24178 
24179   if test "x$path" != "x$new_path"; then
24180     BOOT_JDK="$new_path"
24181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24182 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24183   fi
24184 
24185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24186 
24187   path="$BOOT_JDK"
24188   has_colon=`$ECHO $path | $GREP ^.:`
24189   new_path="$path"
24190   if test "x$has_colon" = x; then
24191     # Not in mixed or Windows style, start by that.
24192     new_path=`cmd //c echo $path`
24193   fi
24194 
24195 
24196   input_path="$new_path"
24197   # Check if we need to convert this using DOS-style short mode. If the path
24198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24199   # take no chances and rewrite it.
24200   # Note: m4 eats our [], so we need to use [ and ] instead.
24201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24202   if test "x$has_forbidden_chars" != x; then
24203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24204     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24205   fi
24206 
24207 
24208   windows_path="$new_path"
24209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24210     unix_path=`$CYGPATH -u "$windows_path"`
24211     new_path="$unix_path"
24212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24214     new_path="$unix_path"
24215   fi
24216 
24217   if test "x$path" != "x$new_path"; then
24218     BOOT_JDK="$new_path"
24219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24220 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24221   fi
24222 
24223   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24224   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24225 
24226   else
24227     # We're on a posix platform. Hooray! :)
24228     path="$BOOT_JDK"
24229     has_space=`$ECHO "$path" | $GREP " "`
24230     if test "x$has_space" != x; then
24231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24233       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24234     fi
24235 
24236     # Use eval to expand a potential ~
24237     eval path="$path"
24238     if test ! -f "$path" && test ! -d "$path"; then
24239       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24240     fi
24241 
24242     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24243   fi
24244 
24245               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24246 $as_echo_n "checking for Boot JDK... " >&6; }
24247               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24248 $as_echo "$BOOT_JDK" >&6; }
24249               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24250 $as_echo_n "checking Boot JDK version... " >&6; }
24251               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24252               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24253 $as_echo "$BOOT_JDK_VERSION" >&6; }
24254             fi # end check jdk version
24255           fi # end check rt.jar
24256         fi # end check javac
24257       fi # end check java
24258     fi # end check boot jdk found
24259   fi
24260 
24261 
24262   if test "x$BOOT_JDK_FOUND" = xno; then
24263     # Now execute the test
24264 
24265   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24266   BOOT_JDK_SUFFIX="/Contents/Home"
24267   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24268   if test "x$ALL_JDKS_FOUND" != x; then
24269     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24270 
24271   if test "x$BOOT_JDK_FOUND" = xno; then
24272     # Now execute the test
24273 
24274         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24275         if test -d "$BOOT_JDK"; then
24276           BOOT_JDK_FOUND=maybe
24277           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24278 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24279         fi
24280 
24281 
24282     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24283     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24284       # Do we have a bin/java?
24285       if test ! -x "$BOOT_JDK/bin/java"; then
24286         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24287 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24288         BOOT_JDK_FOUND=no
24289       else
24290         # Do we have a bin/javac?
24291         if test ! -x "$BOOT_JDK/bin/javac"; then
24292           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24293 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24294           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24295 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24296           BOOT_JDK_FOUND=no
24297         else
24298           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24299           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24300             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24301 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24302             BOOT_JDK_FOUND=no
24303           else
24304             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24305             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24306 
24307             # Extra M4 quote needed to protect [] in grep expression.
24308             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24309             if test "x$FOUND_CORRECT_VERSION" = x; then
24310               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24311 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24312               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24313 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24314               BOOT_JDK_FOUND=no
24315             else
24316               # We're done! :-)
24317               BOOT_JDK_FOUND=yes
24318 
24319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24320 
24321   # Input might be given as Windows format, start by converting to
24322   # unix format.
24323   path="$BOOT_JDK"
24324   new_path=`$CYGPATH -u "$path"`
24325 
24326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24329   # "foo.exe" is OK but "foo" is an error.
24330   #
24331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24332   # It is also a way to make sure we got the proper file name for the real test later on.
24333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24334   if test "x$test_shortpath" = x; then
24335     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24336 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24337     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24338   fi
24339 
24340   # Call helper function which possibly converts this using DOS-style short mode.
24341   # If so, the updated path is stored in $new_path.
24342 
24343   input_path="$new_path"
24344   # Check if we need to convert this using DOS-style short mode. If the path
24345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24346   # take no chances and rewrite it.
24347   # Note: m4 eats our [], so we need to use [ and ] instead.
24348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24349   if test "x$has_forbidden_chars" != x; then
24350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24354       # Going to short mode and back again did indeed matter. Since short mode is
24355       # case insensitive, let's make it lowercase to improve readability.
24356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24357       # Now convert it back to Unix-stile (cygpath)
24358       input_path=`$CYGPATH -u "$shortmode_path"`
24359       new_path="$input_path"
24360     fi
24361   fi
24362 
24363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24364   if test "x$test_cygdrive_prefix" = x; then
24365     # As a simple fix, exclude /usr/bin since it's not a real path.
24366     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24368       # a path prefixed by /cygdrive for fixpath to work.
24369       new_path="$CYGWIN_ROOT_PATH$input_path"
24370     fi
24371   fi
24372 
24373 
24374   if test "x$path" != "x$new_path"; then
24375     BOOT_JDK="$new_path"
24376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24377 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24378   fi
24379 
24380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24381 
24382   path="$BOOT_JDK"
24383   has_colon=`$ECHO $path | $GREP ^.:`
24384   new_path="$path"
24385   if test "x$has_colon" = x; then
24386     # Not in mixed or Windows style, start by that.
24387     new_path=`cmd //c echo $path`
24388   fi
24389 
24390 
24391   input_path="$new_path"
24392   # Check if we need to convert this using DOS-style short mode. If the path
24393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24394   # take no chances and rewrite it.
24395   # Note: m4 eats our [], so we need to use [ and ] instead.
24396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24397   if test "x$has_forbidden_chars" != x; then
24398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24400   fi
24401 
24402 
24403   windows_path="$new_path"
24404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24405     unix_path=`$CYGPATH -u "$windows_path"`
24406     new_path="$unix_path"
24407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24409     new_path="$unix_path"
24410   fi
24411 
24412   if test "x$path" != "x$new_path"; then
24413     BOOT_JDK="$new_path"
24414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24415 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24416   fi
24417 
24418   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24419   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24420 
24421   else
24422     # We're on a posix platform. Hooray! :)
24423     path="$BOOT_JDK"
24424     has_space=`$ECHO "$path" | $GREP " "`
24425     if test "x$has_space" != x; then
24426       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24427 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24428       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24429     fi
24430 
24431     # Use eval to expand a potential ~
24432     eval path="$path"
24433     if test ! -f "$path" && test ! -d "$path"; then
24434       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24435     fi
24436 
24437     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24438   fi
24439 
24440               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24441 $as_echo_n "checking for Boot JDK... " >&6; }
24442               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24443 $as_echo "$BOOT_JDK" >&6; }
24444               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24445 $as_echo_n "checking Boot JDK version... " >&6; }
24446               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24447               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24448 $as_echo "$BOOT_JDK_VERSION" >&6; }
24449             fi # end check jdk version
24450           fi # end check rt.jar
24451         fi # end check javac
24452       fi # end check java
24453     fi # end check boot jdk found
24454   fi
24455 
24456     done
24457   fi
24458 
24459 
24460     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24461     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24462       # Do we have a bin/java?
24463       if test ! -x "$BOOT_JDK/bin/java"; then
24464         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24465 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24466         BOOT_JDK_FOUND=no
24467       else
24468         # Do we have a bin/javac?
24469         if test ! -x "$BOOT_JDK/bin/javac"; then
24470           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24471 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24472           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24473 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24474           BOOT_JDK_FOUND=no
24475         else
24476           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24477           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24478             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24480             BOOT_JDK_FOUND=no
24481           else
24482             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24483             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24484 
24485             # Extra M4 quote needed to protect [] in grep expression.
24486             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24487             if test "x$FOUND_CORRECT_VERSION" = x; then
24488               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24489 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24490               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24491 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24492               BOOT_JDK_FOUND=no
24493             else
24494               # We're done! :-)
24495               BOOT_JDK_FOUND=yes
24496 
24497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24498 
24499   # Input might be given as Windows format, start by converting to
24500   # unix format.
24501   path="$BOOT_JDK"
24502   new_path=`$CYGPATH -u "$path"`
24503 
24504   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24505   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24506   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24507   # "foo.exe" is OK but "foo" is an error.
24508   #
24509   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24510   # It is also a way to make sure we got the proper file name for the real test later on.
24511   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24512   if test "x$test_shortpath" = x; then
24513     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24514 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24515     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24516   fi
24517 
24518   # Call helper function which possibly converts this using DOS-style short mode.
24519   # If so, the updated path is stored in $new_path.
24520 
24521   input_path="$new_path"
24522   # Check if we need to convert this using DOS-style short mode. If the path
24523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24524   # take no chances and rewrite it.
24525   # Note: m4 eats our [], so we need to use [ and ] instead.
24526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24527   if test "x$has_forbidden_chars" != x; then
24528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24529     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24530     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24531     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24532       # Going to short mode and back again did indeed matter. Since short mode is
24533       # case insensitive, let's make it lowercase to improve readability.
24534       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24535       # Now convert it back to Unix-stile (cygpath)
24536       input_path=`$CYGPATH -u "$shortmode_path"`
24537       new_path="$input_path"
24538     fi
24539   fi
24540 
24541   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24542   if test "x$test_cygdrive_prefix" = x; then
24543     # As a simple fix, exclude /usr/bin since it's not a real path.
24544     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24545       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24546       # a path prefixed by /cygdrive for fixpath to work.
24547       new_path="$CYGWIN_ROOT_PATH$input_path"
24548     fi
24549   fi
24550 
24551 
24552   if test "x$path" != "x$new_path"; then
24553     BOOT_JDK="$new_path"
24554     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24555 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24556   fi
24557 
24558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24559 
24560   path="$BOOT_JDK"
24561   has_colon=`$ECHO $path | $GREP ^.:`
24562   new_path="$path"
24563   if test "x$has_colon" = x; then
24564     # Not in mixed or Windows style, start by that.
24565     new_path=`cmd //c echo $path`
24566   fi
24567 
24568 
24569   input_path="$new_path"
24570   # Check if we need to convert this using DOS-style short mode. If the path
24571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24572   # take no chances and rewrite it.
24573   # Note: m4 eats our [], so we need to use [ and ] instead.
24574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24575   if test "x$has_forbidden_chars" != x; then
24576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24577     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24578   fi
24579 
24580 
24581   windows_path="$new_path"
24582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24583     unix_path=`$CYGPATH -u "$windows_path"`
24584     new_path="$unix_path"
24585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24587     new_path="$unix_path"
24588   fi
24589 
24590   if test "x$path" != "x$new_path"; then
24591     BOOT_JDK="$new_path"
24592     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24593 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24594   fi
24595 
24596   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24597   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24598 
24599   else
24600     # We're on a posix platform. Hooray! :)
24601     path="$BOOT_JDK"
24602     has_space=`$ECHO "$path" | $GREP " "`
24603     if test "x$has_space" != x; then
24604       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24605 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24606       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24607     fi
24608 
24609     # Use eval to expand a potential ~
24610     eval path="$path"
24611     if test ! -f "$path" && test ! -d "$path"; then
24612       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24613     fi
24614 
24615     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24616   fi
24617 
24618               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24619 $as_echo_n "checking for Boot JDK... " >&6; }
24620               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24621 $as_echo "$BOOT_JDK" >&6; }
24622               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24623 $as_echo_n "checking Boot JDK version... " >&6; }
24624               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24625               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24626 $as_echo "$BOOT_JDK_VERSION" >&6; }
24627             fi # end check jdk version
24628           fi # end check rt.jar
24629         fi # end check javac
24630       fi # end check java
24631     fi # end check boot jdk found
24632   fi
24633 
24634   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24635 
24636   if test "x$BOOT_JDK_FOUND" = xno; then
24637     # Now execute the test
24638 
24639   BOOT_JDK_PREFIX="/usr/lib/jvm"
24640   BOOT_JDK_SUFFIX=""
24641   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24642   if test "x$ALL_JDKS_FOUND" != x; then
24643     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24644 
24645   if test "x$BOOT_JDK_FOUND" = xno; then
24646     # Now execute the test
24647 
24648         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24649         if test -d "$BOOT_JDK"; then
24650           BOOT_JDK_FOUND=maybe
24651           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24652 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24653         fi
24654 
24655 
24656     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24657     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24658       # Do we have a bin/java?
24659       if test ! -x "$BOOT_JDK/bin/java"; then
24660         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24661 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24662         BOOT_JDK_FOUND=no
24663       else
24664         # Do we have a bin/javac?
24665         if test ! -x "$BOOT_JDK/bin/javac"; then
24666           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24667 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24668           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24669 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24670           BOOT_JDK_FOUND=no
24671         else
24672           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24673           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24674             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24675 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24676             BOOT_JDK_FOUND=no
24677           else
24678             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24679             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24680 
24681             # Extra M4 quote needed to protect [] in grep expression.
24682             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24683             if test "x$FOUND_CORRECT_VERSION" = x; then
24684               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24685 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24686               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24687 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24688               BOOT_JDK_FOUND=no
24689             else
24690               # We're done! :-)
24691               BOOT_JDK_FOUND=yes
24692 
24693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24694 
24695   # Input might be given as Windows format, start by converting to
24696   # unix format.
24697   path="$BOOT_JDK"
24698   new_path=`$CYGPATH -u "$path"`
24699 
24700   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24701   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24702   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24703   # "foo.exe" is OK but "foo" is an error.
24704   #
24705   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24706   # It is also a way to make sure we got the proper file name for the real test later on.
24707   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24708   if test "x$test_shortpath" = x; then
24709     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24710 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24711     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24712   fi
24713 
24714   # Call helper function which possibly converts this using DOS-style short mode.
24715   # If so, the updated path is stored in $new_path.
24716 
24717   input_path="$new_path"
24718   # Check if we need to convert this using DOS-style short mode. If the path
24719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24720   # take no chances and rewrite it.
24721   # Note: m4 eats our [], so we need to use [ and ] instead.
24722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24723   if test "x$has_forbidden_chars" != x; then
24724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24725     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24726     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24727     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24728       # Going to short mode and back again did indeed matter. Since short mode is
24729       # case insensitive, let's make it lowercase to improve readability.
24730       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24731       # Now convert it back to Unix-stile (cygpath)
24732       input_path=`$CYGPATH -u "$shortmode_path"`
24733       new_path="$input_path"
24734     fi
24735   fi
24736 
24737   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24738   if test "x$test_cygdrive_prefix" = x; then
24739     # As a simple fix, exclude /usr/bin since it's not a real path.
24740     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24741       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24742       # a path prefixed by /cygdrive for fixpath to work.
24743       new_path="$CYGWIN_ROOT_PATH$input_path"
24744     fi
24745   fi
24746 
24747 
24748   if test "x$path" != "x$new_path"; then
24749     BOOT_JDK="$new_path"
24750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24751 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24752   fi
24753 
24754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24755 
24756   path="$BOOT_JDK"
24757   has_colon=`$ECHO $path | $GREP ^.:`
24758   new_path="$path"
24759   if test "x$has_colon" = x; then
24760     # Not in mixed or Windows style, start by that.
24761     new_path=`cmd //c echo $path`
24762   fi
24763 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24774   fi
24775 
24776 
24777   windows_path="$new_path"
24778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24779     unix_path=`$CYGPATH -u "$windows_path"`
24780     new_path="$unix_path"
24781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24783     new_path="$unix_path"
24784   fi
24785 
24786   if test "x$path" != "x$new_path"; then
24787     BOOT_JDK="$new_path"
24788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24789 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24790   fi
24791 
24792   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24793   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24794 
24795   else
24796     # We're on a posix platform. Hooray! :)
24797     path="$BOOT_JDK"
24798     has_space=`$ECHO "$path" | $GREP " "`
24799     if test "x$has_space" != x; then
24800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24801 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24802       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24803     fi
24804 
24805     # Use eval to expand a potential ~
24806     eval path="$path"
24807     if test ! -f "$path" && test ! -d "$path"; then
24808       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24809     fi
24810 
24811     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24812   fi
24813 
24814               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24815 $as_echo_n "checking for Boot JDK... " >&6; }
24816               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24817 $as_echo "$BOOT_JDK" >&6; }
24818               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24819 $as_echo_n "checking Boot JDK version... " >&6; }
24820               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24821               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24822 $as_echo "$BOOT_JDK_VERSION" >&6; }
24823             fi # end check jdk version
24824           fi # end check rt.jar
24825         fi # end check javac
24826       fi # end check java
24827     fi # end check boot jdk found
24828   fi
24829 
24830     done
24831   fi
24832 
24833 
24834     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24835     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24836       # Do we have a bin/java?
24837       if test ! -x "$BOOT_JDK/bin/java"; then
24838         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24840         BOOT_JDK_FOUND=no
24841       else
24842         # Do we have a bin/javac?
24843         if test ! -x "$BOOT_JDK/bin/javac"; then
24844           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24845 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24846           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24847 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24848           BOOT_JDK_FOUND=no
24849         else
24850           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24851           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24852             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24854             BOOT_JDK_FOUND=no
24855           else
24856             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24857             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24858 
24859             # Extra M4 quote needed to protect [] in grep expression.
24860             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24861             if test "x$FOUND_CORRECT_VERSION" = x; then
24862               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24863 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24864               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24865 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24866               BOOT_JDK_FOUND=no
24867             else
24868               # We're done! :-)
24869               BOOT_JDK_FOUND=yes
24870 
24871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24872 
24873   # Input might be given as Windows format, start by converting to
24874   # unix format.
24875   path="$BOOT_JDK"
24876   new_path=`$CYGPATH -u "$path"`
24877 
24878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24881   # "foo.exe" is OK but "foo" is an error.
24882   #
24883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24884   # It is also a way to make sure we got the proper file name for the real test later on.
24885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24886   if test "x$test_shortpath" = x; then
24887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24888 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24889     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24890   fi
24891 
24892   # Call helper function which possibly converts this using DOS-style short mode.
24893   # If so, the updated path is stored in $new_path.
24894 
24895   input_path="$new_path"
24896   # Check if we need to convert this using DOS-style short mode. If the path
24897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24898   # take no chances and rewrite it.
24899   # Note: m4 eats our [], so we need to use [ and ] instead.
24900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24901   if test "x$has_forbidden_chars" != x; then
24902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24906       # Going to short mode and back again did indeed matter. Since short mode is
24907       # case insensitive, let's make it lowercase to improve readability.
24908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24909       # Now convert it back to Unix-stile (cygpath)
24910       input_path=`$CYGPATH -u "$shortmode_path"`
24911       new_path="$input_path"
24912     fi
24913   fi
24914 
24915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24916   if test "x$test_cygdrive_prefix" = x; then
24917     # As a simple fix, exclude /usr/bin since it's not a real path.
24918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24920       # a path prefixed by /cygdrive for fixpath to work.
24921       new_path="$CYGWIN_ROOT_PATH$input_path"
24922     fi
24923   fi
24924 
24925 
24926   if test "x$path" != "x$new_path"; then
24927     BOOT_JDK="$new_path"
24928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24929 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24930   fi
24931 
24932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24933 
24934   path="$BOOT_JDK"
24935   has_colon=`$ECHO $path | $GREP ^.:`
24936   new_path="$path"
24937   if test "x$has_colon" = x; then
24938     # Not in mixed or Windows style, start by that.
24939     new_path=`cmd //c echo $path`
24940   fi
24941 
24942 
24943   input_path="$new_path"
24944   # Check if we need to convert this using DOS-style short mode. If the path
24945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24946   # take no chances and rewrite it.
24947   # Note: m4 eats our [], so we need to use [ and ] instead.
24948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24949   if test "x$has_forbidden_chars" != x; then
24950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24952   fi
24953 
24954 
24955   windows_path="$new_path"
24956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24957     unix_path=`$CYGPATH -u "$windows_path"`
24958     new_path="$unix_path"
24959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24961     new_path="$unix_path"
24962   fi
24963 
24964   if test "x$path" != "x$new_path"; then
24965     BOOT_JDK="$new_path"
24966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24968   fi
24969 
24970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24972 
24973   else
24974     # We're on a posix platform. Hooray! :)
24975     path="$BOOT_JDK"
24976     has_space=`$ECHO "$path" | $GREP " "`
24977     if test "x$has_space" != x; then
24978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24979 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24980       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24981     fi
24982 
24983     # Use eval to expand a potential ~
24984     eval path="$path"
24985     if test ! -f "$path" && test ! -d "$path"; then
24986       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24987     fi
24988 
24989     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24990   fi
24991 
24992               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24993 $as_echo_n "checking for Boot JDK... " >&6; }
24994               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24995 $as_echo "$BOOT_JDK" >&6; }
24996               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24997 $as_echo_n "checking Boot JDK version... " >&6; }
24998               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24999               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25000 $as_echo "$BOOT_JDK_VERSION" >&6; }
25001             fi # end check jdk version
25002           fi # end check rt.jar
25003         fi # end check javac
25004       fi # end check java
25005     fi # end check boot jdk found
25006   fi
25007 
25008   fi
25009 
25010 
25011     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25012     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25013       # Do we have a bin/java?
25014       if test ! -x "$BOOT_JDK/bin/java"; then
25015         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25016 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25017         BOOT_JDK_FOUND=no
25018       else
25019         # Do we have a bin/javac?
25020         if test ! -x "$BOOT_JDK/bin/javac"; then
25021           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25022 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25023           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25024 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25025           BOOT_JDK_FOUND=no
25026         else
25027           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25028           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25029             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25031             BOOT_JDK_FOUND=no
25032           else
25033             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25034             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25035 
25036             # Extra M4 quote needed to protect [] in grep expression.
25037             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
25038             if test "x$FOUND_CORRECT_VERSION" = x; then
25039               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25040 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25041               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
25042 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
25043               BOOT_JDK_FOUND=no
25044             else
25045               # We're done! :-)
25046               BOOT_JDK_FOUND=yes
25047 
25048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25049 
25050   # Input might be given as Windows format, start by converting to
25051   # unix format.
25052   path="$BOOT_JDK"
25053   new_path=`$CYGPATH -u "$path"`
25054 
25055   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25056   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25057   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25058   # "foo.exe" is OK but "foo" is an error.
25059   #
25060   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25061   # It is also a way to make sure we got the proper file name for the real test later on.
25062   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25063   if test "x$test_shortpath" = x; then
25064     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25065 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25066     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25067   fi
25068 
25069   # Call helper function which possibly converts this using DOS-style short mode.
25070   # If so, the updated path is stored in $new_path.
25071 
25072   input_path="$new_path"
25073   # Check if we need to convert this using DOS-style short mode. If the path
25074   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25075   # take no chances and rewrite it.
25076   # Note: m4 eats our [], so we need to use [ and ] instead.
25077   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25078   if test "x$has_forbidden_chars" != x; then
25079     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25080     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25081     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25082     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25083       # Going to short mode and back again did indeed matter. Since short mode is
25084       # case insensitive, let's make it lowercase to improve readability.
25085       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25086       # Now convert it back to Unix-stile (cygpath)
25087       input_path=`$CYGPATH -u "$shortmode_path"`
25088       new_path="$input_path"
25089     fi
25090   fi
25091 
25092   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25093   if test "x$test_cygdrive_prefix" = x; then
25094     # As a simple fix, exclude /usr/bin since it's not a real path.
25095     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25096       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25097       # a path prefixed by /cygdrive for fixpath to work.
25098       new_path="$CYGWIN_ROOT_PATH$input_path"
25099     fi
25100   fi
25101 
25102 
25103   if test "x$path" != "x$new_path"; then
25104     BOOT_JDK="$new_path"
25105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25106 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25107   fi
25108 
25109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110 
25111   path="$BOOT_JDK"
25112   has_colon=`$ECHO $path | $GREP ^.:`
25113   new_path="$path"
25114   if test "x$has_colon" = x; then
25115     # Not in mixed or Windows style, start by that.
25116     new_path=`cmd //c echo $path`
25117   fi
25118 
25119 
25120   input_path="$new_path"
25121   # Check if we need to convert this using DOS-style short mode. If the path
25122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25123   # take no chances and rewrite it.
25124   # Note: m4 eats our [], so we need to use [ and ] instead.
25125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25126   if test "x$has_forbidden_chars" != x; then
25127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25128     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25129   fi
25130 
25131 
25132   windows_path="$new_path"
25133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25134     unix_path=`$CYGPATH -u "$windows_path"`
25135     new_path="$unix_path"
25136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25138     new_path="$unix_path"
25139   fi
25140 
25141   if test "x$path" != "x$new_path"; then
25142     BOOT_JDK="$new_path"
25143     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25144 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25145   fi
25146 
25147   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25148   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25149 
25150   else
25151     # We're on a posix platform. Hooray! :)
25152     path="$BOOT_JDK"
25153     has_space=`$ECHO "$path" | $GREP " "`
25154     if test "x$has_space" != x; then
25155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25156 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25157       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25158     fi
25159 
25160     # Use eval to expand a potential ~
25161     eval path="$path"
25162     if test ! -f "$path" && test ! -d "$path"; then
25163       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25164     fi
25165 
25166     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25167   fi
25168 
25169               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25170 $as_echo_n "checking for Boot JDK... " >&6; }
25171               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25172 $as_echo "$BOOT_JDK" >&6; }
25173               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25174 $as_echo_n "checking Boot JDK version... " >&6; }
25175               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25176               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25177 $as_echo "$BOOT_JDK_VERSION" >&6; }
25178             fi # end check jdk version
25179           fi # end check rt.jar
25180         fi # end check javac
25181       fi # end check java
25182     fi # end check boot jdk found
25183   fi
25184 
25185 
25186   # If we haven't found anything yet, we've truly lost. Give up.
25187   if test "x$BOOT_JDK_FOUND" = xno; then
25188 
25189   # Print a helpful message on how to acquire the necessary build dependency.
25190   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25191   MISSING_DEPENDENCY=openjdk
25192 
25193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25194     cygwin_help $MISSING_DEPENDENCY
25195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25196     msys_help $MISSING_DEPENDENCY
25197   else
25198     PKGHANDLER_COMMAND=
25199 
25200     case $PKGHANDLER in
25201       apt-get)
25202         apt_help     $MISSING_DEPENDENCY ;;
25203       yum)
25204         yum_help     $MISSING_DEPENDENCY ;;
25205       port)
25206         port_help    $MISSING_DEPENDENCY ;;
25207       pkgutil)
25208         pkgutil_help $MISSING_DEPENDENCY ;;
25209       pkgadd)
25210         pkgadd_help  $MISSING_DEPENDENCY ;;
25211     esac
25212 
25213     if test "x$PKGHANDLER_COMMAND" != x; then
25214       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25215     fi
25216   fi
25217 
25218     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25219 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25220     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25221 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25222     as_fn_error $? "Cannot continue" "$LINENO" 5
25223   fi
25224 
25225   # Setup proper paths for what we found
25226   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25227   if test ! -f "$BOOT_RTJAR"; then
25228     # On MacOSX it is called classes.jar
25229     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25230     if test -f "$BOOT_RTJAR"; then
25231       # Remove the ..
25232       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25233     fi
25234   fi
25235   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25236   BOOT_JDK="$BOOT_JDK"
25237 
25238 
25239 
25240 
25241   # Setup tools from the Boot JDK.
25242 
25243   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25244 
25245   # Publish this variable in the help.
25246 
25247 
25248   if test "x$JAVA" = x; then
25249     # The variable is not set by user, try to locate tool using the code snippet
25250 
25251       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25252 $as_echo_n "checking for java in Boot JDK... " >&6; }
25253       JAVA=$BOOT_JDK/bin/java
25254       if test ! -x $JAVA; then
25255         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25256 $as_echo "not found" >&6; }
25257         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25258 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25259         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25260       fi
25261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25262 $as_echo "ok" >&6; }
25263 
25264 
25265   else
25266     # The variable is set, but is it from the command line or the environment?
25267 
25268     # Try to remove the string !JAVA! from our list.
25269     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25270     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25271       # If it failed, the variable was not from the command line. Ignore it,
25272       # but warn the user (except for BASH, which is always set by the calling BASH).
25273       if test "xJAVA" != xBASH; then
25274         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25275 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25276       fi
25277       # Try to locate tool using the code snippet
25278 
25279       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25280 $as_echo_n "checking for java in Boot JDK... " >&6; }
25281       JAVA=$BOOT_JDK/bin/java
25282       if test ! -x $JAVA; then
25283         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25284 $as_echo "not found" >&6; }
25285         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25286 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25287         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25288       fi
25289       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25290 $as_echo "ok" >&6; }
25291 
25292 
25293     else
25294       # If it succeeded, then it was overridden by the user. We will use it
25295       # for the tool.
25296 
25297       # First remove it from the list of overridden variables, so we can test
25298       # for unknown variables in the end.
25299       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25300 
25301       # Check if the provided tool contains a complete path.
25302       tool_specified="$JAVA"
25303       tool_basename="${tool_specified##*/}"
25304       if test "x$tool_basename" = "x$tool_specified"; then
25305         # A command without a complete path is provided, search $PATH.
25306         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25307 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25308         # Extract the first word of "$tool_basename", so it can be a program name with args.
25309 set dummy $tool_basename; ac_word=$2
25310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25311 $as_echo_n "checking for $ac_word... " >&6; }
25312 if ${ac_cv_path_JAVA+:} false; then :
25313   $as_echo_n "(cached) " >&6
25314 else
25315   case $JAVA in
25316   [\\/]* | ?:[\\/]*)
25317   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25318   ;;
25319   *)
25320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25321 for as_dir in $PATH
25322 do
25323   IFS=$as_save_IFS
25324   test -z "$as_dir" && as_dir=.
25325     for ac_exec_ext in '' $ac_executable_extensions; do
25326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25327     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25329     break 2
25330   fi
25331 done
25332   done
25333 IFS=$as_save_IFS
25334 
25335   ;;
25336 esac
25337 fi
25338 JAVA=$ac_cv_path_JAVA
25339 if test -n "$JAVA"; then
25340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25341 $as_echo "$JAVA" >&6; }
25342 else
25343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25344 $as_echo "no" >&6; }
25345 fi
25346 
25347 
25348         if test "x$JAVA" = x; then
25349           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25350         fi
25351       else
25352         # Otherwise we believe it is a complete path. Use it as it is.
25353         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25354 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25355         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25356 $as_echo_n "checking for JAVA... " >&6; }
25357         if test ! -x "$tool_specified"; then
25358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25359 $as_echo "not found" >&6; }
25360           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25361         fi
25362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25363 $as_echo "$tool_specified" >&6; }
25364       fi
25365     fi
25366   fi
25367 
25368 
25369 
25370   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25371 
25372   # Publish this variable in the help.
25373 
25374 
25375   if test "x$JAVAC" = x; then
25376     # The variable is not set by user, try to locate tool using the code snippet
25377 
25378       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25379 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25380       JAVAC=$BOOT_JDK/bin/javac
25381       if test ! -x $JAVAC; then
25382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25383 $as_echo "not found" >&6; }
25384         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25385 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25386         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25387       fi
25388       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25389 $as_echo "ok" >&6; }
25390 
25391 
25392   else
25393     # The variable is set, but is it from the command line or the environment?
25394 
25395     # Try to remove the string !JAVAC! from our list.
25396     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25397     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25398       # If it failed, the variable was not from the command line. Ignore it,
25399       # but warn the user (except for BASH, which is always set by the calling BASH).
25400       if test "xJAVAC" != xBASH; then
25401         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25402 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25403       fi
25404       # Try to locate tool using the code snippet
25405 
25406       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25407 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25408       JAVAC=$BOOT_JDK/bin/javac
25409       if test ! -x $JAVAC; then
25410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25411 $as_echo "not found" >&6; }
25412         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25413 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25414         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25415       fi
25416       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25417 $as_echo "ok" >&6; }
25418 
25419 
25420     else
25421       # If it succeeded, then it was overridden by the user. We will use it
25422       # for the tool.
25423 
25424       # First remove it from the list of overridden variables, so we can test
25425       # for unknown variables in the end.
25426       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25427 
25428       # Check if the provided tool contains a complete path.
25429       tool_specified="$JAVAC"
25430       tool_basename="${tool_specified##*/}"
25431       if test "x$tool_basename" = "x$tool_specified"; then
25432         # A command without a complete path is provided, search $PATH.
25433         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25434 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25435         # Extract the first word of "$tool_basename", so it can be a program name with args.
25436 set dummy $tool_basename; ac_word=$2
25437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25438 $as_echo_n "checking for $ac_word... " >&6; }
25439 if ${ac_cv_path_JAVAC+:} false; then :
25440   $as_echo_n "(cached) " >&6
25441 else
25442   case $JAVAC in
25443   [\\/]* | ?:[\\/]*)
25444   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25445   ;;
25446   *)
25447   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25448 for as_dir in $PATH
25449 do
25450   IFS=$as_save_IFS
25451   test -z "$as_dir" && as_dir=.
25452     for ac_exec_ext in '' $ac_executable_extensions; do
25453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25454     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25456     break 2
25457   fi
25458 done
25459   done
25460 IFS=$as_save_IFS
25461 
25462   ;;
25463 esac
25464 fi
25465 JAVAC=$ac_cv_path_JAVAC
25466 if test -n "$JAVAC"; then
25467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25468 $as_echo "$JAVAC" >&6; }
25469 else
25470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25471 $as_echo "no" >&6; }
25472 fi
25473 
25474 
25475         if test "x$JAVAC" = x; then
25476           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25477         fi
25478       else
25479         # Otherwise we believe it is a complete path. Use it as it is.
25480         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25481 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25482         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25483 $as_echo_n "checking for JAVAC... " >&6; }
25484         if test ! -x "$tool_specified"; then
25485           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25486 $as_echo "not found" >&6; }
25487           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25488         fi
25489         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25490 $as_echo "$tool_specified" >&6; }
25491       fi
25492     fi
25493   fi
25494 
25495 
25496 
25497   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25498 
25499   # Publish this variable in the help.
25500 
25501 
25502   if test "x$JAVAH" = x; then
25503     # The variable is not set by user, try to locate tool using the code snippet
25504 
25505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25506 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25507       JAVAH=$BOOT_JDK/bin/javah
25508       if test ! -x $JAVAH; then
25509         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25510 $as_echo "not found" >&6; }
25511         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25512 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25513         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25514       fi
25515       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25516 $as_echo "ok" >&6; }
25517 
25518 
25519   else
25520     # The variable is set, but is it from the command line or the environment?
25521 
25522     # Try to remove the string !JAVAH! from our list.
25523     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25524     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25525       # If it failed, the variable was not from the command line. Ignore it,
25526       # but warn the user (except for BASH, which is always set by the calling BASH).
25527       if test "xJAVAH" != xBASH; then
25528         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25529 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25530       fi
25531       # Try to locate tool using the code snippet
25532 
25533       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25534 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25535       JAVAH=$BOOT_JDK/bin/javah
25536       if test ! -x $JAVAH; then
25537         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25538 $as_echo "not found" >&6; }
25539         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25540 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25541         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25542       fi
25543       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25544 $as_echo "ok" >&6; }
25545 
25546 
25547     else
25548       # If it succeeded, then it was overridden by the user. We will use it
25549       # for the tool.
25550 
25551       # First remove it from the list of overridden variables, so we can test
25552       # for unknown variables in the end.
25553       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25554 
25555       # Check if the provided tool contains a complete path.
25556       tool_specified="$JAVAH"
25557       tool_basename="${tool_specified##*/}"
25558       if test "x$tool_basename" = "x$tool_specified"; then
25559         # A command without a complete path is provided, search $PATH.
25560         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25561 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25562         # Extract the first word of "$tool_basename", so it can be a program name with args.
25563 set dummy $tool_basename; ac_word=$2
25564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25565 $as_echo_n "checking for $ac_word... " >&6; }
25566 if ${ac_cv_path_JAVAH+:} false; then :
25567   $as_echo_n "(cached) " >&6
25568 else
25569   case $JAVAH in
25570   [\\/]* | ?:[\\/]*)
25571   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25572   ;;
25573   *)
25574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25575 for as_dir in $PATH
25576 do
25577   IFS=$as_save_IFS
25578   test -z "$as_dir" && as_dir=.
25579     for ac_exec_ext in '' $ac_executable_extensions; do
25580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25581     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25583     break 2
25584   fi
25585 done
25586   done
25587 IFS=$as_save_IFS
25588 
25589   ;;
25590 esac
25591 fi
25592 JAVAH=$ac_cv_path_JAVAH
25593 if test -n "$JAVAH"; then
25594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25595 $as_echo "$JAVAH" >&6; }
25596 else
25597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25598 $as_echo "no" >&6; }
25599 fi
25600 
25601 
25602         if test "x$JAVAH" = x; then
25603           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25604         fi
25605       else
25606         # Otherwise we believe it is a complete path. Use it as it is.
25607         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25608 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25609         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25610 $as_echo_n "checking for JAVAH... " >&6; }
25611         if test ! -x "$tool_specified"; then
25612           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25613 $as_echo "not found" >&6; }
25614           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25615         fi
25616         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25617 $as_echo "$tool_specified" >&6; }
25618       fi
25619     fi
25620   fi
25621 
25622 
25623 
25624   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25625 
25626   # Publish this variable in the help.
25627 
25628 
25629   if test "x$JAR" = x; then
25630     # The variable is not set by user, try to locate tool using the code snippet
25631 
25632       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25633 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25634       JAR=$BOOT_JDK/bin/jar
25635       if test ! -x $JAR; then
25636         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25637 $as_echo "not found" >&6; }
25638         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25639 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25640         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25641       fi
25642       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25643 $as_echo "ok" >&6; }
25644 
25645 
25646   else
25647     # The variable is set, but is it from the command line or the environment?
25648 
25649     # Try to remove the string !JAR! from our list.
25650     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25651     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25652       # If it failed, the variable was not from the command line. Ignore it,
25653       # but warn the user (except for BASH, which is always set by the calling BASH).
25654       if test "xJAR" != xBASH; then
25655         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25656 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25657       fi
25658       # Try to locate tool using the code snippet
25659 
25660       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25661 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25662       JAR=$BOOT_JDK/bin/jar
25663       if test ! -x $JAR; then
25664         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25665 $as_echo "not found" >&6; }
25666         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25667 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25668         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25669       fi
25670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25671 $as_echo "ok" >&6; }
25672 
25673 
25674     else
25675       # If it succeeded, then it was overridden by the user. We will use it
25676       # for the tool.
25677 
25678       # First remove it from the list of overridden variables, so we can test
25679       # for unknown variables in the end.
25680       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25681 
25682       # Check if the provided tool contains a complete path.
25683       tool_specified="$JAR"
25684       tool_basename="${tool_specified##*/}"
25685       if test "x$tool_basename" = "x$tool_specified"; then
25686         # A command without a complete path is provided, search $PATH.
25687         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25688 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25689         # Extract the first word of "$tool_basename", so it can be a program name with args.
25690 set dummy $tool_basename; ac_word=$2
25691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25692 $as_echo_n "checking for $ac_word... " >&6; }
25693 if ${ac_cv_path_JAR+:} false; then :
25694   $as_echo_n "(cached) " >&6
25695 else
25696   case $JAR in
25697   [\\/]* | ?:[\\/]*)
25698   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25699   ;;
25700   *)
25701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25702 for as_dir in $PATH
25703 do
25704   IFS=$as_save_IFS
25705   test -z "$as_dir" && as_dir=.
25706     for ac_exec_ext in '' $ac_executable_extensions; do
25707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25708     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25710     break 2
25711   fi
25712 done
25713   done
25714 IFS=$as_save_IFS
25715 
25716   ;;
25717 esac
25718 fi
25719 JAR=$ac_cv_path_JAR
25720 if test -n "$JAR"; then
25721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25722 $as_echo "$JAR" >&6; }
25723 else
25724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25725 $as_echo "no" >&6; }
25726 fi
25727 
25728 
25729         if test "x$JAR" = x; then
25730           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25731         fi
25732       else
25733         # Otherwise we believe it is a complete path. Use it as it is.
25734         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25735 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25736         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25737 $as_echo_n "checking for JAR... " >&6; }
25738         if test ! -x "$tool_specified"; then
25739           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25740 $as_echo "not found" >&6; }
25741           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25742         fi
25743         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25744 $as_echo "$tool_specified" >&6; }
25745       fi
25746     fi
25747   fi
25748 
25749 
25750 
25751   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25752 
25753   # Publish this variable in the help.
25754 
25755 
25756   if test "x$NATIVE2ASCII" = x; then
25757     # The variable is not set by user, try to locate tool using the code snippet
25758 
25759       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25760 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25761       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25762       if test ! -x $NATIVE2ASCII; then
25763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25764 $as_echo "not found" >&6; }
25765         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25766 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25767         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25768       fi
25769       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25770 $as_echo "ok" >&6; }
25771 
25772 
25773   else
25774     # The variable is set, but is it from the command line or the environment?
25775 
25776     # Try to remove the string !NATIVE2ASCII! from our list.
25777     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25778     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25779       # If it failed, the variable was not from the command line. Ignore it,
25780       # but warn the user (except for BASH, which is always set by the calling BASH).
25781       if test "xNATIVE2ASCII" != xBASH; then
25782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25783 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25784       fi
25785       # Try to locate tool using the code snippet
25786 
25787       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25788 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25789       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25790       if test ! -x $NATIVE2ASCII; then
25791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25792 $as_echo "not found" >&6; }
25793         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25794 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25795         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25796       fi
25797       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25798 $as_echo "ok" >&6; }
25799 
25800 
25801     else
25802       # If it succeeded, then it was overridden by the user. We will use it
25803       # for the tool.
25804 
25805       # First remove it from the list of overridden variables, so we can test
25806       # for unknown variables in the end.
25807       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25808 
25809       # Check if the provided tool contains a complete path.
25810       tool_specified="$NATIVE2ASCII"
25811       tool_basename="${tool_specified##*/}"
25812       if test "x$tool_basename" = "x$tool_specified"; then
25813         # A command without a complete path is provided, search $PATH.
25814         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25815 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25816         # Extract the first word of "$tool_basename", so it can be a program name with args.
25817 set dummy $tool_basename; ac_word=$2
25818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25819 $as_echo_n "checking for $ac_word... " >&6; }
25820 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25821   $as_echo_n "(cached) " >&6
25822 else
25823   case $NATIVE2ASCII in
25824   [\\/]* | ?:[\\/]*)
25825   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25826   ;;
25827   *)
25828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25829 for as_dir in $PATH
25830 do
25831   IFS=$as_save_IFS
25832   test -z "$as_dir" && as_dir=.
25833     for ac_exec_ext in '' $ac_executable_extensions; do
25834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25835     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25837     break 2
25838   fi
25839 done
25840   done
25841 IFS=$as_save_IFS
25842 
25843   ;;
25844 esac
25845 fi
25846 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25847 if test -n "$NATIVE2ASCII"; then
25848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25849 $as_echo "$NATIVE2ASCII" >&6; }
25850 else
25851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25852 $as_echo "no" >&6; }
25853 fi
25854 
25855 
25856         if test "x$NATIVE2ASCII" = x; then
25857           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25858         fi
25859       else
25860         # Otherwise we believe it is a complete path. Use it as it is.
25861         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25862 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25863         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25864 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
25865         if test ! -x "$tool_specified"; then
25866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25867 $as_echo "not found" >&6; }
25868           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25869         fi
25870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25871 $as_echo "$tool_specified" >&6; }
25872       fi
25873     fi
25874   fi
25875 
25876 
25877 
25878   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25879 
25880   # Publish this variable in the help.
25881 
25882 
25883   if test "x$JARSIGNER" = x; then
25884     # The variable is not set by user, try to locate tool using the code snippet
25885 
25886       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25887 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25888       JARSIGNER=$BOOT_JDK/bin/jarsigner
25889       if test ! -x $JARSIGNER; then
25890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25891 $as_echo "not found" >&6; }
25892         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25893 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25894         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25895       fi
25896       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25897 $as_echo "ok" >&6; }
25898 
25899 
25900   else
25901     # The variable is set, but is it from the command line or the environment?
25902 
25903     # Try to remove the string !JARSIGNER! from our list.
25904     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25905     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25906       # If it failed, the variable was not from the command line. Ignore it,
25907       # but warn the user (except for BASH, which is always set by the calling BASH).
25908       if test "xJARSIGNER" != xBASH; then
25909         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25910 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25911       fi
25912       # Try to locate tool using the code snippet
25913 
25914       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25915 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25916       JARSIGNER=$BOOT_JDK/bin/jarsigner
25917       if test ! -x $JARSIGNER; then
25918         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25919 $as_echo "not found" >&6; }
25920         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25921 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25922         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25923       fi
25924       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25925 $as_echo "ok" >&6; }
25926 
25927 
25928     else
25929       # If it succeeded, then it was overridden by the user. We will use it
25930       # for the tool.
25931 
25932       # First remove it from the list of overridden variables, so we can test
25933       # for unknown variables in the end.
25934       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25935 
25936       # Check if the provided tool contains a complete path.
25937       tool_specified="$JARSIGNER"
25938       tool_basename="${tool_specified##*/}"
25939       if test "x$tool_basename" = "x$tool_specified"; then
25940         # A command without a complete path is provided, search $PATH.
25941         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25942 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25943         # Extract the first word of "$tool_basename", so it can be a program name with args.
25944 set dummy $tool_basename; ac_word=$2
25945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25946 $as_echo_n "checking for $ac_word... " >&6; }
25947 if ${ac_cv_path_JARSIGNER+:} false; then :
25948   $as_echo_n "(cached) " >&6
25949 else
25950   case $JARSIGNER in
25951   [\\/]* | ?:[\\/]*)
25952   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25953   ;;
25954   *)
25955   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25956 for as_dir in $PATH
25957 do
25958   IFS=$as_save_IFS
25959   test -z "$as_dir" && as_dir=.
25960     for ac_exec_ext in '' $ac_executable_extensions; do
25961   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25962     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25963     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25964     break 2
25965   fi
25966 done
25967   done
25968 IFS=$as_save_IFS
25969 
25970   ;;
25971 esac
25972 fi
25973 JARSIGNER=$ac_cv_path_JARSIGNER
25974 if test -n "$JARSIGNER"; then
25975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25976 $as_echo "$JARSIGNER" >&6; }
25977 else
25978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25979 $as_echo "no" >&6; }
25980 fi
25981 
25982 
25983         if test "x$JARSIGNER" = x; then
25984           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25985         fi
25986       else
25987         # Otherwise we believe it is a complete path. Use it as it is.
25988         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25989 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25991 $as_echo_n "checking for JARSIGNER... " >&6; }
25992         if test ! -x "$tool_specified"; then
25993           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25994 $as_echo "not found" >&6; }
25995           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25996         fi
25997         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25998 $as_echo "$tool_specified" >&6; }
25999       fi
26000     fi
26001   fi
26002 
26003 
26004 
26005   # Finally, set some other options...
26006 
26007   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
26008   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
26009 
26010 
26011 
26012 
26013   ##############################################################################
26014   #
26015   # Specify jvm options for anything that is run with the Boot JDK.
26016   # Not all JVM:s accept the same arguments on the command line.
26017   #
26018 
26019 # Check whether --with-boot-jdk-jvmargs was given.
26020 if test "${with_boot_jdk_jvmargs+set}" = set; then :
26021   withval=$with_boot_jdk_jvmargs;
26022 fi
26023 
26024 
26025   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26026 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
26027 
26028   # Disable special log output when a debug build is used as Boot JDK...
26029 
26030   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26031   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26032   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26033   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26034   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26035   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26036     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26037     JVM_ARG_OK=true
26038   else
26039     $ECHO "Arg failed:" >&5
26040     $ECHO "$OUTPUT" >&5
26041     JVM_ARG_OK=false
26042   fi
26043 
26044 
26045   # Apply user provided options.
26046 
26047   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26048   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26049   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26050   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26051   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26052   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26053     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26054     JVM_ARG_OK=true
26055   else
26056     $ECHO "Arg failed:" >&5
26057     $ECHO "$OUTPUT" >&5
26058     JVM_ARG_OK=false
26059   fi
26060 
26061 
26062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26063 $as_echo "$boot_jdk_jvmargs" >&6; }
26064 
26065   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26066   JAVA_FLAGS=$boot_jdk_jvmargs
26067 
26068 
26069 
26070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26071 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26072 
26073   # Starting amount of heap memory.
26074 
26075   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26076   $ECHO "Command: $JAVA -Xms64M -version" >&5
26077   OUTPUT=`$JAVA -Xms64M -version 2>&1`
26078   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26079   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26080   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26081     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26082     JVM_ARG_OK=true
26083   else
26084     $ECHO "Arg failed:" >&5
26085     $ECHO "$OUTPUT" >&5
26086     JVM_ARG_OK=false
26087   fi
26088 
26089 
26090   # Maximum amount of heap memory.
26091   # Maximum stack size.
26092   if test "x$BUILD_NUM_BITS" = x32; then
26093     JVM_MAX_HEAP=1100M
26094     STACK_SIZE=768
26095   else
26096     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26097     # pointers are used. Apparently, we need to increase the heap and stack
26098     # space for the jvm. More specifically, when running javac to build huge
26099     # jdk batch
26100     JVM_MAX_HEAP=1600M
26101     STACK_SIZE=1536
26102   fi
26103 
26104   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26105   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26106   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26107   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26108   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26109   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26110     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26111     JVM_ARG_OK=true
26112   else
26113     $ECHO "Arg failed:" >&5
26114     $ECHO "$OUTPUT" >&5
26115     JVM_ARG_OK=false
26116   fi
26117 
26118 
26119   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26120   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26121   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26122   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26123   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26124   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26125     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26126     JVM_ARG_OK=true
26127   else
26128     $ECHO "Arg failed:" >&5
26129     $ECHO "$OUTPUT" >&5
26130     JVM_ARG_OK=false
26131   fi
26132 
26133 
26134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26135 $as_echo "$boot_jdk_jvmargs_big" >&6; }
26136 
26137   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26138 
26139 
26140 
26141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26142 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26143 
26144   # Use serial gc for small short lived tools if possible
26145 
26146   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26147   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26148   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26149   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26150   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26151   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26152     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26153     JVM_ARG_OK=true
26154   else
26155     $ECHO "Arg failed:" >&5
26156     $ECHO "$OUTPUT" >&5
26157     JVM_ARG_OK=false
26158   fi
26159 
26160 
26161   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26162   $ECHO "Command: $JAVA -Xms32M -version" >&5
26163   OUTPUT=`$JAVA -Xms32M -version 2>&1`
26164   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26165   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26166   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26167     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26168     JVM_ARG_OK=true
26169   else
26170     $ECHO "Arg failed:" >&5
26171     $ECHO "$OUTPUT" >&5
26172     JVM_ARG_OK=false
26173   fi
26174 
26175 
26176   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26177   $ECHO "Command: $JAVA -Xmx512M -version" >&5
26178   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26179   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26180   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26181   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26182     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26183     JVM_ARG_OK=true
26184   else
26185     $ECHO "Arg failed:" >&5
26186     $ECHO "$OUTPUT" >&5
26187     JVM_ARG_OK=false
26188   fi
26189 
26190 
26191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26192 $as_echo "$boot_jdk_jvmargs_small" >&6; }
26193 
26194   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26195 
26196 
26197 
26198 ###############################################################################
26199 #
26200 # Configure the sources to use. We can add or override individual directories.
26201 #
26202 ###############################################################################
26203 
26204 
26205   # Where are the sources. Any of these can be overridden
26206   # using --with-override-corba and the likes.
26207   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26208   CORBA_TOPDIR="$SRC_ROOT/corba"
26209   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26210   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26211   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26212   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26213   JDK_TOPDIR="$SRC_ROOT/jdk"
26214 
26215 
26216 
26217 
26218 
26219 
26220 
26221 
26222 
26223 
26224   ###############################################################################
26225   #
26226   # Pickup additional source for a component from outside of the source root
26227   # or override source for a component.
26228   #
26229 
26230 # Check whether --with-add-source-root was given.
26231 if test "${with_add_source_root+set}" = set; then :
26232   withval=$with_add_source_root;
26233 fi
26234 
26235 
26236 
26237 # Check whether --with-override-source-root was given.
26238 if test "${with_override_source_root+set}" = set; then :
26239   withval=$with_override_source_root;
26240 fi
26241 
26242 
26243 
26244 # Check whether --with-adds-and-overrides was given.
26245 if test "${with_adds_and_overrides+set}" = set; then :
26246   withval=$with_adds_and_overrides;
26247 fi
26248 
26249 
26250   if test "x$with_adds_and_overrides" != x; then
26251     with_add_source_root="$with_adds_and_overrides/adds"
26252     with_override_source_root="$with_adds_and_overrides/overrides"
26253   fi
26254 
26255   if test "x$with_add_source_root" != x; then
26256     if ! test -d $with_add_source_root; then
26257       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26258     fi
26259     CURDIR="$PWD"
26260     cd "$with_add_source_root"
26261     ADD_SRC_ROOT="`pwd`"
26262     cd "$CURDIR"
26263     # Verify that the addon source root does not have any root makefiles.
26264     # If it does, then it is usually an error, prevent this.
26265     if test -f $with_add_source_root/langtools/make/Makefile; then
26266       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
26267     fi
26268     if test -f $with_add_source_root/corba/make/Makefile; then
26269       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
26270     fi
26271     if test -f $with_add_source_root/jaxp/make/Makefile; then
26272       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
26273     fi
26274     if test -f $with_add_source_root/jaxws/make/Makefile; then
26275       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
26276     fi
26277     if test -f $with_add_source_root/hotspot/make/Makefile; then
26278       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
26279     fi
26280     if test -f $with_add_source_root/nashorn/make/Makefile; then
26281       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
26282     fi
26283     if test -f $with_add_source_root/jdk/make/Makefile; then
26284       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
26285     fi
26286   fi
26287 
26288 
26289   if test "x$with_override_source_root" != x; then
26290     if ! test -d $with_override_source_root; then
26291       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26292     fi
26293     CURDIR="$PWD"
26294     cd "$with_override_source_root"
26295     OVERRIDE_SRC_ROOT="`pwd`"
26296     cd "$CURDIR"
26297     if test -f $with_override_source_root/langtools/make/Makefile; then
26298       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
26299     fi
26300     if test -f $with_override_source_root/corba/make/Makefile; then
26301       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
26302     fi
26303     if test -f $with_override_source_root/jaxp/make/Makefile; then
26304       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
26305     fi
26306     if test -f $with_override_source_root/jaxws/make/Makefile; then
26307       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
26308     fi
26309     if test -f $with_override_source_root/hotspot/make/Makefile; then
26310       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
26311     fi
26312     if test -f $with_override_source_root/nashorn/make/Makefile; then
26313       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
26314     fi
26315     if test -f $with_override_source_root/jdk/make/Makefile; then
26316       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
26317     fi
26318   fi
26319 
26320 
26321   ###############################################################################
26322   #
26323   # Override a repo completely, this is used for example when you have 3 small
26324   # development sandboxes of the langtools sources and want to avoid having 3 full
26325   # OpenJDK sources checked out on disk.
26326   #
26327   # Assuming that the 3 langtools sandboxes are located here:
26328   # /home/fredrik/sandbox1/langtools
26329   # /home/fredrik/sandbox2/langtools
26330   # /home/fredrik/sandbox3/langtools
26331   #
26332   # From the source root you create build subdirs manually:
26333   #     mkdir -p build1 build2 build3
26334   # in each build directory run:
26335   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26336   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26337   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26338   #
26339 
26340 
26341 # Check whether --with-override-langtools was given.
26342 if test "${with_override_langtools+set}" = set; then :
26343   withval=$with_override_langtools;
26344 fi
26345 
26346 
26347 
26348 # Check whether --with-override-corba was given.
26349 if test "${with_override_corba+set}" = set; then :
26350   withval=$with_override_corba;
26351 fi
26352 
26353 
26354 
26355 # Check whether --with-override-jaxp was given.
26356 if test "${with_override_jaxp+set}" = set; then :
26357   withval=$with_override_jaxp;
26358 fi
26359 
26360 
26361 
26362 # Check whether --with-override-jaxws was given.
26363 if test "${with_override_jaxws+set}" = set; then :
26364   withval=$with_override_jaxws;
26365 fi
26366 
26367 
26368 
26369 # Check whether --with-override-hotspot was given.
26370 if test "${with_override_hotspot+set}" = set; then :
26371   withval=$with_override_hotspot;
26372 fi
26373 
26374 
26375 
26376 # Check whether --with-override-nashorn was given.
26377 if test "${with_override_nashorn+set}" = set; then :
26378   withval=$with_override_nashorn;
26379 fi
26380 
26381 
26382 
26383 # Check whether --with-override-jdk was given.
26384 if test "${with_override_jdk+set}" = set; then :
26385   withval=$with_override_jdk;
26386 fi
26387 
26388 
26389   if test "x$with_override_langtools" != x; then
26390     CURDIR="$PWD"
26391     cd "$with_override_langtools"
26392     LANGTOOLS_TOPDIR="`pwd`"
26393     cd "$CURDIR"
26394     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26395       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26396     fi
26397     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26398 $as_echo_n "checking if langtools should be overridden... " >&6; }
26399     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26400 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26401   fi
26402   if test "x$with_override_corba" != x; then
26403     CURDIR="$PWD"
26404     cd "$with_override_corba"
26405     CORBA_TOPDIR="`pwd`"
26406     cd "$CURDIR"
26407     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26408       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26409     fi
26410     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26411 $as_echo_n "checking if corba should be overridden... " >&6; }
26412     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26413 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26414   fi
26415   if test "x$with_override_jaxp" != x; then
26416     CURDIR="$PWD"
26417     cd "$with_override_jaxp"
26418     JAXP_TOPDIR="`pwd`"
26419     cd "$CURDIR"
26420     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26421       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26422     fi
26423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26424 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26425     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26426 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26427   fi
26428   if test "x$with_override_jaxws" != x; then
26429     CURDIR="$PWD"
26430     cd "$with_override_jaxws"
26431     JAXWS_TOPDIR="`pwd`"
26432     cd "$CURDIR"
26433     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26434       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26435     fi
26436     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26437 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26439 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26440   fi
26441   if test "x$with_override_hotspot" != x; then
26442     CURDIR="$PWD"
26443     cd "$with_override_hotspot"
26444     HOTSPOT_TOPDIR="`pwd`"
26445     cd "$CURDIR"
26446     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26447       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26448     fi
26449     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26450 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26451     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26452 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26453   fi
26454   if test "x$with_override_nashorn" != x; then
26455     CURDIR="$PWD"
26456     cd "$with_override_nashorn"
26457     NASHORN_TOPDIR="`pwd`"
26458     cd "$CURDIR"
26459     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26460       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26461     fi
26462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26463 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26464     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26465 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26466   fi
26467   if test "x$with_override_jdk" != x; then
26468     CURDIR="$PWD"
26469     cd "$with_override_jdk"
26470     JDK_TOPDIR="`pwd`"
26471     cd "$CURDIR"
26472     if ! test -f $JDK_TOPDIR/make/Makefile; then
26473       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26474     fi
26475     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26476 $as_echo_n "checking if JDK should be overridden... " >&6; }
26477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26478 $as_echo "yes with $JDK_TOPDIR" >&6; }
26479   fi
26480 
26481 
26482   BUILD_OUTPUT="$OUTPUT_ROOT"
26483 
26484 
26485   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26486   BUILD_HOTSPOT=true
26487 
26488 
26489 
26490 # Check whether --with-import-hotspot was given.
26491 if test "${with_import_hotspot+set}" = set; then :
26492   withval=$with_import_hotspot;
26493 fi
26494 
26495   if test "x$with_import_hotspot" != x; then
26496     CURDIR="$PWD"
26497     cd "$with_import_hotspot"
26498     HOTSPOT_DIST="`pwd`"
26499     cd "$CURDIR"
26500     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26501       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26502     fi
26503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26504 $as_echo_n "checking if hotspot should be imported... " >&6; }
26505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26506 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26507     BUILD_HOTSPOT=false
26508   fi
26509 
26510   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26511 
26512 
26513 ###############################################################################
26514 #
26515 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26516 # native code.
26517 #
26518 ###############################################################################
26519 
26520 # First determine the toolchain type (compiler family)
26521 
26522 
26523 # Check whether --with-toolchain-type was given.
26524 if test "${with_toolchain_type+set}" = set; then :
26525   withval=$with_toolchain_type;
26526 fi
26527 
26528 
26529   # Use indirect variable referencing
26530   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26531   VALID_TOOLCHAINS=${!toolchain_var_name}
26532 
26533   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26534     # On Mac OS X, default toolchain to clang after Xcode 5
26535     XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26536     $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26537     if test $? -ne 0; then
26538       as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26539     fi
26540     XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26541         $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26542         $CUT -f 1 -d .`
26543     { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26544 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26545     if test $XCODE_MAJOR_VERSION -ge 5; then
26546         DEFAULT_TOOLCHAIN="clang"
26547     else
26548         DEFAULT_TOOLCHAIN="gcc"
26549     fi
26550   else
26551     # First toolchain type in the list is the default
26552     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26553   fi
26554 
26555   if test "x$with_toolchain_type" = xlist; then
26556     # List all toolchains
26557     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26558 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26559     for toolchain in $VALID_TOOLCHAINS; do
26560       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26561       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26562       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26563     done
26564 
26565     exit 0
26566   elif test "x$with_toolchain_type" != x; then
26567     # User override; check that it is valid
26568     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26569       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26570 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26571       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26572 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26573       as_fn_error $? "Cannot continue." "$LINENO" 5
26574     fi
26575     TOOLCHAIN_TYPE=$with_toolchain_type
26576   else
26577     # No flag given, use default
26578     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26579   fi
26580 
26581 
26582   TOOLCHAIN_CC_BINARY_clang="clang"
26583   TOOLCHAIN_CC_BINARY_gcc="gcc"
26584   TOOLCHAIN_CC_BINARY_microsoft="cl"
26585   TOOLCHAIN_CC_BINARY_solstudio="cc"
26586   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26587 
26588   TOOLCHAIN_CXX_BINARY_clang="clang++"
26589   TOOLCHAIN_CXX_BINARY_gcc="g++"
26590   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26591   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26592   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26593 
26594   # Use indirect variable referencing
26595   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26596   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26597   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26598   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26599   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26600   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26601 
26602 
26603   # Define filename patterns
26604   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26605     LIBRARY_PREFIX=
26606     SHARED_LIBRARY_SUFFIX='.dll'
26607     STATIC_LIBRARY_SUFFIX='.lib'
26608     SHARED_LIBRARY='$1.dll'
26609     STATIC_LIBRARY='$1.lib'
26610     OBJ_SUFFIX='.obj'
26611     EXE_SUFFIX='.exe'
26612   else
26613     LIBRARY_PREFIX=lib
26614     SHARED_LIBRARY_SUFFIX='.so'
26615     STATIC_LIBRARY_SUFFIX='.a'
26616     SHARED_LIBRARY='lib$1.so'
26617     STATIC_LIBRARY='lib$1.a'
26618     OBJ_SUFFIX='.o'
26619     EXE_SUFFIX=''
26620     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26621       SHARED_LIBRARY='lib$1.dylib'
26622       SHARED_LIBRARY_SUFFIX='.dylib'
26623     fi
26624   fi
26625 
26626 
26627 
26628 
26629 
26630 
26631 
26632 
26633 
26634 
26635   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26636     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26637 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26638   else
26639     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26640 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26641   fi
26642 
26643 
26644 # Then detect the actual binaries needed
26645 
26646   # FIXME: Is this needed?
26647   ac_ext=cpp
26648 ac_cpp='$CXXCPP $CPPFLAGS'
26649 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26650 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26651 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26652 
26653 
26654   # Store the CFLAGS etc passed to the configure script.
26655   ORG_CFLAGS="$CFLAGS"
26656   ORG_CXXFLAGS="$CXXFLAGS"
26657   ORG_OBJCFLAGS="$OBJCFLAGS"
26658 
26659   # On Windows, we need to detect the visual studio installation first.
26660   # This will change the PATH, but we need to keep that new PATH even
26661   # after toolchain detection is done, since the compiler (on x86) uses
26662   # it for DLL resolution in runtime.
26663   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26664 
26665   # Store path to cygwin link.exe to help excluding it when searching for
26666   # VS linker. This must be done before changing the PATH when looking for VS.
26667   # Extract the first word of "link", so it can be a program name with args.
26668 set dummy link; ac_word=$2
26669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26670 $as_echo_n "checking for $ac_word... " >&6; }
26671 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26672   $as_echo_n "(cached) " >&6
26673 else
26674   case $CYGWIN_LINK in
26675   [\\/]* | ?:[\\/]*)
26676   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26677   ;;
26678   *)
26679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26680 for as_dir in $PATH
26681 do
26682   IFS=$as_save_IFS
26683   test -z "$as_dir" && as_dir=.
26684     for ac_exec_ext in '' $ac_executable_extensions; do
26685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26686     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26688     break 2
26689   fi
26690 done
26691   done
26692 IFS=$as_save_IFS
26693 
26694   ;;
26695 esac
26696 fi
26697 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26698 if test -n "$CYGWIN_LINK"; then
26699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26700 $as_echo "$CYGWIN_LINK" >&6; }
26701 else
26702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26703 $as_echo "no" >&6; }
26704 fi
26705 
26706 
26707   if test "x$CYGWIN_LINK" != x; then
26708     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26709 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26710     "$CYGWIN_LINK" --version > /dev/null
26711     if test $? -eq 0 ; then
26712       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26713 $as_echo "yes" >&6; }
26714     else
26715       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26716 $as_echo "no" >&6; }
26717       # This might be the VS linker. Don't exclude it later on.
26718       CYGWIN_LINK=""
26719     fi
26720   fi
26721 
26722   # First-hand choice is to locate and run the vsvars bat file.
26723 
26724   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26725     VCVARSFILE="vc/bin/vcvars32.bat"
26726   else
26727     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26728   fi
26729 
26730   VS_ENV_CMD=""
26731   VS_ENV_ARGS=""
26732   if test "x$with_toolsdir" != x; then
26733 
26734   if test "x$VS_ENV_CMD" = x; then
26735     VS100BASE="$with_toolsdir/../.."
26736     METHOD="--with-tools-dir"
26737 
26738   windows_path="$VS100BASE"
26739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740     unix_path=`$CYGPATH -u "$windows_path"`
26741     VS100BASE="$unix_path"
26742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26744     VS100BASE="$unix_path"
26745   fi
26746 
26747     if test -d "$VS100BASE"; then
26748       if test -f "$VS100BASE/$VCVARSFILE"; then
26749         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26750 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26751         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26752       else
26753         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26754 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26755         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26756 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26757       fi
26758     fi
26759   fi
26760 
26761   fi
26762 
26763   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26764     # Having specified an argument which is incorrect will produce an instant failure;
26765     # we should not go on looking
26766     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26767 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26768     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26769 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26770     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26771   fi
26772 
26773   if test "x$VS100COMNTOOLS" != x; then
26774 
26775   if test "x$VS_ENV_CMD" = x; then
26776     VS100BASE="$VS100COMNTOOLS/../.."
26777     METHOD="VS100COMNTOOLS variable"
26778 
26779   windows_path="$VS100BASE"
26780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26781     unix_path=`$CYGPATH -u "$windows_path"`
26782     VS100BASE="$unix_path"
26783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26785     VS100BASE="$unix_path"
26786   fi
26787 
26788     if test -d "$VS100BASE"; then
26789       if test -f "$VS100BASE/$VCVARSFILE"; then
26790         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26791 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26792         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26793       else
26794         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26795 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26796         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26797 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26798       fi
26799     fi
26800   fi
26801 
26802   fi
26803   if test "x$PROGRAMFILES" != x; then
26804 
26805   if test "x$VS_ENV_CMD" = x; then
26806     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26807     METHOD="well-known name"
26808 
26809   windows_path="$VS100BASE"
26810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811     unix_path=`$CYGPATH -u "$windows_path"`
26812     VS100BASE="$unix_path"
26813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26815     VS100BASE="$unix_path"
26816   fi
26817 
26818     if test -d "$VS100BASE"; then
26819       if test -f "$VS100BASE/$VCVARSFILE"; then
26820         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26821 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26822         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26823       else
26824         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26825 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26826         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26827 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26828       fi
26829     fi
26830   fi
26831 
26832   fi
26833 
26834   if test "x$VS_ENV_CMD" = x; then
26835     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26836     METHOD="well-known name"
26837 
26838   windows_path="$VS100BASE"
26839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26840     unix_path=`$CYGPATH -u "$windows_path"`
26841     VS100BASE="$unix_path"
26842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26844     VS100BASE="$unix_path"
26845   fi
26846 
26847     if test -d "$VS100BASE"; then
26848       if test -f "$VS100BASE/$VCVARSFILE"; then
26849         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26850 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26851         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26852       else
26853         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26854 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26855         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26856 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26857       fi
26858     fi
26859   fi
26860 
26861 
26862   if test "x$VS_ENV_CMD" = x; then
26863     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26864     METHOD="well-known name"
26865 
26866   windows_path="$VS100BASE"
26867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26868     unix_path=`$CYGPATH -u "$windows_path"`
26869     VS100BASE="$unix_path"
26870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26872     VS100BASE="$unix_path"
26873   fi
26874 
26875     if test -d "$VS100BASE"; then
26876       if test -f "$VS100BASE/$VCVARSFILE"; then
26877         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26878 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26879         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26880       else
26881         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26882 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26883         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26884 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26885       fi
26886     fi
26887   fi
26888 
26889 
26890   if test "x$ProgramW6432" != x; then
26891 
26892   if test "x$VS_ENV_CMD" = x; then
26893     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26894     METHOD="well-known name"
26895 
26896   windows_path="$WIN_SDK_BASE"
26897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26898     unix_path=`$CYGPATH -u "$windows_path"`
26899     WIN_SDK_BASE="$unix_path"
26900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26902     WIN_SDK_BASE="$unix_path"
26903   fi
26904 
26905     if test -d "$WIN_SDK_BASE"; then
26906       # There have been cases of partial or broken SDK installations. A missing
26907       # lib dir is not going to work.
26908       if test ! -d "$WIN_SDK_BASE/../lib"; then
26909         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26910 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26911         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26912 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26913       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26914         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26915 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26916         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26917         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26918           VS_ENV_ARGS="/x86"
26919         else
26920           VS_ENV_ARGS="/x64"
26921         fi
26922       else
26923         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26924 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26925         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26926 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26927       fi
26928     fi
26929   fi
26930 
26931   fi
26932   if test "x$PROGRAMW6432" != x; then
26933 
26934   if test "x$VS_ENV_CMD" = x; then
26935     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26936     METHOD="well-known name"
26937 
26938   windows_path="$WIN_SDK_BASE"
26939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26940     unix_path=`$CYGPATH -u "$windows_path"`
26941     WIN_SDK_BASE="$unix_path"
26942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26944     WIN_SDK_BASE="$unix_path"
26945   fi
26946 
26947     if test -d "$WIN_SDK_BASE"; then
26948       # There have been cases of partial or broken SDK installations. A missing
26949       # lib dir is not going to work.
26950       if test ! -d "$WIN_SDK_BASE/../lib"; then
26951         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26952 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26953         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26954 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26955       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26956         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26957 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26958         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26959         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26960           VS_ENV_ARGS="/x86"
26961         else
26962           VS_ENV_ARGS="/x64"
26963         fi
26964       else
26965         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26966 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26967         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26968 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26969       fi
26970     fi
26971   fi
26972 
26973   fi
26974   if test "x$PROGRAMFILES" != x; then
26975 
26976   if test "x$VS_ENV_CMD" = x; then
26977     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26978     METHOD="well-known name"
26979 
26980   windows_path="$WIN_SDK_BASE"
26981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26982     unix_path=`$CYGPATH -u "$windows_path"`
26983     WIN_SDK_BASE="$unix_path"
26984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26986     WIN_SDK_BASE="$unix_path"
26987   fi
26988 
26989     if test -d "$WIN_SDK_BASE"; then
26990       # There have been cases of partial or broken SDK installations. A missing
26991       # lib dir is not going to work.
26992       if test ! -d "$WIN_SDK_BASE/../lib"; then
26993         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26994 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26995         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26996 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26997       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26998         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26999 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27000         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27001         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27002           VS_ENV_ARGS="/x86"
27003         else
27004           VS_ENV_ARGS="/x64"
27005         fi
27006       else
27007         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27008 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27009         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27010 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27011       fi
27012     fi
27013   fi
27014 
27015   fi
27016 
27017   if test "x$VS_ENV_CMD" = x; then
27018     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27019     METHOD="well-known name"
27020 
27021   windows_path="$WIN_SDK_BASE"
27022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27023     unix_path=`$CYGPATH -u "$windows_path"`
27024     WIN_SDK_BASE="$unix_path"
27025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27027     WIN_SDK_BASE="$unix_path"
27028   fi
27029 
27030     if test -d "$WIN_SDK_BASE"; then
27031       # There have been cases of partial or broken SDK installations. A missing
27032       # lib dir is not going to work.
27033       if test ! -d "$WIN_SDK_BASE/../lib"; then
27034         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27035 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27036         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27037 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27038       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27042         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27043           VS_ENV_ARGS="/x86"
27044         else
27045           VS_ENV_ARGS="/x64"
27046         fi
27047       else
27048         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27049 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27050         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27051 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27052       fi
27053     fi
27054   fi
27055 
27056 
27057   if test "x$VS_ENV_CMD" = x; then
27058     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27059     METHOD="well-known name"
27060 
27061   windows_path="$WIN_SDK_BASE"
27062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27063     unix_path=`$CYGPATH -u "$windows_path"`
27064     WIN_SDK_BASE="$unix_path"
27065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27067     WIN_SDK_BASE="$unix_path"
27068   fi
27069 
27070     if test -d "$WIN_SDK_BASE"; then
27071       # There have been cases of partial or broken SDK installations. A missing
27072       # lib dir is not going to work.
27073       if test ! -d "$WIN_SDK_BASE/../lib"; then
27074         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27075 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27076         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27077 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27078       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27079         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27080 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27081         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27082         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27083           VS_ENV_ARGS="/x86"
27084         else
27085           VS_ENV_ARGS="/x64"
27086         fi
27087       else
27088         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27089 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27090         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27091 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27092       fi
27093     fi
27094   fi
27095 
27096 
27097   if test "x$VS_ENV_CMD" != x; then
27098     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27099 
27100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27101 
27102   # First separate the path from the arguments. This will split at the first
27103   # space.
27104   complete="$VS_ENV_CMD"
27105   path="${complete%% *}"
27106   tmp="$complete EOL"
27107   arguments="${tmp#* }"
27108 
27109   # Input might be given as Windows format, start by converting to
27110   # unix format.
27111   new_path=`$CYGPATH -u "$path"`
27112 
27113   # Now try to locate executable using which
27114   new_path=`$WHICH "$new_path" 2> /dev/null`
27115   # bat and cmd files are not always considered executable in cygwin causing which
27116   # to not find them
27117   if test "x$new_path" = x \
27118       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27119       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27120     new_path=`$CYGPATH -u "$path"`
27121   fi
27122   if test "x$new_path" = x; then
27123     # Oops. Which didn't find the executable.
27124     # The splitting of arguments from the executable at a space might have been incorrect,
27125     # since paths with space are more likely in Windows. Give it another try with the whole
27126     # argument.
27127     path="$complete"
27128     arguments="EOL"
27129     new_path=`$CYGPATH -u "$path"`
27130     new_path=`$WHICH "$new_path" 2> /dev/null`
27131     # bat and cmd files are not always considered executable in cygwin causing which
27132     # to not find them
27133     if test "x$new_path" = x \
27134         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27135         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27136       new_path=`$CYGPATH -u "$path"`
27137     fi
27138     if test "x$new_path" = x; then
27139       # It's still not found. Now this is an unrecoverable error.
27140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27141 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27142       has_space=`$ECHO "$complete" | $GREP " "`
27143       if test "x$has_space" != x; then
27144         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27145 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27146       fi
27147       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27148     fi
27149   fi
27150 
27151   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27152   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27153   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27154   # "foo.exe" is OK but "foo" is an error.
27155   #
27156   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27157   # It is also a way to make sure we got the proper file name for the real test later on.
27158   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27159   if test "x$test_shortpath" = x; then
27160     # Short path failed, file does not exist as specified.
27161     # Try adding .exe or .cmd
27162     if test -f "${new_path}.exe"; then
27163       input_to_shortpath="${new_path}.exe"
27164     elif test -f "${new_path}.cmd"; then
27165       input_to_shortpath="${new_path}.cmd"
27166     else
27167       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27168 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27169       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27170 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27171       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27172     fi
27173   else
27174     input_to_shortpath="$new_path"
27175   fi
27176 
27177   # Call helper function which possibly converts this using DOS-style short mode.
27178   # If so, the updated path is stored in $new_path.
27179   new_path="$input_to_shortpath"
27180 
27181   input_path="$input_to_shortpath"
27182   # Check if we need to convert this using DOS-style short mode. If the path
27183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27184   # take no chances and rewrite it.
27185   # Note: m4 eats our [], so we need to use [ and ] instead.
27186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27187   if test "x$has_forbidden_chars" != x; then
27188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27189     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27190     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27191     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27192       # Going to short mode and back again did indeed matter. Since short mode is
27193       # case insensitive, let's make it lowercase to improve readability.
27194       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27195       # Now convert it back to Unix-stile (cygpath)
27196       input_path=`$CYGPATH -u "$shortmode_path"`
27197       new_path="$input_path"
27198     fi
27199   fi
27200 
27201   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27202   if test "x$test_cygdrive_prefix" = x; then
27203     # As a simple fix, exclude /usr/bin since it's not a real path.
27204     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27205       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27206       # a path prefixed by /cygdrive for fixpath to work.
27207       new_path="$CYGWIN_ROOT_PATH$input_path"
27208     fi
27209   fi
27210 
27211   # remove trailing .exe if any
27212   new_path="${new_path/%.exe/}"
27213 
27214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27215 
27216   # First separate the path from the arguments. This will split at the first
27217   # space.
27218   complete="$VS_ENV_CMD"
27219   path="${complete%% *}"
27220   tmp="$complete EOL"
27221   arguments="${tmp#* }"
27222 
27223   # Input might be given as Windows format, start by converting to
27224   # unix format.
27225   new_path="$path"
27226 
27227   windows_path="$new_path"
27228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229     unix_path=`$CYGPATH -u "$windows_path"`
27230     new_path="$unix_path"
27231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27233     new_path="$unix_path"
27234   fi
27235 
27236 
27237   # Now try to locate executable using which
27238   new_path=`$WHICH "$new_path" 2> /dev/null`
27239 
27240   if test "x$new_path" = x; then
27241     # Oops. Which didn't find the executable.
27242     # The splitting of arguments from the executable at a space might have been incorrect,
27243     # since paths with space are more likely in Windows. Give it another try with the whole
27244     # argument.
27245     path="$complete"
27246     arguments="EOL"
27247     new_path="$path"
27248 
27249   windows_path="$new_path"
27250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27251     unix_path=`$CYGPATH -u "$windows_path"`
27252     new_path="$unix_path"
27253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27255     new_path="$unix_path"
27256   fi
27257 
27258 
27259     new_path=`$WHICH "$new_path" 2> /dev/null`
27260 
27261     if test "x$new_path" = x; then
27262       # It's still not found. Now this is an unrecoverable error.
27263       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27264 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27265       has_space=`$ECHO "$complete" | $GREP " "`
27266       if test "x$has_space" != x; then
27267         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27268 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27269       fi
27270       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27271     fi
27272   fi
27273 
27274   # Now new_path has a complete unix path to the binary
27275   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27276     # Keep paths in /bin as-is, but remove trailing .exe if any
27277     new_path="${new_path/%.exe/}"
27278     # Do not save /bin paths to all_fixpath_prefixes!
27279   else
27280     # Not in mixed or Windows style, start by that.
27281     new_path=`cmd //c echo $new_path`
27282 
27283   input_path="$new_path"
27284   # Check if we need to convert this using DOS-style short mode. If the path
27285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27286   # take no chances and rewrite it.
27287   # Note: m4 eats our [], so we need to use [ and ] instead.
27288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27289   if test "x$has_forbidden_chars" != x; then
27290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27292   fi
27293 
27294     # Output is in $new_path
27295 
27296   windows_path="$new_path"
27297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27298     unix_path=`$CYGPATH -u "$windows_path"`
27299     new_path="$unix_path"
27300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27302     new_path="$unix_path"
27303   fi
27304 
27305     # remove trailing .exe if any
27306     new_path="${new_path/%.exe/}"
27307 
27308     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27309     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27310   fi
27311 
27312   else
27313     # We're on a posix platform. Hooray! :)
27314     # First separate the path from the arguments. This will split at the first
27315     # space.
27316     complete="$VS_ENV_CMD"
27317     path="${complete%% *}"
27318     tmp="$complete EOL"
27319     arguments="${tmp#* }"
27320 
27321     # Cannot rely on the command "which" here since it doesn't always work.
27322     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27323     if test -z "$is_absolute_path"; then
27324       # Path to executable is not absolute. Find it.
27325       IFS_save="$IFS"
27326       IFS=:
27327       for p in $PATH; do
27328         if test -f "$p/$path" && test -x "$p/$path"; then
27329           new_path="$p/$path"
27330           break
27331         fi
27332       done
27333       IFS="$IFS_save"
27334     else
27335       # This is an absolute path, we can use it without further modifications.
27336       new_path="$path"
27337     fi
27338 
27339     if test "x$new_path" = x; then
27340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27341 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27342       has_space=`$ECHO "$complete" | $GREP " "`
27343       if test "x$has_space" != x; then
27344         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27345 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27346       fi
27347       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27348     fi
27349   fi
27350 
27351   # Now join together the path and the arguments once again
27352   if test "x$arguments" != xEOL; then
27353     new_complete="$new_path ${arguments% *}"
27354   else
27355     new_complete="$new_path"
27356   fi
27357 
27358   if test "x$complete" != "x$new_complete"; then
27359     VS_ENV_CMD="$new_complete"
27360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27361 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27362   fi
27363 
27364 
27365     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27366     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27367 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27368 
27369     # We need to create a couple of temporary files.
27370     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27371     $MKDIR -p $VS_ENV_TMP_DIR
27372 
27373     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27374     # Instead create a shell script which will set the relevant variables when run.
27375     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27376 
27377   unix_path="$WINPATH_VS_ENV_CMD"
27378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27379     windows_path=`$CYGPATH -m "$unix_path"`
27380     WINPATH_VS_ENV_CMD="$windows_path"
27381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27382     windows_path=`cmd //c echo $unix_path`
27383     WINPATH_VS_ENV_CMD="$windows_path"
27384   fi
27385 
27386     WINPATH_BASH="$BASH"
27387 
27388   unix_path="$WINPATH_BASH"
27389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27390     windows_path=`$CYGPATH -m "$unix_path"`
27391     WINPATH_BASH="$windows_path"
27392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27393     windows_path=`cmd //c echo $unix_path`
27394     WINPATH_BASH="$windows_path"
27395   fi
27396 
27397 
27398     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27399     # script (executable by bash) that will setup the important variables.
27400     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27401     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27402     # This will end up something like:
27403     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27404     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27405     # These will end up something like:
27406     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27407     # The trailing space for everyone except PATH is no typo, but is needed due
27408     # to trailing \ in the Windows paths. These will be stripped later.
27409     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27410     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27411     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27412     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27413     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27414     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27415 
27416     # Now execute the newly created bat file.
27417     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27418     # Change directory so we don't need to mess with Windows paths in redirects.
27419     cd $VS_ENV_TMP_DIR
27420     cmd /c extract-vs-env.bat | $CAT
27421     cd $CURDIR
27422 
27423     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27424       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27425 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27426       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27427 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27428       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27429 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27430       as_fn_error $? "Cannot continue" "$LINENO" 5
27431     fi
27432 
27433     # Now set all paths and other env variables. This will allow the rest of
27434     # the configure script to find and run the compiler in the proper way.
27435     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27436 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27437     . $VS_ENV_TMP_DIR/set-vs-env.sh
27438     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27439     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27440   else
27441     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27442     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27443 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27444   fi
27445 
27446   # At this point, we should have correct variables in the environment, or we can't continue.
27447   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27448 $as_echo_n "checking for Visual Studio variables... " >&6; }
27449 
27450   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27451     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27452       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27453 $as_echo "present but broken" >&6; }
27454       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27455     else
27456       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27457 $as_echo "ok" >&6; }
27458       # Remove any trailing "\" and " " from the variables.
27459       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27460       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27461       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27462       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27463       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27464       # Remove any paths containing # (typically F#) as that messes up make. This
27465       # is needed if visual studio was installed with F# support.
27466       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27467 
27468 
27469 
27470 
27471     fi
27472   else
27473     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27474 $as_echo "not found" >&6; }
27475 
27476     if test "x$VS_ENV_CMD" = x; then
27477       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27478 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27479       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27480 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27481     else
27482       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27483 $as_echo "$as_me: Running the extraction script failed." >&6;}
27484     fi
27485     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27486 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27487     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27488 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27489     as_fn_error $? "Cannot continue" "$LINENO" 5
27490   fi
27491 
27492     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27493     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27494     PATH="$VS_PATH"
27495     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27496     export INCLUDE="$VS_INCLUDE"
27497     export LIB="$VS_LIB"
27498   fi
27499 
27500   # autoconf magic only relies on PATH, so update it if tools dir is specified
27501   OLD_PATH="$PATH"
27502 
27503   # For solaris we really need solaris tools, and not the GNU equivalent.
27504   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27505   # so add that to path before starting to probe.
27506   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27507   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27508     PATH="/usr/ccs/bin:$PATH"
27509   fi
27510 
27511   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27512   # override all other locations.
27513   if test "x$TOOLCHAIN_PATH" != x; then
27514     PATH=$TOOLCHAIN_PATH:$PATH
27515   fi
27516 
27517 
27518   #
27519   # Setup the compilers (CC and CXX)
27520   #
27521 
27522   COMPILER_NAME=C
27523   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27524 
27525   if test "x$CC" != x; then
27526     # User has supplied compiler name already, always let that override.
27527     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27528 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27529     if test "x`basename $CC`" = "x$CC"; then
27530       # A command without a complete path is provided, search $PATH.
27531 
27532       for ac_prog in $CC
27533 do
27534   # Extract the first word of "$ac_prog", so it can be a program name with args.
27535 set dummy $ac_prog; ac_word=$2
27536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27537 $as_echo_n "checking for $ac_word... " >&6; }
27538 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27539   $as_echo_n "(cached) " >&6
27540 else
27541   case $POTENTIAL_CC in
27542   [\\/]* | ?:[\\/]*)
27543   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27544   ;;
27545   *)
27546   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27547 for as_dir in $PATH
27548 do
27549   IFS=$as_save_IFS
27550   test -z "$as_dir" && as_dir=.
27551     for ac_exec_ext in '' $ac_executable_extensions; do
27552   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27553     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27554     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27555     break 2
27556   fi
27557 done
27558   done
27559 IFS=$as_save_IFS
27560 
27561   ;;
27562 esac
27563 fi
27564 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27565 if test -n "$POTENTIAL_CC"; then
27566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27567 $as_echo "$POTENTIAL_CC" >&6; }
27568 else
27569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27570 $as_echo "no" >&6; }
27571 fi
27572 
27573 
27574   test -n "$POTENTIAL_CC" && break
27575 done
27576 
27577       if test "x$POTENTIAL_CC" != x; then
27578         CC=$POTENTIAL_CC
27579       else
27580         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27581       fi
27582     else
27583       # Otherwise it might already be a complete path
27584       if test ! -x "$CC"; then
27585         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27586       fi
27587     fi
27588   else
27589     # No user supplied value. Locate compiler ourselves.
27590 
27591     # If we are cross compiling, assume cross compilation tools follows the
27592     # cross compilation standard where they are prefixed with the autoconf
27593     # standard name for the target. For example the binary
27594     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27595     # If we are not cross compiling, then the default compiler name will be
27596     # used.
27597 
27598     CC=
27599     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27600     # before checking the rest of the PATH.
27601     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27602     # step, this should not be necessary.
27603     if test -n "$TOOLCHAIN_PATH"; then
27604       PATH_save="$PATH"
27605       PATH="$TOOLCHAIN_PATH"
27606       for ac_prog in $SEARCH_LIST
27607 do
27608   # Extract the first word of "$ac_prog", so it can be a program name with args.
27609 set dummy $ac_prog; ac_word=$2
27610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27611 $as_echo_n "checking for $ac_word... " >&6; }
27612 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27613   $as_echo_n "(cached) " >&6
27614 else
27615   case $TOOLCHAIN_PATH_CC in
27616   [\\/]* | ?:[\\/]*)
27617   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27618   ;;
27619   *)
27620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27621 for as_dir in $PATH
27622 do
27623   IFS=$as_save_IFS
27624   test -z "$as_dir" && as_dir=.
27625     for ac_exec_ext in '' $ac_executable_extensions; do
27626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27627     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27629     break 2
27630   fi
27631 done
27632   done
27633 IFS=$as_save_IFS
27634 
27635   ;;
27636 esac
27637 fi
27638 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27639 if test -n "$TOOLCHAIN_PATH_CC"; then
27640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27641 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27642 else
27643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27644 $as_echo "no" >&6; }
27645 fi
27646 
27647 
27648   test -n "$TOOLCHAIN_PATH_CC" && break
27649 done
27650 
27651       CC=$TOOLCHAIN_PATH_CC
27652       PATH="$PATH_save"
27653     fi
27654 
27655     # AC_PATH_PROGS can't be run multiple times with the same variable,
27656     # so create a new name for this run.
27657     if test "x$CC" = x; then
27658       for ac_prog in $SEARCH_LIST
27659 do
27660   # Extract the first word of "$ac_prog", so it can be a program name with args.
27661 set dummy $ac_prog; ac_word=$2
27662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27663 $as_echo_n "checking for $ac_word... " >&6; }
27664 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27665   $as_echo_n "(cached) " >&6
27666 else
27667   case $POTENTIAL_CC in
27668   [\\/]* | ?:[\\/]*)
27669   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27670   ;;
27671   *)
27672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27673 for as_dir in $PATH
27674 do
27675   IFS=$as_save_IFS
27676   test -z "$as_dir" && as_dir=.
27677     for ac_exec_ext in '' $ac_executable_extensions; do
27678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27679     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27681     break 2
27682   fi
27683 done
27684   done
27685 IFS=$as_save_IFS
27686 
27687   ;;
27688 esac
27689 fi
27690 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27691 if test -n "$POTENTIAL_CC"; then
27692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27693 $as_echo "$POTENTIAL_CC" >&6; }
27694 else
27695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27696 $as_echo "no" >&6; }
27697 fi
27698 
27699 
27700   test -n "$POTENTIAL_CC" && break
27701 done
27702 
27703       CC=$POTENTIAL_CC
27704     fi
27705 
27706     if test "x$CC" = x; then
27707 
27708   # Print a helpful message on how to acquire the necessary build dependency.
27709   # devkit is the help tag: freetype, cups, pulse, alsa etc
27710   MISSING_DEPENDENCY=devkit
27711 
27712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27713     cygwin_help $MISSING_DEPENDENCY
27714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27715     msys_help $MISSING_DEPENDENCY
27716   else
27717     PKGHANDLER_COMMAND=
27718 
27719     case $PKGHANDLER in
27720       apt-get)
27721         apt_help     $MISSING_DEPENDENCY ;;
27722       yum)
27723         yum_help     $MISSING_DEPENDENCY ;;
27724       port)
27725         port_help    $MISSING_DEPENDENCY ;;
27726       pkgutil)
27727         pkgutil_help $MISSING_DEPENDENCY ;;
27728       pkgadd)
27729         pkgadd_help  $MISSING_DEPENDENCY ;;
27730     esac
27731 
27732     if test "x$PKGHANDLER_COMMAND" != x; then
27733       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27734     fi
27735   fi
27736 
27737       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27738     fi
27739   fi
27740 
27741   # Now we have a compiler binary in CC. Make sure it's okay.
27742 
27743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27744 
27745   # First separate the path from the arguments. This will split at the first
27746   # space.
27747   complete="$CC"
27748   path="${complete%% *}"
27749   tmp="$complete EOL"
27750   arguments="${tmp#* }"
27751 
27752   # Input might be given as Windows format, start by converting to
27753   # unix format.
27754   new_path=`$CYGPATH -u "$path"`
27755 
27756   # Now try to locate executable using which
27757   new_path=`$WHICH "$new_path" 2> /dev/null`
27758   # bat and cmd files are not always considered executable in cygwin causing which
27759   # to not find them
27760   if test "x$new_path" = x \
27761       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27762       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27763     new_path=`$CYGPATH -u "$path"`
27764   fi
27765   if test "x$new_path" = x; then
27766     # Oops. Which didn't find the executable.
27767     # The splitting of arguments from the executable at a space might have been incorrect,
27768     # since paths with space are more likely in Windows. Give it another try with the whole
27769     # argument.
27770     path="$complete"
27771     arguments="EOL"
27772     new_path=`$CYGPATH -u "$path"`
27773     new_path=`$WHICH "$new_path" 2> /dev/null`
27774     # bat and cmd files are not always considered executable in cygwin causing which
27775     # to not find them
27776     if test "x$new_path" = x \
27777         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27778         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27779       new_path=`$CYGPATH -u "$path"`
27780     fi
27781     if test "x$new_path" = x; then
27782       # It's still not found. Now this is an unrecoverable error.
27783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27784 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27785       has_space=`$ECHO "$complete" | $GREP " "`
27786       if test "x$has_space" != x; then
27787         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27788 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27789       fi
27790       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27791     fi
27792   fi
27793 
27794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27797   # "foo.exe" is OK but "foo" is an error.
27798   #
27799   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27800   # It is also a way to make sure we got the proper file name for the real test later on.
27801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27802   if test "x$test_shortpath" = x; then
27803     # Short path failed, file does not exist as specified.
27804     # Try adding .exe or .cmd
27805     if test -f "${new_path}.exe"; then
27806       input_to_shortpath="${new_path}.exe"
27807     elif test -f "${new_path}.cmd"; then
27808       input_to_shortpath="${new_path}.cmd"
27809     else
27810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27811 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27812       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27813 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27814       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27815     fi
27816   else
27817     input_to_shortpath="$new_path"
27818   fi
27819 
27820   # Call helper function which possibly converts this using DOS-style short mode.
27821   # If so, the updated path is stored in $new_path.
27822   new_path="$input_to_shortpath"
27823 
27824   input_path="$input_to_shortpath"
27825   # Check if we need to convert this using DOS-style short mode. If the path
27826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27827   # take no chances and rewrite it.
27828   # Note: m4 eats our [], so we need to use [ and ] instead.
27829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27830   if test "x$has_forbidden_chars" != x; then
27831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27835       # Going to short mode and back again did indeed matter. Since short mode is
27836       # case insensitive, let's make it lowercase to improve readability.
27837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27838       # Now convert it back to Unix-stile (cygpath)
27839       input_path=`$CYGPATH -u "$shortmode_path"`
27840       new_path="$input_path"
27841     fi
27842   fi
27843 
27844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27845   if test "x$test_cygdrive_prefix" = x; then
27846     # As a simple fix, exclude /usr/bin since it's not a real path.
27847     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27849       # a path prefixed by /cygdrive for fixpath to work.
27850       new_path="$CYGWIN_ROOT_PATH$input_path"
27851     fi
27852   fi
27853 
27854   # remove trailing .exe if any
27855   new_path="${new_path/%.exe/}"
27856 
27857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858 
27859   # First separate the path from the arguments. This will split at the first
27860   # space.
27861   complete="$CC"
27862   path="${complete%% *}"
27863   tmp="$complete EOL"
27864   arguments="${tmp#* }"
27865 
27866   # Input might be given as Windows format, start by converting to
27867   # unix format.
27868   new_path="$path"
27869 
27870   windows_path="$new_path"
27871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27872     unix_path=`$CYGPATH -u "$windows_path"`
27873     new_path="$unix_path"
27874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27876     new_path="$unix_path"
27877   fi
27878 
27879 
27880   # Now try to locate executable using which
27881   new_path=`$WHICH "$new_path" 2> /dev/null`
27882 
27883   if test "x$new_path" = x; then
27884     # Oops. Which didn't find the executable.
27885     # The splitting of arguments from the executable at a space might have been incorrect,
27886     # since paths with space are more likely in Windows. Give it another try with the whole
27887     # argument.
27888     path="$complete"
27889     arguments="EOL"
27890     new_path="$path"
27891 
27892   windows_path="$new_path"
27893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27894     unix_path=`$CYGPATH -u "$windows_path"`
27895     new_path="$unix_path"
27896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27898     new_path="$unix_path"
27899   fi
27900 
27901 
27902     new_path=`$WHICH "$new_path" 2> /dev/null`
27903 
27904     if test "x$new_path" = x; then
27905       # It's still not found. Now this is an unrecoverable error.
27906       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27907 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27908       has_space=`$ECHO "$complete" | $GREP " "`
27909       if test "x$has_space" != x; then
27910         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27911 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27912       fi
27913       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27914     fi
27915   fi
27916 
27917   # Now new_path has a complete unix path to the binary
27918   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27919     # Keep paths in /bin as-is, but remove trailing .exe if any
27920     new_path="${new_path/%.exe/}"
27921     # Do not save /bin paths to all_fixpath_prefixes!
27922   else
27923     # Not in mixed or Windows style, start by that.
27924     new_path=`cmd //c echo $new_path`
27925 
27926   input_path="$new_path"
27927   # Check if we need to convert this using DOS-style short mode. If the path
27928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27929   # take no chances and rewrite it.
27930   # Note: m4 eats our [], so we need to use [ and ] instead.
27931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27932   if test "x$has_forbidden_chars" != x; then
27933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27934     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27935   fi
27936 
27937     # Output is in $new_path
27938 
27939   windows_path="$new_path"
27940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941     unix_path=`$CYGPATH -u "$windows_path"`
27942     new_path="$unix_path"
27943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945     new_path="$unix_path"
27946   fi
27947 
27948     # remove trailing .exe if any
27949     new_path="${new_path/%.exe/}"
27950 
27951     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27952     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27953   fi
27954 
27955   else
27956     # We're on a posix platform. Hooray! :)
27957     # First separate the path from the arguments. This will split at the first
27958     # space.
27959     complete="$CC"
27960     path="${complete%% *}"
27961     tmp="$complete EOL"
27962     arguments="${tmp#* }"
27963 
27964     # Cannot rely on the command "which" here since it doesn't always work.
27965     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27966     if test -z "$is_absolute_path"; then
27967       # Path to executable is not absolute. Find it.
27968       IFS_save="$IFS"
27969       IFS=:
27970       for p in $PATH; do
27971         if test -f "$p/$path" && test -x "$p/$path"; then
27972           new_path="$p/$path"
27973           break
27974         fi
27975       done
27976       IFS="$IFS_save"
27977     else
27978       # This is an absolute path, we can use it without further modifications.
27979       new_path="$path"
27980     fi
27981 
27982     if test "x$new_path" = x; then
27983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27984 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27985       has_space=`$ECHO "$complete" | $GREP " "`
27986       if test "x$has_space" != x; then
27987         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27988 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27989       fi
27990       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27991     fi
27992   fi
27993 
27994   # Now join together the path and the arguments once again
27995   if test "x$arguments" != xEOL; then
27996     new_complete="$new_path ${arguments% *}"
27997   else
27998     new_complete="$new_path"
27999   fi
28000 
28001   if test "x$complete" != "x$new_complete"; then
28002     CC="$new_complete"
28003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28004 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28005   fi
28006 
28007   TEST_COMPILER="$CC"
28008   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28009   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28010   if test "x$OPENJDK_BUILD_OS" != xaix; then
28011     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28013 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28014 
28015   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28016     # Follow a chain of symbolic links. Use readlink
28017     # where it exists, else fall back to horribly
28018     # complicated shell code.
28019     if test "x$READLINK_TESTED" != yes; then
28020       # On MacOSX there is a readlink tool with a different
28021       # purpose than the GNU readlink tool. Check the found readlink.
28022       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28023       if test "x$ISGNU" = x; then
28024         # A readlink that we do not know how to use.
28025         # Are there other non-GNU readlinks out there?
28026         READLINK_TESTED=yes
28027         READLINK=
28028       fi
28029     fi
28030 
28031     if test "x$READLINK" != x; then
28032       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28033     else
28034       # Save the current directory for restoring afterwards
28035       STARTDIR=$PWD
28036       COUNTER=0
28037       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28038       sym_link_file=`$BASENAME $TEST_COMPILER`
28039       cd $sym_link_dir
28040       # Use -P flag to resolve symlinks in directories.
28041       cd `$THEPWDCMD -P`
28042       sym_link_dir=`$THEPWDCMD -P`
28043       # Resolve file symlinks
28044       while test $COUNTER -lt 20; do
28045         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28046         if test "x$ISLINK" == x; then
28047           # This is not a symbolic link! We are done!
28048           break
28049         fi
28050         # Again resolve directory symlinks since the target of the just found
28051         # link could be in a different directory
28052         cd `$DIRNAME $ISLINK`
28053         sym_link_dir=`$THEPWDCMD -P`
28054         sym_link_file=`$BASENAME $ISLINK`
28055         let COUNTER=COUNTER+1
28056       done
28057       cd $STARTDIR
28058       TEST_COMPILER=$sym_link_dir/$sym_link_file
28059     fi
28060   fi
28061 
28062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28063 $as_echo "$TEST_COMPILER" >&6; }
28064   fi
28065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28066 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28067 
28068   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28069   if test "x$COMPILER_BASENAME" = "xccache"; then
28070     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28071 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28072     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28073     # We want to control ccache invocation ourselves, so ignore this cc and try
28074     # searching again.
28075 
28076     # Remove the path to the fake ccache cc from the PATH
28077     RETRY_COMPILER_SAVED_PATH="$PATH"
28078     COMPILER_DIRNAME=`$DIRNAME $CC`
28079     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28080 
28081     # Try again looking for our compiler
28082     if test -n "$ac_tool_prefix"; then
28083   for ac_prog in $TOOLCHAIN_CC_BINARY
28084   do
28085     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28086 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28088 $as_echo_n "checking for $ac_word... " >&6; }
28089 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28090   $as_echo_n "(cached) " >&6
28091 else
28092   if test -n "$PROPER_COMPILER_CC"; then
28093   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28094 else
28095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28096 for as_dir in $PATH
28097 do
28098   IFS=$as_save_IFS
28099   test -z "$as_dir" && as_dir=.
28100     for ac_exec_ext in '' $ac_executable_extensions; do
28101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28102     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28104     break 2
28105   fi
28106 done
28107   done
28108 IFS=$as_save_IFS
28109 
28110 fi
28111 fi
28112 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28113 if test -n "$PROPER_COMPILER_CC"; then
28114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28115 $as_echo "$PROPER_COMPILER_CC" >&6; }
28116 else
28117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28118 $as_echo "no" >&6; }
28119 fi
28120 
28121 
28122     test -n "$PROPER_COMPILER_CC" && break
28123   done
28124 fi
28125 if test -z "$PROPER_COMPILER_CC"; then
28126   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28127   for ac_prog in $TOOLCHAIN_CC_BINARY
28128 do
28129   # Extract the first word of "$ac_prog", so it can be a program name with args.
28130 set dummy $ac_prog; ac_word=$2
28131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28132 $as_echo_n "checking for $ac_word... " >&6; }
28133 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28134   $as_echo_n "(cached) " >&6
28135 else
28136   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28137   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28138 else
28139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28140 for as_dir in $PATH
28141 do
28142   IFS=$as_save_IFS
28143   test -z "$as_dir" && as_dir=.
28144     for ac_exec_ext in '' $ac_executable_extensions; do
28145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28146     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28148     break 2
28149   fi
28150 done
28151   done
28152 IFS=$as_save_IFS
28153 
28154 fi
28155 fi
28156 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28157 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28159 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28160 else
28161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28162 $as_echo "no" >&6; }
28163 fi
28164 
28165 
28166   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28167 done
28168 
28169   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28170     PROPER_COMPILER_CC=""
28171   else
28172     case $cross_compiling:$ac_tool_warned in
28173 yes:)
28174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28175 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28176 ac_tool_warned=yes ;;
28177 esac
28178     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28179   fi
28180 fi
28181 
28182 
28183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28184 
28185   # First separate the path from the arguments. This will split at the first
28186   # space.
28187   complete="$PROPER_COMPILER_CC"
28188   path="${complete%% *}"
28189   tmp="$complete EOL"
28190   arguments="${tmp#* }"
28191 
28192   # Input might be given as Windows format, start by converting to
28193   # unix format.
28194   new_path=`$CYGPATH -u "$path"`
28195 
28196   # Now try to locate executable using which
28197   new_path=`$WHICH "$new_path" 2> /dev/null`
28198   # bat and cmd files are not always considered executable in cygwin causing which
28199   # to not find them
28200   if test "x$new_path" = x \
28201       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28202       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28203     new_path=`$CYGPATH -u "$path"`
28204   fi
28205   if test "x$new_path" = x; then
28206     # Oops. Which didn't find the executable.
28207     # The splitting of arguments from the executable at a space might have been incorrect,
28208     # since paths with space are more likely in Windows. Give it another try with the whole
28209     # argument.
28210     path="$complete"
28211     arguments="EOL"
28212     new_path=`$CYGPATH -u "$path"`
28213     new_path=`$WHICH "$new_path" 2> /dev/null`
28214     # bat and cmd files are not always considered executable in cygwin causing which
28215     # to not find them
28216     if test "x$new_path" = x \
28217         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28218         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28219       new_path=`$CYGPATH -u "$path"`
28220     fi
28221     if test "x$new_path" = x; then
28222       # It's still not found. Now this is an unrecoverable error.
28223       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28224 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28225       has_space=`$ECHO "$complete" | $GREP " "`
28226       if test "x$has_space" != x; then
28227         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28228 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28229       fi
28230       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28231     fi
28232   fi
28233 
28234   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28235   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28236   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28237   # "foo.exe" is OK but "foo" is an error.
28238   #
28239   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28240   # It is also a way to make sure we got the proper file name for the real test later on.
28241   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28242   if test "x$test_shortpath" = x; then
28243     # Short path failed, file does not exist as specified.
28244     # Try adding .exe or .cmd
28245     if test -f "${new_path}.exe"; then
28246       input_to_shortpath="${new_path}.exe"
28247     elif test -f "${new_path}.cmd"; then
28248       input_to_shortpath="${new_path}.cmd"
28249     else
28250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28251 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28252       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28253 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28254       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28255     fi
28256   else
28257     input_to_shortpath="$new_path"
28258   fi
28259 
28260   # Call helper function which possibly converts this using DOS-style short mode.
28261   # If so, the updated path is stored in $new_path.
28262   new_path="$input_to_shortpath"
28263 
28264   input_path="$input_to_shortpath"
28265   # Check if we need to convert this using DOS-style short mode. If the path
28266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28267   # take no chances and rewrite it.
28268   # Note: m4 eats our [], so we need to use [ and ] instead.
28269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28270   if test "x$has_forbidden_chars" != x; then
28271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28275       # Going to short mode and back again did indeed matter. Since short mode is
28276       # case insensitive, let's make it lowercase to improve readability.
28277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28278       # Now convert it back to Unix-stile (cygpath)
28279       input_path=`$CYGPATH -u "$shortmode_path"`
28280       new_path="$input_path"
28281     fi
28282   fi
28283 
28284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28285   if test "x$test_cygdrive_prefix" = x; then
28286     # As a simple fix, exclude /usr/bin since it's not a real path.
28287     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28289       # a path prefixed by /cygdrive for fixpath to work.
28290       new_path="$CYGWIN_ROOT_PATH$input_path"
28291     fi
28292   fi
28293 
28294   # remove trailing .exe if any
28295   new_path="${new_path/%.exe/}"
28296 
28297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28298 
28299   # First separate the path from the arguments. This will split at the first
28300   # space.
28301   complete="$PROPER_COMPILER_CC"
28302   path="${complete%% *}"
28303   tmp="$complete EOL"
28304   arguments="${tmp#* }"
28305 
28306   # Input might be given as Windows format, start by converting to
28307   # unix format.
28308   new_path="$path"
28309 
28310   windows_path="$new_path"
28311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28312     unix_path=`$CYGPATH -u "$windows_path"`
28313     new_path="$unix_path"
28314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28316     new_path="$unix_path"
28317   fi
28318 
28319 
28320   # Now try to locate executable using which
28321   new_path=`$WHICH "$new_path" 2> /dev/null`
28322 
28323   if test "x$new_path" = x; then
28324     # Oops. Which didn't find the executable.
28325     # The splitting of arguments from the executable at a space might have been incorrect,
28326     # since paths with space are more likely in Windows. Give it another try with the whole
28327     # argument.
28328     path="$complete"
28329     arguments="EOL"
28330     new_path="$path"
28331 
28332   windows_path="$new_path"
28333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28334     unix_path=`$CYGPATH -u "$windows_path"`
28335     new_path="$unix_path"
28336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28338     new_path="$unix_path"
28339   fi
28340 
28341 
28342     new_path=`$WHICH "$new_path" 2> /dev/null`
28343 
28344     if test "x$new_path" = x; then
28345       # It's still not found. Now this is an unrecoverable error.
28346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28347 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28348       has_space=`$ECHO "$complete" | $GREP " "`
28349       if test "x$has_space" != x; then
28350         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28351 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28352       fi
28353       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28354     fi
28355   fi
28356 
28357   # Now new_path has a complete unix path to the binary
28358   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28359     # Keep paths in /bin as-is, but remove trailing .exe if any
28360     new_path="${new_path/%.exe/}"
28361     # Do not save /bin paths to all_fixpath_prefixes!
28362   else
28363     # Not in mixed or Windows style, start by that.
28364     new_path=`cmd //c echo $new_path`
28365 
28366   input_path="$new_path"
28367   # Check if we need to convert this using DOS-style short mode. If the path
28368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28369   # take no chances and rewrite it.
28370   # Note: m4 eats our [], so we need to use [ and ] instead.
28371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28372   if test "x$has_forbidden_chars" != x; then
28373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28374     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28375   fi
28376 
28377     # Output is in $new_path
28378 
28379   windows_path="$new_path"
28380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28381     unix_path=`$CYGPATH -u "$windows_path"`
28382     new_path="$unix_path"
28383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28385     new_path="$unix_path"
28386   fi
28387 
28388     # remove trailing .exe if any
28389     new_path="${new_path/%.exe/}"
28390 
28391     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28392     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28393   fi
28394 
28395   else
28396     # We're on a posix platform. Hooray! :)
28397     # First separate the path from the arguments. This will split at the first
28398     # space.
28399     complete="$PROPER_COMPILER_CC"
28400     path="${complete%% *}"
28401     tmp="$complete EOL"
28402     arguments="${tmp#* }"
28403 
28404     # Cannot rely on the command "which" here since it doesn't always work.
28405     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28406     if test -z "$is_absolute_path"; then
28407       # Path to executable is not absolute. Find it.
28408       IFS_save="$IFS"
28409       IFS=:
28410       for p in $PATH; do
28411         if test -f "$p/$path" && test -x "$p/$path"; then
28412           new_path="$p/$path"
28413           break
28414         fi
28415       done
28416       IFS="$IFS_save"
28417     else
28418       # This is an absolute path, we can use it without further modifications.
28419       new_path="$path"
28420     fi
28421 
28422     if test "x$new_path" = x; then
28423       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28424 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28425       has_space=`$ECHO "$complete" | $GREP " "`
28426       if test "x$has_space" != x; then
28427         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28428 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28429       fi
28430       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28431     fi
28432   fi
28433 
28434   # Now join together the path and the arguments once again
28435   if test "x$arguments" != xEOL; then
28436     new_complete="$new_path ${arguments% *}"
28437   else
28438     new_complete="$new_path"
28439   fi
28440 
28441   if test "x$complete" != "x$new_complete"; then
28442     PROPER_COMPILER_CC="$new_complete"
28443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28444 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28445   fi
28446 
28447     PATH="$RETRY_COMPILER_SAVED_PATH"
28448 
28449     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28450 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28451 
28452   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28453     # Follow a chain of symbolic links. Use readlink
28454     # where it exists, else fall back to horribly
28455     # complicated shell code.
28456     if test "x$READLINK_TESTED" != yes; then
28457       # On MacOSX there is a readlink tool with a different
28458       # purpose than the GNU readlink tool. Check the found readlink.
28459       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28460       if test "x$ISGNU" = x; then
28461         # A readlink that we do not know how to use.
28462         # Are there other non-GNU readlinks out there?
28463         READLINK_TESTED=yes
28464         READLINK=
28465       fi
28466     fi
28467 
28468     if test "x$READLINK" != x; then
28469       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28470     else
28471       # Save the current directory for restoring afterwards
28472       STARTDIR=$PWD
28473       COUNTER=0
28474       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28475       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28476       cd $sym_link_dir
28477       # Use -P flag to resolve symlinks in directories.
28478       cd `$THEPWDCMD -P`
28479       sym_link_dir=`$THEPWDCMD -P`
28480       # Resolve file symlinks
28481       while test $COUNTER -lt 20; do
28482         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28483         if test "x$ISLINK" == x; then
28484           # This is not a symbolic link! We are done!
28485           break
28486         fi
28487         # Again resolve directory symlinks since the target of the just found
28488         # link could be in a different directory
28489         cd `$DIRNAME $ISLINK`
28490         sym_link_dir=`$THEPWDCMD -P`
28491         sym_link_file=`$BASENAME $ISLINK`
28492         let COUNTER=COUNTER+1
28493       done
28494       cd $STARTDIR
28495       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28496     fi
28497   fi
28498 
28499     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28500 $as_echo "$PROPER_COMPILER_CC" >&6; }
28501     CC="$PROPER_COMPILER_CC"
28502   else
28503     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28504 $as_echo "no, keeping CC" >&6; }
28505   fi
28506 
28507 
28508   COMPILER=$CC
28509   COMPILER_NAME=$COMPILER_NAME
28510 
28511   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28512     # cc -V output typically looks like
28513     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28514     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28515     # Check that this is likely to be the Solaris Studio cc.
28516     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28517     if test $? -ne 0; then
28518       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28519       { $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
28520 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28521       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28522 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28523       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28524 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28525       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28526     fi
28527     # Remove usage instructions (if present), and
28528     # collapse compiler output into a single line
28529     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28530         $SED -e 's/ *[Uu]sage:.*//'`
28531     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28532         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28533   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28534     # xlc -qversion output typically looks like
28535     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28536     #     Version: 11.01.0000.0015
28537     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28538     # Check that this is likely to be the IBM XL C compiler.
28539     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28540     if test $? -ne 0; then
28541       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28542       { $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
28543 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28544       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28545 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28546       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28547 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28548       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28549     fi
28550     # Collapse compiler output into a single line
28551     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28552     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28553         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28554   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28555     # There is no specific version flag, but all output starts with a version string.
28556     # First line typically looks something like:
28557     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28558     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28559     # Check that this is likely to be Microsoft CL.EXE.
28560     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28561     if test $? -ne 0; then
28562       { $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
28563 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28564       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28565 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28566       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28567     fi
28568     # Collapse compiler output into a single line
28569     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28570     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28571         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28572   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28573     # gcc --version output typically looks like
28574     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28575     #     Copyright (C) 2013 Free Software Foundation, Inc.
28576     #     This is free software; see the source for copying conditions.  There is NO
28577     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28578     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28579     # Check that this is likely to be GCC.
28580     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28581     if test $? -ne 0; then
28582       { $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
28583 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28584       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28585 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28586       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28587     fi
28588     # Remove Copyright and legalese from version string, and
28589     # collapse into a single line
28590     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28591         $SED -e 's/ *Copyright .*//'`
28592     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28593         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28594   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28595     # clang --version output typically looks like
28596     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28597     #    clang version 3.3 (tags/RELEASE_33/final)
28598     # or
28599     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28600     #    Target: x86_64-pc-linux-gnu
28601     #    Thread model: posix
28602     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28603     # Check that this is likely to be clang
28604     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28605     if test $? -ne 0; then
28606       { $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
28607 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28608       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28609 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28610       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28611     fi
28612     # Collapse compiler output into a single line
28613     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28614     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28615         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28616   else
28617       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28618   fi
28619   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28620   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28621   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28622   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28623 
28624   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28625 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28626 
28627 
28628   # Now that we have resolved CC ourself, let autoconf have its go at it
28629   ac_ext=c
28630 ac_cpp='$CPP $CPPFLAGS'
28631 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28632 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28633 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28634 if test -n "$ac_tool_prefix"; then
28635   for ac_prog in $CC
28636   do
28637     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28638 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28640 $as_echo_n "checking for $ac_word... " >&6; }
28641 if ${ac_cv_prog_CC+:} false; then :
28642   $as_echo_n "(cached) " >&6
28643 else
28644   if test -n "$CC"; then
28645   ac_cv_prog_CC="$CC" # Let the user override the test.
28646 else
28647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28648 for as_dir in $PATH
28649 do
28650   IFS=$as_save_IFS
28651   test -z "$as_dir" && as_dir=.
28652     for ac_exec_ext in '' $ac_executable_extensions; do
28653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28654     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28656     break 2
28657   fi
28658 done
28659   done
28660 IFS=$as_save_IFS
28661 
28662 fi
28663 fi
28664 CC=$ac_cv_prog_CC
28665 if test -n "$CC"; then
28666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28667 $as_echo "$CC" >&6; }
28668 else
28669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28670 $as_echo "no" >&6; }
28671 fi
28672 
28673 
28674     test -n "$CC" && break
28675   done
28676 fi
28677 if test -z "$CC"; then
28678   ac_ct_CC=$CC
28679   for ac_prog in $CC
28680 do
28681   # Extract the first word of "$ac_prog", so it can be a program name with args.
28682 set dummy $ac_prog; ac_word=$2
28683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28684 $as_echo_n "checking for $ac_word... " >&6; }
28685 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28686   $as_echo_n "(cached) " >&6
28687 else
28688   if test -n "$ac_ct_CC"; then
28689   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28690 else
28691 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28692 for as_dir in $PATH
28693 do
28694   IFS=$as_save_IFS
28695   test -z "$as_dir" && as_dir=.
28696     for ac_exec_ext in '' $ac_executable_extensions; do
28697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28698     ac_cv_prog_ac_ct_CC="$ac_prog"
28699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28700     break 2
28701   fi
28702 done
28703   done
28704 IFS=$as_save_IFS
28705 
28706 fi
28707 fi
28708 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28709 if test -n "$ac_ct_CC"; then
28710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28711 $as_echo "$ac_ct_CC" >&6; }
28712 else
28713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28714 $as_echo "no" >&6; }
28715 fi
28716 
28717 
28718   test -n "$ac_ct_CC" && break
28719 done
28720 
28721   if test "x$ac_ct_CC" = x; then
28722     CC=""
28723   else
28724     case $cross_compiling:$ac_tool_warned in
28725 yes:)
28726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28727 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28728 ac_tool_warned=yes ;;
28729 esac
28730     CC=$ac_ct_CC
28731   fi
28732 fi
28733 
28734 
28735 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28736 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28737 as_fn_error $? "no acceptable C compiler found in \$PATH
28738 See \`config.log' for more details" "$LINENO" 5; }
28739 
28740 # Provide some information about the compiler.
28741 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28742 set X $ac_compile
28743 ac_compiler=$2
28744 for ac_option in --version -v -V -qversion; do
28745   { { ac_try="$ac_compiler $ac_option >&5"
28746 case "(($ac_try" in
28747   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28748   *) ac_try_echo=$ac_try;;
28749 esac
28750 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28751 $as_echo "$ac_try_echo"; } >&5
28752   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28753   ac_status=$?
28754   if test -s conftest.err; then
28755     sed '10a\
28756 ... rest of stderr output deleted ...
28757          10q' conftest.err >conftest.er1
28758     cat conftest.er1 >&5
28759   fi
28760   rm -f conftest.er1 conftest.err
28761   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28762   test $ac_status = 0; }
28763 done
28764 
28765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28766 /* end confdefs.h.  */
28767 
28768 int
28769 main ()
28770 {
28771 
28772   ;
28773   return 0;
28774 }
28775 _ACEOF
28776 ac_clean_files_save=$ac_clean_files
28777 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28778 # Try to create an executable without -o first, disregard a.out.
28779 # It will help us diagnose broken compilers, and finding out an intuition
28780 # of exeext.
28781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28782 $as_echo_n "checking whether the C compiler works... " >&6; }
28783 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28784 
28785 # The possible output files:
28786 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28787 
28788 ac_rmfiles=
28789 for ac_file in $ac_files
28790 do
28791   case $ac_file in
28792     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28793     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28794   esac
28795 done
28796 rm -f $ac_rmfiles
28797 
28798 if { { ac_try="$ac_link_default"
28799 case "(($ac_try" in
28800   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28801   *) ac_try_echo=$ac_try;;
28802 esac
28803 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28804 $as_echo "$ac_try_echo"; } >&5
28805   (eval "$ac_link_default") 2>&5
28806   ac_status=$?
28807   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28808   test $ac_status = 0; }; then :
28809   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28810 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28811 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28812 # so that the user can short-circuit this test for compilers unknown to
28813 # Autoconf.
28814 for ac_file in $ac_files ''
28815 do
28816   test -f "$ac_file" || continue
28817   case $ac_file in
28818     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28819         ;;
28820     [ab].out )
28821         # We found the default executable, but exeext='' is most
28822         # certainly right.
28823         break;;
28824     *.* )
28825         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28826         then :; else
28827            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28828         fi
28829         # We set ac_cv_exeext here because the later test for it is not
28830         # safe: cross compilers may not add the suffix if given an `-o'
28831         # argument, so we may need to know it at that point already.
28832         # Even if this section looks crufty: it has the advantage of
28833         # actually working.
28834         break;;
28835     * )
28836         break;;
28837   esac
28838 done
28839 test "$ac_cv_exeext" = no && ac_cv_exeext=
28840 
28841 else
28842   ac_file=''
28843 fi
28844 if test -z "$ac_file"; then :
28845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28846 $as_echo "no" >&6; }
28847 $as_echo "$as_me: failed program was:" >&5
28848 sed 's/^/| /' conftest.$ac_ext >&5
28849 
28850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28851 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28852 as_fn_error 77 "C compiler cannot create executables
28853 See \`config.log' for more details" "$LINENO" 5; }
28854 else
28855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28856 $as_echo "yes" >&6; }
28857 fi
28858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28859 $as_echo_n "checking for C compiler default output file name... " >&6; }
28860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28861 $as_echo "$ac_file" >&6; }
28862 ac_exeext=$ac_cv_exeext
28863 
28864 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28865 ac_clean_files=$ac_clean_files_save
28866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28867 $as_echo_n "checking for suffix of executables... " >&6; }
28868 if { { ac_try="$ac_link"
28869 case "(($ac_try" in
28870   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28871   *) ac_try_echo=$ac_try;;
28872 esac
28873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28874 $as_echo "$ac_try_echo"; } >&5
28875   (eval "$ac_link") 2>&5
28876   ac_status=$?
28877   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28878   test $ac_status = 0; }; then :
28879   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28880 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28881 # work properly (i.e., refer to `conftest.exe'), while it won't with
28882 # `rm'.
28883 for ac_file in conftest.exe conftest conftest.*; do
28884   test -f "$ac_file" || continue
28885   case $ac_file in
28886     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28887     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28888           break;;
28889     * ) break;;
28890   esac
28891 done
28892 else
28893   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28894 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28895 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28896 See \`config.log' for more details" "$LINENO" 5; }
28897 fi
28898 rm -f conftest conftest$ac_cv_exeext
28899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28900 $as_echo "$ac_cv_exeext" >&6; }
28901 
28902 rm -f conftest.$ac_ext
28903 EXEEXT=$ac_cv_exeext
28904 ac_exeext=$EXEEXT
28905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28906 /* end confdefs.h.  */
28907 #include <stdio.h>
28908 int
28909 main ()
28910 {
28911 FILE *f = fopen ("conftest.out", "w");
28912  return ferror (f) || fclose (f) != 0;
28913 
28914   ;
28915   return 0;
28916 }
28917 _ACEOF
28918 ac_clean_files="$ac_clean_files conftest.out"
28919 # Check that the compiler produces executables we can run.  If not, either
28920 # the compiler is broken, or we cross compile.
28921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28922 $as_echo_n "checking whether we are cross compiling... " >&6; }
28923 if test "$cross_compiling" != yes; then
28924   { { ac_try="$ac_link"
28925 case "(($ac_try" in
28926   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28927   *) ac_try_echo=$ac_try;;
28928 esac
28929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28930 $as_echo "$ac_try_echo"; } >&5
28931   (eval "$ac_link") 2>&5
28932   ac_status=$?
28933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28934   test $ac_status = 0; }
28935   if { ac_try='./conftest$ac_cv_exeext'
28936   { { case "(($ac_try" in
28937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28938   *) ac_try_echo=$ac_try;;
28939 esac
28940 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28941 $as_echo "$ac_try_echo"; } >&5
28942   (eval "$ac_try") 2>&5
28943   ac_status=$?
28944   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28945   test $ac_status = 0; }; }; then
28946     cross_compiling=no
28947   else
28948     if test "$cross_compiling" = maybe; then
28949         cross_compiling=yes
28950     else
28951         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28952 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28953 as_fn_error $? "cannot run C compiled programs.
28954 If you meant to cross compile, use \`--host'.
28955 See \`config.log' for more details" "$LINENO" 5; }
28956     fi
28957   fi
28958 fi
28959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28960 $as_echo "$cross_compiling" >&6; }
28961 
28962 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28963 ac_clean_files=$ac_clean_files_save
28964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28965 $as_echo_n "checking for suffix of object files... " >&6; }
28966 if ${ac_cv_objext+:} false; then :
28967   $as_echo_n "(cached) " >&6
28968 else
28969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28970 /* end confdefs.h.  */
28971 
28972 int
28973 main ()
28974 {
28975 
28976   ;
28977   return 0;
28978 }
28979 _ACEOF
28980 rm -f conftest.o conftest.obj
28981 if { { ac_try="$ac_compile"
28982 case "(($ac_try" in
28983   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28984   *) ac_try_echo=$ac_try;;
28985 esac
28986 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28987 $as_echo "$ac_try_echo"; } >&5
28988   (eval "$ac_compile") 2>&5
28989   ac_status=$?
28990   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28991   test $ac_status = 0; }; then :
28992   for ac_file in conftest.o conftest.obj conftest.*; do
28993   test -f "$ac_file" || continue;
28994   case $ac_file in
28995     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28996     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28997        break;;
28998   esac
28999 done
29000 else
29001   $as_echo "$as_me: failed program was:" >&5
29002 sed 's/^/| /' conftest.$ac_ext >&5
29003 
29004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29005 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29006 as_fn_error $? "cannot compute suffix of object files: cannot compile
29007 See \`config.log' for more details" "$LINENO" 5; }
29008 fi
29009 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29010 fi
29011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29012 $as_echo "$ac_cv_objext" >&6; }
29013 OBJEXT=$ac_cv_objext
29014 ac_objext=$OBJEXT
29015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29016 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29017 if ${ac_cv_c_compiler_gnu+:} false; then :
29018   $as_echo_n "(cached) " >&6
29019 else
29020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29021 /* end confdefs.h.  */
29022 
29023 int
29024 main ()
29025 {
29026 #ifndef __GNUC__
29027        choke me
29028 #endif
29029 
29030   ;
29031   return 0;
29032 }
29033 _ACEOF
29034 if ac_fn_c_try_compile "$LINENO"; then :
29035   ac_compiler_gnu=yes
29036 else
29037   ac_compiler_gnu=no
29038 fi
29039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29040 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29041 
29042 fi
29043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29044 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29045 if test $ac_compiler_gnu = yes; then
29046   GCC=yes
29047 else
29048   GCC=
29049 fi
29050 ac_test_CFLAGS=${CFLAGS+set}
29051 ac_save_CFLAGS=$CFLAGS
29052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29053 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29054 if ${ac_cv_prog_cc_g+:} false; then :
29055   $as_echo_n "(cached) " >&6
29056 else
29057   ac_save_c_werror_flag=$ac_c_werror_flag
29058    ac_c_werror_flag=yes
29059    ac_cv_prog_cc_g=no
29060    CFLAGS="-g"
29061    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29062 /* end confdefs.h.  */
29063 
29064 int
29065 main ()
29066 {
29067 
29068   ;
29069   return 0;
29070 }
29071 _ACEOF
29072 if ac_fn_c_try_compile "$LINENO"; then :
29073   ac_cv_prog_cc_g=yes
29074 else
29075   CFLAGS=""
29076       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29077 /* end confdefs.h.  */
29078 
29079 int
29080 main ()
29081 {
29082 
29083   ;
29084   return 0;
29085 }
29086 _ACEOF
29087 if ac_fn_c_try_compile "$LINENO"; then :
29088 
29089 else
29090   ac_c_werror_flag=$ac_save_c_werror_flag
29091          CFLAGS="-g"
29092          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093 /* end confdefs.h.  */
29094 
29095 int
29096 main ()
29097 {
29098 
29099   ;
29100   return 0;
29101 }
29102 _ACEOF
29103 if ac_fn_c_try_compile "$LINENO"; then :
29104   ac_cv_prog_cc_g=yes
29105 fi
29106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29107 fi
29108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29109 fi
29110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29111    ac_c_werror_flag=$ac_save_c_werror_flag
29112 fi
29113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29114 $as_echo "$ac_cv_prog_cc_g" >&6; }
29115 if test "$ac_test_CFLAGS" = set; then
29116   CFLAGS=$ac_save_CFLAGS
29117 elif test $ac_cv_prog_cc_g = yes; then
29118   if test "$GCC" = yes; then
29119     CFLAGS="-g -O2"
29120   else
29121     CFLAGS="-g"
29122   fi
29123 else
29124   if test "$GCC" = yes; then
29125     CFLAGS="-O2"
29126   else
29127     CFLAGS=
29128   fi
29129 fi
29130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29131 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29132 if ${ac_cv_prog_cc_c89+:} false; then :
29133   $as_echo_n "(cached) " >&6
29134 else
29135   ac_cv_prog_cc_c89=no
29136 ac_save_CC=$CC
29137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29138 /* end confdefs.h.  */
29139 #include <stdarg.h>
29140 #include <stdio.h>
29141 struct stat;
29142 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29143 struct buf { int x; };
29144 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29145 static char *e (p, i)
29146      char **p;
29147      int i;
29148 {
29149   return p[i];
29150 }
29151 static char *f (char * (*g) (char **, int), char **p, ...)
29152 {
29153   char *s;
29154   va_list v;
29155   va_start (v,p);
29156   s = g (p, va_arg (v,int));
29157   va_end (v);
29158   return s;
29159 }
29160 
29161 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29162    function prototypes and stuff, but not '\xHH' hex character constants.
29163    These don't provoke an error unfortunately, instead are silently treated
29164    as 'x'.  The following induces an error, until -std is added to get
29165    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29166    array size at least.  It's necessary to write '\x00'==0 to get something
29167    that's true only with -std.  */
29168 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29169 
29170 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29171    inside strings and character constants.  */
29172 #define FOO(x) 'x'
29173 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29174 
29175 int test (int i, double x);
29176 struct s1 {int (*f) (int a);};
29177 struct s2 {int (*f) (double a);};
29178 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29179 int argc;
29180 char **argv;
29181 int
29182 main ()
29183 {
29184 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29185   ;
29186   return 0;
29187 }
29188 _ACEOF
29189 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29190         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29191 do
29192   CC="$ac_save_CC $ac_arg"
29193   if ac_fn_c_try_compile "$LINENO"; then :
29194   ac_cv_prog_cc_c89=$ac_arg
29195 fi
29196 rm -f core conftest.err conftest.$ac_objext
29197   test "x$ac_cv_prog_cc_c89" != "xno" && break
29198 done
29199 rm -f conftest.$ac_ext
29200 CC=$ac_save_CC
29201 
29202 fi
29203 # AC_CACHE_VAL
29204 case "x$ac_cv_prog_cc_c89" in
29205   x)
29206     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29207 $as_echo "none needed" >&6; } ;;
29208   xno)
29209     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29210 $as_echo "unsupported" >&6; } ;;
29211   *)
29212     CC="$CC $ac_cv_prog_cc_c89"
29213     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29214 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29215 esac
29216 if test "x$ac_cv_prog_cc_c89" != xno; then :
29217 
29218 fi
29219 
29220 ac_ext=cpp
29221 ac_cpp='$CXXCPP $CPPFLAGS'
29222 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29223 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29224 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29225 
29226 
29227 
29228   COMPILER_NAME=C++
29229   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29230 
29231   if test "x$CXX" != x; then
29232     # User has supplied compiler name already, always let that override.
29233     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29234 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29235     if test "x`basename $CXX`" = "x$CXX"; then
29236       # A command without a complete path is provided, search $PATH.
29237 
29238       for ac_prog in $CXX
29239 do
29240   # Extract the first word of "$ac_prog", so it can be a program name with args.
29241 set dummy $ac_prog; ac_word=$2
29242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29243 $as_echo_n "checking for $ac_word... " >&6; }
29244 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29245   $as_echo_n "(cached) " >&6
29246 else
29247   case $POTENTIAL_CXX in
29248   [\\/]* | ?:[\\/]*)
29249   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29250   ;;
29251   *)
29252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29253 for as_dir in $PATH
29254 do
29255   IFS=$as_save_IFS
29256   test -z "$as_dir" && as_dir=.
29257     for ac_exec_ext in '' $ac_executable_extensions; do
29258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29259     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29261     break 2
29262   fi
29263 done
29264   done
29265 IFS=$as_save_IFS
29266 
29267   ;;
29268 esac
29269 fi
29270 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29271 if test -n "$POTENTIAL_CXX"; then
29272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29273 $as_echo "$POTENTIAL_CXX" >&6; }
29274 else
29275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29276 $as_echo "no" >&6; }
29277 fi
29278 
29279 
29280   test -n "$POTENTIAL_CXX" && break
29281 done
29282 
29283       if test "x$POTENTIAL_CXX" != x; then
29284         CXX=$POTENTIAL_CXX
29285       else
29286         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29287       fi
29288     else
29289       # Otherwise it might already be a complete path
29290       if test ! -x "$CXX"; then
29291         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29292       fi
29293     fi
29294   else
29295     # No user supplied value. Locate compiler ourselves.
29296 
29297     # If we are cross compiling, assume cross compilation tools follows the
29298     # cross compilation standard where they are prefixed with the autoconf
29299     # standard name for the target. For example the binary
29300     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29301     # If we are not cross compiling, then the default compiler name will be
29302     # used.
29303 
29304     CXX=
29305     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29306     # before checking the rest of the PATH.
29307     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29308     # step, this should not be necessary.
29309     if test -n "$TOOLCHAIN_PATH"; then
29310       PATH_save="$PATH"
29311       PATH="$TOOLCHAIN_PATH"
29312       for ac_prog in $SEARCH_LIST
29313 do
29314   # Extract the first word of "$ac_prog", so it can be a program name with args.
29315 set dummy $ac_prog; ac_word=$2
29316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29317 $as_echo_n "checking for $ac_word... " >&6; }
29318 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29319   $as_echo_n "(cached) " >&6
29320 else
29321   case $TOOLCHAIN_PATH_CXX in
29322   [\\/]* | ?:[\\/]*)
29323   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29324   ;;
29325   *)
29326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29327 for as_dir in $PATH
29328 do
29329   IFS=$as_save_IFS
29330   test -z "$as_dir" && as_dir=.
29331     for ac_exec_ext in '' $ac_executable_extensions; do
29332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29333     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29335     break 2
29336   fi
29337 done
29338   done
29339 IFS=$as_save_IFS
29340 
29341   ;;
29342 esac
29343 fi
29344 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29345 if test -n "$TOOLCHAIN_PATH_CXX"; then
29346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29347 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29348 else
29349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29350 $as_echo "no" >&6; }
29351 fi
29352 
29353 
29354   test -n "$TOOLCHAIN_PATH_CXX" && break
29355 done
29356 
29357       CXX=$TOOLCHAIN_PATH_CXX
29358       PATH="$PATH_save"
29359     fi
29360 
29361     # AC_PATH_PROGS can't be run multiple times with the same variable,
29362     # so create a new name for this run.
29363     if test "x$CXX" = x; then
29364       for ac_prog in $SEARCH_LIST
29365 do
29366   # Extract the first word of "$ac_prog", so it can be a program name with args.
29367 set dummy $ac_prog; ac_word=$2
29368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29369 $as_echo_n "checking for $ac_word... " >&6; }
29370 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29371   $as_echo_n "(cached) " >&6
29372 else
29373   case $POTENTIAL_CXX in
29374   [\\/]* | ?:[\\/]*)
29375   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29376   ;;
29377   *)
29378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29379 for as_dir in $PATH
29380 do
29381   IFS=$as_save_IFS
29382   test -z "$as_dir" && as_dir=.
29383     for ac_exec_ext in '' $ac_executable_extensions; do
29384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29385     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29387     break 2
29388   fi
29389 done
29390   done
29391 IFS=$as_save_IFS
29392 
29393   ;;
29394 esac
29395 fi
29396 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29397 if test -n "$POTENTIAL_CXX"; then
29398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29399 $as_echo "$POTENTIAL_CXX" >&6; }
29400 else
29401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29402 $as_echo "no" >&6; }
29403 fi
29404 
29405 
29406   test -n "$POTENTIAL_CXX" && break
29407 done
29408 
29409       CXX=$POTENTIAL_CXX
29410     fi
29411 
29412     if test "x$CXX" = x; then
29413 
29414   # Print a helpful message on how to acquire the necessary build dependency.
29415   # devkit is the help tag: freetype, cups, pulse, alsa etc
29416   MISSING_DEPENDENCY=devkit
29417 
29418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29419     cygwin_help $MISSING_DEPENDENCY
29420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29421     msys_help $MISSING_DEPENDENCY
29422   else
29423     PKGHANDLER_COMMAND=
29424 
29425     case $PKGHANDLER in
29426       apt-get)
29427         apt_help     $MISSING_DEPENDENCY ;;
29428       yum)
29429         yum_help     $MISSING_DEPENDENCY ;;
29430       port)
29431         port_help    $MISSING_DEPENDENCY ;;
29432       pkgutil)
29433         pkgutil_help $MISSING_DEPENDENCY ;;
29434       pkgadd)
29435         pkgadd_help  $MISSING_DEPENDENCY ;;
29436     esac
29437 
29438     if test "x$PKGHANDLER_COMMAND" != x; then
29439       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29440     fi
29441   fi
29442 
29443       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29444     fi
29445   fi
29446 
29447   # Now we have a compiler binary in CXX. Make sure it's okay.
29448 
29449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29450 
29451   # First separate the path from the arguments. This will split at the first
29452   # space.
29453   complete="$CXX"
29454   path="${complete%% *}"
29455   tmp="$complete EOL"
29456   arguments="${tmp#* }"
29457 
29458   # Input might be given as Windows format, start by converting to
29459   # unix format.
29460   new_path=`$CYGPATH -u "$path"`
29461 
29462   # Now try to locate executable using which
29463   new_path=`$WHICH "$new_path" 2> /dev/null`
29464   # bat and cmd files are not always considered executable in cygwin causing which
29465   # to not find them
29466   if test "x$new_path" = x \
29467       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29468       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29469     new_path=`$CYGPATH -u "$path"`
29470   fi
29471   if test "x$new_path" = x; then
29472     # Oops. Which didn't find the executable.
29473     # The splitting of arguments from the executable at a space might have been incorrect,
29474     # since paths with space are more likely in Windows. Give it another try with the whole
29475     # argument.
29476     path="$complete"
29477     arguments="EOL"
29478     new_path=`$CYGPATH -u "$path"`
29479     new_path=`$WHICH "$new_path" 2> /dev/null`
29480     # bat and cmd files are not always considered executable in cygwin causing which
29481     # to not find them
29482     if test "x$new_path" = x \
29483         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29484         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29485       new_path=`$CYGPATH -u "$path"`
29486     fi
29487     if test "x$new_path" = x; then
29488       # It's still not found. Now this is an unrecoverable error.
29489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29490 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29491       has_space=`$ECHO "$complete" | $GREP " "`
29492       if test "x$has_space" != x; then
29493         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29494 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29495       fi
29496       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29497     fi
29498   fi
29499 
29500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29503   # "foo.exe" is OK but "foo" is an error.
29504   #
29505   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29506   # It is also a way to make sure we got the proper file name for the real test later on.
29507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29508   if test "x$test_shortpath" = x; then
29509     # Short path failed, file does not exist as specified.
29510     # Try adding .exe or .cmd
29511     if test -f "${new_path}.exe"; then
29512       input_to_shortpath="${new_path}.exe"
29513     elif test -f "${new_path}.cmd"; then
29514       input_to_shortpath="${new_path}.cmd"
29515     else
29516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29517 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29518       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29519 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29520       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29521     fi
29522   else
29523     input_to_shortpath="$new_path"
29524   fi
29525 
29526   # Call helper function which possibly converts this using DOS-style short mode.
29527   # If so, the updated path is stored in $new_path.
29528   new_path="$input_to_shortpath"
29529 
29530   input_path="$input_to_shortpath"
29531   # Check if we need to convert this using DOS-style short mode. If the path
29532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29533   # take no chances and rewrite it.
29534   # Note: m4 eats our [], so we need to use [ and ] instead.
29535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29536   if test "x$has_forbidden_chars" != x; then
29537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29538     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29539     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29540     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29541       # Going to short mode and back again did indeed matter. Since short mode is
29542       # case insensitive, let's make it lowercase to improve readability.
29543       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29544       # Now convert it back to Unix-stile (cygpath)
29545       input_path=`$CYGPATH -u "$shortmode_path"`
29546       new_path="$input_path"
29547     fi
29548   fi
29549 
29550   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29551   if test "x$test_cygdrive_prefix" = x; then
29552     # As a simple fix, exclude /usr/bin since it's not a real path.
29553     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29554       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29555       # a path prefixed by /cygdrive for fixpath to work.
29556       new_path="$CYGWIN_ROOT_PATH$input_path"
29557     fi
29558   fi
29559 
29560   # remove trailing .exe if any
29561   new_path="${new_path/%.exe/}"
29562 
29563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29564 
29565   # First separate the path from the arguments. This will split at the first
29566   # space.
29567   complete="$CXX"
29568   path="${complete%% *}"
29569   tmp="$complete EOL"
29570   arguments="${tmp#* }"
29571 
29572   # Input might be given as Windows format, start by converting to
29573   # unix format.
29574   new_path="$path"
29575 
29576   windows_path="$new_path"
29577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29578     unix_path=`$CYGPATH -u "$windows_path"`
29579     new_path="$unix_path"
29580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29582     new_path="$unix_path"
29583   fi
29584 
29585 
29586   # Now try to locate executable using which
29587   new_path=`$WHICH "$new_path" 2> /dev/null`
29588 
29589   if test "x$new_path" = x; then
29590     # Oops. Which didn't find the executable.
29591     # The splitting of arguments from the executable at a space might have been incorrect,
29592     # since paths with space are more likely in Windows. Give it another try with the whole
29593     # argument.
29594     path="$complete"
29595     arguments="EOL"
29596     new_path="$path"
29597 
29598   windows_path="$new_path"
29599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29600     unix_path=`$CYGPATH -u "$windows_path"`
29601     new_path="$unix_path"
29602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29604     new_path="$unix_path"
29605   fi
29606 
29607 
29608     new_path=`$WHICH "$new_path" 2> /dev/null`
29609 
29610     if test "x$new_path" = x; then
29611       # It's still not found. Now this is an unrecoverable error.
29612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29613 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29614       has_space=`$ECHO "$complete" | $GREP " "`
29615       if test "x$has_space" != x; then
29616         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29617 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29618       fi
29619       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29620     fi
29621   fi
29622 
29623   # Now new_path has a complete unix path to the binary
29624   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29625     # Keep paths in /bin as-is, but remove trailing .exe if any
29626     new_path="${new_path/%.exe/}"
29627     # Do not save /bin paths to all_fixpath_prefixes!
29628   else
29629     # Not in mixed or Windows style, start by that.
29630     new_path=`cmd //c echo $new_path`
29631 
29632   input_path="$new_path"
29633   # Check if we need to convert this using DOS-style short mode. If the path
29634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29635   # take no chances and rewrite it.
29636   # Note: m4 eats our [], so we need to use [ and ] instead.
29637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29638   if test "x$has_forbidden_chars" != x; then
29639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29640     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29641   fi
29642 
29643     # Output is in $new_path
29644 
29645   windows_path="$new_path"
29646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29647     unix_path=`$CYGPATH -u "$windows_path"`
29648     new_path="$unix_path"
29649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29651     new_path="$unix_path"
29652   fi
29653 
29654     # remove trailing .exe if any
29655     new_path="${new_path/%.exe/}"
29656 
29657     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29658     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29659   fi
29660 
29661   else
29662     # We're on a posix platform. Hooray! :)
29663     # First separate the path from the arguments. This will split at the first
29664     # space.
29665     complete="$CXX"
29666     path="${complete%% *}"
29667     tmp="$complete EOL"
29668     arguments="${tmp#* }"
29669 
29670     # Cannot rely on the command "which" here since it doesn't always work.
29671     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29672     if test -z "$is_absolute_path"; then
29673       # Path to executable is not absolute. Find it.
29674       IFS_save="$IFS"
29675       IFS=:
29676       for p in $PATH; do
29677         if test -f "$p/$path" && test -x "$p/$path"; then
29678           new_path="$p/$path"
29679           break
29680         fi
29681       done
29682       IFS="$IFS_save"
29683     else
29684       # This is an absolute path, we can use it without further modifications.
29685       new_path="$path"
29686     fi
29687 
29688     if test "x$new_path" = x; then
29689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29690 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29691       has_space=`$ECHO "$complete" | $GREP " "`
29692       if test "x$has_space" != x; then
29693         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29694 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29695       fi
29696       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29697     fi
29698   fi
29699 
29700   # Now join together the path and the arguments once again
29701   if test "x$arguments" != xEOL; then
29702     new_complete="$new_path ${arguments% *}"
29703   else
29704     new_complete="$new_path"
29705   fi
29706 
29707   if test "x$complete" != "x$new_complete"; then
29708     CXX="$new_complete"
29709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29710 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29711   fi
29712 
29713   TEST_COMPILER="$CXX"
29714   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29715   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29716   if test "x$OPENJDK_BUILD_OS" != xaix; then
29717     # FIXME: This test should not be needed anymore; we don't do that for any platform.
29718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29719 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29720 
29721   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29722     # Follow a chain of symbolic links. Use readlink
29723     # where it exists, else fall back to horribly
29724     # complicated shell code.
29725     if test "x$READLINK_TESTED" != yes; then
29726       # On MacOSX there is a readlink tool with a different
29727       # purpose than the GNU readlink tool. Check the found readlink.
29728       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29729       if test "x$ISGNU" = x; then
29730         # A readlink that we do not know how to use.
29731         # Are there other non-GNU readlinks out there?
29732         READLINK_TESTED=yes
29733         READLINK=
29734       fi
29735     fi
29736 
29737     if test "x$READLINK" != x; then
29738       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29739     else
29740       # Save the current directory for restoring afterwards
29741       STARTDIR=$PWD
29742       COUNTER=0
29743       sym_link_dir=`$DIRNAME $TEST_COMPILER`
29744       sym_link_file=`$BASENAME $TEST_COMPILER`
29745       cd $sym_link_dir
29746       # Use -P flag to resolve symlinks in directories.
29747       cd `$THEPWDCMD -P`
29748       sym_link_dir=`$THEPWDCMD -P`
29749       # Resolve file symlinks
29750       while test $COUNTER -lt 20; do
29751         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29752         if test "x$ISLINK" == x; then
29753           # This is not a symbolic link! We are done!
29754           break
29755         fi
29756         # Again resolve directory symlinks since the target of the just found
29757         # link could be in a different directory
29758         cd `$DIRNAME $ISLINK`
29759         sym_link_dir=`$THEPWDCMD -P`
29760         sym_link_file=`$BASENAME $ISLINK`
29761         let COUNTER=COUNTER+1
29762       done
29763       cd $STARTDIR
29764       TEST_COMPILER=$sym_link_dir/$sym_link_file
29765     fi
29766   fi
29767 
29768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29769 $as_echo "$TEST_COMPILER" >&6; }
29770   fi
29771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29772 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29773 
29774   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29775   if test "x$COMPILER_BASENAME" = "xccache"; then
29776     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29777 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29778     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29779     # We want to control ccache invocation ourselves, so ignore this cc and try
29780     # searching again.
29781 
29782     # Remove the path to the fake ccache cc from the PATH
29783     RETRY_COMPILER_SAVED_PATH="$PATH"
29784     COMPILER_DIRNAME=`$DIRNAME $CXX`
29785     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29786 
29787     # Try again looking for our compiler
29788     if test -n "$ac_tool_prefix"; then
29789   for ac_prog in $TOOLCHAIN_CXX_BINARY
29790   do
29791     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29792 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29794 $as_echo_n "checking for $ac_word... " >&6; }
29795 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29796   $as_echo_n "(cached) " >&6
29797 else
29798   if test -n "$PROPER_COMPILER_CXX"; then
29799   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29800 else
29801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29802 for as_dir in $PATH
29803 do
29804   IFS=$as_save_IFS
29805   test -z "$as_dir" && as_dir=.
29806     for ac_exec_ext in '' $ac_executable_extensions; do
29807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29808     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29810     break 2
29811   fi
29812 done
29813   done
29814 IFS=$as_save_IFS
29815 
29816 fi
29817 fi
29818 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29819 if test -n "$PROPER_COMPILER_CXX"; then
29820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29821 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29822 else
29823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29824 $as_echo "no" >&6; }
29825 fi
29826 
29827 
29828     test -n "$PROPER_COMPILER_CXX" && break
29829   done
29830 fi
29831 if test -z "$PROPER_COMPILER_CXX"; then
29832   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29833   for ac_prog in $TOOLCHAIN_CXX_BINARY
29834 do
29835   # Extract the first word of "$ac_prog", so it can be a program name with args.
29836 set dummy $ac_prog; ac_word=$2
29837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29838 $as_echo_n "checking for $ac_word... " >&6; }
29839 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29840   $as_echo_n "(cached) " >&6
29841 else
29842   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29843   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29844 else
29845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29846 for as_dir in $PATH
29847 do
29848   IFS=$as_save_IFS
29849   test -z "$as_dir" && as_dir=.
29850     for ac_exec_ext in '' $ac_executable_extensions; do
29851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29852     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29854     break 2
29855   fi
29856 done
29857   done
29858 IFS=$as_save_IFS
29859 
29860 fi
29861 fi
29862 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29863 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29865 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29866 else
29867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29868 $as_echo "no" >&6; }
29869 fi
29870 
29871 
29872   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29873 done
29874 
29875   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29876     PROPER_COMPILER_CXX=""
29877   else
29878     case $cross_compiling:$ac_tool_warned in
29879 yes:)
29880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29881 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29882 ac_tool_warned=yes ;;
29883 esac
29884     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29885   fi
29886 fi
29887 
29888 
29889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29890 
29891   # First separate the path from the arguments. This will split at the first
29892   # space.
29893   complete="$PROPER_COMPILER_CXX"
29894   path="${complete%% *}"
29895   tmp="$complete EOL"
29896   arguments="${tmp#* }"
29897 
29898   # Input might be given as Windows format, start by converting to
29899   # unix format.
29900   new_path=`$CYGPATH -u "$path"`
29901 
29902   # Now try to locate executable using which
29903   new_path=`$WHICH "$new_path" 2> /dev/null`
29904   # bat and cmd files are not always considered executable in cygwin causing which
29905   # to not find them
29906   if test "x$new_path" = x \
29907       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29908       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29909     new_path=`$CYGPATH -u "$path"`
29910   fi
29911   if test "x$new_path" = x; then
29912     # Oops. Which didn't find the executable.
29913     # The splitting of arguments from the executable at a space might have been incorrect,
29914     # since paths with space are more likely in Windows. Give it another try with the whole
29915     # argument.
29916     path="$complete"
29917     arguments="EOL"
29918     new_path=`$CYGPATH -u "$path"`
29919     new_path=`$WHICH "$new_path" 2> /dev/null`
29920     # bat and cmd files are not always considered executable in cygwin causing which
29921     # to not find them
29922     if test "x$new_path" = x \
29923         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29924         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29925       new_path=`$CYGPATH -u "$path"`
29926     fi
29927     if test "x$new_path" = x; then
29928       # It's still not found. Now this is an unrecoverable error.
29929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29930 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29931       has_space=`$ECHO "$complete" | $GREP " "`
29932       if test "x$has_space" != x; then
29933         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29934 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29935       fi
29936       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29937     fi
29938   fi
29939 
29940   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29941   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29942   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29943   # "foo.exe" is OK but "foo" is an error.
29944   #
29945   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29946   # It is also a way to make sure we got the proper file name for the real test later on.
29947   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29948   if test "x$test_shortpath" = x; then
29949     # Short path failed, file does not exist as specified.
29950     # Try adding .exe or .cmd
29951     if test -f "${new_path}.exe"; then
29952       input_to_shortpath="${new_path}.exe"
29953     elif test -f "${new_path}.cmd"; then
29954       input_to_shortpath="${new_path}.cmd"
29955     else
29956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29957 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29958       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29959 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29960       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29961     fi
29962   else
29963     input_to_shortpath="$new_path"
29964   fi
29965 
29966   # Call helper function which possibly converts this using DOS-style short mode.
29967   # If so, the updated path is stored in $new_path.
29968   new_path="$input_to_shortpath"
29969 
29970   input_path="$input_to_shortpath"
29971   # Check if we need to convert this using DOS-style short mode. If the path
29972   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29973   # take no chances and rewrite it.
29974   # Note: m4 eats our [], so we need to use [ and ] instead.
29975   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29976   if test "x$has_forbidden_chars" != x; then
29977     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29978     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29979     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29980     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29981       # Going to short mode and back again did indeed matter. Since short mode is
29982       # case insensitive, let's make it lowercase to improve readability.
29983       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29984       # Now convert it back to Unix-stile (cygpath)
29985       input_path=`$CYGPATH -u "$shortmode_path"`
29986       new_path="$input_path"
29987     fi
29988   fi
29989 
29990   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29991   if test "x$test_cygdrive_prefix" = x; then
29992     # As a simple fix, exclude /usr/bin since it's not a real path.
29993     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29994       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29995       # a path prefixed by /cygdrive for fixpath to work.
29996       new_path="$CYGWIN_ROOT_PATH$input_path"
29997     fi
29998   fi
29999 
30000   # remove trailing .exe if any
30001   new_path="${new_path/%.exe/}"
30002 
30003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30004 
30005   # First separate the path from the arguments. This will split at the first
30006   # space.
30007   complete="$PROPER_COMPILER_CXX"
30008   path="${complete%% *}"
30009   tmp="$complete EOL"
30010   arguments="${tmp#* }"
30011 
30012   # Input might be given as Windows format, start by converting to
30013   # unix format.
30014   new_path="$path"
30015 
30016   windows_path="$new_path"
30017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30018     unix_path=`$CYGPATH -u "$windows_path"`
30019     new_path="$unix_path"
30020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30022     new_path="$unix_path"
30023   fi
30024 
30025 
30026   # Now try to locate executable using which
30027   new_path=`$WHICH "$new_path" 2> /dev/null`
30028 
30029   if test "x$new_path" = x; then
30030     # Oops. Which didn't find the executable.
30031     # The splitting of arguments from the executable at a space might have been incorrect,
30032     # since paths with space are more likely in Windows. Give it another try with the whole
30033     # argument.
30034     path="$complete"
30035     arguments="EOL"
30036     new_path="$path"
30037 
30038   windows_path="$new_path"
30039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30040     unix_path=`$CYGPATH -u "$windows_path"`
30041     new_path="$unix_path"
30042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30044     new_path="$unix_path"
30045   fi
30046 
30047 
30048     new_path=`$WHICH "$new_path" 2> /dev/null`
30049 
30050     if test "x$new_path" = x; then
30051       # It's still not found. Now this is an unrecoverable error.
30052       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30053 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30054       has_space=`$ECHO "$complete" | $GREP " "`
30055       if test "x$has_space" != x; then
30056         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30057 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30058       fi
30059       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30060     fi
30061   fi
30062 
30063   # Now new_path has a complete unix path to the binary
30064   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30065     # Keep paths in /bin as-is, but remove trailing .exe if any
30066     new_path="${new_path/%.exe/}"
30067     # Do not save /bin paths to all_fixpath_prefixes!
30068   else
30069     # Not in mixed or Windows style, start by that.
30070     new_path=`cmd //c echo $new_path`
30071 
30072   input_path="$new_path"
30073   # Check if we need to convert this using DOS-style short mode. If the path
30074   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30075   # take no chances and rewrite it.
30076   # Note: m4 eats our [], so we need to use [ and ] instead.
30077   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30078   if test "x$has_forbidden_chars" != x; then
30079     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30080     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30081   fi
30082 
30083     # Output is in $new_path
30084 
30085   windows_path="$new_path"
30086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30087     unix_path=`$CYGPATH -u "$windows_path"`
30088     new_path="$unix_path"
30089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30090     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30091     new_path="$unix_path"
30092   fi
30093 
30094     # remove trailing .exe if any
30095     new_path="${new_path/%.exe/}"
30096 
30097     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30098     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30099   fi
30100 
30101   else
30102     # We're on a posix platform. Hooray! :)
30103     # First separate the path from the arguments. This will split at the first
30104     # space.
30105     complete="$PROPER_COMPILER_CXX"
30106     path="${complete%% *}"
30107     tmp="$complete EOL"
30108     arguments="${tmp#* }"
30109 
30110     # Cannot rely on the command "which" here since it doesn't always work.
30111     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30112     if test -z "$is_absolute_path"; then
30113       # Path to executable is not absolute. Find it.
30114       IFS_save="$IFS"
30115       IFS=:
30116       for p in $PATH; do
30117         if test -f "$p/$path" && test -x "$p/$path"; then
30118           new_path="$p/$path"
30119           break
30120         fi
30121       done
30122       IFS="$IFS_save"
30123     else
30124       # This is an absolute path, we can use it without further modifications.
30125       new_path="$path"
30126     fi
30127 
30128     if test "x$new_path" = x; then
30129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30130 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30131       has_space=`$ECHO "$complete" | $GREP " "`
30132       if test "x$has_space" != x; then
30133         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30134 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30135       fi
30136       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30137     fi
30138   fi
30139 
30140   # Now join together the path and the arguments once again
30141   if test "x$arguments" != xEOL; then
30142     new_complete="$new_path ${arguments% *}"
30143   else
30144     new_complete="$new_path"
30145   fi
30146 
30147   if test "x$complete" != "x$new_complete"; then
30148     PROPER_COMPILER_CXX="$new_complete"
30149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30150 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30151   fi
30152 
30153     PATH="$RETRY_COMPILER_SAVED_PATH"
30154 
30155     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30156 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30157 
30158   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30159     # Follow a chain of symbolic links. Use readlink
30160     # where it exists, else fall back to horribly
30161     # complicated shell code.
30162     if test "x$READLINK_TESTED" != yes; then
30163       # On MacOSX there is a readlink tool with a different
30164       # purpose than the GNU readlink tool. Check the found readlink.
30165       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30166       if test "x$ISGNU" = x; then
30167         # A readlink that we do not know how to use.
30168         # Are there other non-GNU readlinks out there?
30169         READLINK_TESTED=yes
30170         READLINK=
30171       fi
30172     fi
30173 
30174     if test "x$READLINK" != x; then
30175       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30176     else
30177       # Save the current directory for restoring afterwards
30178       STARTDIR=$PWD
30179       COUNTER=0
30180       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30181       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30182       cd $sym_link_dir
30183       # Use -P flag to resolve symlinks in directories.
30184       cd `$THEPWDCMD -P`
30185       sym_link_dir=`$THEPWDCMD -P`
30186       # Resolve file symlinks
30187       while test $COUNTER -lt 20; do
30188         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30189         if test "x$ISLINK" == x; then
30190           # This is not a symbolic link! We are done!
30191           break
30192         fi
30193         # Again resolve directory symlinks since the target of the just found
30194         # link could be in a different directory
30195         cd `$DIRNAME $ISLINK`
30196         sym_link_dir=`$THEPWDCMD -P`
30197         sym_link_file=`$BASENAME $ISLINK`
30198         let COUNTER=COUNTER+1
30199       done
30200       cd $STARTDIR
30201       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30202     fi
30203   fi
30204 
30205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30206 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30207     CXX="$PROPER_COMPILER_CXX"
30208   else
30209     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30210 $as_echo "no, keeping CXX" >&6; }
30211   fi
30212 
30213 
30214   COMPILER=$CXX
30215   COMPILER_NAME=$COMPILER_NAME
30216 
30217   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30218     # cc -V output typically looks like
30219     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30220     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30221     # Check that this is likely to be the Solaris Studio cc.
30222     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30223     if test $? -ne 0; then
30224       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30225       { $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
30226 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30227       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30228 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30229       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30230 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30231       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30232     fi
30233     # Remove usage instructions (if present), and
30234     # collapse compiler output into a single line
30235     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30236         $SED -e 's/ *[Uu]sage:.*//'`
30237     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30238         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30239   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30240     # xlc -qversion output typically looks like
30241     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30242     #     Version: 11.01.0000.0015
30243     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30244     # Check that this is likely to be the IBM XL C compiler.
30245     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30246     if test $? -ne 0; then
30247       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30248       { $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
30249 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30250       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30251 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30252       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30253 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30254       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30255     fi
30256     # Collapse compiler output into a single line
30257     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30258     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30259         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30260   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30261     # There is no specific version flag, but all output starts with a version string.
30262     # First line typically looks something like:
30263     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30264     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30265     # Check that this is likely to be Microsoft CL.EXE.
30266     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30267     if test $? -ne 0; then
30268       { $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
30269 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30270       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30271 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30272       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30273     fi
30274     # Collapse compiler output into a single line
30275     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30276     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30277         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30278   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30279     # gcc --version output typically looks like
30280     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30281     #     Copyright (C) 2013 Free Software Foundation, Inc.
30282     #     This is free software; see the source for copying conditions.  There is NO
30283     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30284     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30285     # Check that this is likely to be GCC.
30286     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30287     if test $? -ne 0; then
30288       { $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
30289 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30290       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30291 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30292       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30293     fi
30294     # Remove Copyright and legalese from version string, and
30295     # collapse into a single line
30296     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30297         $SED -e 's/ *Copyright .*//'`
30298     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30299         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30300   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30301     # clang --version output typically looks like
30302     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30303     #    clang version 3.3 (tags/RELEASE_33/final)
30304     # or
30305     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30306     #    Target: x86_64-pc-linux-gnu
30307     #    Thread model: posix
30308     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30309     # Check that this is likely to be clang
30310     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30311     if test $? -ne 0; then
30312       { $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
30313 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30314       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30315 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30316       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30317     fi
30318     # Collapse compiler output into a single line
30319     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30320     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30321         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30322   else
30323       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30324   fi
30325   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30326   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30327   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30328   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30329 
30330   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30331 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30332 
30333 
30334   # Now that we have resolved CXX ourself, let autoconf have its go at it
30335   ac_ext=cpp
30336 ac_cpp='$CXXCPP $CPPFLAGS'
30337 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30338 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30339 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30340 if test -z "$CXX"; then
30341   if test -n "$CCC"; then
30342     CXX=$CCC
30343   else
30344     if test -n "$ac_tool_prefix"; then
30345   for ac_prog in $CXX
30346   do
30347     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30348 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30350 $as_echo_n "checking for $ac_word... " >&6; }
30351 if ${ac_cv_prog_CXX+:} false; then :
30352   $as_echo_n "(cached) " >&6
30353 else
30354   if test -n "$CXX"; then
30355   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30356 else
30357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30358 for as_dir in $PATH
30359 do
30360   IFS=$as_save_IFS
30361   test -z "$as_dir" && as_dir=.
30362     for ac_exec_ext in '' $ac_executable_extensions; do
30363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30364     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30366     break 2
30367   fi
30368 done
30369   done
30370 IFS=$as_save_IFS
30371 
30372 fi
30373 fi
30374 CXX=$ac_cv_prog_CXX
30375 if test -n "$CXX"; then
30376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30377 $as_echo "$CXX" >&6; }
30378 else
30379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30380 $as_echo "no" >&6; }
30381 fi
30382 
30383 
30384     test -n "$CXX" && break
30385   done
30386 fi
30387 if test -z "$CXX"; then
30388   ac_ct_CXX=$CXX
30389   for ac_prog in $CXX
30390 do
30391   # Extract the first word of "$ac_prog", so it can be a program name with args.
30392 set dummy $ac_prog; ac_word=$2
30393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30394 $as_echo_n "checking for $ac_word... " >&6; }
30395 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30396   $as_echo_n "(cached) " >&6
30397 else
30398   if test -n "$ac_ct_CXX"; then
30399   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30400 else
30401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30402 for as_dir in $PATH
30403 do
30404   IFS=$as_save_IFS
30405   test -z "$as_dir" && as_dir=.
30406     for ac_exec_ext in '' $ac_executable_extensions; do
30407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30408     ac_cv_prog_ac_ct_CXX="$ac_prog"
30409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30410     break 2
30411   fi
30412 done
30413   done
30414 IFS=$as_save_IFS
30415 
30416 fi
30417 fi
30418 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30419 if test -n "$ac_ct_CXX"; then
30420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30421 $as_echo "$ac_ct_CXX" >&6; }
30422 else
30423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30424 $as_echo "no" >&6; }
30425 fi
30426 
30427 
30428   test -n "$ac_ct_CXX" && break
30429 done
30430 
30431   if test "x$ac_ct_CXX" = x; then
30432     CXX="g++"
30433   else
30434     case $cross_compiling:$ac_tool_warned in
30435 yes:)
30436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30437 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30438 ac_tool_warned=yes ;;
30439 esac
30440     CXX=$ac_ct_CXX
30441   fi
30442 fi
30443 
30444   fi
30445 fi
30446 # Provide some information about the compiler.
30447 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30448 set X $ac_compile
30449 ac_compiler=$2
30450 for ac_option in --version -v -V -qversion; do
30451   { { ac_try="$ac_compiler $ac_option >&5"
30452 case "(($ac_try" in
30453   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30454   *) ac_try_echo=$ac_try;;
30455 esac
30456 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30457 $as_echo "$ac_try_echo"; } >&5
30458   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30459   ac_status=$?
30460   if test -s conftest.err; then
30461     sed '10a\
30462 ... rest of stderr output deleted ...
30463          10q' conftest.err >conftest.er1
30464     cat conftest.er1 >&5
30465   fi
30466   rm -f conftest.er1 conftest.err
30467   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30468   test $ac_status = 0; }
30469 done
30470 
30471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30472 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30473 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30474   $as_echo_n "(cached) " >&6
30475 else
30476   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30477 /* end confdefs.h.  */
30478 
30479 int
30480 main ()
30481 {
30482 #ifndef __GNUC__
30483        choke me
30484 #endif
30485 
30486   ;
30487   return 0;
30488 }
30489 _ACEOF
30490 if ac_fn_cxx_try_compile "$LINENO"; then :
30491   ac_compiler_gnu=yes
30492 else
30493   ac_compiler_gnu=no
30494 fi
30495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30496 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30497 
30498 fi
30499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30500 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30501 if test $ac_compiler_gnu = yes; then
30502   GXX=yes
30503 else
30504   GXX=
30505 fi
30506 ac_test_CXXFLAGS=${CXXFLAGS+set}
30507 ac_save_CXXFLAGS=$CXXFLAGS
30508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30509 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30510 if ${ac_cv_prog_cxx_g+:} false; then :
30511   $as_echo_n "(cached) " >&6
30512 else
30513   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30514    ac_cxx_werror_flag=yes
30515    ac_cv_prog_cxx_g=no
30516    CXXFLAGS="-g"
30517    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30518 /* end confdefs.h.  */
30519 
30520 int
30521 main ()
30522 {
30523 
30524   ;
30525   return 0;
30526 }
30527 _ACEOF
30528 if ac_fn_cxx_try_compile "$LINENO"; then :
30529   ac_cv_prog_cxx_g=yes
30530 else
30531   CXXFLAGS=""
30532       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30533 /* end confdefs.h.  */
30534 
30535 int
30536 main ()
30537 {
30538 
30539   ;
30540   return 0;
30541 }
30542 _ACEOF
30543 if ac_fn_cxx_try_compile "$LINENO"; then :
30544 
30545 else
30546   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30547          CXXFLAGS="-g"
30548          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30549 /* end confdefs.h.  */
30550 
30551 int
30552 main ()
30553 {
30554 
30555   ;
30556   return 0;
30557 }
30558 _ACEOF
30559 if ac_fn_cxx_try_compile "$LINENO"; then :
30560   ac_cv_prog_cxx_g=yes
30561 fi
30562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30563 fi
30564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30565 fi
30566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30567    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30568 fi
30569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30570 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30571 if test "$ac_test_CXXFLAGS" = set; then
30572   CXXFLAGS=$ac_save_CXXFLAGS
30573 elif test $ac_cv_prog_cxx_g = yes; then
30574   if test "$GXX" = yes; then
30575     CXXFLAGS="-g -O2"
30576   else
30577     CXXFLAGS="-g"
30578   fi
30579 else
30580   if test "$GXX" = yes; then
30581     CXXFLAGS="-O2"
30582   else
30583     CXXFLAGS=
30584   fi
30585 fi
30586 ac_ext=cpp
30587 ac_cpp='$CXXCPP $CPPFLAGS'
30588 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30589 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30590 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30591 
30592 
30593   #
30594   # Setup the preprocessor (CPP and CXXCPP)
30595   #
30596   ac_ext=c
30597 ac_cpp='$CPP $CPPFLAGS'
30598 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30599 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30600 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30602 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30603 # On Suns, sometimes $CPP names a directory.
30604 if test -n "$CPP" && test -d "$CPP"; then
30605   CPP=
30606 fi
30607 if test -z "$CPP"; then
30608   if ${ac_cv_prog_CPP+:} false; then :
30609   $as_echo_n "(cached) " >&6
30610 else
30611       # Double quotes because CPP needs to be expanded
30612     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30613     do
30614       ac_preproc_ok=false
30615 for ac_c_preproc_warn_flag in '' yes
30616 do
30617   # Use a header file that comes with gcc, so configuring glibc
30618   # with a fresh cross-compiler works.
30619   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30620   # <limits.h> exists even on freestanding compilers.
30621   # On the NeXT, cc -E runs the code through the compiler's parser,
30622   # not just through cpp. "Syntax error" is here to catch this case.
30623   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30624 /* end confdefs.h.  */
30625 #ifdef __STDC__
30626 # include <limits.h>
30627 #else
30628 # include <assert.h>
30629 #endif
30630                      Syntax error
30631 _ACEOF
30632 if ac_fn_c_try_cpp "$LINENO"; then :
30633 
30634 else
30635   # Broken: fails on valid input.
30636 continue
30637 fi
30638 rm -f conftest.err conftest.i conftest.$ac_ext
30639 
30640   # OK, works on sane cases.  Now check whether nonexistent headers
30641   # can be detected and how.
30642   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30643 /* end confdefs.h.  */
30644 #include <ac_nonexistent.h>
30645 _ACEOF
30646 if ac_fn_c_try_cpp "$LINENO"; then :
30647   # Broken: success on invalid input.
30648 continue
30649 else
30650   # Passes both tests.
30651 ac_preproc_ok=:
30652 break
30653 fi
30654 rm -f conftest.err conftest.i conftest.$ac_ext
30655 
30656 done
30657 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30658 rm -f conftest.i conftest.err conftest.$ac_ext
30659 if $ac_preproc_ok; then :
30660   break
30661 fi
30662 
30663     done
30664     ac_cv_prog_CPP=$CPP
30665 
30666 fi
30667   CPP=$ac_cv_prog_CPP
30668 else
30669   ac_cv_prog_CPP=$CPP
30670 fi
30671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30672 $as_echo "$CPP" >&6; }
30673 ac_preproc_ok=false
30674 for ac_c_preproc_warn_flag in '' yes
30675 do
30676   # Use a header file that comes with gcc, so configuring glibc
30677   # with a fresh cross-compiler works.
30678   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30679   # <limits.h> exists even on freestanding compilers.
30680   # On the NeXT, cc -E runs the code through the compiler's parser,
30681   # not just through cpp. "Syntax error" is here to catch this case.
30682   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30683 /* end confdefs.h.  */
30684 #ifdef __STDC__
30685 # include <limits.h>
30686 #else
30687 # include <assert.h>
30688 #endif
30689                      Syntax error
30690 _ACEOF
30691 if ac_fn_c_try_cpp "$LINENO"; then :
30692 
30693 else
30694   # Broken: fails on valid input.
30695 continue
30696 fi
30697 rm -f conftest.err conftest.i conftest.$ac_ext
30698 
30699   # OK, works on sane cases.  Now check whether nonexistent headers
30700   # can be detected and how.
30701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702 /* end confdefs.h.  */
30703 #include <ac_nonexistent.h>
30704 _ACEOF
30705 if ac_fn_c_try_cpp "$LINENO"; then :
30706   # Broken: success on invalid input.
30707 continue
30708 else
30709   # Passes both tests.
30710 ac_preproc_ok=:
30711 break
30712 fi
30713 rm -f conftest.err conftest.i conftest.$ac_ext
30714 
30715 done
30716 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30717 rm -f conftest.i conftest.err conftest.$ac_ext
30718 if $ac_preproc_ok; then :
30719 
30720 else
30721   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30722 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30723 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30724 See \`config.log' for more details" "$LINENO" 5; }
30725 fi
30726 
30727 ac_ext=cpp
30728 ac_cpp='$CXXCPP $CPPFLAGS'
30729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30732 
30733 
30734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30735 
30736   # First separate the path from the arguments. This will split at the first
30737   # space.
30738   complete="$CPP"
30739   path="${complete%% *}"
30740   tmp="$complete EOL"
30741   arguments="${tmp#* }"
30742 
30743   # Input might be given as Windows format, start by converting to
30744   # unix format.
30745   new_path=`$CYGPATH -u "$path"`
30746 
30747   # Now try to locate executable using which
30748   new_path=`$WHICH "$new_path" 2> /dev/null`
30749   # bat and cmd files are not always considered executable in cygwin causing which
30750   # to not find them
30751   if test "x$new_path" = x \
30752       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30753       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30754     new_path=`$CYGPATH -u "$path"`
30755   fi
30756   if test "x$new_path" = x; then
30757     # Oops. Which didn't find the executable.
30758     # The splitting of arguments from the executable at a space might have been incorrect,
30759     # since paths with space are more likely in Windows. Give it another try with the whole
30760     # argument.
30761     path="$complete"
30762     arguments="EOL"
30763     new_path=`$CYGPATH -u "$path"`
30764     new_path=`$WHICH "$new_path" 2> /dev/null`
30765     # bat and cmd files are not always considered executable in cygwin causing which
30766     # to not find them
30767     if test "x$new_path" = x \
30768         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30769         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30770       new_path=`$CYGPATH -u "$path"`
30771     fi
30772     if test "x$new_path" = x; then
30773       # It's still not found. Now this is an unrecoverable error.
30774       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30775 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30776       has_space=`$ECHO "$complete" | $GREP " "`
30777       if test "x$has_space" != x; then
30778         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30779 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30780       fi
30781       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30782     fi
30783   fi
30784 
30785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30788   # "foo.exe" is OK but "foo" is an error.
30789   #
30790   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30791   # It is also a way to make sure we got the proper file name for the real test later on.
30792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30793   if test "x$test_shortpath" = x; then
30794     # Short path failed, file does not exist as specified.
30795     # Try adding .exe or .cmd
30796     if test -f "${new_path}.exe"; then
30797       input_to_shortpath="${new_path}.exe"
30798     elif test -f "${new_path}.cmd"; then
30799       input_to_shortpath="${new_path}.cmd"
30800     else
30801       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30802 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30803       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30804 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30805       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30806     fi
30807   else
30808     input_to_shortpath="$new_path"
30809   fi
30810 
30811   # Call helper function which possibly converts this using DOS-style short mode.
30812   # If so, the updated path is stored in $new_path.
30813   new_path="$input_to_shortpath"
30814 
30815   input_path="$input_to_shortpath"
30816   # Check if we need to convert this using DOS-style short mode. If the path
30817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30818   # take no chances and rewrite it.
30819   # Note: m4 eats our [], so we need to use [ and ] instead.
30820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30821   if test "x$has_forbidden_chars" != x; then
30822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30826       # Going to short mode and back again did indeed matter. Since short mode is
30827       # case insensitive, let's make it lowercase to improve readability.
30828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30829       # Now convert it back to Unix-stile (cygpath)
30830       input_path=`$CYGPATH -u "$shortmode_path"`
30831       new_path="$input_path"
30832     fi
30833   fi
30834 
30835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30836   if test "x$test_cygdrive_prefix" = x; then
30837     # As a simple fix, exclude /usr/bin since it's not a real path.
30838     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30840       # a path prefixed by /cygdrive for fixpath to work.
30841       new_path="$CYGWIN_ROOT_PATH$input_path"
30842     fi
30843   fi
30844 
30845   # remove trailing .exe if any
30846   new_path="${new_path/%.exe/}"
30847 
30848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30849 
30850   # First separate the path from the arguments. This will split at the first
30851   # space.
30852   complete="$CPP"
30853   path="${complete%% *}"
30854   tmp="$complete EOL"
30855   arguments="${tmp#* }"
30856 
30857   # Input might be given as Windows format, start by converting to
30858   # unix format.
30859   new_path="$path"
30860 
30861   windows_path="$new_path"
30862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30863     unix_path=`$CYGPATH -u "$windows_path"`
30864     new_path="$unix_path"
30865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30867     new_path="$unix_path"
30868   fi
30869 
30870 
30871   # Now try to locate executable using which
30872   new_path=`$WHICH "$new_path" 2> /dev/null`
30873 
30874   if test "x$new_path" = x; then
30875     # Oops. Which didn't find the executable.
30876     # The splitting of arguments from the executable at a space might have been incorrect,
30877     # since paths with space are more likely in Windows. Give it another try with the whole
30878     # argument.
30879     path="$complete"
30880     arguments="EOL"
30881     new_path="$path"
30882 
30883   windows_path="$new_path"
30884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30885     unix_path=`$CYGPATH -u "$windows_path"`
30886     new_path="$unix_path"
30887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30889     new_path="$unix_path"
30890   fi
30891 
30892 
30893     new_path=`$WHICH "$new_path" 2> /dev/null`
30894 
30895     if test "x$new_path" = x; then
30896       # It's still not found. Now this is an unrecoverable error.
30897       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30898 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30899       has_space=`$ECHO "$complete" | $GREP " "`
30900       if test "x$has_space" != x; then
30901         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30902 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30903       fi
30904       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30905     fi
30906   fi
30907 
30908   # Now new_path has a complete unix path to the binary
30909   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30910     # Keep paths in /bin as-is, but remove trailing .exe if any
30911     new_path="${new_path/%.exe/}"
30912     # Do not save /bin paths to all_fixpath_prefixes!
30913   else
30914     # Not in mixed or Windows style, start by that.
30915     new_path=`cmd //c echo $new_path`
30916 
30917   input_path="$new_path"
30918   # Check if we need to convert this using DOS-style short mode. If the path
30919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30920   # take no chances and rewrite it.
30921   # Note: m4 eats our [], so we need to use [ and ] instead.
30922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30923   if test "x$has_forbidden_chars" != x; then
30924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30926   fi
30927 
30928     # Output is in $new_path
30929 
30930   windows_path="$new_path"
30931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30932     unix_path=`$CYGPATH -u "$windows_path"`
30933     new_path="$unix_path"
30934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30936     new_path="$unix_path"
30937   fi
30938 
30939     # remove trailing .exe if any
30940     new_path="${new_path/%.exe/}"
30941 
30942     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30943     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30944   fi
30945 
30946   else
30947     # We're on a posix platform. Hooray! :)
30948     # First separate the path from the arguments. This will split at the first
30949     # space.
30950     complete="$CPP"
30951     path="${complete%% *}"
30952     tmp="$complete EOL"
30953     arguments="${tmp#* }"
30954 
30955     # Cannot rely on the command "which" here since it doesn't always work.
30956     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30957     if test -z "$is_absolute_path"; then
30958       # Path to executable is not absolute. Find it.
30959       IFS_save="$IFS"
30960       IFS=:
30961       for p in $PATH; do
30962         if test -f "$p/$path" && test -x "$p/$path"; then
30963           new_path="$p/$path"
30964           break
30965         fi
30966       done
30967       IFS="$IFS_save"
30968     else
30969       # This is an absolute path, we can use it without further modifications.
30970       new_path="$path"
30971     fi
30972 
30973     if test "x$new_path" = x; then
30974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30975 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30976       has_space=`$ECHO "$complete" | $GREP " "`
30977       if test "x$has_space" != x; then
30978         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30979 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30980       fi
30981       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30982     fi
30983   fi
30984 
30985   # Now join together the path and the arguments once again
30986   if test "x$arguments" != xEOL; then
30987     new_complete="$new_path ${arguments% *}"
30988   else
30989     new_complete="$new_path"
30990   fi
30991 
30992   if test "x$complete" != "x$new_complete"; then
30993     CPP="$new_complete"
30994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30995 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30996   fi
30997 
30998   ac_ext=cpp
30999 ac_cpp='$CXXCPP $CPPFLAGS'
31000 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31001 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31002 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31004 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31005 if test -z "$CXXCPP"; then
31006   if ${ac_cv_prog_CXXCPP+:} false; then :
31007   $as_echo_n "(cached) " >&6
31008 else
31009       # Double quotes because CXXCPP needs to be expanded
31010     for CXXCPP in "$CXX -E" "/lib/cpp"
31011     do
31012       ac_preproc_ok=false
31013 for ac_cxx_preproc_warn_flag in '' yes
31014 do
31015   # Use a header file that comes with gcc, so configuring glibc
31016   # with a fresh cross-compiler works.
31017   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31018   # <limits.h> exists even on freestanding compilers.
31019   # On the NeXT, cc -E runs the code through the compiler's parser,
31020   # not just through cpp. "Syntax error" is here to catch this case.
31021   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022 /* end confdefs.h.  */
31023 #ifdef __STDC__
31024 # include <limits.h>
31025 #else
31026 # include <assert.h>
31027 #endif
31028                      Syntax error
31029 _ACEOF
31030 if ac_fn_cxx_try_cpp "$LINENO"; then :
31031 
31032 else
31033   # Broken: fails on valid input.
31034 continue
31035 fi
31036 rm -f conftest.err conftest.i conftest.$ac_ext
31037 
31038   # OK, works on sane cases.  Now check whether nonexistent headers
31039   # can be detected and how.
31040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31041 /* end confdefs.h.  */
31042 #include <ac_nonexistent.h>
31043 _ACEOF
31044 if ac_fn_cxx_try_cpp "$LINENO"; then :
31045   # Broken: success on invalid input.
31046 continue
31047 else
31048   # Passes both tests.
31049 ac_preproc_ok=:
31050 break
31051 fi
31052 rm -f conftest.err conftest.i conftest.$ac_ext
31053 
31054 done
31055 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31056 rm -f conftest.i conftest.err conftest.$ac_ext
31057 if $ac_preproc_ok; then :
31058   break
31059 fi
31060 
31061     done
31062     ac_cv_prog_CXXCPP=$CXXCPP
31063 
31064 fi
31065   CXXCPP=$ac_cv_prog_CXXCPP
31066 else
31067   ac_cv_prog_CXXCPP=$CXXCPP
31068 fi
31069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31070 $as_echo "$CXXCPP" >&6; }
31071 ac_preproc_ok=false
31072 for ac_cxx_preproc_warn_flag in '' yes
31073 do
31074   # Use a header file that comes with gcc, so configuring glibc
31075   # with a fresh cross-compiler works.
31076   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31077   # <limits.h> exists even on freestanding compilers.
31078   # On the NeXT, cc -E runs the code through the compiler's parser,
31079   # not just through cpp. "Syntax error" is here to catch this case.
31080   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31081 /* end confdefs.h.  */
31082 #ifdef __STDC__
31083 # include <limits.h>
31084 #else
31085 # include <assert.h>
31086 #endif
31087                      Syntax error
31088 _ACEOF
31089 if ac_fn_cxx_try_cpp "$LINENO"; then :
31090 
31091 else
31092   # Broken: fails on valid input.
31093 continue
31094 fi
31095 rm -f conftest.err conftest.i conftest.$ac_ext
31096 
31097   # OK, works on sane cases.  Now check whether nonexistent headers
31098   # can be detected and how.
31099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31100 /* end confdefs.h.  */
31101 #include <ac_nonexistent.h>
31102 _ACEOF
31103 if ac_fn_cxx_try_cpp "$LINENO"; then :
31104   # Broken: success on invalid input.
31105 continue
31106 else
31107   # Passes both tests.
31108 ac_preproc_ok=:
31109 break
31110 fi
31111 rm -f conftest.err conftest.i conftest.$ac_ext
31112 
31113 done
31114 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31115 rm -f conftest.i conftest.err conftest.$ac_ext
31116 if $ac_preproc_ok; then :
31117 
31118 else
31119   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31120 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31121 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31122 See \`config.log' for more details" "$LINENO" 5; }
31123 fi
31124 
31125 ac_ext=cpp
31126 ac_cpp='$CXXCPP $CPPFLAGS'
31127 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31128 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31129 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31130 
31131 
31132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31133 
31134   # First separate the path from the arguments. This will split at the first
31135   # space.
31136   complete="$CXXCPP"
31137   path="${complete%% *}"
31138   tmp="$complete EOL"
31139   arguments="${tmp#* }"
31140 
31141   # Input might be given as Windows format, start by converting to
31142   # unix format.
31143   new_path=`$CYGPATH -u "$path"`
31144 
31145   # Now try to locate executable using which
31146   new_path=`$WHICH "$new_path" 2> /dev/null`
31147   # bat and cmd files are not always considered executable in cygwin causing which
31148   # to not find them
31149   if test "x$new_path" = x \
31150       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31151       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31152     new_path=`$CYGPATH -u "$path"`
31153   fi
31154   if test "x$new_path" = x; then
31155     # Oops. Which didn't find the executable.
31156     # The splitting of arguments from the executable at a space might have been incorrect,
31157     # since paths with space are more likely in Windows. Give it another try with the whole
31158     # argument.
31159     path="$complete"
31160     arguments="EOL"
31161     new_path=`$CYGPATH -u "$path"`
31162     new_path=`$WHICH "$new_path" 2> /dev/null`
31163     # bat and cmd files are not always considered executable in cygwin causing which
31164     # to not find them
31165     if test "x$new_path" = x \
31166         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31167         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31168       new_path=`$CYGPATH -u "$path"`
31169     fi
31170     if test "x$new_path" = x; then
31171       # It's still not found. Now this is an unrecoverable error.
31172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31173 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31174       has_space=`$ECHO "$complete" | $GREP " "`
31175       if test "x$has_space" != x; then
31176         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31178       fi
31179       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31180     fi
31181   fi
31182 
31183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31186   # "foo.exe" is OK but "foo" is an error.
31187   #
31188   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31189   # It is also a way to make sure we got the proper file name for the real test later on.
31190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31191   if test "x$test_shortpath" = x; then
31192     # Short path failed, file does not exist as specified.
31193     # Try adding .exe or .cmd
31194     if test -f "${new_path}.exe"; then
31195       input_to_shortpath="${new_path}.exe"
31196     elif test -f "${new_path}.cmd"; then
31197       input_to_shortpath="${new_path}.cmd"
31198     else
31199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31200 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31201       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31202 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31203       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31204     fi
31205   else
31206     input_to_shortpath="$new_path"
31207   fi
31208 
31209   # Call helper function which possibly converts this using DOS-style short mode.
31210   # If so, the updated path is stored in $new_path.
31211   new_path="$input_to_shortpath"
31212 
31213   input_path="$input_to_shortpath"
31214   # Check if we need to convert this using DOS-style short mode. If the path
31215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31216   # take no chances and rewrite it.
31217   # Note: m4 eats our [], so we need to use [ and ] instead.
31218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31219   if test "x$has_forbidden_chars" != x; then
31220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31221     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31222     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31223     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31224       # Going to short mode and back again did indeed matter. Since short mode is
31225       # case insensitive, let's make it lowercase to improve readability.
31226       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31227       # Now convert it back to Unix-stile (cygpath)
31228       input_path=`$CYGPATH -u "$shortmode_path"`
31229       new_path="$input_path"
31230     fi
31231   fi
31232 
31233   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31234   if test "x$test_cygdrive_prefix" = x; then
31235     # As a simple fix, exclude /usr/bin since it's not a real path.
31236     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31237       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31238       # a path prefixed by /cygdrive for fixpath to work.
31239       new_path="$CYGWIN_ROOT_PATH$input_path"
31240     fi
31241   fi
31242 
31243   # remove trailing .exe if any
31244   new_path="${new_path/%.exe/}"
31245 
31246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31247 
31248   # First separate the path from the arguments. This will split at the first
31249   # space.
31250   complete="$CXXCPP"
31251   path="${complete%% *}"
31252   tmp="$complete EOL"
31253   arguments="${tmp#* }"
31254 
31255   # Input might be given as Windows format, start by converting to
31256   # unix format.
31257   new_path="$path"
31258 
31259   windows_path="$new_path"
31260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31261     unix_path=`$CYGPATH -u "$windows_path"`
31262     new_path="$unix_path"
31263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31265     new_path="$unix_path"
31266   fi
31267 
31268 
31269   # Now try to locate executable using which
31270   new_path=`$WHICH "$new_path" 2> /dev/null`
31271 
31272   if test "x$new_path" = x; then
31273     # Oops. Which didn't find the executable.
31274     # The splitting of arguments from the executable at a space might have been incorrect,
31275     # since paths with space are more likely in Windows. Give it another try with the whole
31276     # argument.
31277     path="$complete"
31278     arguments="EOL"
31279     new_path="$path"
31280 
31281   windows_path="$new_path"
31282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31283     unix_path=`$CYGPATH -u "$windows_path"`
31284     new_path="$unix_path"
31285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31287     new_path="$unix_path"
31288   fi
31289 
31290 
31291     new_path=`$WHICH "$new_path" 2> /dev/null`
31292 
31293     if test "x$new_path" = x; then
31294       # It's still not found. Now this is an unrecoverable error.
31295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31296 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31297       has_space=`$ECHO "$complete" | $GREP " "`
31298       if test "x$has_space" != x; then
31299         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31301       fi
31302       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31303     fi
31304   fi
31305 
31306   # Now new_path has a complete unix path to the binary
31307   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31308     # Keep paths in /bin as-is, but remove trailing .exe if any
31309     new_path="${new_path/%.exe/}"
31310     # Do not save /bin paths to all_fixpath_prefixes!
31311   else
31312     # Not in mixed or Windows style, start by that.
31313     new_path=`cmd //c echo $new_path`
31314 
31315   input_path="$new_path"
31316   # Check if we need to convert this using DOS-style short mode. If the path
31317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31318   # take no chances and rewrite it.
31319   # Note: m4 eats our [], so we need to use [ and ] instead.
31320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31321   if test "x$has_forbidden_chars" != x; then
31322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31323     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31324   fi
31325 
31326     # Output is in $new_path
31327 
31328   windows_path="$new_path"
31329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31330     unix_path=`$CYGPATH -u "$windows_path"`
31331     new_path="$unix_path"
31332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31334     new_path="$unix_path"
31335   fi
31336 
31337     # remove trailing .exe if any
31338     new_path="${new_path/%.exe/}"
31339 
31340     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31341     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31342   fi
31343 
31344   else
31345     # We're on a posix platform. Hooray! :)
31346     # First separate the path from the arguments. This will split at the first
31347     # space.
31348     complete="$CXXCPP"
31349     path="${complete%% *}"
31350     tmp="$complete EOL"
31351     arguments="${tmp#* }"
31352 
31353     # Cannot rely on the command "which" here since it doesn't always work.
31354     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31355     if test -z "$is_absolute_path"; then
31356       # Path to executable is not absolute. Find it.
31357       IFS_save="$IFS"
31358       IFS=:
31359       for p in $PATH; do
31360         if test -f "$p/$path" && test -x "$p/$path"; then
31361           new_path="$p/$path"
31362           break
31363         fi
31364       done
31365       IFS="$IFS_save"
31366     else
31367       # This is an absolute path, we can use it without further modifications.
31368       new_path="$path"
31369     fi
31370 
31371     if test "x$new_path" = x; then
31372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31373 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31374       has_space=`$ECHO "$complete" | $GREP " "`
31375       if test "x$has_space" != x; then
31376         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31377 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31378       fi
31379       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31380     fi
31381   fi
31382 
31383   # Now join together the path and the arguments once again
31384   if test "x$arguments" != xEOL; then
31385     new_complete="$new_path ${arguments% *}"
31386   else
31387     new_complete="$new_path"
31388   fi
31389 
31390   if test "x$complete" != "x$new_complete"; then
31391     CXXCPP="$new_complete"
31392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31393 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31394   fi
31395 
31396 
31397   #
31398   # Setup the linker (LD)
31399   #
31400   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31401     # In the Microsoft toolchain we have a separate LD command "link".
31402     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31403     # a cygwin program for something completely different.
31404     # Extract the first word of "link", so it can be a program name with args.
31405 set dummy link; ac_word=$2
31406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31407 $as_echo_n "checking for $ac_word... " >&6; }
31408 if ${ac_cv_prog_LD+:} false; then :
31409   $as_echo_n "(cached) " >&6
31410 else
31411   if test -n "$LD"; then
31412   ac_cv_prog_LD="$LD" # Let the user override the test.
31413 else
31414   ac_prog_rejected=no
31415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31416 for as_dir in $PATH
31417 do
31418   IFS=$as_save_IFS
31419   test -z "$as_dir" && as_dir=.
31420     for ac_exec_ext in '' $ac_executable_extensions; do
31421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31422     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31423        ac_prog_rejected=yes
31424        continue
31425      fi
31426     ac_cv_prog_LD="link"
31427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31428     break 2
31429   fi
31430 done
31431   done
31432 IFS=$as_save_IFS
31433 
31434 if test $ac_prog_rejected = yes; then
31435   # We found a bogon in the path, so make sure we never use it.
31436   set dummy $ac_cv_prog_LD
31437   shift
31438   if test $# != 0; then
31439     # We chose a different compiler from the bogus one.
31440     # However, it has the same basename, so the bogon will be chosen
31441     # first if we set LD to just the basename; use the full file name.
31442     shift
31443     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31444   fi
31445 fi
31446 fi
31447 fi
31448 LD=$ac_cv_prog_LD
31449 if test -n "$LD"; then
31450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31451 $as_echo "$LD" >&6; }
31452 else
31453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31454 $as_echo "no" >&6; }
31455 fi
31456 
31457 
31458 
31459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31460 
31461   # First separate the path from the arguments. This will split at the first
31462   # space.
31463   complete="$LD"
31464   path="${complete%% *}"
31465   tmp="$complete EOL"
31466   arguments="${tmp#* }"
31467 
31468   # Input might be given as Windows format, start by converting to
31469   # unix format.
31470   new_path=`$CYGPATH -u "$path"`
31471 
31472   # Now try to locate executable using which
31473   new_path=`$WHICH "$new_path" 2> /dev/null`
31474   # bat and cmd files are not always considered executable in cygwin causing which
31475   # to not find them
31476   if test "x$new_path" = x \
31477       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31478       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31479     new_path=`$CYGPATH -u "$path"`
31480   fi
31481   if test "x$new_path" = x; then
31482     # Oops. Which didn't find the executable.
31483     # The splitting of arguments from the executable at a space might have been incorrect,
31484     # since paths with space are more likely in Windows. Give it another try with the whole
31485     # argument.
31486     path="$complete"
31487     arguments="EOL"
31488     new_path=`$CYGPATH -u "$path"`
31489     new_path=`$WHICH "$new_path" 2> /dev/null`
31490     # bat and cmd files are not always considered executable in cygwin causing which
31491     # to not find them
31492     if test "x$new_path" = x \
31493         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31494         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31495       new_path=`$CYGPATH -u "$path"`
31496     fi
31497     if test "x$new_path" = x; then
31498       # It's still not found. Now this is an unrecoverable error.
31499       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31500 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31501       has_space=`$ECHO "$complete" | $GREP " "`
31502       if test "x$has_space" != x; then
31503         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31504 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31505       fi
31506       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31507     fi
31508   fi
31509 
31510   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31511   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31512   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31513   # "foo.exe" is OK but "foo" is an error.
31514   #
31515   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31516   # It is also a way to make sure we got the proper file name for the real test later on.
31517   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31518   if test "x$test_shortpath" = x; then
31519     # Short path failed, file does not exist as specified.
31520     # Try adding .exe or .cmd
31521     if test -f "${new_path}.exe"; then
31522       input_to_shortpath="${new_path}.exe"
31523     elif test -f "${new_path}.cmd"; then
31524       input_to_shortpath="${new_path}.cmd"
31525     else
31526       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31527 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31528       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31529 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31530       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31531     fi
31532   else
31533     input_to_shortpath="$new_path"
31534   fi
31535 
31536   # Call helper function which possibly converts this using DOS-style short mode.
31537   # If so, the updated path is stored in $new_path.
31538   new_path="$input_to_shortpath"
31539 
31540   input_path="$input_to_shortpath"
31541   # Check if we need to convert this using DOS-style short mode. If the path
31542   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31543   # take no chances and rewrite it.
31544   # Note: m4 eats our [], so we need to use [ and ] instead.
31545   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31546   if test "x$has_forbidden_chars" != x; then
31547     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31548     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31549     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31550     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31551       # Going to short mode and back again did indeed matter. Since short mode is
31552       # case insensitive, let's make it lowercase to improve readability.
31553       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31554       # Now convert it back to Unix-stile (cygpath)
31555       input_path=`$CYGPATH -u "$shortmode_path"`
31556       new_path="$input_path"
31557     fi
31558   fi
31559 
31560   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31561   if test "x$test_cygdrive_prefix" = x; then
31562     # As a simple fix, exclude /usr/bin since it's not a real path.
31563     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31564       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31565       # a path prefixed by /cygdrive for fixpath to work.
31566       new_path="$CYGWIN_ROOT_PATH$input_path"
31567     fi
31568   fi
31569 
31570   # remove trailing .exe if any
31571   new_path="${new_path/%.exe/}"
31572 
31573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31574 
31575   # First separate the path from the arguments. This will split at the first
31576   # space.
31577   complete="$LD"
31578   path="${complete%% *}"
31579   tmp="$complete EOL"
31580   arguments="${tmp#* }"
31581 
31582   # Input might be given as Windows format, start by converting to
31583   # unix format.
31584   new_path="$path"
31585 
31586   windows_path="$new_path"
31587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31588     unix_path=`$CYGPATH -u "$windows_path"`
31589     new_path="$unix_path"
31590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31592     new_path="$unix_path"
31593   fi
31594 
31595 
31596   # Now try to locate executable using which
31597   new_path=`$WHICH "$new_path" 2> /dev/null`
31598 
31599   if test "x$new_path" = x; then
31600     # Oops. Which didn't find the executable.
31601     # The splitting of arguments from the executable at a space might have been incorrect,
31602     # since paths with space are more likely in Windows. Give it another try with the whole
31603     # argument.
31604     path="$complete"
31605     arguments="EOL"
31606     new_path="$path"
31607 
31608   windows_path="$new_path"
31609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31610     unix_path=`$CYGPATH -u "$windows_path"`
31611     new_path="$unix_path"
31612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31613     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31614     new_path="$unix_path"
31615   fi
31616 
31617 
31618     new_path=`$WHICH "$new_path" 2> /dev/null`
31619 
31620     if test "x$new_path" = x; then
31621       # It's still not found. Now this is an unrecoverable error.
31622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31623 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31624       has_space=`$ECHO "$complete" | $GREP " "`
31625       if test "x$has_space" != x; then
31626         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31627 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31628       fi
31629       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31630     fi
31631   fi
31632 
31633   # Now new_path has a complete unix path to the binary
31634   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31635     # Keep paths in /bin as-is, but remove trailing .exe if any
31636     new_path="${new_path/%.exe/}"
31637     # Do not save /bin paths to all_fixpath_prefixes!
31638   else
31639     # Not in mixed or Windows style, start by that.
31640     new_path=`cmd //c echo $new_path`
31641 
31642   input_path="$new_path"
31643   # Check if we need to convert this using DOS-style short mode. If the path
31644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31645   # take no chances and rewrite it.
31646   # Note: m4 eats our [], so we need to use [ and ] instead.
31647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31648   if test "x$has_forbidden_chars" != x; then
31649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31650     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31651   fi
31652 
31653     # Output is in $new_path
31654 
31655   windows_path="$new_path"
31656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31657     unix_path=`$CYGPATH -u "$windows_path"`
31658     new_path="$unix_path"
31659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31661     new_path="$unix_path"
31662   fi
31663 
31664     # remove trailing .exe if any
31665     new_path="${new_path/%.exe/}"
31666 
31667     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31668     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31669   fi
31670 
31671   else
31672     # We're on a posix platform. Hooray! :)
31673     # First separate the path from the arguments. This will split at the first
31674     # space.
31675     complete="$LD"
31676     path="${complete%% *}"
31677     tmp="$complete EOL"
31678     arguments="${tmp#* }"
31679 
31680     # Cannot rely on the command "which" here since it doesn't always work.
31681     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31682     if test -z "$is_absolute_path"; then
31683       # Path to executable is not absolute. Find it.
31684       IFS_save="$IFS"
31685       IFS=:
31686       for p in $PATH; do
31687         if test -f "$p/$path" && test -x "$p/$path"; then
31688           new_path="$p/$path"
31689           break
31690         fi
31691       done
31692       IFS="$IFS_save"
31693     else
31694       # This is an absolute path, we can use it without further modifications.
31695       new_path="$path"
31696     fi
31697 
31698     if test "x$new_path" = x; then
31699       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31700 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31701       has_space=`$ECHO "$complete" | $GREP " "`
31702       if test "x$has_space" != x; then
31703         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31704 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31705       fi
31706       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31707     fi
31708   fi
31709 
31710   # Now join together the path and the arguments once again
31711   if test "x$arguments" != xEOL; then
31712     new_complete="$new_path ${arguments% *}"
31713   else
31714     new_complete="$new_path"
31715   fi
31716 
31717   if test "x$complete" != "x$new_complete"; then
31718     LD="$new_complete"
31719     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31720 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31721   fi
31722 
31723     # Verify that we indeed succeeded with this trick.
31724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31725 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31726     "$LD" --version > /dev/null
31727     if test $? -eq 0 ; then
31728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31729 $as_echo "no" >&6; }
31730       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31731     else
31732       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31733 $as_echo "yes" >&6; }
31734     fi
31735     LDCXX="$LD"
31736   else
31737     # All other toolchains use the compiler to link.
31738     LD="$CC"
31739     LDCXX="$CXX"
31740   fi
31741 
31742   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31743 
31744 
31745   #
31746   # Setup the assembler (AS)
31747   #
31748   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31749     # FIXME: should this really be solaris, or solstudio?
31750 
31751 
31752   # Publish this variable in the help.
31753 
31754 
31755   if test "x$AS" = x; then
31756     # The variable is not set by user, try to locate tool using the code snippet
31757     for ac_prog in as
31758 do
31759   # Extract the first word of "$ac_prog", so it can be a program name with args.
31760 set dummy $ac_prog; ac_word=$2
31761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31762 $as_echo_n "checking for $ac_word... " >&6; }
31763 if ${ac_cv_path_AS+:} false; then :
31764   $as_echo_n "(cached) " >&6
31765 else
31766   case $AS in
31767   [\\/]* | ?:[\\/]*)
31768   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31769   ;;
31770   *)
31771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31772 for as_dir in $PATH
31773 do
31774   IFS=$as_save_IFS
31775   test -z "$as_dir" && as_dir=.
31776     for ac_exec_ext in '' $ac_executable_extensions; do
31777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31778     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31780     break 2
31781   fi
31782 done
31783   done
31784 IFS=$as_save_IFS
31785 
31786   ;;
31787 esac
31788 fi
31789 AS=$ac_cv_path_AS
31790 if test -n "$AS"; then
31791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31792 $as_echo "$AS" >&6; }
31793 else
31794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31795 $as_echo "no" >&6; }
31796 fi
31797 
31798 
31799   test -n "$AS" && break
31800 done
31801 
31802   else
31803     # The variable is set, but is it from the command line or the environment?
31804 
31805     # Try to remove the string !AS! from our list.
31806     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31807     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31808       # If it failed, the variable was not from the command line. Ignore it,
31809       # but warn the user (except for BASH, which is always set by the calling BASH).
31810       if test "xAS" != xBASH; then
31811         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31812 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31813       fi
31814       # Try to locate tool using the code snippet
31815       for ac_prog in as
31816 do
31817   # Extract the first word of "$ac_prog", so it can be a program name with args.
31818 set dummy $ac_prog; ac_word=$2
31819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31820 $as_echo_n "checking for $ac_word... " >&6; }
31821 if ${ac_cv_path_AS+:} false; then :
31822   $as_echo_n "(cached) " >&6
31823 else
31824   case $AS in
31825   [\\/]* | ?:[\\/]*)
31826   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31827   ;;
31828   *)
31829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31830 for as_dir in $PATH
31831 do
31832   IFS=$as_save_IFS
31833   test -z "$as_dir" && as_dir=.
31834     for ac_exec_ext in '' $ac_executable_extensions; do
31835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31836     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31838     break 2
31839   fi
31840 done
31841   done
31842 IFS=$as_save_IFS
31843 
31844   ;;
31845 esac
31846 fi
31847 AS=$ac_cv_path_AS
31848 if test -n "$AS"; then
31849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31850 $as_echo "$AS" >&6; }
31851 else
31852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31853 $as_echo "no" >&6; }
31854 fi
31855 
31856 
31857   test -n "$AS" && break
31858 done
31859 
31860     else
31861       # If it succeeded, then it was overridden by the user. We will use it
31862       # for the tool.
31863 
31864       # First remove it from the list of overridden variables, so we can test
31865       # for unknown variables in the end.
31866       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31867 
31868       # Check if the provided tool contains a complete path.
31869       tool_specified="$AS"
31870       tool_basename="${tool_specified##*/}"
31871       if test "x$tool_basename" = "x$tool_specified"; then
31872         # A command without a complete path is provided, search $PATH.
31873         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31874 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31875         # Extract the first word of "$tool_basename", so it can be a program name with args.
31876 set dummy $tool_basename; ac_word=$2
31877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31878 $as_echo_n "checking for $ac_word... " >&6; }
31879 if ${ac_cv_path_AS+:} false; then :
31880   $as_echo_n "(cached) " >&6
31881 else
31882   case $AS in
31883   [\\/]* | ?:[\\/]*)
31884   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31885   ;;
31886   *)
31887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31888 for as_dir in $PATH
31889 do
31890   IFS=$as_save_IFS
31891   test -z "$as_dir" && as_dir=.
31892     for ac_exec_ext in '' $ac_executable_extensions; do
31893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31894     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31896     break 2
31897   fi
31898 done
31899   done
31900 IFS=$as_save_IFS
31901 
31902   ;;
31903 esac
31904 fi
31905 AS=$ac_cv_path_AS
31906 if test -n "$AS"; then
31907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31908 $as_echo "$AS" >&6; }
31909 else
31910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31911 $as_echo "no" >&6; }
31912 fi
31913 
31914 
31915         if test "x$AS" = x; then
31916           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31917         fi
31918       else
31919         # Otherwise we believe it is a complete path. Use it as it is.
31920         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31921 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31922         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31923 $as_echo_n "checking for AS... " >&6; }
31924         if test ! -x "$tool_specified"; then
31925           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31926 $as_echo "not found" >&6; }
31927           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31928         fi
31929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31930 $as_echo "$tool_specified" >&6; }
31931       fi
31932     fi
31933   fi
31934 
31935 
31936 
31937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31938 
31939   # First separate the path from the arguments. This will split at the first
31940   # space.
31941   complete="$AS"
31942   path="${complete%% *}"
31943   tmp="$complete EOL"
31944   arguments="${tmp#* }"
31945 
31946   # Input might be given as Windows format, start by converting to
31947   # unix format.
31948   new_path=`$CYGPATH -u "$path"`
31949 
31950   # Now try to locate executable using which
31951   new_path=`$WHICH "$new_path" 2> /dev/null`
31952   # bat and cmd files are not always considered executable in cygwin causing which
31953   # to not find them
31954   if test "x$new_path" = x \
31955       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31956       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31957     new_path=`$CYGPATH -u "$path"`
31958   fi
31959   if test "x$new_path" = x; then
31960     # Oops. Which didn't find the executable.
31961     # The splitting of arguments from the executable at a space might have been incorrect,
31962     # since paths with space are more likely in Windows. Give it another try with the whole
31963     # argument.
31964     path="$complete"
31965     arguments="EOL"
31966     new_path=`$CYGPATH -u "$path"`
31967     new_path=`$WHICH "$new_path" 2> /dev/null`
31968     # bat and cmd files are not always considered executable in cygwin causing which
31969     # to not find them
31970     if test "x$new_path" = x \
31971         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31972         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31973       new_path=`$CYGPATH -u "$path"`
31974     fi
31975     if test "x$new_path" = x; then
31976       # It's still not found. Now this is an unrecoverable error.
31977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31978 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31979       has_space=`$ECHO "$complete" | $GREP " "`
31980       if test "x$has_space" != x; then
31981         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31982 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31983       fi
31984       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31985     fi
31986   fi
31987 
31988   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31989   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31990   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31991   # "foo.exe" is OK but "foo" is an error.
31992   #
31993   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31994   # It is also a way to make sure we got the proper file name for the real test later on.
31995   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31996   if test "x$test_shortpath" = x; then
31997     # Short path failed, file does not exist as specified.
31998     # Try adding .exe or .cmd
31999     if test -f "${new_path}.exe"; then
32000       input_to_shortpath="${new_path}.exe"
32001     elif test -f "${new_path}.cmd"; then
32002       input_to_shortpath="${new_path}.cmd"
32003     else
32004       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32005 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32006       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32007 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32008       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32009     fi
32010   else
32011     input_to_shortpath="$new_path"
32012   fi
32013 
32014   # Call helper function which possibly converts this using DOS-style short mode.
32015   # If so, the updated path is stored in $new_path.
32016   new_path="$input_to_shortpath"
32017 
32018   input_path="$input_to_shortpath"
32019   # Check if we need to convert this using DOS-style short mode. If the path
32020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32021   # take no chances and rewrite it.
32022   # Note: m4 eats our [], so we need to use [ and ] instead.
32023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32024   if test "x$has_forbidden_chars" != x; then
32025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32029       # Going to short mode and back again did indeed matter. Since short mode is
32030       # case insensitive, let's make it lowercase to improve readability.
32031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32032       # Now convert it back to Unix-stile (cygpath)
32033       input_path=`$CYGPATH -u "$shortmode_path"`
32034       new_path="$input_path"
32035     fi
32036   fi
32037 
32038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32039   if test "x$test_cygdrive_prefix" = x; then
32040     # As a simple fix, exclude /usr/bin since it's not a real path.
32041     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32043       # a path prefixed by /cygdrive for fixpath to work.
32044       new_path="$CYGWIN_ROOT_PATH$input_path"
32045     fi
32046   fi
32047 
32048   # remove trailing .exe if any
32049   new_path="${new_path/%.exe/}"
32050 
32051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32052 
32053   # First separate the path from the arguments. This will split at the first
32054   # space.
32055   complete="$AS"
32056   path="${complete%% *}"
32057   tmp="$complete EOL"
32058   arguments="${tmp#* }"
32059 
32060   # Input might be given as Windows format, start by converting to
32061   # unix format.
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 
32074   # Now try to locate executable using which
32075   new_path=`$WHICH "$new_path" 2> /dev/null`
32076 
32077   if test "x$new_path" = x; then
32078     # Oops. Which didn't find the executable.
32079     # The splitting of arguments from the executable at a space might have been incorrect,
32080     # since paths with space are more likely in Windows. Give it another try with the whole
32081     # argument.
32082     path="$complete"
32083     arguments="EOL"
32084     new_path="$path"
32085 
32086   windows_path="$new_path"
32087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32088     unix_path=`$CYGPATH -u "$windows_path"`
32089     new_path="$unix_path"
32090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32092     new_path="$unix_path"
32093   fi
32094 
32095 
32096     new_path=`$WHICH "$new_path" 2> /dev/null`
32097 
32098     if test "x$new_path" = x; then
32099       # It's still not found. Now this is an unrecoverable error.
32100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32101 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32102       has_space=`$ECHO "$complete" | $GREP " "`
32103       if test "x$has_space" != x; then
32104         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32106       fi
32107       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32108     fi
32109   fi
32110 
32111   # Now new_path has a complete unix path to the binary
32112   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32113     # Keep paths in /bin as-is, but remove trailing .exe if any
32114     new_path="${new_path/%.exe/}"
32115     # Do not save /bin paths to all_fixpath_prefixes!
32116   else
32117     # Not in mixed or Windows style, start by that.
32118     new_path=`cmd //c echo $new_path`
32119 
32120   input_path="$new_path"
32121   # Check if we need to convert this using DOS-style short mode. If the path
32122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32123   # take no chances and rewrite it.
32124   # Note: m4 eats our [], so we need to use [ and ] instead.
32125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32126   if test "x$has_forbidden_chars" != x; then
32127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32128     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32129   fi
32130 
32131     # Output is in $new_path
32132 
32133   windows_path="$new_path"
32134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32135     unix_path=`$CYGPATH -u "$windows_path"`
32136     new_path="$unix_path"
32137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32139     new_path="$unix_path"
32140   fi
32141 
32142     # remove trailing .exe if any
32143     new_path="${new_path/%.exe/}"
32144 
32145     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32146     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32147   fi
32148 
32149   else
32150     # We're on a posix platform. Hooray! :)
32151     # First separate the path from the arguments. This will split at the first
32152     # space.
32153     complete="$AS"
32154     path="${complete%% *}"
32155     tmp="$complete EOL"
32156     arguments="${tmp#* }"
32157 
32158     # Cannot rely on the command "which" here since it doesn't always work.
32159     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32160     if test -z "$is_absolute_path"; then
32161       # Path to executable is not absolute. Find it.
32162       IFS_save="$IFS"
32163       IFS=:
32164       for p in $PATH; do
32165         if test -f "$p/$path" && test -x "$p/$path"; then
32166           new_path="$p/$path"
32167           break
32168         fi
32169       done
32170       IFS="$IFS_save"
32171     else
32172       # This is an absolute path, we can use it without further modifications.
32173       new_path="$path"
32174     fi
32175 
32176     if test "x$new_path" = x; then
32177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32178 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32179       has_space=`$ECHO "$complete" | $GREP " "`
32180       if test "x$has_space" != x; then
32181         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32182 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32183       fi
32184       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32185     fi
32186   fi
32187 
32188   # Now join together the path and the arguments once again
32189   if test "x$arguments" != xEOL; then
32190     new_complete="$new_path ${arguments% *}"
32191   else
32192     new_complete="$new_path"
32193   fi
32194 
32195   if test "x$complete" != "x$new_complete"; then
32196     AS="$new_complete"
32197     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32198 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32199   fi
32200 
32201   else
32202     # FIXME: is this correct for microsoft?
32203     AS="$CC -c"
32204   fi
32205 
32206 
32207   #
32208   # Setup the archiver (AR)
32209   #
32210   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32211     # The corresponding ar tool is lib.exe (used to create static libraries)
32212     # Extract the first word of "lib", so it can be a program name with args.
32213 set dummy lib; ac_word=$2
32214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32215 $as_echo_n "checking for $ac_word... " >&6; }
32216 if ${ac_cv_prog_AR+:} false; then :
32217   $as_echo_n "(cached) " >&6
32218 else
32219   if test -n "$AR"; then
32220   ac_cv_prog_AR="$AR" # Let the user override the test.
32221 else
32222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32223 for as_dir in $PATH
32224 do
32225   IFS=$as_save_IFS
32226   test -z "$as_dir" && as_dir=.
32227     for ac_exec_ext in '' $ac_executable_extensions; do
32228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32229     ac_cv_prog_AR="lib"
32230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32231     break 2
32232   fi
32233 done
32234   done
32235 IFS=$as_save_IFS
32236 
32237 fi
32238 fi
32239 AR=$ac_cv_prog_AR
32240 if test -n "$AR"; then
32241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32242 $as_echo "$AR" >&6; }
32243 else
32244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32245 $as_echo "no" >&6; }
32246 fi
32247 
32248 
32249   else
32250 
32251 
32252   # Publish this variable in the help.
32253 
32254 
32255   if test "x$AR" = x; then
32256     # The variable is not set by user, try to locate tool using the code snippet
32257     if test -n "$ac_tool_prefix"; then
32258   for ac_prog in ar
32259   do
32260     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32261 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32263 $as_echo_n "checking for $ac_word... " >&6; }
32264 if ${ac_cv_prog_AR+:} false; then :
32265   $as_echo_n "(cached) " >&6
32266 else
32267   if test -n "$AR"; then
32268   ac_cv_prog_AR="$AR" # Let the user override the test.
32269 else
32270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32271 for as_dir in $PATH
32272 do
32273   IFS=$as_save_IFS
32274   test -z "$as_dir" && as_dir=.
32275     for ac_exec_ext in '' $ac_executable_extensions; do
32276   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32277     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32278     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32279     break 2
32280   fi
32281 done
32282   done
32283 IFS=$as_save_IFS
32284 
32285 fi
32286 fi
32287 AR=$ac_cv_prog_AR
32288 if test -n "$AR"; then
32289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32290 $as_echo "$AR" >&6; }
32291 else
32292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32293 $as_echo "no" >&6; }
32294 fi
32295 
32296 
32297     test -n "$AR" && break
32298   done
32299 fi
32300 if test -z "$AR"; then
32301   ac_ct_AR=$AR
32302   for ac_prog in ar
32303 do
32304   # Extract the first word of "$ac_prog", so it can be a program name with args.
32305 set dummy $ac_prog; ac_word=$2
32306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32307 $as_echo_n "checking for $ac_word... " >&6; }
32308 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32309   $as_echo_n "(cached) " >&6
32310 else
32311   if test -n "$ac_ct_AR"; then
32312   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32313 else
32314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32315 for as_dir in $PATH
32316 do
32317   IFS=$as_save_IFS
32318   test -z "$as_dir" && as_dir=.
32319     for ac_exec_ext in '' $ac_executable_extensions; do
32320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32321     ac_cv_prog_ac_ct_AR="$ac_prog"
32322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32323     break 2
32324   fi
32325 done
32326   done
32327 IFS=$as_save_IFS
32328 
32329 fi
32330 fi
32331 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32332 if test -n "$ac_ct_AR"; then
32333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32334 $as_echo "$ac_ct_AR" >&6; }
32335 else
32336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32337 $as_echo "no" >&6; }
32338 fi
32339 
32340 
32341   test -n "$ac_ct_AR" && break
32342 done
32343 
32344   if test "x$ac_ct_AR" = x; then
32345     AR=""
32346   else
32347     case $cross_compiling:$ac_tool_warned in
32348 yes:)
32349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32350 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32351 ac_tool_warned=yes ;;
32352 esac
32353     AR=$ac_ct_AR
32354   fi
32355 fi
32356 
32357   else
32358     # The variable is set, but is it from the command line or the environment?
32359 
32360     # Try to remove the string !AR! from our list.
32361     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32362     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32363       # If it failed, the variable was not from the command line. Ignore it,
32364       # but warn the user (except for BASH, which is always set by the calling BASH).
32365       if test "xAR" != xBASH; then
32366         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32367 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32368       fi
32369       # Try to locate tool using the code snippet
32370       if test -n "$ac_tool_prefix"; then
32371   for ac_prog in ar
32372   do
32373     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32374 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32376 $as_echo_n "checking for $ac_word... " >&6; }
32377 if ${ac_cv_prog_AR+:} false; then :
32378   $as_echo_n "(cached) " >&6
32379 else
32380   if test -n "$AR"; then
32381   ac_cv_prog_AR="$AR" # Let the user override the test.
32382 else
32383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32384 for as_dir in $PATH
32385 do
32386   IFS=$as_save_IFS
32387   test -z "$as_dir" && as_dir=.
32388     for ac_exec_ext in '' $ac_executable_extensions; do
32389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32390     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32392     break 2
32393   fi
32394 done
32395   done
32396 IFS=$as_save_IFS
32397 
32398 fi
32399 fi
32400 AR=$ac_cv_prog_AR
32401 if test -n "$AR"; then
32402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32403 $as_echo "$AR" >&6; }
32404 else
32405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32406 $as_echo "no" >&6; }
32407 fi
32408 
32409 
32410     test -n "$AR" && break
32411   done
32412 fi
32413 if test -z "$AR"; then
32414   ac_ct_AR=$AR
32415   for ac_prog in ar
32416 do
32417   # Extract the first word of "$ac_prog", so it can be a program name with args.
32418 set dummy $ac_prog; ac_word=$2
32419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32420 $as_echo_n "checking for $ac_word... " >&6; }
32421 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32422   $as_echo_n "(cached) " >&6
32423 else
32424   if test -n "$ac_ct_AR"; then
32425   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32426 else
32427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32428 for as_dir in $PATH
32429 do
32430   IFS=$as_save_IFS
32431   test -z "$as_dir" && as_dir=.
32432     for ac_exec_ext in '' $ac_executable_extensions; do
32433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32434     ac_cv_prog_ac_ct_AR="$ac_prog"
32435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32436     break 2
32437   fi
32438 done
32439   done
32440 IFS=$as_save_IFS
32441 
32442 fi
32443 fi
32444 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32445 if test -n "$ac_ct_AR"; then
32446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32447 $as_echo "$ac_ct_AR" >&6; }
32448 else
32449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32450 $as_echo "no" >&6; }
32451 fi
32452 
32453 
32454   test -n "$ac_ct_AR" && break
32455 done
32456 
32457   if test "x$ac_ct_AR" = x; then
32458     AR=""
32459   else
32460     case $cross_compiling:$ac_tool_warned in
32461 yes:)
32462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32463 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32464 ac_tool_warned=yes ;;
32465 esac
32466     AR=$ac_ct_AR
32467   fi
32468 fi
32469 
32470     else
32471       # If it succeeded, then it was overridden by the user. We will use it
32472       # for the tool.
32473 
32474       # First remove it from the list of overridden variables, so we can test
32475       # for unknown variables in the end.
32476       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32477 
32478       # Check if the provided tool contains a complete path.
32479       tool_specified="$AR"
32480       tool_basename="${tool_specified##*/}"
32481       if test "x$tool_basename" = "x$tool_specified"; then
32482         # A command without a complete path is provided, search $PATH.
32483         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32484 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32485         # Extract the first word of "$tool_basename", so it can be a program name with args.
32486 set dummy $tool_basename; ac_word=$2
32487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32488 $as_echo_n "checking for $ac_word... " >&6; }
32489 if ${ac_cv_path_AR+:} false; then :
32490   $as_echo_n "(cached) " >&6
32491 else
32492   case $AR in
32493   [\\/]* | ?:[\\/]*)
32494   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32495   ;;
32496   *)
32497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32498 for as_dir in $PATH
32499 do
32500   IFS=$as_save_IFS
32501   test -z "$as_dir" && as_dir=.
32502     for ac_exec_ext in '' $ac_executable_extensions; do
32503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32504     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32506     break 2
32507   fi
32508 done
32509   done
32510 IFS=$as_save_IFS
32511 
32512   ;;
32513 esac
32514 fi
32515 AR=$ac_cv_path_AR
32516 if test -n "$AR"; then
32517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32518 $as_echo "$AR" >&6; }
32519 else
32520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32521 $as_echo "no" >&6; }
32522 fi
32523 
32524 
32525         if test "x$AR" = x; then
32526           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32527         fi
32528       else
32529         # Otherwise we believe it is a complete path. Use it as it is.
32530         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32531 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32532         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32533 $as_echo_n "checking for AR... " >&6; }
32534         if test ! -x "$tool_specified"; then
32535           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32536 $as_echo "not found" >&6; }
32537           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32538         fi
32539         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32540 $as_echo "$tool_specified" >&6; }
32541       fi
32542     fi
32543   fi
32544 
32545 
32546   fi
32547 
32548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32549 
32550   # First separate the path from the arguments. This will split at the first
32551   # space.
32552   complete="$AR"
32553   path="${complete%% *}"
32554   tmp="$complete EOL"
32555   arguments="${tmp#* }"
32556 
32557   # Input might be given as Windows format, start by converting to
32558   # unix format.
32559   new_path=`$CYGPATH -u "$path"`
32560 
32561   # Now try to locate executable using which
32562   new_path=`$WHICH "$new_path" 2> /dev/null`
32563   # bat and cmd files are not always considered executable in cygwin causing which
32564   # to not find them
32565   if test "x$new_path" = x \
32566       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32567       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32568     new_path=`$CYGPATH -u "$path"`
32569   fi
32570   if test "x$new_path" = x; then
32571     # Oops. Which didn't find the executable.
32572     # The splitting of arguments from the executable at a space might have been incorrect,
32573     # since paths with space are more likely in Windows. Give it another try with the whole
32574     # argument.
32575     path="$complete"
32576     arguments="EOL"
32577     new_path=`$CYGPATH -u "$path"`
32578     new_path=`$WHICH "$new_path" 2> /dev/null`
32579     # bat and cmd files are not always considered executable in cygwin causing which
32580     # to not find them
32581     if test "x$new_path" = x \
32582         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32583         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32584       new_path=`$CYGPATH -u "$path"`
32585     fi
32586     if test "x$new_path" = x; then
32587       # It's still not found. Now this is an unrecoverable error.
32588       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32589 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32590       has_space=`$ECHO "$complete" | $GREP " "`
32591       if test "x$has_space" != x; then
32592         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32593 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32594       fi
32595       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32596     fi
32597   fi
32598 
32599   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32600   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32601   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32602   # "foo.exe" is OK but "foo" is an error.
32603   #
32604   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32605   # It is also a way to make sure we got the proper file name for the real test later on.
32606   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32607   if test "x$test_shortpath" = x; then
32608     # Short path failed, file does not exist as specified.
32609     # Try adding .exe or .cmd
32610     if test -f "${new_path}.exe"; then
32611       input_to_shortpath="${new_path}.exe"
32612     elif test -f "${new_path}.cmd"; then
32613       input_to_shortpath="${new_path}.cmd"
32614     else
32615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32616 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32617       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32618 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32619       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32620     fi
32621   else
32622     input_to_shortpath="$new_path"
32623   fi
32624 
32625   # Call helper function which possibly converts this using DOS-style short mode.
32626   # If so, the updated path is stored in $new_path.
32627   new_path="$input_to_shortpath"
32628 
32629   input_path="$input_to_shortpath"
32630   # Check if we need to convert this using DOS-style short mode. If the path
32631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32632   # take no chances and rewrite it.
32633   # Note: m4 eats our [], so we need to use [ and ] instead.
32634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32635   if test "x$has_forbidden_chars" != x; then
32636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32637     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32638     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32639     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32640       # Going to short mode and back again did indeed matter. Since short mode is
32641       # case insensitive, let's make it lowercase to improve readability.
32642       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32643       # Now convert it back to Unix-stile (cygpath)
32644       input_path=`$CYGPATH -u "$shortmode_path"`
32645       new_path="$input_path"
32646     fi
32647   fi
32648 
32649   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32650   if test "x$test_cygdrive_prefix" = x; then
32651     # As a simple fix, exclude /usr/bin since it's not a real path.
32652     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32653       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32654       # a path prefixed by /cygdrive for fixpath to work.
32655       new_path="$CYGWIN_ROOT_PATH$input_path"
32656     fi
32657   fi
32658 
32659   # remove trailing .exe if any
32660   new_path="${new_path/%.exe/}"
32661 
32662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32663 
32664   # First separate the path from the arguments. This will split at the first
32665   # space.
32666   complete="$AR"
32667   path="${complete%% *}"
32668   tmp="$complete EOL"
32669   arguments="${tmp#* }"
32670 
32671   # Input might be given as Windows format, start by converting to
32672   # unix format.
32673   new_path="$path"
32674 
32675   windows_path="$new_path"
32676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32677     unix_path=`$CYGPATH -u "$windows_path"`
32678     new_path="$unix_path"
32679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32681     new_path="$unix_path"
32682   fi
32683 
32684 
32685   # Now try to locate executable using which
32686   new_path=`$WHICH "$new_path" 2> /dev/null`
32687 
32688   if test "x$new_path" = x; then
32689     # Oops. Which didn't find the executable.
32690     # The splitting of arguments from the executable at a space might have been incorrect,
32691     # since paths with space are more likely in Windows. Give it another try with the whole
32692     # argument.
32693     path="$complete"
32694     arguments="EOL"
32695     new_path="$path"
32696 
32697   windows_path="$new_path"
32698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32699     unix_path=`$CYGPATH -u "$windows_path"`
32700     new_path="$unix_path"
32701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32703     new_path="$unix_path"
32704   fi
32705 
32706 
32707     new_path=`$WHICH "$new_path" 2> /dev/null`
32708 
32709     if test "x$new_path" = x; then
32710       # It's still not found. Now this is an unrecoverable error.
32711       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32712 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32713       has_space=`$ECHO "$complete" | $GREP " "`
32714       if test "x$has_space" != x; then
32715         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32716 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32717       fi
32718       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32719     fi
32720   fi
32721 
32722   # Now new_path has a complete unix path to the binary
32723   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32724     # Keep paths in /bin as-is, but remove trailing .exe if any
32725     new_path="${new_path/%.exe/}"
32726     # Do not save /bin paths to all_fixpath_prefixes!
32727   else
32728     # Not in mixed or Windows style, start by that.
32729     new_path=`cmd //c echo $new_path`
32730 
32731   input_path="$new_path"
32732   # Check if we need to convert this using DOS-style short mode. If the path
32733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32734   # take no chances and rewrite it.
32735   # Note: m4 eats our [], so we need to use [ and ] instead.
32736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32737   if test "x$has_forbidden_chars" != x; then
32738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32739     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32740   fi
32741 
32742     # Output is in $new_path
32743 
32744   windows_path="$new_path"
32745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32746     unix_path=`$CYGPATH -u "$windows_path"`
32747     new_path="$unix_path"
32748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32750     new_path="$unix_path"
32751   fi
32752 
32753     # remove trailing .exe if any
32754     new_path="${new_path/%.exe/}"
32755 
32756     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32757     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32758   fi
32759 
32760   else
32761     # We're on a posix platform. Hooray! :)
32762     # First separate the path from the arguments. This will split at the first
32763     # space.
32764     complete="$AR"
32765     path="${complete%% *}"
32766     tmp="$complete EOL"
32767     arguments="${tmp#* }"
32768 
32769     # Cannot rely on the command "which" here since it doesn't always work.
32770     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32771     if test -z "$is_absolute_path"; then
32772       # Path to executable is not absolute. Find it.
32773       IFS_save="$IFS"
32774       IFS=:
32775       for p in $PATH; do
32776         if test -f "$p/$path" && test -x "$p/$path"; then
32777           new_path="$p/$path"
32778           break
32779         fi
32780       done
32781       IFS="$IFS_save"
32782     else
32783       # This is an absolute path, we can use it without further modifications.
32784       new_path="$path"
32785     fi
32786 
32787     if test "x$new_path" = x; then
32788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32789 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32790       has_space=`$ECHO "$complete" | $GREP " "`
32791       if test "x$has_space" != x; then
32792         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32793 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32794       fi
32795       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32796     fi
32797   fi
32798 
32799   # Now join together the path and the arguments once again
32800   if test "x$arguments" != xEOL; then
32801     new_complete="$new_path ${arguments% *}"
32802   else
32803     new_complete="$new_path"
32804   fi
32805 
32806   if test "x$complete" != "x$new_complete"; then
32807     AR="$new_complete"
32808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32809 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32810   fi
32811 
32812 
32813 
32814   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32815     ac_ext=m
32816 ac_cpp='$OBJCPP $CPPFLAGS'
32817 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32818 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32819 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32820 if test -n "$ac_tool_prefix"; then
32821   for ac_prog in gcc objcc objc cc CC
32822   do
32823     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32824 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32826 $as_echo_n "checking for $ac_word... " >&6; }
32827 if ${ac_cv_prog_OBJC+:} false; then :
32828   $as_echo_n "(cached) " >&6
32829 else
32830   if test -n "$OBJC"; then
32831   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32832 else
32833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32834 for as_dir in $PATH
32835 do
32836   IFS=$as_save_IFS
32837   test -z "$as_dir" && as_dir=.
32838     for ac_exec_ext in '' $ac_executable_extensions; do
32839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32840     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32842     break 2
32843   fi
32844 done
32845   done
32846 IFS=$as_save_IFS
32847 
32848 fi
32849 fi
32850 OBJC=$ac_cv_prog_OBJC
32851 if test -n "$OBJC"; then
32852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32853 $as_echo "$OBJC" >&6; }
32854 else
32855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32856 $as_echo "no" >&6; }
32857 fi
32858 
32859 
32860     test -n "$OBJC" && break
32861   done
32862 fi
32863 if test -z "$OBJC"; then
32864   ac_ct_OBJC=$OBJC
32865   for ac_prog in gcc objcc objc cc CC
32866 do
32867   # Extract the first word of "$ac_prog", so it can be a program name with args.
32868 set dummy $ac_prog; ac_word=$2
32869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32870 $as_echo_n "checking for $ac_word... " >&6; }
32871 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32872   $as_echo_n "(cached) " >&6
32873 else
32874   if test -n "$ac_ct_OBJC"; then
32875   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32876 else
32877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32878 for as_dir in $PATH
32879 do
32880   IFS=$as_save_IFS
32881   test -z "$as_dir" && as_dir=.
32882     for ac_exec_ext in '' $ac_executable_extensions; do
32883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32884     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32886     break 2
32887   fi
32888 done
32889   done
32890 IFS=$as_save_IFS
32891 
32892 fi
32893 fi
32894 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32895 if test -n "$ac_ct_OBJC"; then
32896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32897 $as_echo "$ac_ct_OBJC" >&6; }
32898 else
32899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32900 $as_echo "no" >&6; }
32901 fi
32902 
32903 
32904   test -n "$ac_ct_OBJC" && break
32905 done
32906 
32907   if test "x$ac_ct_OBJC" = x; then
32908     OBJC="gcc"
32909   else
32910     case $cross_compiling:$ac_tool_warned in
32911 yes:)
32912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32913 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32914 ac_tool_warned=yes ;;
32915 esac
32916     OBJC=$ac_ct_OBJC
32917   fi
32918 fi
32919 
32920 # Provide some information about the compiler.
32921 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32922 set X $ac_compile
32923 ac_compiler=$2
32924 for ac_option in --version -v -V -qversion; do
32925   { { ac_try="$ac_compiler $ac_option >&5"
32926 case "(($ac_try" in
32927   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32928   *) ac_try_echo=$ac_try;;
32929 esac
32930 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32931 $as_echo "$ac_try_echo"; } >&5
32932   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32933   ac_status=$?
32934   if test -s conftest.err; then
32935     sed '10a\
32936 ... rest of stderr output deleted ...
32937          10q' conftest.err >conftest.er1
32938     cat conftest.er1 >&5
32939   fi
32940   rm -f conftest.er1 conftest.err
32941   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32942   test $ac_status = 0; }
32943 done
32944 
32945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32946 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32947 if ${ac_cv_objc_compiler_gnu+:} false; then :
32948   $as_echo_n "(cached) " >&6
32949 else
32950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32951 /* end confdefs.h.  */
32952 
32953 int
32954 main ()
32955 {
32956 #ifndef __GNUC__
32957        choke me
32958 #endif
32959 
32960   ;
32961   return 0;
32962 }
32963 _ACEOF
32964 if ac_fn_objc_try_compile "$LINENO"; then :
32965   ac_compiler_gnu=yes
32966 else
32967   ac_compiler_gnu=no
32968 fi
32969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32970 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32971 
32972 fi
32973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32974 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32975 if test $ac_compiler_gnu = yes; then
32976   GOBJC=yes
32977 else
32978   GOBJC=
32979 fi
32980 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32981 ac_save_OBJCFLAGS=$OBJCFLAGS
32982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32983 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32984 if ${ac_cv_prog_objc_g+:} false; then :
32985   $as_echo_n "(cached) " >&6
32986 else
32987   ac_save_objc_werror_flag=$ac_objc_werror_flag
32988    ac_objc_werror_flag=yes
32989    ac_cv_prog_objc_g=no
32990    OBJCFLAGS="-g"
32991    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32992 /* end confdefs.h.  */
32993 
32994 int
32995 main ()
32996 {
32997 
32998   ;
32999   return 0;
33000 }
33001 _ACEOF
33002 if ac_fn_objc_try_compile "$LINENO"; then :
33003   ac_cv_prog_objc_g=yes
33004 else
33005   OBJCFLAGS=""
33006       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33007 /* end confdefs.h.  */
33008 
33009 int
33010 main ()
33011 {
33012 
33013   ;
33014   return 0;
33015 }
33016 _ACEOF
33017 if ac_fn_objc_try_compile "$LINENO"; then :
33018 
33019 else
33020   ac_objc_werror_flag=$ac_save_objc_werror_flag
33021          OBJCFLAGS="-g"
33022          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33023 /* end confdefs.h.  */
33024 
33025 int
33026 main ()
33027 {
33028 
33029   ;
33030   return 0;
33031 }
33032 _ACEOF
33033 if ac_fn_objc_try_compile "$LINENO"; then :
33034   ac_cv_prog_objc_g=yes
33035 fi
33036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33037 fi
33038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33039 fi
33040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33041    ac_objc_werror_flag=$ac_save_objc_werror_flag
33042 fi
33043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33044 $as_echo "$ac_cv_prog_objc_g" >&6; }
33045 if test "$ac_test_OBJCFLAGS" = set; then
33046   OBJCFLAGS=$ac_save_OBJCFLAGS
33047 elif test $ac_cv_prog_objc_g = yes; then
33048   if test "$GOBJC" = yes; then
33049     OBJCFLAGS="-g -O2"
33050   else
33051     OBJCFLAGS="-g"
33052   fi
33053 else
33054   if test "$GOBJC" = yes; then
33055     OBJCFLAGS="-O2"
33056   else
33057     OBJCFLAGS=
33058   fi
33059 fi
33060 ac_ext=cpp
33061 ac_cpp='$CXXCPP $CPPFLAGS'
33062 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33063 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33064 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33065 
33066 
33067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33068 
33069   # First separate the path from the arguments. This will split at the first
33070   # space.
33071   complete="$OBJC"
33072   path="${complete%% *}"
33073   tmp="$complete EOL"
33074   arguments="${tmp#* }"
33075 
33076   # Input might be given as Windows format, start by converting to
33077   # unix format.
33078   new_path=`$CYGPATH -u "$path"`
33079 
33080   # Now try to locate executable using which
33081   new_path=`$WHICH "$new_path" 2> /dev/null`
33082   # bat and cmd files are not always considered executable in cygwin causing which
33083   # to not find them
33084   if test "x$new_path" = x \
33085       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33086       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33087     new_path=`$CYGPATH -u "$path"`
33088   fi
33089   if test "x$new_path" = x; then
33090     # Oops. Which didn't find the executable.
33091     # The splitting of arguments from the executable at a space might have been incorrect,
33092     # since paths with space are more likely in Windows. Give it another try with the whole
33093     # argument.
33094     path="$complete"
33095     arguments="EOL"
33096     new_path=`$CYGPATH -u "$path"`
33097     new_path=`$WHICH "$new_path" 2> /dev/null`
33098     # bat and cmd files are not always considered executable in cygwin causing which
33099     # to not find them
33100     if test "x$new_path" = x \
33101         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33102         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33103       new_path=`$CYGPATH -u "$path"`
33104     fi
33105     if test "x$new_path" = x; then
33106       # It's still not found. Now this is an unrecoverable error.
33107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33108 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33109       has_space=`$ECHO "$complete" | $GREP " "`
33110       if test "x$has_space" != x; then
33111         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33112 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33113       fi
33114       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33115     fi
33116   fi
33117 
33118   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33119   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33120   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33121   # "foo.exe" is OK but "foo" is an error.
33122   #
33123   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33124   # It is also a way to make sure we got the proper file name for the real test later on.
33125   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33126   if test "x$test_shortpath" = x; then
33127     # Short path failed, file does not exist as specified.
33128     # Try adding .exe or .cmd
33129     if test -f "${new_path}.exe"; then
33130       input_to_shortpath="${new_path}.exe"
33131     elif test -f "${new_path}.cmd"; then
33132       input_to_shortpath="${new_path}.cmd"
33133     else
33134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33135 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33136       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33137 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33138       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33139     fi
33140   else
33141     input_to_shortpath="$new_path"
33142   fi
33143 
33144   # Call helper function which possibly converts this using DOS-style short mode.
33145   # If so, the updated path is stored in $new_path.
33146   new_path="$input_to_shortpath"
33147 
33148   input_path="$input_to_shortpath"
33149   # Check if we need to convert this using DOS-style short mode. If the path
33150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33151   # take no chances and rewrite it.
33152   # Note: m4 eats our [], so we need to use [ and ] instead.
33153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33154   if test "x$has_forbidden_chars" != x; then
33155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33159       # Going to short mode and back again did indeed matter. Since short mode is
33160       # case insensitive, let's make it lowercase to improve readability.
33161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33162       # Now convert it back to Unix-stile (cygpath)
33163       input_path=`$CYGPATH -u "$shortmode_path"`
33164       new_path="$input_path"
33165     fi
33166   fi
33167 
33168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33169   if test "x$test_cygdrive_prefix" = x; then
33170     # As a simple fix, exclude /usr/bin since it's not a real path.
33171     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33173       # a path prefixed by /cygdrive for fixpath to work.
33174       new_path="$CYGWIN_ROOT_PATH$input_path"
33175     fi
33176   fi
33177 
33178   # remove trailing .exe if any
33179   new_path="${new_path/%.exe/}"
33180 
33181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33182 
33183   # First separate the path from the arguments. This will split at the first
33184   # space.
33185   complete="$OBJC"
33186   path="${complete%% *}"
33187   tmp="$complete EOL"
33188   arguments="${tmp#* }"
33189 
33190   # Input might be given as Windows format, start by converting to
33191   # unix format.
33192   new_path="$path"
33193 
33194   windows_path="$new_path"
33195   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33196     unix_path=`$CYGPATH -u "$windows_path"`
33197     new_path="$unix_path"
33198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33199     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33200     new_path="$unix_path"
33201   fi
33202 
33203 
33204   # Now try to locate executable using which
33205   new_path=`$WHICH "$new_path" 2> /dev/null`
33206 
33207   if test "x$new_path" = x; then
33208     # Oops. Which didn't find the executable.
33209     # The splitting of arguments from the executable at a space might have been incorrect,
33210     # since paths with space are more likely in Windows. Give it another try with the whole
33211     # argument.
33212     path="$complete"
33213     arguments="EOL"
33214     new_path="$path"
33215 
33216   windows_path="$new_path"
33217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33218     unix_path=`$CYGPATH -u "$windows_path"`
33219     new_path="$unix_path"
33220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33222     new_path="$unix_path"
33223   fi
33224 
33225 
33226     new_path=`$WHICH "$new_path" 2> /dev/null`
33227 
33228     if test "x$new_path" = x; then
33229       # It's still not found. Now this is an unrecoverable error.
33230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33231 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33232       has_space=`$ECHO "$complete" | $GREP " "`
33233       if test "x$has_space" != x; then
33234         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33235 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33236       fi
33237       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33238     fi
33239   fi
33240 
33241   # Now new_path has a complete unix path to the binary
33242   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33243     # Keep paths in /bin as-is, but remove trailing .exe if any
33244     new_path="${new_path/%.exe/}"
33245     # Do not save /bin paths to all_fixpath_prefixes!
33246   else
33247     # Not in mixed or Windows style, start by that.
33248     new_path=`cmd //c echo $new_path`
33249 
33250   input_path="$new_path"
33251   # Check if we need to convert this using DOS-style short mode. If the path
33252   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33253   # take no chances and rewrite it.
33254   # Note: m4 eats our [], so we need to use [ and ] instead.
33255   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33256   if test "x$has_forbidden_chars" != x; then
33257     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33258     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33259   fi
33260 
33261     # Output is in $new_path
33262 
33263   windows_path="$new_path"
33264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33265     unix_path=`$CYGPATH -u "$windows_path"`
33266     new_path="$unix_path"
33267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33269     new_path="$unix_path"
33270   fi
33271 
33272     # remove trailing .exe if any
33273     new_path="${new_path/%.exe/}"
33274 
33275     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33276     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33277   fi
33278 
33279   else
33280     # We're on a posix platform. Hooray! :)
33281     # First separate the path from the arguments. This will split at the first
33282     # space.
33283     complete="$OBJC"
33284     path="${complete%% *}"
33285     tmp="$complete EOL"
33286     arguments="${tmp#* }"
33287 
33288     # Cannot rely on the command "which" here since it doesn't always work.
33289     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33290     if test -z "$is_absolute_path"; then
33291       # Path to executable is not absolute. Find it.
33292       IFS_save="$IFS"
33293       IFS=:
33294       for p in $PATH; do
33295         if test -f "$p/$path" && test -x "$p/$path"; then
33296           new_path="$p/$path"
33297           break
33298         fi
33299       done
33300       IFS="$IFS_save"
33301     else
33302       # This is an absolute path, we can use it without further modifications.
33303       new_path="$path"
33304     fi
33305 
33306     if test "x$new_path" = x; then
33307       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33308 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33309       has_space=`$ECHO "$complete" | $GREP " "`
33310       if test "x$has_space" != x; then
33311         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33312 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33313       fi
33314       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33315     fi
33316   fi
33317 
33318   # Now join together the path and the arguments once again
33319   if test "x$arguments" != xEOL; then
33320     new_complete="$new_path ${arguments% *}"
33321   else
33322     new_complete="$new_path"
33323   fi
33324 
33325   if test "x$complete" != "x$new_complete"; then
33326     OBJC="$new_complete"
33327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33328 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33329   fi
33330 
33331 
33332 
33333   # Publish this variable in the help.
33334 
33335 
33336   if test "x$LIPO" = x; then
33337     # The variable is not set by user, try to locate tool using the code snippet
33338     for ac_prog in lipo
33339 do
33340   # Extract the first word of "$ac_prog", so it can be a program name with args.
33341 set dummy $ac_prog; ac_word=$2
33342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33343 $as_echo_n "checking for $ac_word... " >&6; }
33344 if ${ac_cv_path_LIPO+:} false; then :
33345   $as_echo_n "(cached) " >&6
33346 else
33347   case $LIPO in
33348   [\\/]* | ?:[\\/]*)
33349   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33350   ;;
33351   *)
33352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33353 for as_dir in $PATH
33354 do
33355   IFS=$as_save_IFS
33356   test -z "$as_dir" && as_dir=.
33357     for ac_exec_ext in '' $ac_executable_extensions; do
33358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33359     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33361     break 2
33362   fi
33363 done
33364   done
33365 IFS=$as_save_IFS
33366 
33367   ;;
33368 esac
33369 fi
33370 LIPO=$ac_cv_path_LIPO
33371 if test -n "$LIPO"; then
33372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33373 $as_echo "$LIPO" >&6; }
33374 else
33375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33376 $as_echo "no" >&6; }
33377 fi
33378 
33379 
33380   test -n "$LIPO" && break
33381 done
33382 
33383   else
33384     # The variable is set, but is it from the command line or the environment?
33385 
33386     # Try to remove the string !LIPO! from our list.
33387     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33388     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33389       # If it failed, the variable was not from the command line. Ignore it,
33390       # but warn the user (except for BASH, which is always set by the calling BASH).
33391       if test "xLIPO" != xBASH; then
33392         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33393 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33394       fi
33395       # Try to locate tool using the code snippet
33396       for ac_prog in lipo
33397 do
33398   # Extract the first word of "$ac_prog", so it can be a program name with args.
33399 set dummy $ac_prog; ac_word=$2
33400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33401 $as_echo_n "checking for $ac_word... " >&6; }
33402 if ${ac_cv_path_LIPO+:} false; then :
33403   $as_echo_n "(cached) " >&6
33404 else
33405   case $LIPO in
33406   [\\/]* | ?:[\\/]*)
33407   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33408   ;;
33409   *)
33410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33411 for as_dir in $PATH
33412 do
33413   IFS=$as_save_IFS
33414   test -z "$as_dir" && as_dir=.
33415     for ac_exec_ext in '' $ac_executable_extensions; do
33416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33417     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33419     break 2
33420   fi
33421 done
33422   done
33423 IFS=$as_save_IFS
33424 
33425   ;;
33426 esac
33427 fi
33428 LIPO=$ac_cv_path_LIPO
33429 if test -n "$LIPO"; then
33430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33431 $as_echo "$LIPO" >&6; }
33432 else
33433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33434 $as_echo "no" >&6; }
33435 fi
33436 
33437 
33438   test -n "$LIPO" && break
33439 done
33440 
33441     else
33442       # If it succeeded, then it was overridden by the user. We will use it
33443       # for the tool.
33444 
33445       # First remove it from the list of overridden variables, so we can test
33446       # for unknown variables in the end.
33447       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33448 
33449       # Check if the provided tool contains a complete path.
33450       tool_specified="$LIPO"
33451       tool_basename="${tool_specified##*/}"
33452       if test "x$tool_basename" = "x$tool_specified"; then
33453         # A command without a complete path is provided, search $PATH.
33454         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33455 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33456         # Extract the first word of "$tool_basename", so it can be a program name with args.
33457 set dummy $tool_basename; ac_word=$2
33458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33459 $as_echo_n "checking for $ac_word... " >&6; }
33460 if ${ac_cv_path_LIPO+:} false; then :
33461   $as_echo_n "(cached) " >&6
33462 else
33463   case $LIPO in
33464   [\\/]* | ?:[\\/]*)
33465   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33466   ;;
33467   *)
33468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33469 for as_dir in $PATH
33470 do
33471   IFS=$as_save_IFS
33472   test -z "$as_dir" && as_dir=.
33473     for ac_exec_ext in '' $ac_executable_extensions; do
33474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33475     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33477     break 2
33478   fi
33479 done
33480   done
33481 IFS=$as_save_IFS
33482 
33483   ;;
33484 esac
33485 fi
33486 LIPO=$ac_cv_path_LIPO
33487 if test -n "$LIPO"; then
33488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33489 $as_echo "$LIPO" >&6; }
33490 else
33491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33492 $as_echo "no" >&6; }
33493 fi
33494 
33495 
33496         if test "x$LIPO" = x; then
33497           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33498         fi
33499       else
33500         # Otherwise we believe it is a complete path. Use it as it is.
33501         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33502 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33503         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33504 $as_echo_n "checking for LIPO... " >&6; }
33505         if test ! -x "$tool_specified"; then
33506           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33507 $as_echo "not found" >&6; }
33508           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33509         fi
33510         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33511 $as_echo "$tool_specified" >&6; }
33512       fi
33513     fi
33514   fi
33515 
33516 
33517 
33518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33519 
33520   # First separate the path from the arguments. This will split at the first
33521   # space.
33522   complete="$LIPO"
33523   path="${complete%% *}"
33524   tmp="$complete EOL"
33525   arguments="${tmp#* }"
33526 
33527   # Input might be given as Windows format, start by converting to
33528   # unix format.
33529   new_path=`$CYGPATH -u "$path"`
33530 
33531   # Now try to locate executable using which
33532   new_path=`$WHICH "$new_path" 2> /dev/null`
33533   # bat and cmd files are not always considered executable in cygwin causing which
33534   # to not find them
33535   if test "x$new_path" = x \
33536       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33537       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33538     new_path=`$CYGPATH -u "$path"`
33539   fi
33540   if test "x$new_path" = x; then
33541     # Oops. Which didn't find the executable.
33542     # The splitting of arguments from the executable at a space might have been incorrect,
33543     # since paths with space are more likely in Windows. Give it another try with the whole
33544     # argument.
33545     path="$complete"
33546     arguments="EOL"
33547     new_path=`$CYGPATH -u "$path"`
33548     new_path=`$WHICH "$new_path" 2> /dev/null`
33549     # bat and cmd files are not always considered executable in cygwin causing which
33550     # to not find them
33551     if test "x$new_path" = x \
33552         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33553         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33554       new_path=`$CYGPATH -u "$path"`
33555     fi
33556     if test "x$new_path" = x; then
33557       # It's still not found. Now this is an unrecoverable error.
33558       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33559 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33560       has_space=`$ECHO "$complete" | $GREP " "`
33561       if test "x$has_space" != x; then
33562         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33563 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33564       fi
33565       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33566     fi
33567   fi
33568 
33569   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33570   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33571   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33572   # "foo.exe" is OK but "foo" is an error.
33573   #
33574   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33575   # It is also a way to make sure we got the proper file name for the real test later on.
33576   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33577   if test "x$test_shortpath" = x; then
33578     # Short path failed, file does not exist as specified.
33579     # Try adding .exe or .cmd
33580     if test -f "${new_path}.exe"; then
33581       input_to_shortpath="${new_path}.exe"
33582     elif test -f "${new_path}.cmd"; then
33583       input_to_shortpath="${new_path}.cmd"
33584     else
33585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33586 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33587       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33588 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33589       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33590     fi
33591   else
33592     input_to_shortpath="$new_path"
33593   fi
33594 
33595   # Call helper function which possibly converts this using DOS-style short mode.
33596   # If so, the updated path is stored in $new_path.
33597   new_path="$input_to_shortpath"
33598 
33599   input_path="$input_to_shortpath"
33600   # Check if we need to convert this using DOS-style short mode. If the path
33601   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33602   # take no chances and rewrite it.
33603   # Note: m4 eats our [], so we need to use [ and ] instead.
33604   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33605   if test "x$has_forbidden_chars" != x; then
33606     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33607     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33608     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33609     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33610       # Going to short mode and back again did indeed matter. Since short mode is
33611       # case insensitive, let's make it lowercase to improve readability.
33612       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33613       # Now convert it back to Unix-stile (cygpath)
33614       input_path=`$CYGPATH -u "$shortmode_path"`
33615       new_path="$input_path"
33616     fi
33617   fi
33618 
33619   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33620   if test "x$test_cygdrive_prefix" = x; then
33621     # As a simple fix, exclude /usr/bin since it's not a real path.
33622     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33623       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33624       # a path prefixed by /cygdrive for fixpath to work.
33625       new_path="$CYGWIN_ROOT_PATH$input_path"
33626     fi
33627   fi
33628 
33629   # remove trailing .exe if any
33630   new_path="${new_path/%.exe/}"
33631 
33632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33633 
33634   # First separate the path from the arguments. This will split at the first
33635   # space.
33636   complete="$LIPO"
33637   path="${complete%% *}"
33638   tmp="$complete EOL"
33639   arguments="${tmp#* }"
33640 
33641   # Input might be given as Windows format, start by converting to
33642   # unix format.
33643   new_path="$path"
33644 
33645   windows_path="$new_path"
33646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33647     unix_path=`$CYGPATH -u "$windows_path"`
33648     new_path="$unix_path"
33649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33651     new_path="$unix_path"
33652   fi
33653 
33654 
33655   # Now try to locate executable using which
33656   new_path=`$WHICH "$new_path" 2> /dev/null`
33657 
33658   if test "x$new_path" = x; then
33659     # Oops. Which didn't find the executable.
33660     # The splitting of arguments from the executable at a space might have been incorrect,
33661     # since paths with space are more likely in Windows. Give it another try with the whole
33662     # argument.
33663     path="$complete"
33664     arguments="EOL"
33665     new_path="$path"
33666 
33667   windows_path="$new_path"
33668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33669     unix_path=`$CYGPATH -u "$windows_path"`
33670     new_path="$unix_path"
33671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33673     new_path="$unix_path"
33674   fi
33675 
33676 
33677     new_path=`$WHICH "$new_path" 2> /dev/null`
33678 
33679     if test "x$new_path" = x; then
33680       # It's still not found. Now this is an unrecoverable error.
33681       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33682 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33683       has_space=`$ECHO "$complete" | $GREP " "`
33684       if test "x$has_space" != x; then
33685         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33686 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33687       fi
33688       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33689     fi
33690   fi
33691 
33692   # Now new_path has a complete unix path to the binary
33693   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33694     # Keep paths in /bin as-is, but remove trailing .exe if any
33695     new_path="${new_path/%.exe/}"
33696     # Do not save /bin paths to all_fixpath_prefixes!
33697   else
33698     # Not in mixed or Windows style, start by that.
33699     new_path=`cmd //c echo $new_path`
33700 
33701   input_path="$new_path"
33702   # Check if we need to convert this using DOS-style short mode. If the path
33703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33704   # take no chances and rewrite it.
33705   # Note: m4 eats our [], so we need to use [ and ] instead.
33706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33707   if test "x$has_forbidden_chars" != x; then
33708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33709     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33710   fi
33711 
33712     # Output is in $new_path
33713 
33714   windows_path="$new_path"
33715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33716     unix_path=`$CYGPATH -u "$windows_path"`
33717     new_path="$unix_path"
33718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33720     new_path="$unix_path"
33721   fi
33722 
33723     # remove trailing .exe if any
33724     new_path="${new_path/%.exe/}"
33725 
33726     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33727     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33728   fi
33729 
33730   else
33731     # We're on a posix platform. Hooray! :)
33732     # First separate the path from the arguments. This will split at the first
33733     # space.
33734     complete="$LIPO"
33735     path="${complete%% *}"
33736     tmp="$complete EOL"
33737     arguments="${tmp#* }"
33738 
33739     # Cannot rely on the command "which" here since it doesn't always work.
33740     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33741     if test -z "$is_absolute_path"; then
33742       # Path to executable is not absolute. Find it.
33743       IFS_save="$IFS"
33744       IFS=:
33745       for p in $PATH; do
33746         if test -f "$p/$path" && test -x "$p/$path"; then
33747           new_path="$p/$path"
33748           break
33749         fi
33750       done
33751       IFS="$IFS_save"
33752     else
33753       # This is an absolute path, we can use it without further modifications.
33754       new_path="$path"
33755     fi
33756 
33757     if test "x$new_path" = x; then
33758       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33759 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33760       has_space=`$ECHO "$complete" | $GREP " "`
33761       if test "x$has_space" != x; then
33762         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33763 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33764       fi
33765       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33766     fi
33767   fi
33768 
33769   # Now join together the path and the arguments once again
33770   if test "x$arguments" != xEOL; then
33771     new_complete="$new_path ${arguments% *}"
33772   else
33773     new_complete="$new_path"
33774   fi
33775 
33776   if test "x$complete" != "x$new_complete"; then
33777     LIPO="$new_complete"
33778     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33779 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33780   fi
33781 
33782   else
33783     OBJC=
33784   fi
33785 
33786   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33787     # Extract the first word of "mt", so it can be a program name with args.
33788 set dummy mt; ac_word=$2
33789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33790 $as_echo_n "checking for $ac_word... " >&6; }
33791 if ${ac_cv_prog_MT+:} false; then :
33792   $as_echo_n "(cached) " >&6
33793 else
33794   if test -n "$MT"; then
33795   ac_cv_prog_MT="$MT" # Let the user override the test.
33796 else
33797   ac_prog_rejected=no
33798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33799 for as_dir in $PATH
33800 do
33801   IFS=$as_save_IFS
33802   test -z "$as_dir" && as_dir=.
33803     for ac_exec_ext in '' $ac_executable_extensions; do
33804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33805     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33806        ac_prog_rejected=yes
33807        continue
33808      fi
33809     ac_cv_prog_MT="mt"
33810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33811     break 2
33812   fi
33813 done
33814   done
33815 IFS=$as_save_IFS
33816 
33817 if test $ac_prog_rejected = yes; then
33818   # We found a bogon in the path, so make sure we never use it.
33819   set dummy $ac_cv_prog_MT
33820   shift
33821   if test $# != 0; then
33822     # We chose a different compiler from the bogus one.
33823     # However, it has the same basename, so the bogon will be chosen
33824     # first if we set MT to just the basename; use the full file name.
33825     shift
33826     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33827   fi
33828 fi
33829 fi
33830 fi
33831 MT=$ac_cv_prog_MT
33832 if test -n "$MT"; then
33833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33834 $as_echo "$MT" >&6; }
33835 else
33836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33837 $as_echo "no" >&6; }
33838 fi
33839 
33840 
33841 
33842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33843 
33844   # First separate the path from the arguments. This will split at the first
33845   # space.
33846   complete="$MT"
33847   path="${complete%% *}"
33848   tmp="$complete EOL"
33849   arguments="${tmp#* }"
33850 
33851   # Input might be given as Windows format, start by converting to
33852   # unix format.
33853   new_path=`$CYGPATH -u "$path"`
33854 
33855   # Now try to locate executable using which
33856   new_path=`$WHICH "$new_path" 2> /dev/null`
33857   # bat and cmd files are not always considered executable in cygwin causing which
33858   # to not find them
33859   if test "x$new_path" = x \
33860       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33861       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33862     new_path=`$CYGPATH -u "$path"`
33863   fi
33864   if test "x$new_path" = x; then
33865     # Oops. Which didn't find the executable.
33866     # The splitting of arguments from the executable at a space might have been incorrect,
33867     # since paths with space are more likely in Windows. Give it another try with the whole
33868     # argument.
33869     path="$complete"
33870     arguments="EOL"
33871     new_path=`$CYGPATH -u "$path"`
33872     new_path=`$WHICH "$new_path" 2> /dev/null`
33873     # bat and cmd files are not always considered executable in cygwin causing which
33874     # to not find them
33875     if test "x$new_path" = x \
33876         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33877         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33878       new_path=`$CYGPATH -u "$path"`
33879     fi
33880     if test "x$new_path" = x; then
33881       # It's still not found. Now this is an unrecoverable error.
33882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33883 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33884       has_space=`$ECHO "$complete" | $GREP " "`
33885       if test "x$has_space" != x; then
33886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33888       fi
33889       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33890     fi
33891   fi
33892 
33893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33896   # "foo.exe" is OK but "foo" is an error.
33897   #
33898   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33899   # It is also a way to make sure we got the proper file name for the real test later on.
33900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33901   if test "x$test_shortpath" = x; then
33902     # Short path failed, file does not exist as specified.
33903     # Try adding .exe or .cmd
33904     if test -f "${new_path}.exe"; then
33905       input_to_shortpath="${new_path}.exe"
33906     elif test -f "${new_path}.cmd"; then
33907       input_to_shortpath="${new_path}.cmd"
33908     else
33909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33910 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33911       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33912 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33913       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33914     fi
33915   else
33916     input_to_shortpath="$new_path"
33917   fi
33918 
33919   # Call helper function which possibly converts this using DOS-style short mode.
33920   # If so, the updated path is stored in $new_path.
33921   new_path="$input_to_shortpath"
33922 
33923   input_path="$input_to_shortpath"
33924   # Check if we need to convert this using DOS-style short mode. If the path
33925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33926   # take no chances and rewrite it.
33927   # Note: m4 eats our [], so we need to use [ and ] instead.
33928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33929   if test "x$has_forbidden_chars" != x; then
33930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33934       # Going to short mode and back again did indeed matter. Since short mode is
33935       # case insensitive, let's make it lowercase to improve readability.
33936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33937       # Now convert it back to Unix-stile (cygpath)
33938       input_path=`$CYGPATH -u "$shortmode_path"`
33939       new_path="$input_path"
33940     fi
33941   fi
33942 
33943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33944   if test "x$test_cygdrive_prefix" = x; then
33945     # As a simple fix, exclude /usr/bin since it's not a real path.
33946     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33948       # a path prefixed by /cygdrive for fixpath to work.
33949       new_path="$CYGWIN_ROOT_PATH$input_path"
33950     fi
33951   fi
33952 
33953   # remove trailing .exe if any
33954   new_path="${new_path/%.exe/}"
33955 
33956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33957 
33958   # First separate the path from the arguments. This will split at the first
33959   # space.
33960   complete="$MT"
33961   path="${complete%% *}"
33962   tmp="$complete EOL"
33963   arguments="${tmp#* }"
33964 
33965   # Input might be given as Windows format, start by converting to
33966   # unix format.
33967   new_path="$path"
33968 
33969   windows_path="$new_path"
33970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33971     unix_path=`$CYGPATH -u "$windows_path"`
33972     new_path="$unix_path"
33973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33975     new_path="$unix_path"
33976   fi
33977 
33978 
33979   # Now try to locate executable using which
33980   new_path=`$WHICH "$new_path" 2> /dev/null`
33981 
33982   if test "x$new_path" = x; then
33983     # Oops. Which didn't find the executable.
33984     # The splitting of arguments from the executable at a space might have been incorrect,
33985     # since paths with space are more likely in Windows. Give it another try with the whole
33986     # argument.
33987     path="$complete"
33988     arguments="EOL"
33989     new_path="$path"
33990 
33991   windows_path="$new_path"
33992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33993     unix_path=`$CYGPATH -u "$windows_path"`
33994     new_path="$unix_path"
33995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33997     new_path="$unix_path"
33998   fi
33999 
34000 
34001     new_path=`$WHICH "$new_path" 2> /dev/null`
34002 
34003     if test "x$new_path" = x; then
34004       # It's still not found. Now this is an unrecoverable error.
34005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34006 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34007       has_space=`$ECHO "$complete" | $GREP " "`
34008       if test "x$has_space" != x; then
34009         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34010 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34011       fi
34012       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34013     fi
34014   fi
34015 
34016   # Now new_path has a complete unix path to the binary
34017   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34018     # Keep paths in /bin as-is, but remove trailing .exe if any
34019     new_path="${new_path/%.exe/}"
34020     # Do not save /bin paths to all_fixpath_prefixes!
34021   else
34022     # Not in mixed or Windows style, start by that.
34023     new_path=`cmd //c echo $new_path`
34024 
34025   input_path="$new_path"
34026   # Check if we need to convert this using DOS-style short mode. If the path
34027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34028   # take no chances and rewrite it.
34029   # Note: m4 eats our [], so we need to use [ and ] instead.
34030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34031   if test "x$has_forbidden_chars" != x; then
34032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34034   fi
34035 
34036     # Output is in $new_path
34037 
34038   windows_path="$new_path"
34039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34040     unix_path=`$CYGPATH -u "$windows_path"`
34041     new_path="$unix_path"
34042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34044     new_path="$unix_path"
34045   fi
34046 
34047     # remove trailing .exe if any
34048     new_path="${new_path/%.exe/}"
34049 
34050     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34051     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34052   fi
34053 
34054   else
34055     # We're on a posix platform. Hooray! :)
34056     # First separate the path from the arguments. This will split at the first
34057     # space.
34058     complete="$MT"
34059     path="${complete%% *}"
34060     tmp="$complete EOL"
34061     arguments="${tmp#* }"
34062 
34063     # Cannot rely on the command "which" here since it doesn't always work.
34064     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34065     if test -z "$is_absolute_path"; then
34066       # Path to executable is not absolute. Find it.
34067       IFS_save="$IFS"
34068       IFS=:
34069       for p in $PATH; do
34070         if test -f "$p/$path" && test -x "$p/$path"; then
34071           new_path="$p/$path"
34072           break
34073         fi
34074       done
34075       IFS="$IFS_save"
34076     else
34077       # This is an absolute path, we can use it without further modifications.
34078       new_path="$path"
34079     fi
34080 
34081     if test "x$new_path" = x; then
34082       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34083 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34084       has_space=`$ECHO "$complete" | $GREP " "`
34085       if test "x$has_space" != x; then
34086         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34087 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34088       fi
34089       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34090     fi
34091   fi
34092 
34093   # Now join together the path and the arguments once again
34094   if test "x$arguments" != xEOL; then
34095     new_complete="$new_path ${arguments% *}"
34096   else
34097     new_complete="$new_path"
34098   fi
34099 
34100   if test "x$complete" != "x$new_complete"; then
34101     MT="$new_complete"
34102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34103 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34104   fi
34105 
34106     # Setup the resource compiler (RC)
34107     # Extract the first word of "rc", so it can be a program name with args.
34108 set dummy rc; ac_word=$2
34109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34110 $as_echo_n "checking for $ac_word... " >&6; }
34111 if ${ac_cv_prog_RC+:} false; then :
34112   $as_echo_n "(cached) " >&6
34113 else
34114   if test -n "$RC"; then
34115   ac_cv_prog_RC="$RC" # Let the user override the test.
34116 else
34117   ac_prog_rejected=no
34118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34119 for as_dir in $PATH
34120 do
34121   IFS=$as_save_IFS
34122   test -z "$as_dir" && as_dir=.
34123     for ac_exec_ext in '' $ac_executable_extensions; do
34124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34125     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34126        ac_prog_rejected=yes
34127        continue
34128      fi
34129     ac_cv_prog_RC="rc"
34130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34131     break 2
34132   fi
34133 done
34134   done
34135 IFS=$as_save_IFS
34136 
34137 if test $ac_prog_rejected = yes; then
34138   # We found a bogon in the path, so make sure we never use it.
34139   set dummy $ac_cv_prog_RC
34140   shift
34141   if test $# != 0; then
34142     # We chose a different compiler from the bogus one.
34143     # However, it has the same basename, so the bogon will be chosen
34144     # first if we set RC to just the basename; use the full file name.
34145     shift
34146     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34147   fi
34148 fi
34149 fi
34150 fi
34151 RC=$ac_cv_prog_RC
34152 if test -n "$RC"; then
34153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34154 $as_echo "$RC" >&6; }
34155 else
34156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34157 $as_echo "no" >&6; }
34158 fi
34159 
34160 
34161 
34162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34163 
34164   # First separate the path from the arguments. This will split at the first
34165   # space.
34166   complete="$RC"
34167   path="${complete%% *}"
34168   tmp="$complete EOL"
34169   arguments="${tmp#* }"
34170 
34171   # Input might be given as Windows format, start by converting to
34172   # unix format.
34173   new_path=`$CYGPATH -u "$path"`
34174 
34175   # Now try to locate executable using which
34176   new_path=`$WHICH "$new_path" 2> /dev/null`
34177   # bat and cmd files are not always considered executable in cygwin causing which
34178   # to not find them
34179   if test "x$new_path" = x \
34180       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34181       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34182     new_path=`$CYGPATH -u "$path"`
34183   fi
34184   if test "x$new_path" = x; then
34185     # Oops. Which didn't find the executable.
34186     # The splitting of arguments from the executable at a space might have been incorrect,
34187     # since paths with space are more likely in Windows. Give it another try with the whole
34188     # argument.
34189     path="$complete"
34190     arguments="EOL"
34191     new_path=`$CYGPATH -u "$path"`
34192     new_path=`$WHICH "$new_path" 2> /dev/null`
34193     # bat and cmd files are not always considered executable in cygwin causing which
34194     # to not find them
34195     if test "x$new_path" = x \
34196         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34197         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34198       new_path=`$CYGPATH -u "$path"`
34199     fi
34200     if test "x$new_path" = x; then
34201       # It's still not found. Now this is an unrecoverable error.
34202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34203 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34204       has_space=`$ECHO "$complete" | $GREP " "`
34205       if test "x$has_space" != x; then
34206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34208       fi
34209       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34210     fi
34211   fi
34212 
34213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34216   # "foo.exe" is OK but "foo" is an error.
34217   #
34218   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34219   # It is also a way to make sure we got the proper file name for the real test later on.
34220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34221   if test "x$test_shortpath" = x; then
34222     # Short path failed, file does not exist as specified.
34223     # Try adding .exe or .cmd
34224     if test -f "${new_path}.exe"; then
34225       input_to_shortpath="${new_path}.exe"
34226     elif test -f "${new_path}.cmd"; then
34227       input_to_shortpath="${new_path}.cmd"
34228     else
34229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34230 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34231       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34232 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34233       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34234     fi
34235   else
34236     input_to_shortpath="$new_path"
34237   fi
34238 
34239   # Call helper function which possibly converts this using DOS-style short mode.
34240   # If so, the updated path is stored in $new_path.
34241   new_path="$input_to_shortpath"
34242 
34243   input_path="$input_to_shortpath"
34244   # Check if we need to convert this using DOS-style short mode. If the path
34245   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34246   # take no chances and rewrite it.
34247   # Note: m4 eats our [], so we need to use [ and ] instead.
34248   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34249   if test "x$has_forbidden_chars" != x; then
34250     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34251     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34252     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34253     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34254       # Going to short mode and back again did indeed matter. Since short mode is
34255       # case insensitive, let's make it lowercase to improve readability.
34256       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34257       # Now convert it back to Unix-stile (cygpath)
34258       input_path=`$CYGPATH -u "$shortmode_path"`
34259       new_path="$input_path"
34260     fi
34261   fi
34262 
34263   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34264   if test "x$test_cygdrive_prefix" = x; then
34265     # As a simple fix, exclude /usr/bin since it's not a real path.
34266     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34267       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34268       # a path prefixed by /cygdrive for fixpath to work.
34269       new_path="$CYGWIN_ROOT_PATH$input_path"
34270     fi
34271   fi
34272 
34273   # remove trailing .exe if any
34274   new_path="${new_path/%.exe/}"
34275 
34276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34277 
34278   # First separate the path from the arguments. This will split at the first
34279   # space.
34280   complete="$RC"
34281   path="${complete%% *}"
34282   tmp="$complete EOL"
34283   arguments="${tmp#* }"
34284 
34285   # Input might be given as Windows format, start by converting to
34286   # unix format.
34287   new_path="$path"
34288 
34289   windows_path="$new_path"
34290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34291     unix_path=`$CYGPATH -u "$windows_path"`
34292     new_path="$unix_path"
34293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34295     new_path="$unix_path"
34296   fi
34297 
34298 
34299   # Now try to locate executable using which
34300   new_path=`$WHICH "$new_path" 2> /dev/null`
34301 
34302   if test "x$new_path" = x; then
34303     # Oops. Which didn't find the executable.
34304     # The splitting of arguments from the executable at a space might have been incorrect,
34305     # since paths with space are more likely in Windows. Give it another try with the whole
34306     # argument.
34307     path="$complete"
34308     arguments="EOL"
34309     new_path="$path"
34310 
34311   windows_path="$new_path"
34312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34313     unix_path=`$CYGPATH -u "$windows_path"`
34314     new_path="$unix_path"
34315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34317     new_path="$unix_path"
34318   fi
34319 
34320 
34321     new_path=`$WHICH "$new_path" 2> /dev/null`
34322 
34323     if test "x$new_path" = x; then
34324       # It's still not found. Now this is an unrecoverable error.
34325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34326 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34327       has_space=`$ECHO "$complete" | $GREP " "`
34328       if test "x$has_space" != x; then
34329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34331       fi
34332       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34333     fi
34334   fi
34335 
34336   # Now new_path has a complete unix path to the binary
34337   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34338     # Keep paths in /bin as-is, but remove trailing .exe if any
34339     new_path="${new_path/%.exe/}"
34340     # Do not save /bin paths to all_fixpath_prefixes!
34341   else
34342     # Not in mixed or Windows style, start by that.
34343     new_path=`cmd //c echo $new_path`
34344 
34345   input_path="$new_path"
34346   # Check if we need to convert this using DOS-style short mode. If the path
34347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34348   # take no chances and rewrite it.
34349   # Note: m4 eats our [], so we need to use [ and ] instead.
34350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34351   if test "x$has_forbidden_chars" != x; then
34352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34354   fi
34355 
34356     # Output is in $new_path
34357 
34358   windows_path="$new_path"
34359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34360     unix_path=`$CYGPATH -u "$windows_path"`
34361     new_path="$unix_path"
34362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34364     new_path="$unix_path"
34365   fi
34366 
34367     # remove trailing .exe if any
34368     new_path="${new_path/%.exe/}"
34369 
34370     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34371     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34372   fi
34373 
34374   else
34375     # We're on a posix platform. Hooray! :)
34376     # First separate the path from the arguments. This will split at the first
34377     # space.
34378     complete="$RC"
34379     path="${complete%% *}"
34380     tmp="$complete EOL"
34381     arguments="${tmp#* }"
34382 
34383     # Cannot rely on the command "which" here since it doesn't always work.
34384     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34385     if test -z "$is_absolute_path"; then
34386       # Path to executable is not absolute. Find it.
34387       IFS_save="$IFS"
34388       IFS=:
34389       for p in $PATH; do
34390         if test -f "$p/$path" && test -x "$p/$path"; then
34391           new_path="$p/$path"
34392           break
34393         fi
34394       done
34395       IFS="$IFS_save"
34396     else
34397       # This is an absolute path, we can use it without further modifications.
34398       new_path="$path"
34399     fi
34400 
34401     if test "x$new_path" = x; then
34402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34403 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34404       has_space=`$ECHO "$complete" | $GREP " "`
34405       if test "x$has_space" != x; then
34406         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34407 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34408       fi
34409       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34410     fi
34411   fi
34412 
34413   # Now join together the path and the arguments once again
34414   if test "x$arguments" != xEOL; then
34415     new_complete="$new_path ${arguments% *}"
34416   else
34417     new_complete="$new_path"
34418   fi
34419 
34420   if test "x$complete" != "x$new_complete"; then
34421     RC="$new_complete"
34422     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34423 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34424   fi
34425 
34426     # Extract the first word of "dumpbin", so it can be a program name with args.
34427 set dummy dumpbin; ac_word=$2
34428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34429 $as_echo_n "checking for $ac_word... " >&6; }
34430 if ${ac_cv_prog_DUMPBIN+:} false; then :
34431   $as_echo_n "(cached) " >&6
34432 else
34433   if test -n "$DUMPBIN"; then
34434   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34435 else
34436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34437 for as_dir in $PATH
34438 do
34439   IFS=$as_save_IFS
34440   test -z "$as_dir" && as_dir=.
34441     for ac_exec_ext in '' $ac_executable_extensions; do
34442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34443     ac_cv_prog_DUMPBIN="dumpbin"
34444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34445     break 2
34446   fi
34447 done
34448   done
34449 IFS=$as_save_IFS
34450 
34451 fi
34452 fi
34453 DUMPBIN=$ac_cv_prog_DUMPBIN
34454 if test -n "$DUMPBIN"; then
34455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34456 $as_echo "$DUMPBIN" >&6; }
34457 else
34458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34459 $as_echo "no" >&6; }
34460 fi
34461 
34462 
34463 
34464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34465 
34466   # First separate the path from the arguments. This will split at the first
34467   # space.
34468   complete="$DUMPBIN"
34469   path="${complete%% *}"
34470   tmp="$complete EOL"
34471   arguments="${tmp#* }"
34472 
34473   # Input might be given as Windows format, start by converting to
34474   # unix format.
34475   new_path=`$CYGPATH -u "$path"`
34476 
34477   # Now try to locate executable using which
34478   new_path=`$WHICH "$new_path" 2> /dev/null`
34479   # bat and cmd files are not always considered executable in cygwin causing which
34480   # to not find them
34481   if test "x$new_path" = x \
34482       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34483       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34484     new_path=`$CYGPATH -u "$path"`
34485   fi
34486   if test "x$new_path" = x; then
34487     # Oops. Which didn't find the executable.
34488     # The splitting of arguments from the executable at a space might have been incorrect,
34489     # since paths with space are more likely in Windows. Give it another try with the whole
34490     # argument.
34491     path="$complete"
34492     arguments="EOL"
34493     new_path=`$CYGPATH -u "$path"`
34494     new_path=`$WHICH "$new_path" 2> /dev/null`
34495     # bat and cmd files are not always considered executable in cygwin causing which
34496     # to not find them
34497     if test "x$new_path" = x \
34498         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34499         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34500       new_path=`$CYGPATH -u "$path"`
34501     fi
34502     if test "x$new_path" = x; then
34503       # It's still not found. Now this is an unrecoverable error.
34504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34505 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34506       has_space=`$ECHO "$complete" | $GREP " "`
34507       if test "x$has_space" != x; then
34508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34510       fi
34511       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34512     fi
34513   fi
34514 
34515   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34516   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34517   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34518   # "foo.exe" is OK but "foo" is an error.
34519   #
34520   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34521   # It is also a way to make sure we got the proper file name for the real test later on.
34522   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34523   if test "x$test_shortpath" = x; then
34524     # Short path failed, file does not exist as specified.
34525     # Try adding .exe or .cmd
34526     if test -f "${new_path}.exe"; then
34527       input_to_shortpath="${new_path}.exe"
34528     elif test -f "${new_path}.cmd"; then
34529       input_to_shortpath="${new_path}.cmd"
34530     else
34531       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34532 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34533       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34534 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34535       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34536     fi
34537   else
34538     input_to_shortpath="$new_path"
34539   fi
34540 
34541   # Call helper function which possibly converts this using DOS-style short mode.
34542   # If so, the updated path is stored in $new_path.
34543   new_path="$input_to_shortpath"
34544 
34545   input_path="$input_to_shortpath"
34546   # Check if we need to convert this using DOS-style short mode. If the path
34547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34548   # take no chances and rewrite it.
34549   # Note: m4 eats our [], so we need to use [ and ] instead.
34550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34551   if test "x$has_forbidden_chars" != x; then
34552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34556       # Going to short mode and back again did indeed matter. Since short mode is
34557       # case insensitive, let's make it lowercase to improve readability.
34558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34559       # Now convert it back to Unix-stile (cygpath)
34560       input_path=`$CYGPATH -u "$shortmode_path"`
34561       new_path="$input_path"
34562     fi
34563   fi
34564 
34565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34566   if test "x$test_cygdrive_prefix" = x; then
34567     # As a simple fix, exclude /usr/bin since it's not a real path.
34568     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34570       # a path prefixed by /cygdrive for fixpath to work.
34571       new_path="$CYGWIN_ROOT_PATH$input_path"
34572     fi
34573   fi
34574 
34575   # remove trailing .exe if any
34576   new_path="${new_path/%.exe/}"
34577 
34578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34579 
34580   # First separate the path from the arguments. This will split at the first
34581   # space.
34582   complete="$DUMPBIN"
34583   path="${complete%% *}"
34584   tmp="$complete EOL"
34585   arguments="${tmp#* }"
34586 
34587   # Input might be given as Windows format, start by converting to
34588   # unix format.
34589   new_path="$path"
34590 
34591   windows_path="$new_path"
34592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34593     unix_path=`$CYGPATH -u "$windows_path"`
34594     new_path="$unix_path"
34595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34597     new_path="$unix_path"
34598   fi
34599 
34600 
34601   # Now try to locate executable using which
34602   new_path=`$WHICH "$new_path" 2> /dev/null`
34603 
34604   if test "x$new_path" = x; then
34605     # Oops. Which didn't find the executable.
34606     # The splitting of arguments from the executable at a space might have been incorrect,
34607     # since paths with space are more likely in Windows. Give it another try with the whole
34608     # argument.
34609     path="$complete"
34610     arguments="EOL"
34611     new_path="$path"
34612 
34613   windows_path="$new_path"
34614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34615     unix_path=`$CYGPATH -u "$windows_path"`
34616     new_path="$unix_path"
34617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34619     new_path="$unix_path"
34620   fi
34621 
34622 
34623     new_path=`$WHICH "$new_path" 2> /dev/null`
34624 
34625     if test "x$new_path" = x; then
34626       # It's still not found. Now this is an unrecoverable error.
34627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34628 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34629       has_space=`$ECHO "$complete" | $GREP " "`
34630       if test "x$has_space" != x; then
34631         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34632 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34633       fi
34634       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34635     fi
34636   fi
34637 
34638   # Now new_path has a complete unix path to the binary
34639   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34640     # Keep paths in /bin as-is, but remove trailing .exe if any
34641     new_path="${new_path/%.exe/}"
34642     # Do not save /bin paths to all_fixpath_prefixes!
34643   else
34644     # Not in mixed or Windows style, start by that.
34645     new_path=`cmd //c echo $new_path`
34646 
34647   input_path="$new_path"
34648   # Check if we need to convert this using DOS-style short mode. If the path
34649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34650   # take no chances and rewrite it.
34651   # Note: m4 eats our [], so we need to use [ and ] instead.
34652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34653   if test "x$has_forbidden_chars" != x; then
34654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34655     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34656   fi
34657 
34658     # Output is in $new_path
34659 
34660   windows_path="$new_path"
34661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34662     unix_path=`$CYGPATH -u "$windows_path"`
34663     new_path="$unix_path"
34664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34666     new_path="$unix_path"
34667   fi
34668 
34669     # remove trailing .exe if any
34670     new_path="${new_path/%.exe/}"
34671 
34672     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34673     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34674   fi
34675 
34676   else
34677     # We're on a posix platform. Hooray! :)
34678     # First separate the path from the arguments. This will split at the first
34679     # space.
34680     complete="$DUMPBIN"
34681     path="${complete%% *}"
34682     tmp="$complete EOL"
34683     arguments="${tmp#* }"
34684 
34685     # Cannot rely on the command "which" here since it doesn't always work.
34686     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34687     if test -z "$is_absolute_path"; then
34688       # Path to executable is not absolute. Find it.
34689       IFS_save="$IFS"
34690       IFS=:
34691       for p in $PATH; do
34692         if test -f "$p/$path" && test -x "$p/$path"; then
34693           new_path="$p/$path"
34694           break
34695         fi
34696       done
34697       IFS="$IFS_save"
34698     else
34699       # This is an absolute path, we can use it without further modifications.
34700       new_path="$path"
34701     fi
34702 
34703     if test "x$new_path" = x; then
34704       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34705 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34706       has_space=`$ECHO "$complete" | $GREP " "`
34707       if test "x$has_space" != x; then
34708         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34709 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34710       fi
34711       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34712     fi
34713   fi
34714 
34715   # Now join together the path and the arguments once again
34716   if test "x$arguments" != xEOL; then
34717     new_complete="$new_path ${arguments% *}"
34718   else
34719     new_complete="$new_path"
34720   fi
34721 
34722   if test "x$complete" != "x$new_complete"; then
34723     DUMPBIN="$new_complete"
34724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34725 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34726   fi
34727 
34728   fi
34729 
34730   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34731 
34732 
34733   # Publish this variable in the help.
34734 
34735 
34736   if test "x$STRIP" = x; then
34737     # The variable is not set by user, try to locate tool using the code snippet
34738     for ac_prog in strip
34739 do
34740   # Extract the first word of "$ac_prog", so it can be a program name with args.
34741 set dummy $ac_prog; ac_word=$2
34742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34743 $as_echo_n "checking for $ac_word... " >&6; }
34744 if ${ac_cv_path_STRIP+:} false; then :
34745   $as_echo_n "(cached) " >&6
34746 else
34747   case $STRIP in
34748   [\\/]* | ?:[\\/]*)
34749   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34750   ;;
34751   *)
34752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34753 for as_dir in $PATH
34754 do
34755   IFS=$as_save_IFS
34756   test -z "$as_dir" && as_dir=.
34757     for ac_exec_ext in '' $ac_executable_extensions; do
34758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34759     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34761     break 2
34762   fi
34763 done
34764   done
34765 IFS=$as_save_IFS
34766 
34767   ;;
34768 esac
34769 fi
34770 STRIP=$ac_cv_path_STRIP
34771 if test -n "$STRIP"; then
34772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34773 $as_echo "$STRIP" >&6; }
34774 else
34775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34776 $as_echo "no" >&6; }
34777 fi
34778 
34779 
34780   test -n "$STRIP" && break
34781 done
34782 
34783   else
34784     # The variable is set, but is it from the command line or the environment?
34785 
34786     # Try to remove the string !STRIP! from our list.
34787     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34788     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34789       # If it failed, the variable was not from the command line. Ignore it,
34790       # but warn the user (except for BASH, which is always set by the calling BASH).
34791       if test "xSTRIP" != xBASH; then
34792         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34793 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34794       fi
34795       # Try to locate tool using the code snippet
34796       for ac_prog in strip
34797 do
34798   # Extract the first word of "$ac_prog", so it can be a program name with args.
34799 set dummy $ac_prog; ac_word=$2
34800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34801 $as_echo_n "checking for $ac_word... " >&6; }
34802 if ${ac_cv_path_STRIP+:} false; then :
34803   $as_echo_n "(cached) " >&6
34804 else
34805   case $STRIP in
34806   [\\/]* | ?:[\\/]*)
34807   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34808   ;;
34809   *)
34810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34811 for as_dir in $PATH
34812 do
34813   IFS=$as_save_IFS
34814   test -z "$as_dir" && as_dir=.
34815     for ac_exec_ext in '' $ac_executable_extensions; do
34816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34817     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34819     break 2
34820   fi
34821 done
34822   done
34823 IFS=$as_save_IFS
34824 
34825   ;;
34826 esac
34827 fi
34828 STRIP=$ac_cv_path_STRIP
34829 if test -n "$STRIP"; then
34830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34831 $as_echo "$STRIP" >&6; }
34832 else
34833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34834 $as_echo "no" >&6; }
34835 fi
34836 
34837 
34838   test -n "$STRIP" && break
34839 done
34840 
34841     else
34842       # If it succeeded, then it was overridden by the user. We will use it
34843       # for the tool.
34844 
34845       # First remove it from the list of overridden variables, so we can test
34846       # for unknown variables in the end.
34847       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34848 
34849       # Check if the provided tool contains a complete path.
34850       tool_specified="$STRIP"
34851       tool_basename="${tool_specified##*/}"
34852       if test "x$tool_basename" = "x$tool_specified"; then
34853         # A command without a complete path is provided, search $PATH.
34854         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34855 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34856         # Extract the first word of "$tool_basename", so it can be a program name with args.
34857 set dummy $tool_basename; ac_word=$2
34858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34859 $as_echo_n "checking for $ac_word... " >&6; }
34860 if ${ac_cv_path_STRIP+:} false; then :
34861   $as_echo_n "(cached) " >&6
34862 else
34863   case $STRIP in
34864   [\\/]* | ?:[\\/]*)
34865   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34866   ;;
34867   *)
34868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34869 for as_dir in $PATH
34870 do
34871   IFS=$as_save_IFS
34872   test -z "$as_dir" && as_dir=.
34873     for ac_exec_ext in '' $ac_executable_extensions; do
34874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34875     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34877     break 2
34878   fi
34879 done
34880   done
34881 IFS=$as_save_IFS
34882 
34883   ;;
34884 esac
34885 fi
34886 STRIP=$ac_cv_path_STRIP
34887 if test -n "$STRIP"; then
34888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34889 $as_echo "$STRIP" >&6; }
34890 else
34891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34892 $as_echo "no" >&6; }
34893 fi
34894 
34895 
34896         if test "x$STRIP" = x; then
34897           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34898         fi
34899       else
34900         # Otherwise we believe it is a complete path. Use it as it is.
34901         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34902 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34903         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34904 $as_echo_n "checking for STRIP... " >&6; }
34905         if test ! -x "$tool_specified"; then
34906           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34907 $as_echo "not found" >&6; }
34908           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34909         fi
34910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34911 $as_echo "$tool_specified" >&6; }
34912       fi
34913     fi
34914   fi
34915 
34916 
34917 
34918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34919 
34920   # First separate the path from the arguments. This will split at the first
34921   # space.
34922   complete="$STRIP"
34923   path="${complete%% *}"
34924   tmp="$complete EOL"
34925   arguments="${tmp#* }"
34926 
34927   # Input might be given as Windows format, start by converting to
34928   # unix format.
34929   new_path=`$CYGPATH -u "$path"`
34930 
34931   # Now try to locate executable using which
34932   new_path=`$WHICH "$new_path" 2> /dev/null`
34933   # bat and cmd files are not always considered executable in cygwin causing which
34934   # to not find them
34935   if test "x$new_path" = x \
34936       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34937       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34938     new_path=`$CYGPATH -u "$path"`
34939   fi
34940   if test "x$new_path" = x; then
34941     # Oops. Which didn't find the executable.
34942     # The splitting of arguments from the executable at a space might have been incorrect,
34943     # since paths with space are more likely in Windows. Give it another try with the whole
34944     # argument.
34945     path="$complete"
34946     arguments="EOL"
34947     new_path=`$CYGPATH -u "$path"`
34948     new_path=`$WHICH "$new_path" 2> /dev/null`
34949     # bat and cmd files are not always considered executable in cygwin causing which
34950     # to not find them
34951     if test "x$new_path" = x \
34952         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34953         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34954       new_path=`$CYGPATH -u "$path"`
34955     fi
34956     if test "x$new_path" = x; then
34957       # It's still not found. Now this is an unrecoverable error.
34958       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34959 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34960       has_space=`$ECHO "$complete" | $GREP " "`
34961       if test "x$has_space" != x; then
34962         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34963 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34964       fi
34965       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34966     fi
34967   fi
34968 
34969   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34970   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34971   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34972   # "foo.exe" is OK but "foo" is an error.
34973   #
34974   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34975   # It is also a way to make sure we got the proper file name for the real test later on.
34976   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34977   if test "x$test_shortpath" = x; then
34978     # Short path failed, file does not exist as specified.
34979     # Try adding .exe or .cmd
34980     if test -f "${new_path}.exe"; then
34981       input_to_shortpath="${new_path}.exe"
34982     elif test -f "${new_path}.cmd"; then
34983       input_to_shortpath="${new_path}.cmd"
34984     else
34985       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34986 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34987       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34988 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34989       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34990     fi
34991   else
34992     input_to_shortpath="$new_path"
34993   fi
34994 
34995   # Call helper function which possibly converts this using DOS-style short mode.
34996   # If so, the updated path is stored in $new_path.
34997   new_path="$input_to_shortpath"
34998 
34999   input_path="$input_to_shortpath"
35000   # Check if we need to convert this using DOS-style short mode. If the path
35001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35002   # take no chances and rewrite it.
35003   # Note: m4 eats our [], so we need to use [ and ] instead.
35004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35005   if test "x$has_forbidden_chars" != x; then
35006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35007     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35008     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35009     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35010       # Going to short mode and back again did indeed matter. Since short mode is
35011       # case insensitive, let's make it lowercase to improve readability.
35012       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35013       # Now convert it back to Unix-stile (cygpath)
35014       input_path=`$CYGPATH -u "$shortmode_path"`
35015       new_path="$input_path"
35016     fi
35017   fi
35018 
35019   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35020   if test "x$test_cygdrive_prefix" = x; then
35021     # As a simple fix, exclude /usr/bin since it's not a real path.
35022     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35023       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35024       # a path prefixed by /cygdrive for fixpath to work.
35025       new_path="$CYGWIN_ROOT_PATH$input_path"
35026     fi
35027   fi
35028 
35029   # remove trailing .exe if any
35030   new_path="${new_path/%.exe/}"
35031 
35032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35033 
35034   # First separate the path from the arguments. This will split at the first
35035   # space.
35036   complete="$STRIP"
35037   path="${complete%% *}"
35038   tmp="$complete EOL"
35039   arguments="${tmp#* }"
35040 
35041   # Input might be given as Windows format, start by converting to
35042   # unix format.
35043   new_path="$path"
35044 
35045   windows_path="$new_path"
35046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35047     unix_path=`$CYGPATH -u "$windows_path"`
35048     new_path="$unix_path"
35049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35051     new_path="$unix_path"
35052   fi
35053 
35054 
35055   # Now try to locate executable using which
35056   new_path=`$WHICH "$new_path" 2> /dev/null`
35057 
35058   if test "x$new_path" = x; then
35059     # Oops. Which didn't find the executable.
35060     # The splitting of arguments from the executable at a space might have been incorrect,
35061     # since paths with space are more likely in Windows. Give it another try with the whole
35062     # argument.
35063     path="$complete"
35064     arguments="EOL"
35065     new_path="$path"
35066 
35067   windows_path="$new_path"
35068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35069     unix_path=`$CYGPATH -u "$windows_path"`
35070     new_path="$unix_path"
35071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35073     new_path="$unix_path"
35074   fi
35075 
35076 
35077     new_path=`$WHICH "$new_path" 2> /dev/null`
35078 
35079     if test "x$new_path" = x; then
35080       # It's still not found. Now this is an unrecoverable error.
35081       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35082 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35083       has_space=`$ECHO "$complete" | $GREP " "`
35084       if test "x$has_space" != x; then
35085         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35086 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35087       fi
35088       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35089     fi
35090   fi
35091 
35092   # Now new_path has a complete unix path to the binary
35093   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35094     # Keep paths in /bin as-is, but remove trailing .exe if any
35095     new_path="${new_path/%.exe/}"
35096     # Do not save /bin paths to all_fixpath_prefixes!
35097   else
35098     # Not in mixed or Windows style, start by that.
35099     new_path=`cmd //c echo $new_path`
35100 
35101   input_path="$new_path"
35102   # Check if we need to convert this using DOS-style short mode. If the path
35103   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35104   # take no chances and rewrite it.
35105   # Note: m4 eats our [], so we need to use [ and ] instead.
35106   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35107   if test "x$has_forbidden_chars" != x; then
35108     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35109     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35110   fi
35111 
35112     # Output is in $new_path
35113 
35114   windows_path="$new_path"
35115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35116     unix_path=`$CYGPATH -u "$windows_path"`
35117     new_path="$unix_path"
35118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35119     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35120     new_path="$unix_path"
35121   fi
35122 
35123     # remove trailing .exe if any
35124     new_path="${new_path/%.exe/}"
35125 
35126     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35127     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35128   fi
35129 
35130   else
35131     # We're on a posix platform. Hooray! :)
35132     # First separate the path from the arguments. This will split at the first
35133     # space.
35134     complete="$STRIP"
35135     path="${complete%% *}"
35136     tmp="$complete EOL"
35137     arguments="${tmp#* }"
35138 
35139     # Cannot rely on the command "which" here since it doesn't always work.
35140     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35141     if test -z "$is_absolute_path"; then
35142       # Path to executable is not absolute. Find it.
35143       IFS_save="$IFS"
35144       IFS=:
35145       for p in $PATH; do
35146         if test -f "$p/$path" && test -x "$p/$path"; then
35147           new_path="$p/$path"
35148           break
35149         fi
35150       done
35151       IFS="$IFS_save"
35152     else
35153       # This is an absolute path, we can use it without further modifications.
35154       new_path="$path"
35155     fi
35156 
35157     if test "x$new_path" = x; then
35158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35159 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35160       has_space=`$ECHO "$complete" | $GREP " "`
35161       if test "x$has_space" != x; then
35162         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35163 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35164       fi
35165       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35166     fi
35167   fi
35168 
35169   # Now join together the path and the arguments once again
35170   if test "x$arguments" != xEOL; then
35171     new_complete="$new_path ${arguments% *}"
35172   else
35173     new_complete="$new_path"
35174   fi
35175 
35176   if test "x$complete" != "x$new_complete"; then
35177     STRIP="$new_complete"
35178     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35179 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35180   fi
35181 
35182 
35183 
35184   # Publish this variable in the help.
35185 
35186 
35187   if test "x$NM" = x; then
35188     # The variable is not set by user, try to locate tool using the code snippet
35189     for ac_prog in nm
35190 do
35191   # Extract the first word of "$ac_prog", so it can be a program name with args.
35192 set dummy $ac_prog; ac_word=$2
35193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35194 $as_echo_n "checking for $ac_word... " >&6; }
35195 if ${ac_cv_path_NM+:} false; then :
35196   $as_echo_n "(cached) " >&6
35197 else
35198   case $NM in
35199   [\\/]* | ?:[\\/]*)
35200   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35201   ;;
35202   *)
35203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35204 for as_dir in $PATH
35205 do
35206   IFS=$as_save_IFS
35207   test -z "$as_dir" && as_dir=.
35208     for ac_exec_ext in '' $ac_executable_extensions; do
35209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35210     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35212     break 2
35213   fi
35214 done
35215   done
35216 IFS=$as_save_IFS
35217 
35218   ;;
35219 esac
35220 fi
35221 NM=$ac_cv_path_NM
35222 if test -n "$NM"; then
35223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35224 $as_echo "$NM" >&6; }
35225 else
35226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35227 $as_echo "no" >&6; }
35228 fi
35229 
35230 
35231   test -n "$NM" && break
35232 done
35233 
35234   else
35235     # The variable is set, but is it from the command line or the environment?
35236 
35237     # Try to remove the string !NM! from our list.
35238     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35239     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35240       # If it failed, the variable was not from the command line. Ignore it,
35241       # but warn the user (except for BASH, which is always set by the calling BASH).
35242       if test "xNM" != xBASH; then
35243         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35244 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35245       fi
35246       # Try to locate tool using the code snippet
35247       for ac_prog in nm
35248 do
35249   # Extract the first word of "$ac_prog", so it can be a program name with args.
35250 set dummy $ac_prog; ac_word=$2
35251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35252 $as_echo_n "checking for $ac_word... " >&6; }
35253 if ${ac_cv_path_NM+:} false; then :
35254   $as_echo_n "(cached) " >&6
35255 else
35256   case $NM in
35257   [\\/]* | ?:[\\/]*)
35258   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35259   ;;
35260   *)
35261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35262 for as_dir in $PATH
35263 do
35264   IFS=$as_save_IFS
35265   test -z "$as_dir" && as_dir=.
35266     for ac_exec_ext in '' $ac_executable_extensions; do
35267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35268     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35270     break 2
35271   fi
35272 done
35273   done
35274 IFS=$as_save_IFS
35275 
35276   ;;
35277 esac
35278 fi
35279 NM=$ac_cv_path_NM
35280 if test -n "$NM"; then
35281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35282 $as_echo "$NM" >&6; }
35283 else
35284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35285 $as_echo "no" >&6; }
35286 fi
35287 
35288 
35289   test -n "$NM" && break
35290 done
35291 
35292     else
35293       # If it succeeded, then it was overridden by the user. We will use it
35294       # for the tool.
35295 
35296       # First remove it from the list of overridden variables, so we can test
35297       # for unknown variables in the end.
35298       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35299 
35300       # Check if the provided tool contains a complete path.
35301       tool_specified="$NM"
35302       tool_basename="${tool_specified##*/}"
35303       if test "x$tool_basename" = "x$tool_specified"; then
35304         # A command without a complete path is provided, search $PATH.
35305         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35306 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35307         # Extract the first word of "$tool_basename", so it can be a program name with args.
35308 set dummy $tool_basename; ac_word=$2
35309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35310 $as_echo_n "checking for $ac_word... " >&6; }
35311 if ${ac_cv_path_NM+:} false; then :
35312   $as_echo_n "(cached) " >&6
35313 else
35314   case $NM in
35315   [\\/]* | ?:[\\/]*)
35316   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35317   ;;
35318   *)
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_path_NM="$as_dir/$ac_word$ac_exec_ext"
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   ;;
35335 esac
35336 fi
35337 NM=$ac_cv_path_NM
35338 if test -n "$NM"; then
35339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35340 $as_echo "$NM" >&6; }
35341 else
35342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35343 $as_echo "no" >&6; }
35344 fi
35345 
35346 
35347         if test "x$NM" = x; then
35348           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35349         fi
35350       else
35351         # Otherwise we believe it is a complete path. Use it as it is.
35352         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35353 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35354         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35355 $as_echo_n "checking for NM... " >&6; }
35356         if test ! -x "$tool_specified"; then
35357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35358 $as_echo "not found" >&6; }
35359           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35360         fi
35361         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35362 $as_echo "$tool_specified" >&6; }
35363       fi
35364     fi
35365   fi
35366 
35367 
35368 
35369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35370 
35371   # First separate the path from the arguments. This will split at the first
35372   # space.
35373   complete="$NM"
35374   path="${complete%% *}"
35375   tmp="$complete EOL"
35376   arguments="${tmp#* }"
35377 
35378   # Input might be given as Windows format, start by converting to
35379   # unix format.
35380   new_path=`$CYGPATH -u "$path"`
35381 
35382   # Now try to locate executable using which
35383   new_path=`$WHICH "$new_path" 2> /dev/null`
35384   # bat and cmd files are not always considered executable in cygwin causing which
35385   # to not find them
35386   if test "x$new_path" = x \
35387       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35388       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35389     new_path=`$CYGPATH -u "$path"`
35390   fi
35391   if test "x$new_path" = x; then
35392     # Oops. Which didn't find the executable.
35393     # The splitting of arguments from the executable at a space might have been incorrect,
35394     # since paths with space are more likely in Windows. Give it another try with the whole
35395     # argument.
35396     path="$complete"
35397     arguments="EOL"
35398     new_path=`$CYGPATH -u "$path"`
35399     new_path=`$WHICH "$new_path" 2> /dev/null`
35400     # bat and cmd files are not always considered executable in cygwin causing which
35401     # to not find them
35402     if test "x$new_path" = x \
35403         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35404         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35405       new_path=`$CYGPATH -u "$path"`
35406     fi
35407     if test "x$new_path" = x; then
35408       # It's still not found. Now this is an unrecoverable error.
35409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35410 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35411       has_space=`$ECHO "$complete" | $GREP " "`
35412       if test "x$has_space" != x; then
35413         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35415       fi
35416       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35417     fi
35418   fi
35419 
35420   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35421   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35422   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35423   # "foo.exe" is OK but "foo" is an error.
35424   #
35425   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35426   # It is also a way to make sure we got the proper file name for the real test later on.
35427   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35428   if test "x$test_shortpath" = x; then
35429     # Short path failed, file does not exist as specified.
35430     # Try adding .exe or .cmd
35431     if test -f "${new_path}.exe"; then
35432       input_to_shortpath="${new_path}.exe"
35433     elif test -f "${new_path}.cmd"; then
35434       input_to_shortpath="${new_path}.cmd"
35435     else
35436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35437 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35438       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35439 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35440       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35441     fi
35442   else
35443     input_to_shortpath="$new_path"
35444   fi
35445 
35446   # Call helper function which possibly converts this using DOS-style short mode.
35447   # If so, the updated path is stored in $new_path.
35448   new_path="$input_to_shortpath"
35449 
35450   input_path="$input_to_shortpath"
35451   # Check if we need to convert this using DOS-style short mode. If the path
35452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35453   # take no chances and rewrite it.
35454   # Note: m4 eats our [], so we need to use [ and ] instead.
35455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35456   if test "x$has_forbidden_chars" != x; then
35457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35458     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35459     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35460     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35461       # Going to short mode and back again did indeed matter. Since short mode is
35462       # case insensitive, let's make it lowercase to improve readability.
35463       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35464       # Now convert it back to Unix-stile (cygpath)
35465       input_path=`$CYGPATH -u "$shortmode_path"`
35466       new_path="$input_path"
35467     fi
35468   fi
35469 
35470   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35471   if test "x$test_cygdrive_prefix" = x; then
35472     # As a simple fix, exclude /usr/bin since it's not a real path.
35473     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35474       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35475       # a path prefixed by /cygdrive for fixpath to work.
35476       new_path="$CYGWIN_ROOT_PATH$input_path"
35477     fi
35478   fi
35479 
35480   # remove trailing .exe if any
35481   new_path="${new_path/%.exe/}"
35482 
35483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35484 
35485   # First separate the path from the arguments. This will split at the first
35486   # space.
35487   complete="$NM"
35488   path="${complete%% *}"
35489   tmp="$complete EOL"
35490   arguments="${tmp#* }"
35491 
35492   # Input might be given as Windows format, start by converting to
35493   # unix format.
35494   new_path="$path"
35495 
35496   windows_path="$new_path"
35497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35498     unix_path=`$CYGPATH -u "$windows_path"`
35499     new_path="$unix_path"
35500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35502     new_path="$unix_path"
35503   fi
35504 
35505 
35506   # Now try to locate executable using which
35507   new_path=`$WHICH "$new_path" 2> /dev/null`
35508 
35509   if test "x$new_path" = x; then
35510     # Oops. Which didn't find the executable.
35511     # The splitting of arguments from the executable at a space might have been incorrect,
35512     # since paths with space are more likely in Windows. Give it another try with the whole
35513     # argument.
35514     path="$complete"
35515     arguments="EOL"
35516     new_path="$path"
35517 
35518   windows_path="$new_path"
35519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35520     unix_path=`$CYGPATH -u "$windows_path"`
35521     new_path="$unix_path"
35522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35524     new_path="$unix_path"
35525   fi
35526 
35527 
35528     new_path=`$WHICH "$new_path" 2> /dev/null`
35529 
35530     if test "x$new_path" = x; then
35531       # It's still not found. Now this is an unrecoverable error.
35532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35533 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35534       has_space=`$ECHO "$complete" | $GREP " "`
35535       if test "x$has_space" != x; then
35536         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35537 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35538       fi
35539       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35540     fi
35541   fi
35542 
35543   # Now new_path has a complete unix path to the binary
35544   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35545     # Keep paths in /bin as-is, but remove trailing .exe if any
35546     new_path="${new_path/%.exe/}"
35547     # Do not save /bin paths to all_fixpath_prefixes!
35548   else
35549     # Not in mixed or Windows style, start by that.
35550     new_path=`cmd //c echo $new_path`
35551 
35552   input_path="$new_path"
35553   # Check if we need to convert this using DOS-style short mode. If the path
35554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35555   # take no chances and rewrite it.
35556   # Note: m4 eats our [], so we need to use [ and ] instead.
35557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35558   if test "x$has_forbidden_chars" != x; then
35559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35561   fi
35562 
35563     # Output is in $new_path
35564 
35565   windows_path="$new_path"
35566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35567     unix_path=`$CYGPATH -u "$windows_path"`
35568     new_path="$unix_path"
35569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35571     new_path="$unix_path"
35572   fi
35573 
35574     # remove trailing .exe if any
35575     new_path="${new_path/%.exe/}"
35576 
35577     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35578     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35579   fi
35580 
35581   else
35582     # We're on a posix platform. Hooray! :)
35583     # First separate the path from the arguments. This will split at the first
35584     # space.
35585     complete="$NM"
35586     path="${complete%% *}"
35587     tmp="$complete EOL"
35588     arguments="${tmp#* }"
35589 
35590     # Cannot rely on the command "which" here since it doesn't always work.
35591     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35592     if test -z "$is_absolute_path"; then
35593       # Path to executable is not absolute. Find it.
35594       IFS_save="$IFS"
35595       IFS=:
35596       for p in $PATH; do
35597         if test -f "$p/$path" && test -x "$p/$path"; then
35598           new_path="$p/$path"
35599           break
35600         fi
35601       done
35602       IFS="$IFS_save"
35603     else
35604       # This is an absolute path, we can use it without further modifications.
35605       new_path="$path"
35606     fi
35607 
35608     if test "x$new_path" = x; then
35609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35610 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35611       has_space=`$ECHO "$complete" | $GREP " "`
35612       if test "x$has_space" != x; then
35613         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35614 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35615       fi
35616       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35617     fi
35618   fi
35619 
35620   # Now join together the path and the arguments once again
35621   if test "x$arguments" != xEOL; then
35622     new_complete="$new_path ${arguments% *}"
35623   else
35624     new_complete="$new_path"
35625   fi
35626 
35627   if test "x$complete" != "x$new_complete"; then
35628     NM="$new_complete"
35629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35630 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35631   fi
35632 
35633 
35634 
35635   # Publish this variable in the help.
35636 
35637 
35638   if test "x$GNM" = x; then
35639     # The variable is not set by user, try to locate tool using the code snippet
35640     for ac_prog in gnm
35641 do
35642   # Extract the first word of "$ac_prog", so it can be a program name with args.
35643 set dummy $ac_prog; ac_word=$2
35644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35645 $as_echo_n "checking for $ac_word... " >&6; }
35646 if ${ac_cv_path_GNM+:} false; then :
35647   $as_echo_n "(cached) " >&6
35648 else
35649   case $GNM in
35650   [\\/]* | ?:[\\/]*)
35651   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35652   ;;
35653   *)
35654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35655 for as_dir in $PATH
35656 do
35657   IFS=$as_save_IFS
35658   test -z "$as_dir" && as_dir=.
35659     for ac_exec_ext in '' $ac_executable_extensions; do
35660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35661     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35663     break 2
35664   fi
35665 done
35666   done
35667 IFS=$as_save_IFS
35668 
35669   ;;
35670 esac
35671 fi
35672 GNM=$ac_cv_path_GNM
35673 if test -n "$GNM"; then
35674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35675 $as_echo "$GNM" >&6; }
35676 else
35677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35678 $as_echo "no" >&6; }
35679 fi
35680 
35681 
35682   test -n "$GNM" && break
35683 done
35684 
35685   else
35686     # The variable is set, but is it from the command line or the environment?
35687 
35688     # Try to remove the string !GNM! from our list.
35689     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35690     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35691       # If it failed, the variable was not from the command line. Ignore it,
35692       # but warn the user (except for BASH, which is always set by the calling BASH).
35693       if test "xGNM" != xBASH; then
35694         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35695 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35696       fi
35697       # Try to locate tool using the code snippet
35698       for ac_prog in gnm
35699 do
35700   # Extract the first word of "$ac_prog", so it can be a program name with args.
35701 set dummy $ac_prog; ac_word=$2
35702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35703 $as_echo_n "checking for $ac_word... " >&6; }
35704 if ${ac_cv_path_GNM+:} false; then :
35705   $as_echo_n "(cached) " >&6
35706 else
35707   case $GNM in
35708   [\\/]* | ?:[\\/]*)
35709   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35710   ;;
35711   *)
35712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35713 for as_dir in $PATH
35714 do
35715   IFS=$as_save_IFS
35716   test -z "$as_dir" && as_dir=.
35717     for ac_exec_ext in '' $ac_executable_extensions; do
35718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35719     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35721     break 2
35722   fi
35723 done
35724   done
35725 IFS=$as_save_IFS
35726 
35727   ;;
35728 esac
35729 fi
35730 GNM=$ac_cv_path_GNM
35731 if test -n "$GNM"; then
35732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35733 $as_echo "$GNM" >&6; }
35734 else
35735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35736 $as_echo "no" >&6; }
35737 fi
35738 
35739 
35740   test -n "$GNM" && break
35741 done
35742 
35743     else
35744       # If it succeeded, then it was overridden by the user. We will use it
35745       # for the tool.
35746 
35747       # First remove it from the list of overridden variables, so we can test
35748       # for unknown variables in the end.
35749       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35750 
35751       # Check if the provided tool contains a complete path.
35752       tool_specified="$GNM"
35753       tool_basename="${tool_specified##*/}"
35754       if test "x$tool_basename" = "x$tool_specified"; then
35755         # A command without a complete path is provided, search $PATH.
35756         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35757 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35758         # Extract the first word of "$tool_basename", so it can be a program name with args.
35759 set dummy $tool_basename; ac_word=$2
35760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35761 $as_echo_n "checking for $ac_word... " >&6; }
35762 if ${ac_cv_path_GNM+:} false; then :
35763   $as_echo_n "(cached) " >&6
35764 else
35765   case $GNM in
35766   [\\/]* | ?:[\\/]*)
35767   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35768   ;;
35769   *)
35770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35771 for as_dir in $PATH
35772 do
35773   IFS=$as_save_IFS
35774   test -z "$as_dir" && as_dir=.
35775     for ac_exec_ext in '' $ac_executable_extensions; do
35776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35777     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35779     break 2
35780   fi
35781 done
35782   done
35783 IFS=$as_save_IFS
35784 
35785   ;;
35786 esac
35787 fi
35788 GNM=$ac_cv_path_GNM
35789 if test -n "$GNM"; then
35790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35791 $as_echo "$GNM" >&6; }
35792 else
35793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35794 $as_echo "no" >&6; }
35795 fi
35796 
35797 
35798         if test "x$GNM" = x; then
35799           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35800         fi
35801       else
35802         # Otherwise we believe it is a complete path. Use it as it is.
35803         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35804 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35805         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35806 $as_echo_n "checking for GNM... " >&6; }
35807         if test ! -x "$tool_specified"; then
35808           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35809 $as_echo "not found" >&6; }
35810           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35811         fi
35812         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35813 $as_echo "$tool_specified" >&6; }
35814       fi
35815     fi
35816   fi
35817 
35818 
35819 
35820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35821 
35822   # First separate the path from the arguments. This will split at the first
35823   # space.
35824   complete="$GNM"
35825   path="${complete%% *}"
35826   tmp="$complete EOL"
35827   arguments="${tmp#* }"
35828 
35829   # Input might be given as Windows format, start by converting to
35830   # unix format.
35831   new_path=`$CYGPATH -u "$path"`
35832 
35833   # Now try to locate executable using which
35834   new_path=`$WHICH "$new_path" 2> /dev/null`
35835   # bat and cmd files are not always considered executable in cygwin causing which
35836   # to not find them
35837   if test "x$new_path" = x \
35838       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35839       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35840     new_path=`$CYGPATH -u "$path"`
35841   fi
35842   if test "x$new_path" = x; then
35843     # Oops. Which didn't find the executable.
35844     # The splitting of arguments from the executable at a space might have been incorrect,
35845     # since paths with space are more likely in Windows. Give it another try with the whole
35846     # argument.
35847     path="$complete"
35848     arguments="EOL"
35849     new_path=`$CYGPATH -u "$path"`
35850     new_path=`$WHICH "$new_path" 2> /dev/null`
35851     # bat and cmd files are not always considered executable in cygwin causing which
35852     # to not find them
35853     if test "x$new_path" = x \
35854         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35855         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35856       new_path=`$CYGPATH -u "$path"`
35857     fi
35858     if test "x$new_path" = x; then
35859       # It's still not found. Now this is an unrecoverable error.
35860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35861 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35862       has_space=`$ECHO "$complete" | $GREP " "`
35863       if test "x$has_space" != x; then
35864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35866       fi
35867       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35868     fi
35869   fi
35870 
35871   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35872   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35873   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35874   # "foo.exe" is OK but "foo" is an error.
35875   #
35876   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35877   # It is also a way to make sure we got the proper file name for the real test later on.
35878   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35879   if test "x$test_shortpath" = x; then
35880     # Short path failed, file does not exist as specified.
35881     # Try adding .exe or .cmd
35882     if test -f "${new_path}.exe"; then
35883       input_to_shortpath="${new_path}.exe"
35884     elif test -f "${new_path}.cmd"; then
35885       input_to_shortpath="${new_path}.cmd"
35886     else
35887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35888 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35889       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35890 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35891       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35892     fi
35893   else
35894     input_to_shortpath="$new_path"
35895   fi
35896 
35897   # Call helper function which possibly converts this using DOS-style short mode.
35898   # If so, the updated path is stored in $new_path.
35899   new_path="$input_to_shortpath"
35900 
35901   input_path="$input_to_shortpath"
35902   # Check if we need to convert this using DOS-style short mode. If the path
35903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35904   # take no chances and rewrite it.
35905   # Note: m4 eats our [], so we need to use [ and ] instead.
35906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35907   if test "x$has_forbidden_chars" != x; then
35908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35912       # Going to short mode and back again did indeed matter. Since short mode is
35913       # case insensitive, let's make it lowercase to improve readability.
35914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35915       # Now convert it back to Unix-stile (cygpath)
35916       input_path=`$CYGPATH -u "$shortmode_path"`
35917       new_path="$input_path"
35918     fi
35919   fi
35920 
35921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35922   if test "x$test_cygdrive_prefix" = x; then
35923     # As a simple fix, exclude /usr/bin since it's not a real path.
35924     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35926       # a path prefixed by /cygdrive for fixpath to work.
35927       new_path="$CYGWIN_ROOT_PATH$input_path"
35928     fi
35929   fi
35930 
35931   # remove trailing .exe if any
35932   new_path="${new_path/%.exe/}"
35933 
35934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35935 
35936   # First separate the path from the arguments. This will split at the first
35937   # space.
35938   complete="$GNM"
35939   path="${complete%% *}"
35940   tmp="$complete EOL"
35941   arguments="${tmp#* }"
35942 
35943   # Input might be given as Windows format, start by converting to
35944   # unix format.
35945   new_path="$path"
35946 
35947   windows_path="$new_path"
35948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35949     unix_path=`$CYGPATH -u "$windows_path"`
35950     new_path="$unix_path"
35951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35953     new_path="$unix_path"
35954   fi
35955 
35956 
35957   # Now try to locate executable using which
35958   new_path=`$WHICH "$new_path" 2> /dev/null`
35959 
35960   if test "x$new_path" = x; then
35961     # Oops. Which didn't find the executable.
35962     # The splitting of arguments from the executable at a space might have been incorrect,
35963     # since paths with space are more likely in Windows. Give it another try with the whole
35964     # argument.
35965     path="$complete"
35966     arguments="EOL"
35967     new_path="$path"
35968 
35969   windows_path="$new_path"
35970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35971     unix_path=`$CYGPATH -u "$windows_path"`
35972     new_path="$unix_path"
35973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35975     new_path="$unix_path"
35976   fi
35977 
35978 
35979     new_path=`$WHICH "$new_path" 2> /dev/null`
35980 
35981     if test "x$new_path" = x; then
35982       # It's still not found. Now this is an unrecoverable error.
35983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35984 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35985       has_space=`$ECHO "$complete" | $GREP " "`
35986       if test "x$has_space" != x; then
35987         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35988 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35989       fi
35990       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35991     fi
35992   fi
35993 
35994   # Now new_path has a complete unix path to the binary
35995   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35996     # Keep paths in /bin as-is, but remove trailing .exe if any
35997     new_path="${new_path/%.exe/}"
35998     # Do not save /bin paths to all_fixpath_prefixes!
35999   else
36000     # Not in mixed or Windows style, start by that.
36001     new_path=`cmd //c echo $new_path`
36002 
36003   input_path="$new_path"
36004   # Check if we need to convert this using DOS-style short mode. If the path
36005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36006   # take no chances and rewrite it.
36007   # Note: m4 eats our [], so we need to use [ and ] instead.
36008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36009   if test "x$has_forbidden_chars" != x; then
36010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36011     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36012   fi
36013 
36014     # Output is in $new_path
36015 
36016   windows_path="$new_path"
36017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36018     unix_path=`$CYGPATH -u "$windows_path"`
36019     new_path="$unix_path"
36020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36022     new_path="$unix_path"
36023   fi
36024 
36025     # remove trailing .exe if any
36026     new_path="${new_path/%.exe/}"
36027 
36028     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36029     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36030   fi
36031 
36032   else
36033     # We're on a posix platform. Hooray! :)
36034     # First separate the path from the arguments. This will split at the first
36035     # space.
36036     complete="$GNM"
36037     path="${complete%% *}"
36038     tmp="$complete EOL"
36039     arguments="${tmp#* }"
36040 
36041     # Cannot rely on the command "which" here since it doesn't always work.
36042     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36043     if test -z "$is_absolute_path"; then
36044       # Path to executable is not absolute. Find it.
36045       IFS_save="$IFS"
36046       IFS=:
36047       for p in $PATH; do
36048         if test -f "$p/$path" && test -x "$p/$path"; then
36049           new_path="$p/$path"
36050           break
36051         fi
36052       done
36053       IFS="$IFS_save"
36054     else
36055       # This is an absolute path, we can use it without further modifications.
36056       new_path="$path"
36057     fi
36058 
36059     if test "x$new_path" = x; then
36060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36061 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36062       has_space=`$ECHO "$complete" | $GREP " "`
36063       if test "x$has_space" != x; then
36064         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36065 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36066       fi
36067       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36068     fi
36069   fi
36070 
36071   # Now join together the path and the arguments once again
36072   if test "x$arguments" != xEOL; then
36073     new_complete="$new_path ${arguments% *}"
36074   else
36075     new_complete="$new_path"
36076   fi
36077 
36078   if test "x$complete" != "x$new_complete"; then
36079     GNM="$new_complete"
36080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36081 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36082   fi
36083 
36084 
36085 
36086 
36087   # Publish this variable in the help.
36088 
36089 
36090   if test "x$MCS" = x; then
36091     # The variable is not set by user, try to locate tool using the code snippet
36092     for ac_prog in mcs
36093 do
36094   # Extract the first word of "$ac_prog", so it can be a program name with args.
36095 set dummy $ac_prog; ac_word=$2
36096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36097 $as_echo_n "checking for $ac_word... " >&6; }
36098 if ${ac_cv_path_MCS+:} false; then :
36099   $as_echo_n "(cached) " >&6
36100 else
36101   case $MCS in
36102   [\\/]* | ?:[\\/]*)
36103   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36104   ;;
36105   *)
36106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36107 for as_dir in $PATH
36108 do
36109   IFS=$as_save_IFS
36110   test -z "$as_dir" && as_dir=.
36111     for ac_exec_ext in '' $ac_executable_extensions; do
36112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36113     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36115     break 2
36116   fi
36117 done
36118   done
36119 IFS=$as_save_IFS
36120 
36121   ;;
36122 esac
36123 fi
36124 MCS=$ac_cv_path_MCS
36125 if test -n "$MCS"; then
36126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36127 $as_echo "$MCS" >&6; }
36128 else
36129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36130 $as_echo "no" >&6; }
36131 fi
36132 
36133 
36134   test -n "$MCS" && break
36135 done
36136 
36137   else
36138     # The variable is set, but is it from the command line or the environment?
36139 
36140     # Try to remove the string !MCS! from our list.
36141     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36142     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36143       # If it failed, the variable was not from the command line. Ignore it,
36144       # but warn the user (except for BASH, which is always set by the calling BASH).
36145       if test "xMCS" != xBASH; then
36146         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36147 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36148       fi
36149       # Try to locate tool using the code snippet
36150       for ac_prog in mcs
36151 do
36152   # Extract the first word of "$ac_prog", so it can be a program name with args.
36153 set dummy $ac_prog; ac_word=$2
36154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36155 $as_echo_n "checking for $ac_word... " >&6; }
36156 if ${ac_cv_path_MCS+:} false; then :
36157   $as_echo_n "(cached) " >&6
36158 else
36159   case $MCS in
36160   [\\/]* | ?:[\\/]*)
36161   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36162   ;;
36163   *)
36164   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36165 for as_dir in $PATH
36166 do
36167   IFS=$as_save_IFS
36168   test -z "$as_dir" && as_dir=.
36169     for ac_exec_ext in '' $ac_executable_extensions; do
36170   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36171     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36173     break 2
36174   fi
36175 done
36176   done
36177 IFS=$as_save_IFS
36178 
36179   ;;
36180 esac
36181 fi
36182 MCS=$ac_cv_path_MCS
36183 if test -n "$MCS"; then
36184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36185 $as_echo "$MCS" >&6; }
36186 else
36187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36188 $as_echo "no" >&6; }
36189 fi
36190 
36191 
36192   test -n "$MCS" && break
36193 done
36194 
36195     else
36196       # If it succeeded, then it was overridden by the user. We will use it
36197       # for the tool.
36198 
36199       # First remove it from the list of overridden variables, so we can test
36200       # for unknown variables in the end.
36201       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36202 
36203       # Check if the provided tool contains a complete path.
36204       tool_specified="$MCS"
36205       tool_basename="${tool_specified##*/}"
36206       if test "x$tool_basename" = "x$tool_specified"; then
36207         # A command without a complete path is provided, search $PATH.
36208         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36209 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36210         # Extract the first word of "$tool_basename", so it can be a program name with args.
36211 set dummy $tool_basename; ac_word=$2
36212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36213 $as_echo_n "checking for $ac_word... " >&6; }
36214 if ${ac_cv_path_MCS+:} false; then :
36215   $as_echo_n "(cached) " >&6
36216 else
36217   case $MCS in
36218   [\\/]* | ?:[\\/]*)
36219   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36220   ;;
36221   *)
36222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36223 for as_dir in $PATH
36224 do
36225   IFS=$as_save_IFS
36226   test -z "$as_dir" && as_dir=.
36227     for ac_exec_ext in '' $ac_executable_extensions; do
36228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36229     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36231     break 2
36232   fi
36233 done
36234   done
36235 IFS=$as_save_IFS
36236 
36237   ;;
36238 esac
36239 fi
36240 MCS=$ac_cv_path_MCS
36241 if test -n "$MCS"; then
36242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36243 $as_echo "$MCS" >&6; }
36244 else
36245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36246 $as_echo "no" >&6; }
36247 fi
36248 
36249 
36250         if test "x$MCS" = x; then
36251           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36252         fi
36253       else
36254         # Otherwise we believe it is a complete path. Use it as it is.
36255         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36256 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36258 $as_echo_n "checking for MCS... " >&6; }
36259         if test ! -x "$tool_specified"; then
36260           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36261 $as_echo "not found" >&6; }
36262           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36263         fi
36264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36265 $as_echo "$tool_specified" >&6; }
36266       fi
36267     fi
36268   fi
36269 
36270 
36271 
36272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36273 
36274   # First separate the path from the arguments. This will split at the first
36275   # space.
36276   complete="$MCS"
36277   path="${complete%% *}"
36278   tmp="$complete EOL"
36279   arguments="${tmp#* }"
36280 
36281   # Input might be given as Windows format, start by converting to
36282   # unix format.
36283   new_path=`$CYGPATH -u "$path"`
36284 
36285   # Now try to locate executable using which
36286   new_path=`$WHICH "$new_path" 2> /dev/null`
36287   # bat and cmd files are not always considered executable in cygwin causing which
36288   # to not find them
36289   if test "x$new_path" = x \
36290       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36291       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36292     new_path=`$CYGPATH -u "$path"`
36293   fi
36294   if test "x$new_path" = x; then
36295     # Oops. Which didn't find the executable.
36296     # The splitting of arguments from the executable at a space might have been incorrect,
36297     # since paths with space are more likely in Windows. Give it another try with the whole
36298     # argument.
36299     path="$complete"
36300     arguments="EOL"
36301     new_path=`$CYGPATH -u "$path"`
36302     new_path=`$WHICH "$new_path" 2> /dev/null`
36303     # bat and cmd files are not always considered executable in cygwin causing which
36304     # to not find them
36305     if test "x$new_path" = x \
36306         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36307         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36308       new_path=`$CYGPATH -u "$path"`
36309     fi
36310     if test "x$new_path" = x; then
36311       # It's still not found. Now this is an unrecoverable error.
36312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36313 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36314       has_space=`$ECHO "$complete" | $GREP " "`
36315       if test "x$has_space" != x; then
36316         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36317 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36318       fi
36319       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36320     fi
36321   fi
36322 
36323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36326   # "foo.exe" is OK but "foo" is an error.
36327   #
36328   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36329   # It is also a way to make sure we got the proper file name for the real test later on.
36330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36331   if test "x$test_shortpath" = x; then
36332     # Short path failed, file does not exist as specified.
36333     # Try adding .exe or .cmd
36334     if test -f "${new_path}.exe"; then
36335       input_to_shortpath="${new_path}.exe"
36336     elif test -f "${new_path}.cmd"; then
36337       input_to_shortpath="${new_path}.cmd"
36338     else
36339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36340 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36341       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36342 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36343       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36344     fi
36345   else
36346     input_to_shortpath="$new_path"
36347   fi
36348 
36349   # Call helper function which possibly converts this using DOS-style short mode.
36350   # If so, the updated path is stored in $new_path.
36351   new_path="$input_to_shortpath"
36352 
36353   input_path="$input_to_shortpath"
36354   # Check if we need to convert this using DOS-style short mode. If the path
36355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36356   # take no chances and rewrite it.
36357   # Note: m4 eats our [], so we need to use [ and ] instead.
36358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36359   if test "x$has_forbidden_chars" != x; then
36360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36361     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36362     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36363     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36364       # Going to short mode and back again did indeed matter. Since short mode is
36365       # case insensitive, let's make it lowercase to improve readability.
36366       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36367       # Now convert it back to Unix-stile (cygpath)
36368       input_path=`$CYGPATH -u "$shortmode_path"`
36369       new_path="$input_path"
36370     fi
36371   fi
36372 
36373   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36374   if test "x$test_cygdrive_prefix" = x; then
36375     # As a simple fix, exclude /usr/bin since it's not a real path.
36376     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36377       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36378       # a path prefixed by /cygdrive for fixpath to work.
36379       new_path="$CYGWIN_ROOT_PATH$input_path"
36380     fi
36381   fi
36382 
36383   # remove trailing .exe if any
36384   new_path="${new_path/%.exe/}"
36385 
36386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36387 
36388   # First separate the path from the arguments. This will split at the first
36389   # space.
36390   complete="$MCS"
36391   path="${complete%% *}"
36392   tmp="$complete EOL"
36393   arguments="${tmp#* }"
36394 
36395   # Input might be given as Windows format, start by converting to
36396   # unix format.
36397   new_path="$path"
36398 
36399   windows_path="$new_path"
36400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36401     unix_path=`$CYGPATH -u "$windows_path"`
36402     new_path="$unix_path"
36403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36405     new_path="$unix_path"
36406   fi
36407 
36408 
36409   # Now try to locate executable using which
36410   new_path=`$WHICH "$new_path" 2> /dev/null`
36411 
36412   if test "x$new_path" = x; then
36413     # Oops. Which didn't find the executable.
36414     # The splitting of arguments from the executable at a space might have been incorrect,
36415     # since paths with space are more likely in Windows. Give it another try with the whole
36416     # argument.
36417     path="$complete"
36418     arguments="EOL"
36419     new_path="$path"
36420 
36421   windows_path="$new_path"
36422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36423     unix_path=`$CYGPATH -u "$windows_path"`
36424     new_path="$unix_path"
36425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36427     new_path="$unix_path"
36428   fi
36429 
36430 
36431     new_path=`$WHICH "$new_path" 2> /dev/null`
36432 
36433     if test "x$new_path" = x; then
36434       # It's still not found. Now this is an unrecoverable error.
36435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36436 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36437       has_space=`$ECHO "$complete" | $GREP " "`
36438       if test "x$has_space" != x; then
36439         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36440 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36441       fi
36442       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36443     fi
36444   fi
36445 
36446   # Now new_path has a complete unix path to the binary
36447   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36448     # Keep paths in /bin as-is, but remove trailing .exe if any
36449     new_path="${new_path/%.exe/}"
36450     # Do not save /bin paths to all_fixpath_prefixes!
36451   else
36452     # Not in mixed or Windows style, start by that.
36453     new_path=`cmd //c echo $new_path`
36454 
36455   input_path="$new_path"
36456   # Check if we need to convert this using DOS-style short mode. If the path
36457   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36458   # take no chances and rewrite it.
36459   # Note: m4 eats our [], so we need to use [ and ] instead.
36460   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36461   if test "x$has_forbidden_chars" != x; then
36462     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36463     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36464   fi
36465 
36466     # Output is in $new_path
36467 
36468   windows_path="$new_path"
36469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36470     unix_path=`$CYGPATH -u "$windows_path"`
36471     new_path="$unix_path"
36472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36474     new_path="$unix_path"
36475   fi
36476 
36477     # remove trailing .exe if any
36478     new_path="${new_path/%.exe/}"
36479 
36480     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36481     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36482   fi
36483 
36484   else
36485     # We're on a posix platform. Hooray! :)
36486     # First separate the path from the arguments. This will split at the first
36487     # space.
36488     complete="$MCS"
36489     path="${complete%% *}"
36490     tmp="$complete EOL"
36491     arguments="${tmp#* }"
36492 
36493     # Cannot rely on the command "which" here since it doesn't always work.
36494     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36495     if test -z "$is_absolute_path"; then
36496       # Path to executable is not absolute. Find it.
36497       IFS_save="$IFS"
36498       IFS=:
36499       for p in $PATH; do
36500         if test -f "$p/$path" && test -x "$p/$path"; then
36501           new_path="$p/$path"
36502           break
36503         fi
36504       done
36505       IFS="$IFS_save"
36506     else
36507       # This is an absolute path, we can use it without further modifications.
36508       new_path="$path"
36509     fi
36510 
36511     if test "x$new_path" = x; then
36512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36513 $as_echo "$as_me: The path of MCS, 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}: This might be caused by spaces in the path, which is not allowed." >&5
36517 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36518       fi
36519       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36520     fi
36521   fi
36522 
36523   # Now join together the path and the arguments once again
36524   if test "x$arguments" != xEOL; then
36525     new_complete="$new_path ${arguments% *}"
36526   else
36527     new_complete="$new_path"
36528   fi
36529 
36530   if test "x$complete" != "x$new_complete"; then
36531     MCS="$new_complete"
36532     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36533 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36534   fi
36535 
36536   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36537     # FIXME: we should unify this with the solaris case above.
36538 
36539 
36540   # Publish this variable in the help.
36541 
36542 
36543   if test "x$STRIP" = x; then
36544     # The variable is not set by user, try to locate tool using the code snippet
36545     if test -n "$ac_tool_prefix"; then
36546   for ac_prog in strip
36547   do
36548     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36549 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36551 $as_echo_n "checking for $ac_word... " >&6; }
36552 if ${ac_cv_prog_STRIP+:} false; then :
36553   $as_echo_n "(cached) " >&6
36554 else
36555   if test -n "$STRIP"; then
36556   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36557 else
36558 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36559 for as_dir in $PATH
36560 do
36561   IFS=$as_save_IFS
36562   test -z "$as_dir" && as_dir=.
36563     for ac_exec_ext in '' $ac_executable_extensions; do
36564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36565     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36567     break 2
36568   fi
36569 done
36570   done
36571 IFS=$as_save_IFS
36572 
36573 fi
36574 fi
36575 STRIP=$ac_cv_prog_STRIP
36576 if test -n "$STRIP"; then
36577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36578 $as_echo "$STRIP" >&6; }
36579 else
36580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581 $as_echo "no" >&6; }
36582 fi
36583 
36584 
36585     test -n "$STRIP" && break
36586   done
36587 fi
36588 if test -z "$STRIP"; then
36589   ac_ct_STRIP=$STRIP
36590   for ac_prog in strip
36591 do
36592   # Extract the first word of "$ac_prog", so it can be a program name with args.
36593 set dummy $ac_prog; ac_word=$2
36594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36595 $as_echo_n "checking for $ac_word... " >&6; }
36596 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36597   $as_echo_n "(cached) " >&6
36598 else
36599   if test -n "$ac_ct_STRIP"; then
36600   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36601 else
36602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36603 for as_dir in $PATH
36604 do
36605   IFS=$as_save_IFS
36606   test -z "$as_dir" && as_dir=.
36607     for ac_exec_ext in '' $ac_executable_extensions; do
36608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36609     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36611     break 2
36612   fi
36613 done
36614   done
36615 IFS=$as_save_IFS
36616 
36617 fi
36618 fi
36619 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36620 if test -n "$ac_ct_STRIP"; then
36621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36622 $as_echo "$ac_ct_STRIP" >&6; }
36623 else
36624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36625 $as_echo "no" >&6; }
36626 fi
36627 
36628 
36629   test -n "$ac_ct_STRIP" && break
36630 done
36631 
36632   if test "x$ac_ct_STRIP" = x; then
36633     STRIP=""
36634   else
36635     case $cross_compiling:$ac_tool_warned in
36636 yes:)
36637 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36638 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36639 ac_tool_warned=yes ;;
36640 esac
36641     STRIP=$ac_ct_STRIP
36642   fi
36643 fi
36644 
36645   else
36646     # The variable is set, but is it from the command line or the environment?
36647 
36648     # Try to remove the string !STRIP! from our list.
36649     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36650     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36651       # If it failed, the variable was not from the command line. Ignore it,
36652       # but warn the user (except for BASH, which is always set by the calling BASH).
36653       if test "xSTRIP" != xBASH; then
36654         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36655 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36656       fi
36657       # Try to locate tool using the code snippet
36658       if test -n "$ac_tool_prefix"; then
36659   for ac_prog in strip
36660   do
36661     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36662 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36664 $as_echo_n "checking for $ac_word... " >&6; }
36665 if ${ac_cv_prog_STRIP+:} false; then :
36666   $as_echo_n "(cached) " >&6
36667 else
36668   if test -n "$STRIP"; then
36669   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36670 else
36671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36672 for as_dir in $PATH
36673 do
36674   IFS=$as_save_IFS
36675   test -z "$as_dir" && as_dir=.
36676     for ac_exec_ext in '' $ac_executable_extensions; do
36677   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36678     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36679     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36680     break 2
36681   fi
36682 done
36683   done
36684 IFS=$as_save_IFS
36685 
36686 fi
36687 fi
36688 STRIP=$ac_cv_prog_STRIP
36689 if test -n "$STRIP"; then
36690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36691 $as_echo "$STRIP" >&6; }
36692 else
36693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36694 $as_echo "no" >&6; }
36695 fi
36696 
36697 
36698     test -n "$STRIP" && break
36699   done
36700 fi
36701 if test -z "$STRIP"; then
36702   ac_ct_STRIP=$STRIP
36703   for ac_prog in strip
36704 do
36705   # Extract the first word of "$ac_prog", so it can be a program name with args.
36706 set dummy $ac_prog; ac_word=$2
36707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36708 $as_echo_n "checking for $ac_word... " >&6; }
36709 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36710   $as_echo_n "(cached) " >&6
36711 else
36712   if test -n "$ac_ct_STRIP"; then
36713   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36714 else
36715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36716 for as_dir in $PATH
36717 do
36718   IFS=$as_save_IFS
36719   test -z "$as_dir" && as_dir=.
36720     for ac_exec_ext in '' $ac_executable_extensions; do
36721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36722     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36724     break 2
36725   fi
36726 done
36727   done
36728 IFS=$as_save_IFS
36729 
36730 fi
36731 fi
36732 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36733 if test -n "$ac_ct_STRIP"; then
36734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36735 $as_echo "$ac_ct_STRIP" >&6; }
36736 else
36737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36738 $as_echo "no" >&6; }
36739 fi
36740 
36741 
36742   test -n "$ac_ct_STRIP" && break
36743 done
36744 
36745   if test "x$ac_ct_STRIP" = x; then
36746     STRIP=""
36747   else
36748     case $cross_compiling:$ac_tool_warned in
36749 yes:)
36750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36752 ac_tool_warned=yes ;;
36753 esac
36754     STRIP=$ac_ct_STRIP
36755   fi
36756 fi
36757 
36758     else
36759       # If it succeeded, then it was overridden by the user. We will use it
36760       # for the tool.
36761 
36762       # First remove it from the list of overridden variables, so we can test
36763       # for unknown variables in the end.
36764       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36765 
36766       # Check if the provided tool contains a complete path.
36767       tool_specified="$STRIP"
36768       tool_basename="${tool_specified##*/}"
36769       if test "x$tool_basename" = "x$tool_specified"; then
36770         # A command without a complete path is provided, search $PATH.
36771         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36772 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36773         # Extract the first word of "$tool_basename", so it can be a program name with args.
36774 set dummy $tool_basename; ac_word=$2
36775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36776 $as_echo_n "checking for $ac_word... " >&6; }
36777 if ${ac_cv_path_STRIP+:} false; then :
36778   $as_echo_n "(cached) " >&6
36779 else
36780   case $STRIP in
36781   [\\/]* | ?:[\\/]*)
36782   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36783   ;;
36784   *)
36785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36786 for as_dir in $PATH
36787 do
36788   IFS=$as_save_IFS
36789   test -z "$as_dir" && as_dir=.
36790     for ac_exec_ext in '' $ac_executable_extensions; do
36791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36792     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36794     break 2
36795   fi
36796 done
36797   done
36798 IFS=$as_save_IFS
36799 
36800   ;;
36801 esac
36802 fi
36803 STRIP=$ac_cv_path_STRIP
36804 if test -n "$STRIP"; then
36805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36806 $as_echo "$STRIP" >&6; }
36807 else
36808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36809 $as_echo "no" >&6; }
36810 fi
36811 
36812 
36813         if test "x$STRIP" = x; then
36814           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36815         fi
36816       else
36817         # Otherwise we believe it is a complete path. Use it as it is.
36818         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36819 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36821 $as_echo_n "checking for STRIP... " >&6; }
36822         if test ! -x "$tool_specified"; then
36823           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36824 $as_echo "not found" >&6; }
36825           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36826         fi
36827         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36828 $as_echo "$tool_specified" >&6; }
36829       fi
36830     fi
36831   fi
36832 
36833 
36834 
36835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36836 
36837   # First separate the path from the arguments. This will split at the first
36838   # space.
36839   complete="$STRIP"
36840   path="${complete%% *}"
36841   tmp="$complete EOL"
36842   arguments="${tmp#* }"
36843 
36844   # Input might be given as Windows format, start by converting to
36845   # unix format.
36846   new_path=`$CYGPATH -u "$path"`
36847 
36848   # Now try to locate executable using which
36849   new_path=`$WHICH "$new_path" 2> /dev/null`
36850   # bat and cmd files are not always considered executable in cygwin causing which
36851   # to not find them
36852   if test "x$new_path" = x \
36853       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36854       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36855     new_path=`$CYGPATH -u "$path"`
36856   fi
36857   if test "x$new_path" = x; then
36858     # Oops. Which didn't find the executable.
36859     # The splitting of arguments from the executable at a space might have been incorrect,
36860     # since paths with space are more likely in Windows. Give it another try with the whole
36861     # argument.
36862     path="$complete"
36863     arguments="EOL"
36864     new_path=`$CYGPATH -u "$path"`
36865     new_path=`$WHICH "$new_path" 2> /dev/null`
36866     # bat and cmd files are not always considered executable in cygwin causing which
36867     # to not find them
36868     if test "x$new_path" = x \
36869         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36870         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36871       new_path=`$CYGPATH -u "$path"`
36872     fi
36873     if test "x$new_path" = x; then
36874       # It's still not found. Now this is an unrecoverable error.
36875       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36876 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36877       has_space=`$ECHO "$complete" | $GREP " "`
36878       if test "x$has_space" != x; then
36879         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36880 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36881       fi
36882       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36883     fi
36884   fi
36885 
36886   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36887   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36888   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36889   # "foo.exe" is OK but "foo" is an error.
36890   #
36891   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36892   # It is also a way to make sure we got the proper file name for the real test later on.
36893   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36894   if test "x$test_shortpath" = x; then
36895     # Short path failed, file does not exist as specified.
36896     # Try adding .exe or .cmd
36897     if test -f "${new_path}.exe"; then
36898       input_to_shortpath="${new_path}.exe"
36899     elif test -f "${new_path}.cmd"; then
36900       input_to_shortpath="${new_path}.cmd"
36901     else
36902       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36903 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36904       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36905 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36906       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36907     fi
36908   else
36909     input_to_shortpath="$new_path"
36910   fi
36911 
36912   # Call helper function which possibly converts this using DOS-style short mode.
36913   # If so, the updated path is stored in $new_path.
36914   new_path="$input_to_shortpath"
36915 
36916   input_path="$input_to_shortpath"
36917   # Check if we need to convert this using DOS-style short mode. If the path
36918   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36919   # take no chances and rewrite it.
36920   # Note: m4 eats our [], so we need to use [ and ] instead.
36921   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36922   if test "x$has_forbidden_chars" != x; then
36923     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36924     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36925     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36926     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36927       # Going to short mode and back again did indeed matter. Since short mode is
36928       # case insensitive, let's make it lowercase to improve readability.
36929       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36930       # Now convert it back to Unix-stile (cygpath)
36931       input_path=`$CYGPATH -u "$shortmode_path"`
36932       new_path="$input_path"
36933     fi
36934   fi
36935 
36936   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36937   if test "x$test_cygdrive_prefix" = x; then
36938     # As a simple fix, exclude /usr/bin since it's not a real path.
36939     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36940       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36941       # a path prefixed by /cygdrive for fixpath to work.
36942       new_path="$CYGWIN_ROOT_PATH$input_path"
36943     fi
36944   fi
36945 
36946   # remove trailing .exe if any
36947   new_path="${new_path/%.exe/}"
36948 
36949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950 
36951   # First separate the path from the arguments. This will split at the first
36952   # space.
36953   complete="$STRIP"
36954   path="${complete%% *}"
36955   tmp="$complete EOL"
36956   arguments="${tmp#* }"
36957 
36958   # Input might be given as Windows format, start by converting to
36959   # unix format.
36960   new_path="$path"
36961 
36962   windows_path="$new_path"
36963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36964     unix_path=`$CYGPATH -u "$windows_path"`
36965     new_path="$unix_path"
36966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36968     new_path="$unix_path"
36969   fi
36970 
36971 
36972   # Now try to locate executable using which
36973   new_path=`$WHICH "$new_path" 2> /dev/null`
36974 
36975   if test "x$new_path" = x; then
36976     # Oops. Which didn't find the executable.
36977     # The splitting of arguments from the executable at a space might have been incorrect,
36978     # since paths with space are more likely in Windows. Give it another try with the whole
36979     # argument.
36980     path="$complete"
36981     arguments="EOL"
36982     new_path="$path"
36983 
36984   windows_path="$new_path"
36985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36986     unix_path=`$CYGPATH -u "$windows_path"`
36987     new_path="$unix_path"
36988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36990     new_path="$unix_path"
36991   fi
36992 
36993 
36994     new_path=`$WHICH "$new_path" 2> /dev/null`
36995 
36996     if test "x$new_path" = x; then
36997       # It's still not found. Now this is an unrecoverable error.
36998       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36999 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37000       has_space=`$ECHO "$complete" | $GREP " "`
37001       if test "x$has_space" != x; then
37002         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37003 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37004       fi
37005       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37006     fi
37007   fi
37008 
37009   # Now new_path has a complete unix path to the binary
37010   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37011     # Keep paths in /bin as-is, but remove trailing .exe if any
37012     new_path="${new_path/%.exe/}"
37013     # Do not save /bin paths to all_fixpath_prefixes!
37014   else
37015     # Not in mixed or Windows style, start by that.
37016     new_path=`cmd //c echo $new_path`
37017 
37018   input_path="$new_path"
37019   # Check if we need to convert this using DOS-style short mode. If the path
37020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37021   # take no chances and rewrite it.
37022   # Note: m4 eats our [], so we need to use [ and ] instead.
37023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37024   if test "x$has_forbidden_chars" != x; then
37025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37026     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37027   fi
37028 
37029     # Output is in $new_path
37030 
37031   windows_path="$new_path"
37032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37033     unix_path=`$CYGPATH -u "$windows_path"`
37034     new_path="$unix_path"
37035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37036     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37037     new_path="$unix_path"
37038   fi
37039 
37040     # remove trailing .exe if any
37041     new_path="${new_path/%.exe/}"
37042 
37043     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37044     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37045   fi
37046 
37047   else
37048     # We're on a posix platform. Hooray! :)
37049     # First separate the path from the arguments. This will split at the first
37050     # space.
37051     complete="$STRIP"
37052     path="${complete%% *}"
37053     tmp="$complete EOL"
37054     arguments="${tmp#* }"
37055 
37056     # Cannot rely on the command "which" here since it doesn't always work.
37057     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37058     if test -z "$is_absolute_path"; then
37059       # Path to executable is not absolute. Find it.
37060       IFS_save="$IFS"
37061       IFS=:
37062       for p in $PATH; do
37063         if test -f "$p/$path" && test -x "$p/$path"; then
37064           new_path="$p/$path"
37065           break
37066         fi
37067       done
37068       IFS="$IFS_save"
37069     else
37070       # This is an absolute path, we can use it without further modifications.
37071       new_path="$path"
37072     fi
37073 
37074     if test "x$new_path" = x; then
37075       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37076 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37077       has_space=`$ECHO "$complete" | $GREP " "`
37078       if test "x$has_space" != x; then
37079         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37080 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37081       fi
37082       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37083     fi
37084   fi
37085 
37086   # Now join together the path and the arguments once again
37087   if test "x$arguments" != xEOL; then
37088     new_complete="$new_path ${arguments% *}"
37089   else
37090     new_complete="$new_path"
37091   fi
37092 
37093   if test "x$complete" != "x$new_complete"; then
37094     STRIP="$new_complete"
37095     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37096 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37097   fi
37098 
37099 
37100 
37101   # Publish this variable in the help.
37102 
37103 
37104   if test "x$NM" = x; then
37105     # The variable is not set by user, try to locate tool using the code snippet
37106     if test -n "$ac_tool_prefix"; then
37107   for ac_prog in nm
37108   do
37109     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37110 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37112 $as_echo_n "checking for $ac_word... " >&6; }
37113 if ${ac_cv_prog_NM+:} false; then :
37114   $as_echo_n "(cached) " >&6
37115 else
37116   if test -n "$NM"; then
37117   ac_cv_prog_NM="$NM" # Let the user override the test.
37118 else
37119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37120 for as_dir in $PATH
37121 do
37122   IFS=$as_save_IFS
37123   test -z "$as_dir" && as_dir=.
37124     for ac_exec_ext in '' $ac_executable_extensions; do
37125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37126     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37128     break 2
37129   fi
37130 done
37131   done
37132 IFS=$as_save_IFS
37133 
37134 fi
37135 fi
37136 NM=$ac_cv_prog_NM
37137 if test -n "$NM"; then
37138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37139 $as_echo "$NM" >&6; }
37140 else
37141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37142 $as_echo "no" >&6; }
37143 fi
37144 
37145 
37146     test -n "$NM" && break
37147   done
37148 fi
37149 if test -z "$NM"; then
37150   ac_ct_NM=$NM
37151   for ac_prog in nm
37152 do
37153   # Extract the first word of "$ac_prog", so it can be a program name with args.
37154 set dummy $ac_prog; ac_word=$2
37155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37156 $as_echo_n "checking for $ac_word... " >&6; }
37157 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37158   $as_echo_n "(cached) " >&6
37159 else
37160   if test -n "$ac_ct_NM"; then
37161   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37162 else
37163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37164 for as_dir in $PATH
37165 do
37166   IFS=$as_save_IFS
37167   test -z "$as_dir" && as_dir=.
37168     for ac_exec_ext in '' $ac_executable_extensions; do
37169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37170     ac_cv_prog_ac_ct_NM="$ac_prog"
37171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37172     break 2
37173   fi
37174 done
37175   done
37176 IFS=$as_save_IFS
37177 
37178 fi
37179 fi
37180 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37181 if test -n "$ac_ct_NM"; then
37182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37183 $as_echo "$ac_ct_NM" >&6; }
37184 else
37185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37186 $as_echo "no" >&6; }
37187 fi
37188 
37189 
37190   test -n "$ac_ct_NM" && break
37191 done
37192 
37193   if test "x$ac_ct_NM" = x; then
37194     NM=""
37195   else
37196     case $cross_compiling:$ac_tool_warned in
37197 yes:)
37198 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37199 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37200 ac_tool_warned=yes ;;
37201 esac
37202     NM=$ac_ct_NM
37203   fi
37204 fi
37205 
37206   else
37207     # The variable is set, but is it from the command line or the environment?
37208 
37209     # Try to remove the string !NM! from our list.
37210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37212       # If it failed, the variable was not from the command line. Ignore it,
37213       # but warn the user (except for BASH, which is always set by the calling BASH).
37214       if test "xNM" != xBASH; then
37215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37216 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37217       fi
37218       # Try to locate tool using the code snippet
37219       if test -n "$ac_tool_prefix"; then
37220   for ac_prog in nm
37221   do
37222     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37223 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37225 $as_echo_n "checking for $ac_word... " >&6; }
37226 if ${ac_cv_prog_NM+:} false; then :
37227   $as_echo_n "(cached) " >&6
37228 else
37229   if test -n "$NM"; then
37230   ac_cv_prog_NM="$NM" # Let the user override the test.
37231 else
37232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37233 for as_dir in $PATH
37234 do
37235   IFS=$as_save_IFS
37236   test -z "$as_dir" && as_dir=.
37237     for ac_exec_ext in '' $ac_executable_extensions; do
37238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37239     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37241     break 2
37242   fi
37243 done
37244   done
37245 IFS=$as_save_IFS
37246 
37247 fi
37248 fi
37249 NM=$ac_cv_prog_NM
37250 if test -n "$NM"; then
37251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37252 $as_echo "$NM" >&6; }
37253 else
37254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37255 $as_echo "no" >&6; }
37256 fi
37257 
37258 
37259     test -n "$NM" && break
37260   done
37261 fi
37262 if test -z "$NM"; then
37263   ac_ct_NM=$NM
37264   for ac_prog in nm
37265 do
37266   # Extract the first word of "$ac_prog", so it can be a program name with args.
37267 set dummy $ac_prog; ac_word=$2
37268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37269 $as_echo_n "checking for $ac_word... " >&6; }
37270 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37271   $as_echo_n "(cached) " >&6
37272 else
37273   if test -n "$ac_ct_NM"; then
37274   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37275 else
37276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37277 for as_dir in $PATH
37278 do
37279   IFS=$as_save_IFS
37280   test -z "$as_dir" && as_dir=.
37281     for ac_exec_ext in '' $ac_executable_extensions; do
37282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37283     ac_cv_prog_ac_ct_NM="$ac_prog"
37284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37285     break 2
37286   fi
37287 done
37288   done
37289 IFS=$as_save_IFS
37290 
37291 fi
37292 fi
37293 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37294 if test -n "$ac_ct_NM"; then
37295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37296 $as_echo "$ac_ct_NM" >&6; }
37297 else
37298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37299 $as_echo "no" >&6; }
37300 fi
37301 
37302 
37303   test -n "$ac_ct_NM" && break
37304 done
37305 
37306   if test "x$ac_ct_NM" = x; then
37307     NM=""
37308   else
37309     case $cross_compiling:$ac_tool_warned in
37310 yes:)
37311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37312 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37313 ac_tool_warned=yes ;;
37314 esac
37315     NM=$ac_ct_NM
37316   fi
37317 fi
37318 
37319     else
37320       # If it succeeded, then it was overridden by the user. We will use it
37321       # for the tool.
37322 
37323       # First remove it from the list of overridden variables, so we can test
37324       # for unknown variables in the end.
37325       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37326 
37327       # Check if the provided tool contains a complete path.
37328       tool_specified="$NM"
37329       tool_basename="${tool_specified##*/}"
37330       if test "x$tool_basename" = "x$tool_specified"; then
37331         # A command without a complete path is provided, search $PATH.
37332         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37333 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37334         # Extract the first word of "$tool_basename", so it can be a program name with args.
37335 set dummy $tool_basename; ac_word=$2
37336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37337 $as_echo_n "checking for $ac_word... " >&6; }
37338 if ${ac_cv_path_NM+:} false; then :
37339   $as_echo_n "(cached) " >&6
37340 else
37341   case $NM in
37342   [\\/]* | ?:[\\/]*)
37343   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37344   ;;
37345   *)
37346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37347 for as_dir in $PATH
37348 do
37349   IFS=$as_save_IFS
37350   test -z "$as_dir" && as_dir=.
37351     for ac_exec_ext in '' $ac_executable_extensions; do
37352   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37353     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37355     break 2
37356   fi
37357 done
37358   done
37359 IFS=$as_save_IFS
37360 
37361   ;;
37362 esac
37363 fi
37364 NM=$ac_cv_path_NM
37365 if test -n "$NM"; then
37366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37367 $as_echo "$NM" >&6; }
37368 else
37369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37370 $as_echo "no" >&6; }
37371 fi
37372 
37373 
37374         if test "x$NM" = x; then
37375           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37376         fi
37377       else
37378         # Otherwise we believe it is a complete path. Use it as it is.
37379         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37380 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37382 $as_echo_n "checking for NM... " >&6; }
37383         if test ! -x "$tool_specified"; then
37384           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37385 $as_echo "not found" >&6; }
37386           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37387         fi
37388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37389 $as_echo "$tool_specified" >&6; }
37390       fi
37391     fi
37392   fi
37393 
37394 
37395 
37396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37397 
37398   # First separate the path from the arguments. This will split at the first
37399   # space.
37400   complete="$NM"
37401   path="${complete%% *}"
37402   tmp="$complete EOL"
37403   arguments="${tmp#* }"
37404 
37405   # Input might be given as Windows format, start by converting to
37406   # unix format.
37407   new_path=`$CYGPATH -u "$path"`
37408 
37409   # Now try to locate executable using which
37410   new_path=`$WHICH "$new_path" 2> /dev/null`
37411   # bat and cmd files are not always considered executable in cygwin causing which
37412   # to not find them
37413   if test "x$new_path" = x \
37414       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37415       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37416     new_path=`$CYGPATH -u "$path"`
37417   fi
37418   if test "x$new_path" = x; then
37419     # Oops. Which didn't find the executable.
37420     # The splitting of arguments from the executable at a space might have been incorrect,
37421     # since paths with space are more likely in Windows. Give it another try with the whole
37422     # argument.
37423     path="$complete"
37424     arguments="EOL"
37425     new_path=`$CYGPATH -u "$path"`
37426     new_path=`$WHICH "$new_path" 2> /dev/null`
37427     # bat and cmd files are not always considered executable in cygwin causing which
37428     # to not find them
37429     if test "x$new_path" = x \
37430         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37431         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37432       new_path=`$CYGPATH -u "$path"`
37433     fi
37434     if test "x$new_path" = x; then
37435       # It's still not found. Now this is an unrecoverable error.
37436       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37437 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37438       has_space=`$ECHO "$complete" | $GREP " "`
37439       if test "x$has_space" != x; then
37440         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37441 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37442       fi
37443       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37444     fi
37445   fi
37446 
37447   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37448   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37449   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37450   # "foo.exe" is OK but "foo" is an error.
37451   #
37452   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37453   # It is also a way to make sure we got the proper file name for the real test later on.
37454   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37455   if test "x$test_shortpath" = x; then
37456     # Short path failed, file does not exist as specified.
37457     # Try adding .exe or .cmd
37458     if test -f "${new_path}.exe"; then
37459       input_to_shortpath="${new_path}.exe"
37460     elif test -f "${new_path}.cmd"; then
37461       input_to_shortpath="${new_path}.cmd"
37462     else
37463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37464 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37465       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37466 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37467       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37468     fi
37469   else
37470     input_to_shortpath="$new_path"
37471   fi
37472 
37473   # Call helper function which possibly converts this using DOS-style short mode.
37474   # If so, the updated path is stored in $new_path.
37475   new_path="$input_to_shortpath"
37476 
37477   input_path="$input_to_shortpath"
37478   # Check if we need to convert this using DOS-style short mode. If the path
37479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37480   # take no chances and rewrite it.
37481   # Note: m4 eats our [], so we need to use [ and ] instead.
37482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37483   if test "x$has_forbidden_chars" != x; then
37484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37488       # Going to short mode and back again did indeed matter. Since short mode is
37489       # case insensitive, let's make it lowercase to improve readability.
37490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37491       # Now convert it back to Unix-stile (cygpath)
37492       input_path=`$CYGPATH -u "$shortmode_path"`
37493       new_path="$input_path"
37494     fi
37495   fi
37496 
37497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37498   if test "x$test_cygdrive_prefix" = x; then
37499     # As a simple fix, exclude /usr/bin since it's not a real path.
37500     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37502       # a path prefixed by /cygdrive for fixpath to work.
37503       new_path="$CYGWIN_ROOT_PATH$input_path"
37504     fi
37505   fi
37506 
37507   # remove trailing .exe if any
37508   new_path="${new_path/%.exe/}"
37509 
37510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37511 
37512   # First separate the path from the arguments. This will split at the first
37513   # space.
37514   complete="$NM"
37515   path="${complete%% *}"
37516   tmp="$complete EOL"
37517   arguments="${tmp#* }"
37518 
37519   # Input might be given as Windows format, start by converting to
37520   # unix format.
37521   new_path="$path"
37522 
37523   windows_path="$new_path"
37524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37525     unix_path=`$CYGPATH -u "$windows_path"`
37526     new_path="$unix_path"
37527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37529     new_path="$unix_path"
37530   fi
37531 
37532 
37533   # Now try to locate executable using which
37534   new_path=`$WHICH "$new_path" 2> /dev/null`
37535 
37536   if test "x$new_path" = x; then
37537     # Oops. Which didn't find the executable.
37538     # The splitting of arguments from the executable at a space might have been incorrect,
37539     # since paths with space are more likely in Windows. Give it another try with the whole
37540     # argument.
37541     path="$complete"
37542     arguments="EOL"
37543     new_path="$path"
37544 
37545   windows_path="$new_path"
37546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37547     unix_path=`$CYGPATH -u "$windows_path"`
37548     new_path="$unix_path"
37549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37551     new_path="$unix_path"
37552   fi
37553 
37554 
37555     new_path=`$WHICH "$new_path" 2> /dev/null`
37556 
37557     if test "x$new_path" = x; then
37558       # It's still not found. Now this is an unrecoverable error.
37559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37560 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37561       has_space=`$ECHO "$complete" | $GREP " "`
37562       if test "x$has_space" != x; then
37563         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37564 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37565       fi
37566       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37567     fi
37568   fi
37569 
37570   # Now new_path has a complete unix path to the binary
37571   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37572     # Keep paths in /bin as-is, but remove trailing .exe if any
37573     new_path="${new_path/%.exe/}"
37574     # Do not save /bin paths to all_fixpath_prefixes!
37575   else
37576     # Not in mixed or Windows style, start by that.
37577     new_path=`cmd //c echo $new_path`
37578 
37579   input_path="$new_path"
37580   # Check if we need to convert this using DOS-style short mode. If the path
37581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37582   # take no chances and rewrite it.
37583   # Note: m4 eats our [], so we need to use [ and ] instead.
37584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37585   if test "x$has_forbidden_chars" != x; then
37586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37587     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37588   fi
37589 
37590     # Output is in $new_path
37591 
37592   windows_path="$new_path"
37593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37594     unix_path=`$CYGPATH -u "$windows_path"`
37595     new_path="$unix_path"
37596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37598     new_path="$unix_path"
37599   fi
37600 
37601     # remove trailing .exe if any
37602     new_path="${new_path/%.exe/}"
37603 
37604     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37605     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37606   fi
37607 
37608   else
37609     # We're on a posix platform. Hooray! :)
37610     # First separate the path from the arguments. This will split at the first
37611     # space.
37612     complete="$NM"
37613     path="${complete%% *}"
37614     tmp="$complete EOL"
37615     arguments="${tmp#* }"
37616 
37617     # Cannot rely on the command "which" here since it doesn't always work.
37618     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37619     if test -z "$is_absolute_path"; then
37620       # Path to executable is not absolute. Find it.
37621       IFS_save="$IFS"
37622       IFS=:
37623       for p in $PATH; do
37624         if test -f "$p/$path" && test -x "$p/$path"; then
37625           new_path="$p/$path"
37626           break
37627         fi
37628       done
37629       IFS="$IFS_save"
37630     else
37631       # This is an absolute path, we can use it without further modifications.
37632       new_path="$path"
37633     fi
37634 
37635     if test "x$new_path" = x; then
37636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37637 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37638       has_space=`$ECHO "$complete" | $GREP " "`
37639       if test "x$has_space" != x; then
37640         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37641 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37642       fi
37643       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37644     fi
37645   fi
37646 
37647   # Now join together the path and the arguments once again
37648   if test "x$arguments" != xEOL; then
37649     new_complete="$new_path ${arguments% *}"
37650   else
37651     new_complete="$new_path"
37652   fi
37653 
37654   if test "x$complete" != "x$new_complete"; then
37655     NM="$new_complete"
37656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37657 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37658   fi
37659 
37660     GNM="$NM"
37661 
37662   fi
37663 
37664   # objcopy is used for moving debug symbols to separate files when
37665   # full debug symbols are enabled.
37666   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37667 
37668 
37669   # Publish this variable in the help.
37670 
37671 
37672   if test "x$OBJCOPY" = x; then
37673     # The variable is not set by user, try to locate tool using the code snippet
37674     if test -n "$ac_tool_prefix"; then
37675   for ac_prog in gobjcopy objcopy
37676   do
37677     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37678 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680 $as_echo_n "checking for $ac_word... " >&6; }
37681 if ${ac_cv_prog_OBJCOPY+:} false; then :
37682   $as_echo_n "(cached) " >&6
37683 else
37684   if test -n "$OBJCOPY"; then
37685   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37686 else
37687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37688 for as_dir in $PATH
37689 do
37690   IFS=$as_save_IFS
37691   test -z "$as_dir" && as_dir=.
37692     for ac_exec_ext in '' $ac_executable_extensions; do
37693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37694     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37696     break 2
37697   fi
37698 done
37699   done
37700 IFS=$as_save_IFS
37701 
37702 fi
37703 fi
37704 OBJCOPY=$ac_cv_prog_OBJCOPY
37705 if test -n "$OBJCOPY"; then
37706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37707 $as_echo "$OBJCOPY" >&6; }
37708 else
37709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710 $as_echo "no" >&6; }
37711 fi
37712 
37713 
37714     test -n "$OBJCOPY" && break
37715   done
37716 fi
37717 if test -z "$OBJCOPY"; then
37718   ac_ct_OBJCOPY=$OBJCOPY
37719   for ac_prog in gobjcopy objcopy
37720 do
37721   # Extract the first word of "$ac_prog", so it can be a program name with args.
37722 set dummy $ac_prog; ac_word=$2
37723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37724 $as_echo_n "checking for $ac_word... " >&6; }
37725 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37726   $as_echo_n "(cached) " >&6
37727 else
37728   if test -n "$ac_ct_OBJCOPY"; then
37729   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37730 else
37731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37732 for as_dir in $PATH
37733 do
37734   IFS=$as_save_IFS
37735   test -z "$as_dir" && as_dir=.
37736     for ac_exec_ext in '' $ac_executable_extensions; do
37737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37738     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37740     break 2
37741   fi
37742 done
37743   done
37744 IFS=$as_save_IFS
37745 
37746 fi
37747 fi
37748 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37749 if test -n "$ac_ct_OBJCOPY"; then
37750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37751 $as_echo "$ac_ct_OBJCOPY" >&6; }
37752 else
37753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37754 $as_echo "no" >&6; }
37755 fi
37756 
37757 
37758   test -n "$ac_ct_OBJCOPY" && break
37759 done
37760 
37761   if test "x$ac_ct_OBJCOPY" = x; then
37762     OBJCOPY=""
37763   else
37764     case $cross_compiling:$ac_tool_warned in
37765 yes:)
37766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37767 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37768 ac_tool_warned=yes ;;
37769 esac
37770     OBJCOPY=$ac_ct_OBJCOPY
37771   fi
37772 fi
37773 
37774   else
37775     # The variable is set, but is it from the command line or the environment?
37776 
37777     # Try to remove the string !OBJCOPY! from our list.
37778     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37779     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37780       # If it failed, the variable was not from the command line. Ignore it,
37781       # but warn the user (except for BASH, which is always set by the calling BASH).
37782       if test "xOBJCOPY" != xBASH; then
37783         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37784 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37785       fi
37786       # Try to locate tool using the code snippet
37787       if test -n "$ac_tool_prefix"; then
37788   for ac_prog in gobjcopy objcopy
37789   do
37790     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37791 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37793 $as_echo_n "checking for $ac_word... " >&6; }
37794 if ${ac_cv_prog_OBJCOPY+:} false; then :
37795   $as_echo_n "(cached) " >&6
37796 else
37797   if test -n "$OBJCOPY"; then
37798   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37799 else
37800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37801 for as_dir in $PATH
37802 do
37803   IFS=$as_save_IFS
37804   test -z "$as_dir" && as_dir=.
37805     for ac_exec_ext in '' $ac_executable_extensions; do
37806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37807     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37809     break 2
37810   fi
37811 done
37812   done
37813 IFS=$as_save_IFS
37814 
37815 fi
37816 fi
37817 OBJCOPY=$ac_cv_prog_OBJCOPY
37818 if test -n "$OBJCOPY"; then
37819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37820 $as_echo "$OBJCOPY" >&6; }
37821 else
37822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37823 $as_echo "no" >&6; }
37824 fi
37825 
37826 
37827     test -n "$OBJCOPY" && break
37828   done
37829 fi
37830 if test -z "$OBJCOPY"; then
37831   ac_ct_OBJCOPY=$OBJCOPY
37832   for ac_prog in gobjcopy objcopy
37833 do
37834   # Extract the first word of "$ac_prog", so it can be a program name with args.
37835 set dummy $ac_prog; ac_word=$2
37836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37837 $as_echo_n "checking for $ac_word... " >&6; }
37838 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37839   $as_echo_n "(cached) " >&6
37840 else
37841   if test -n "$ac_ct_OBJCOPY"; then
37842   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37843 else
37844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37845 for as_dir in $PATH
37846 do
37847   IFS=$as_save_IFS
37848   test -z "$as_dir" && as_dir=.
37849     for ac_exec_ext in '' $ac_executable_extensions; do
37850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37851     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37853     break 2
37854   fi
37855 done
37856   done
37857 IFS=$as_save_IFS
37858 
37859 fi
37860 fi
37861 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37862 if test -n "$ac_ct_OBJCOPY"; then
37863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37864 $as_echo "$ac_ct_OBJCOPY" >&6; }
37865 else
37866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37867 $as_echo "no" >&6; }
37868 fi
37869 
37870 
37871   test -n "$ac_ct_OBJCOPY" && break
37872 done
37873 
37874   if test "x$ac_ct_OBJCOPY" = x; then
37875     OBJCOPY=""
37876   else
37877     case $cross_compiling:$ac_tool_warned in
37878 yes:)
37879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37880 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37881 ac_tool_warned=yes ;;
37882 esac
37883     OBJCOPY=$ac_ct_OBJCOPY
37884   fi
37885 fi
37886 
37887     else
37888       # If it succeeded, then it was overridden by the user. We will use it
37889       # for the tool.
37890 
37891       # First remove it from the list of overridden variables, so we can test
37892       # for unknown variables in the end.
37893       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37894 
37895       # Check if the provided tool contains a complete path.
37896       tool_specified="$OBJCOPY"
37897       tool_basename="${tool_specified##*/}"
37898       if test "x$tool_basename" = "x$tool_specified"; then
37899         # A command without a complete path is provided, search $PATH.
37900         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37901 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37902         # Extract the first word of "$tool_basename", so it can be a program name with args.
37903 set dummy $tool_basename; ac_word=$2
37904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37905 $as_echo_n "checking for $ac_word... " >&6; }
37906 if ${ac_cv_path_OBJCOPY+:} false; then :
37907   $as_echo_n "(cached) " >&6
37908 else
37909   case $OBJCOPY in
37910   [\\/]* | ?:[\\/]*)
37911   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37912   ;;
37913   *)
37914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37915 for as_dir in $PATH
37916 do
37917   IFS=$as_save_IFS
37918   test -z "$as_dir" && as_dir=.
37919     for ac_exec_ext in '' $ac_executable_extensions; do
37920   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37921     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37922     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37923     break 2
37924   fi
37925 done
37926   done
37927 IFS=$as_save_IFS
37928 
37929   ;;
37930 esac
37931 fi
37932 OBJCOPY=$ac_cv_path_OBJCOPY
37933 if test -n "$OBJCOPY"; then
37934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37935 $as_echo "$OBJCOPY" >&6; }
37936 else
37937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37938 $as_echo "no" >&6; }
37939 fi
37940 
37941 
37942         if test "x$OBJCOPY" = x; then
37943           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37944         fi
37945       else
37946         # Otherwise we believe it is a complete path. Use it as it is.
37947         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37948 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37949         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37950 $as_echo_n "checking for OBJCOPY... " >&6; }
37951         if test ! -x "$tool_specified"; then
37952           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37953 $as_echo "not found" >&6; }
37954           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37955         fi
37956         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37957 $as_echo "$tool_specified" >&6; }
37958       fi
37959     fi
37960   fi
37961 
37962 
37963     # Only call fixup if objcopy was found.
37964     if test -n "$OBJCOPY"; then
37965 
37966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37967 
37968   # First separate the path from the arguments. This will split at the first
37969   # space.
37970   complete="$OBJCOPY"
37971   path="${complete%% *}"
37972   tmp="$complete EOL"
37973   arguments="${tmp#* }"
37974 
37975   # Input might be given as Windows format, start by converting to
37976   # unix format.
37977   new_path=`$CYGPATH -u "$path"`
37978 
37979   # Now try to locate executable using which
37980   new_path=`$WHICH "$new_path" 2> /dev/null`
37981   # bat and cmd files are not always considered executable in cygwin causing which
37982   # to not find them
37983   if test "x$new_path" = x \
37984       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37985       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37986     new_path=`$CYGPATH -u "$path"`
37987   fi
37988   if test "x$new_path" = x; then
37989     # Oops. Which didn't find the executable.
37990     # The splitting of arguments from the executable at a space might have been incorrect,
37991     # since paths with space are more likely in Windows. Give it another try with the whole
37992     # argument.
37993     path="$complete"
37994     arguments="EOL"
37995     new_path=`$CYGPATH -u "$path"`
37996     new_path=`$WHICH "$new_path" 2> /dev/null`
37997     # bat and cmd files are not always considered executable in cygwin causing which
37998     # to not find them
37999     if test "x$new_path" = x \
38000         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38001         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38002       new_path=`$CYGPATH -u "$path"`
38003     fi
38004     if test "x$new_path" = x; then
38005       # It's still not found. Now this is an unrecoverable error.
38006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38007 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38008       has_space=`$ECHO "$complete" | $GREP " "`
38009       if test "x$has_space" != x; then
38010         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38011 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38012       fi
38013       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38014     fi
38015   fi
38016 
38017   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38018   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38019   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38020   # "foo.exe" is OK but "foo" is an error.
38021   #
38022   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38023   # It is also a way to make sure we got the proper file name for the real test later on.
38024   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38025   if test "x$test_shortpath" = x; then
38026     # Short path failed, file does not exist as specified.
38027     # Try adding .exe or .cmd
38028     if test -f "${new_path}.exe"; then
38029       input_to_shortpath="${new_path}.exe"
38030     elif test -f "${new_path}.cmd"; then
38031       input_to_shortpath="${new_path}.cmd"
38032     else
38033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38034 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38035       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38036 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38037       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38038     fi
38039   else
38040     input_to_shortpath="$new_path"
38041   fi
38042 
38043   # Call helper function which possibly converts this using DOS-style short mode.
38044   # If so, the updated path is stored in $new_path.
38045   new_path="$input_to_shortpath"
38046 
38047   input_path="$input_to_shortpath"
38048   # Check if we need to convert this using DOS-style short mode. If the path
38049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38050   # take no chances and rewrite it.
38051   # Note: m4 eats our [], so we need to use [ and ] instead.
38052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38053   if test "x$has_forbidden_chars" != x; then
38054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38055     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38056     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38057     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38058       # Going to short mode and back again did indeed matter. Since short mode is
38059       # case insensitive, let's make it lowercase to improve readability.
38060       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38061       # Now convert it back to Unix-stile (cygpath)
38062       input_path=`$CYGPATH -u "$shortmode_path"`
38063       new_path="$input_path"
38064     fi
38065   fi
38066 
38067   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38068   if test "x$test_cygdrive_prefix" = x; then
38069     # As a simple fix, exclude /usr/bin since it's not a real path.
38070     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38071       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38072       # a path prefixed by /cygdrive for fixpath to work.
38073       new_path="$CYGWIN_ROOT_PATH$input_path"
38074     fi
38075   fi
38076 
38077   # remove trailing .exe if any
38078   new_path="${new_path/%.exe/}"
38079 
38080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38081 
38082   # First separate the path from the arguments. This will split at the first
38083   # space.
38084   complete="$OBJCOPY"
38085   path="${complete%% *}"
38086   tmp="$complete EOL"
38087   arguments="${tmp#* }"
38088 
38089   # Input might be given as Windows format, start by converting to
38090   # unix format.
38091   new_path="$path"
38092 
38093   windows_path="$new_path"
38094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38095     unix_path=`$CYGPATH -u "$windows_path"`
38096     new_path="$unix_path"
38097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38098     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38099     new_path="$unix_path"
38100   fi
38101 
38102 
38103   # Now try to locate executable using which
38104   new_path=`$WHICH "$new_path" 2> /dev/null`
38105 
38106   if test "x$new_path" = x; then
38107     # Oops. Which didn't find the executable.
38108     # The splitting of arguments from the executable at a space might have been incorrect,
38109     # since paths with space are more likely in Windows. Give it another try with the whole
38110     # argument.
38111     path="$complete"
38112     arguments="EOL"
38113     new_path="$path"
38114 
38115   windows_path="$new_path"
38116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38117     unix_path=`$CYGPATH -u "$windows_path"`
38118     new_path="$unix_path"
38119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38121     new_path="$unix_path"
38122   fi
38123 
38124 
38125     new_path=`$WHICH "$new_path" 2> /dev/null`
38126 
38127     if test "x$new_path" = x; then
38128       # It's still not found. Now this is an unrecoverable error.
38129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38130 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38131       has_space=`$ECHO "$complete" | $GREP " "`
38132       if test "x$has_space" != x; then
38133         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38134 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38135       fi
38136       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38137     fi
38138   fi
38139 
38140   # Now new_path has a complete unix path to the binary
38141   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38142     # Keep paths in /bin as-is, but remove trailing .exe if any
38143     new_path="${new_path/%.exe/}"
38144     # Do not save /bin paths to all_fixpath_prefixes!
38145   else
38146     # Not in mixed or Windows style, start by that.
38147     new_path=`cmd //c echo $new_path`
38148 
38149   input_path="$new_path"
38150   # Check if we need to convert this using DOS-style short mode. If the path
38151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38152   # take no chances and rewrite it.
38153   # Note: m4 eats our [], so we need to use [ and ] instead.
38154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38155   if test "x$has_forbidden_chars" != x; then
38156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38157     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38158   fi
38159 
38160     # Output is in $new_path
38161 
38162   windows_path="$new_path"
38163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38164     unix_path=`$CYGPATH -u "$windows_path"`
38165     new_path="$unix_path"
38166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38168     new_path="$unix_path"
38169   fi
38170 
38171     # remove trailing .exe if any
38172     new_path="${new_path/%.exe/}"
38173 
38174     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38175     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38176   fi
38177 
38178   else
38179     # We're on a posix platform. Hooray! :)
38180     # First separate the path from the arguments. This will split at the first
38181     # space.
38182     complete="$OBJCOPY"
38183     path="${complete%% *}"
38184     tmp="$complete EOL"
38185     arguments="${tmp#* }"
38186 
38187     # Cannot rely on the command "which" here since it doesn't always work.
38188     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38189     if test -z "$is_absolute_path"; then
38190       # Path to executable is not absolute. Find it.
38191       IFS_save="$IFS"
38192       IFS=:
38193       for p in $PATH; do
38194         if test -f "$p/$path" && test -x "$p/$path"; then
38195           new_path="$p/$path"
38196           break
38197         fi
38198       done
38199       IFS="$IFS_save"
38200     else
38201       # This is an absolute path, we can use it without further modifications.
38202       new_path="$path"
38203     fi
38204 
38205     if test "x$new_path" = x; then
38206       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38207 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38208       has_space=`$ECHO "$complete" | $GREP " "`
38209       if test "x$has_space" != x; then
38210         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38211 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38212       fi
38213       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38214     fi
38215   fi
38216 
38217   # Now join together the path and the arguments once again
38218   if test "x$arguments" != xEOL; then
38219     new_complete="$new_path ${arguments% *}"
38220   else
38221     new_complete="$new_path"
38222   fi
38223 
38224   if test "x$complete" != "x$new_complete"; then
38225     OBJCOPY="$new_complete"
38226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38227 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38228   fi
38229 
38230     fi
38231   fi
38232 
38233 
38234 
38235   # Publish this variable in the help.
38236 
38237 
38238   if test "x$OBJDUMP" = x; then
38239     # The variable is not set by user, try to locate tool using the code snippet
38240     if test -n "$ac_tool_prefix"; then
38241   for ac_prog in gobjdump objdump
38242   do
38243     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38244 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38246 $as_echo_n "checking for $ac_word... " >&6; }
38247 if ${ac_cv_prog_OBJDUMP+:} false; then :
38248   $as_echo_n "(cached) " >&6
38249 else
38250   if test -n "$OBJDUMP"; then
38251   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38252 else
38253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38254 for as_dir in $PATH
38255 do
38256   IFS=$as_save_IFS
38257   test -z "$as_dir" && as_dir=.
38258     for ac_exec_ext in '' $ac_executable_extensions; do
38259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38260     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38262     break 2
38263   fi
38264 done
38265   done
38266 IFS=$as_save_IFS
38267 
38268 fi
38269 fi
38270 OBJDUMP=$ac_cv_prog_OBJDUMP
38271 if test -n "$OBJDUMP"; then
38272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38273 $as_echo "$OBJDUMP" >&6; }
38274 else
38275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38276 $as_echo "no" >&6; }
38277 fi
38278 
38279 
38280     test -n "$OBJDUMP" && break
38281   done
38282 fi
38283 if test -z "$OBJDUMP"; then
38284   ac_ct_OBJDUMP=$OBJDUMP
38285   for ac_prog in gobjdump objdump
38286 do
38287   # Extract the first word of "$ac_prog", so it can be a program name with args.
38288 set dummy $ac_prog; ac_word=$2
38289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38290 $as_echo_n "checking for $ac_word... " >&6; }
38291 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38292   $as_echo_n "(cached) " >&6
38293 else
38294   if test -n "$ac_ct_OBJDUMP"; then
38295   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38296 else
38297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38298 for as_dir in $PATH
38299 do
38300   IFS=$as_save_IFS
38301   test -z "$as_dir" && as_dir=.
38302     for ac_exec_ext in '' $ac_executable_extensions; do
38303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38304     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38306     break 2
38307   fi
38308 done
38309   done
38310 IFS=$as_save_IFS
38311 
38312 fi
38313 fi
38314 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38315 if test -n "$ac_ct_OBJDUMP"; then
38316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38317 $as_echo "$ac_ct_OBJDUMP" >&6; }
38318 else
38319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38320 $as_echo "no" >&6; }
38321 fi
38322 
38323 
38324   test -n "$ac_ct_OBJDUMP" && break
38325 done
38326 
38327   if test "x$ac_ct_OBJDUMP" = x; then
38328     OBJDUMP=""
38329   else
38330     case $cross_compiling:$ac_tool_warned in
38331 yes:)
38332 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38333 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38334 ac_tool_warned=yes ;;
38335 esac
38336     OBJDUMP=$ac_ct_OBJDUMP
38337   fi
38338 fi
38339 
38340   else
38341     # The variable is set, but is it from the command line or the environment?
38342 
38343     # Try to remove the string !OBJDUMP! from our list.
38344     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38345     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38346       # If it failed, the variable was not from the command line. Ignore it,
38347       # but warn the user (except for BASH, which is always set by the calling BASH).
38348       if test "xOBJDUMP" != xBASH; then
38349         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38350 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38351       fi
38352       # Try to locate tool using the code snippet
38353       if test -n "$ac_tool_prefix"; then
38354   for ac_prog in gobjdump objdump
38355   do
38356     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38357 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38359 $as_echo_n "checking for $ac_word... " >&6; }
38360 if ${ac_cv_prog_OBJDUMP+:} false; then :
38361   $as_echo_n "(cached) " >&6
38362 else
38363   if test -n "$OBJDUMP"; then
38364   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38365 else
38366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38367 for as_dir in $PATH
38368 do
38369   IFS=$as_save_IFS
38370   test -z "$as_dir" && as_dir=.
38371     for ac_exec_ext in '' $ac_executable_extensions; do
38372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38373     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38375     break 2
38376   fi
38377 done
38378   done
38379 IFS=$as_save_IFS
38380 
38381 fi
38382 fi
38383 OBJDUMP=$ac_cv_prog_OBJDUMP
38384 if test -n "$OBJDUMP"; then
38385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38386 $as_echo "$OBJDUMP" >&6; }
38387 else
38388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38389 $as_echo "no" >&6; }
38390 fi
38391 
38392 
38393     test -n "$OBJDUMP" && break
38394   done
38395 fi
38396 if test -z "$OBJDUMP"; then
38397   ac_ct_OBJDUMP=$OBJDUMP
38398   for ac_prog in gobjdump objdump
38399 do
38400   # Extract the first word of "$ac_prog", so it can be a program name with args.
38401 set dummy $ac_prog; ac_word=$2
38402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38403 $as_echo_n "checking for $ac_word... " >&6; }
38404 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38405   $as_echo_n "(cached) " >&6
38406 else
38407   if test -n "$ac_ct_OBJDUMP"; then
38408   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38409 else
38410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38411 for as_dir in $PATH
38412 do
38413   IFS=$as_save_IFS
38414   test -z "$as_dir" && as_dir=.
38415     for ac_exec_ext in '' $ac_executable_extensions; do
38416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38417     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38419     break 2
38420   fi
38421 done
38422   done
38423 IFS=$as_save_IFS
38424 
38425 fi
38426 fi
38427 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38428 if test -n "$ac_ct_OBJDUMP"; then
38429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38430 $as_echo "$ac_ct_OBJDUMP" >&6; }
38431 else
38432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38433 $as_echo "no" >&6; }
38434 fi
38435 
38436 
38437   test -n "$ac_ct_OBJDUMP" && break
38438 done
38439 
38440   if test "x$ac_ct_OBJDUMP" = x; then
38441     OBJDUMP=""
38442   else
38443     case $cross_compiling:$ac_tool_warned in
38444 yes:)
38445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38446 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38447 ac_tool_warned=yes ;;
38448 esac
38449     OBJDUMP=$ac_ct_OBJDUMP
38450   fi
38451 fi
38452 
38453     else
38454       # If it succeeded, then it was overridden by the user. We will use it
38455       # for the tool.
38456 
38457       # First remove it from the list of overridden variables, so we can test
38458       # for unknown variables in the end.
38459       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38460 
38461       # Check if the provided tool contains a complete path.
38462       tool_specified="$OBJDUMP"
38463       tool_basename="${tool_specified##*/}"
38464       if test "x$tool_basename" = "x$tool_specified"; then
38465         # A command without a complete path is provided, search $PATH.
38466         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38467 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38468         # Extract the first word of "$tool_basename", so it can be a program name with args.
38469 set dummy $tool_basename; ac_word=$2
38470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38471 $as_echo_n "checking for $ac_word... " >&6; }
38472 if ${ac_cv_path_OBJDUMP+:} false; then :
38473   $as_echo_n "(cached) " >&6
38474 else
38475   case $OBJDUMP in
38476   [\\/]* | ?:[\\/]*)
38477   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38478   ;;
38479   *)
38480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38481 for as_dir in $PATH
38482 do
38483   IFS=$as_save_IFS
38484   test -z "$as_dir" && as_dir=.
38485     for ac_exec_ext in '' $ac_executable_extensions; do
38486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38487     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38489     break 2
38490   fi
38491 done
38492   done
38493 IFS=$as_save_IFS
38494 
38495   ;;
38496 esac
38497 fi
38498 OBJDUMP=$ac_cv_path_OBJDUMP
38499 if test -n "$OBJDUMP"; then
38500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38501 $as_echo "$OBJDUMP" >&6; }
38502 else
38503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38504 $as_echo "no" >&6; }
38505 fi
38506 
38507 
38508         if test "x$OBJDUMP" = x; then
38509           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38510         fi
38511       else
38512         # Otherwise we believe it is a complete path. Use it as it is.
38513         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38514 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38516 $as_echo_n "checking for OBJDUMP... " >&6; }
38517         if test ! -x "$tool_specified"; then
38518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38519 $as_echo "not found" >&6; }
38520           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38521         fi
38522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38523 $as_echo "$tool_specified" >&6; }
38524       fi
38525     fi
38526   fi
38527 
38528 
38529   if test "x$OBJDUMP" != x; then
38530     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38531     # bails if argument is missing.
38532 
38533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38534 
38535   # First separate the path from the arguments. This will split at the first
38536   # space.
38537   complete="$OBJDUMP"
38538   path="${complete%% *}"
38539   tmp="$complete EOL"
38540   arguments="${tmp#* }"
38541 
38542   # Input might be given as Windows format, start by converting to
38543   # unix format.
38544   new_path=`$CYGPATH -u "$path"`
38545 
38546   # Now try to locate executable using which
38547   new_path=`$WHICH "$new_path" 2> /dev/null`
38548   # bat and cmd files are not always considered executable in cygwin causing which
38549   # to not find them
38550   if test "x$new_path" = x \
38551       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38552       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38553     new_path=`$CYGPATH -u "$path"`
38554   fi
38555   if test "x$new_path" = x; then
38556     # Oops. Which didn't find the executable.
38557     # The splitting of arguments from the executable at a space might have been incorrect,
38558     # since paths with space are more likely in Windows. Give it another try with the whole
38559     # argument.
38560     path="$complete"
38561     arguments="EOL"
38562     new_path=`$CYGPATH -u "$path"`
38563     new_path=`$WHICH "$new_path" 2> /dev/null`
38564     # bat and cmd files are not always considered executable in cygwin causing which
38565     # to not find them
38566     if test "x$new_path" = x \
38567         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38568         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38569       new_path=`$CYGPATH -u "$path"`
38570     fi
38571     if test "x$new_path" = x; then
38572       # It's still not found. Now this is an unrecoverable error.
38573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38574 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38575       has_space=`$ECHO "$complete" | $GREP " "`
38576       if test "x$has_space" != x; then
38577         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38578 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38579       fi
38580       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38581     fi
38582   fi
38583 
38584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38587   # "foo.exe" is OK but "foo" is an error.
38588   #
38589   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38590   # It is also a way to make sure we got the proper file name for the real test later on.
38591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38592   if test "x$test_shortpath" = x; then
38593     # Short path failed, file does not exist as specified.
38594     # Try adding .exe or .cmd
38595     if test -f "${new_path}.exe"; then
38596       input_to_shortpath="${new_path}.exe"
38597     elif test -f "${new_path}.cmd"; then
38598       input_to_shortpath="${new_path}.cmd"
38599     else
38600       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38601 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38602       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38603 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38604       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38605     fi
38606   else
38607     input_to_shortpath="$new_path"
38608   fi
38609 
38610   # Call helper function which possibly converts this using DOS-style short mode.
38611   # If so, the updated path is stored in $new_path.
38612   new_path="$input_to_shortpath"
38613 
38614   input_path="$input_to_shortpath"
38615   # Check if we need to convert this using DOS-style short mode. If the path
38616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38617   # take no chances and rewrite it.
38618   # Note: m4 eats our [], so we need to use [ and ] instead.
38619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38620   if test "x$has_forbidden_chars" != x; then
38621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38625       # Going to short mode and back again did indeed matter. Since short mode is
38626       # case insensitive, let's make it lowercase to improve readability.
38627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38628       # Now convert it back to Unix-stile (cygpath)
38629       input_path=`$CYGPATH -u "$shortmode_path"`
38630       new_path="$input_path"
38631     fi
38632   fi
38633 
38634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38635   if test "x$test_cygdrive_prefix" = x; then
38636     # As a simple fix, exclude /usr/bin since it's not a real path.
38637     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38639       # a path prefixed by /cygdrive for fixpath to work.
38640       new_path="$CYGWIN_ROOT_PATH$input_path"
38641     fi
38642   fi
38643 
38644   # remove trailing .exe if any
38645   new_path="${new_path/%.exe/}"
38646 
38647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648 
38649   # First separate the path from the arguments. This will split at the first
38650   # space.
38651   complete="$OBJDUMP"
38652   path="${complete%% *}"
38653   tmp="$complete EOL"
38654   arguments="${tmp#* }"
38655 
38656   # Input might be given as Windows format, start by converting to
38657   # unix format.
38658   new_path="$path"
38659 
38660   windows_path="$new_path"
38661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38662     unix_path=`$CYGPATH -u "$windows_path"`
38663     new_path="$unix_path"
38664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38666     new_path="$unix_path"
38667   fi
38668 
38669 
38670   # Now try to locate executable using which
38671   new_path=`$WHICH "$new_path" 2> /dev/null`
38672 
38673   if test "x$new_path" = x; then
38674     # Oops. Which didn't find the executable.
38675     # The splitting of arguments from the executable at a space might have been incorrect,
38676     # since paths with space are more likely in Windows. Give it another try with the whole
38677     # argument.
38678     path="$complete"
38679     arguments="EOL"
38680     new_path="$path"
38681 
38682   windows_path="$new_path"
38683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38684     unix_path=`$CYGPATH -u "$windows_path"`
38685     new_path="$unix_path"
38686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38688     new_path="$unix_path"
38689   fi
38690 
38691 
38692     new_path=`$WHICH "$new_path" 2> /dev/null`
38693 
38694     if test "x$new_path" = x; then
38695       # It's still not found. Now this is an unrecoverable error.
38696       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38697 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38698       has_space=`$ECHO "$complete" | $GREP " "`
38699       if test "x$has_space" != x; then
38700         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38701 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38702       fi
38703       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38704     fi
38705   fi
38706 
38707   # Now new_path has a complete unix path to the binary
38708   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38709     # Keep paths in /bin as-is, but remove trailing .exe if any
38710     new_path="${new_path/%.exe/}"
38711     # Do not save /bin paths to all_fixpath_prefixes!
38712   else
38713     # Not in mixed or Windows style, start by that.
38714     new_path=`cmd //c echo $new_path`
38715 
38716   input_path="$new_path"
38717   # Check if we need to convert this using DOS-style short mode. If the path
38718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38719   # take no chances and rewrite it.
38720   # Note: m4 eats our [], so we need to use [ and ] instead.
38721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38722   if test "x$has_forbidden_chars" != x; then
38723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38725   fi
38726 
38727     # Output is in $new_path
38728 
38729   windows_path="$new_path"
38730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38731     unix_path=`$CYGPATH -u "$windows_path"`
38732     new_path="$unix_path"
38733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38735     new_path="$unix_path"
38736   fi
38737 
38738     # remove trailing .exe if any
38739     new_path="${new_path/%.exe/}"
38740 
38741     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38742     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38743   fi
38744 
38745   else
38746     # We're on a posix platform. Hooray! :)
38747     # First separate the path from the arguments. This will split at the first
38748     # space.
38749     complete="$OBJDUMP"
38750     path="${complete%% *}"
38751     tmp="$complete EOL"
38752     arguments="${tmp#* }"
38753 
38754     # Cannot rely on the command "which" here since it doesn't always work.
38755     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38756     if test -z "$is_absolute_path"; then
38757       # Path to executable is not absolute. Find it.
38758       IFS_save="$IFS"
38759       IFS=:
38760       for p in $PATH; do
38761         if test -f "$p/$path" && test -x "$p/$path"; then
38762           new_path="$p/$path"
38763           break
38764         fi
38765       done
38766       IFS="$IFS_save"
38767     else
38768       # This is an absolute path, we can use it without further modifications.
38769       new_path="$path"
38770     fi
38771 
38772     if test "x$new_path" = x; then
38773       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38774 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38775       has_space=`$ECHO "$complete" | $GREP " "`
38776       if test "x$has_space" != x; then
38777         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38778 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38779       fi
38780       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38781     fi
38782   fi
38783 
38784   # Now join together the path and the arguments once again
38785   if test "x$arguments" != xEOL; then
38786     new_complete="$new_path ${arguments% *}"
38787   else
38788     new_complete="$new_path"
38789   fi
38790 
38791   if test "x$complete" != "x$new_complete"; then
38792     OBJDUMP="$new_complete"
38793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38794 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38795   fi
38796 
38797   fi
38798 
38799 
38800   # Restore old path.
38801   PATH="$OLD_PATH"
38802 
38803   # Restore the flags to the user specified values.
38804   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38805   CFLAGS="$ORG_CFLAGS"
38806   CXXFLAGS="$ORG_CXXFLAGS"
38807   OBJCFLAGS="$ORG_OBJCFLAGS"
38808 
38809 
38810 # Finally do some processing after the detection phase
38811 
38812   if test "x$COMPILE_TYPE" = "xcross"; then
38813     # Now we need to find a C/C++ compiler that can build executables for the
38814     # build platform. We can't use the AC_PROG_CC macro, since it can only be
38815     # used once. Also, we need to do this without adding a tools dir to the
38816     # path, otherwise we might pick up cross-compilers which don't use standard
38817     # naming.
38818 
38819     # FIXME: we should list the discovered compilers as an exclude pattern!
38820     # If we do that, we can do this detection before POST_DETECTION, and still
38821     # find the build compilers in the tools dir, if needed.
38822 
38823 
38824   # Publish this variable in the help.
38825 
38826 
38827   if test "x$BUILD_CC" = x; then
38828     # The variable is not set by user, try to locate tool using the code snippet
38829     for ac_prog in cl cc gcc
38830 do
38831   # Extract the first word of "$ac_prog", so it can be a program name with args.
38832 set dummy $ac_prog; ac_word=$2
38833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38834 $as_echo_n "checking for $ac_word... " >&6; }
38835 if ${ac_cv_path_BUILD_CC+:} false; then :
38836   $as_echo_n "(cached) " >&6
38837 else
38838   case $BUILD_CC in
38839   [\\/]* | ?:[\\/]*)
38840   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38841   ;;
38842   *)
38843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38844 for as_dir in $PATH
38845 do
38846   IFS=$as_save_IFS
38847   test -z "$as_dir" && as_dir=.
38848     for ac_exec_ext in '' $ac_executable_extensions; do
38849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38850     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38852     break 2
38853   fi
38854 done
38855   done
38856 IFS=$as_save_IFS
38857 
38858   ;;
38859 esac
38860 fi
38861 BUILD_CC=$ac_cv_path_BUILD_CC
38862 if test -n "$BUILD_CC"; then
38863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38864 $as_echo "$BUILD_CC" >&6; }
38865 else
38866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38867 $as_echo "no" >&6; }
38868 fi
38869 
38870 
38871   test -n "$BUILD_CC" && break
38872 done
38873 
38874   else
38875     # The variable is set, but is it from the command line or the environment?
38876 
38877     # Try to remove the string !BUILD_CC! from our list.
38878     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38879     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38880       # If it failed, the variable was not from the command line. Ignore it,
38881       # but warn the user (except for BASH, which is always set by the calling BASH).
38882       if test "xBUILD_CC" != xBASH; then
38883         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38884 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38885       fi
38886       # Try to locate tool using the code snippet
38887       for ac_prog in cl cc gcc
38888 do
38889   # Extract the first word of "$ac_prog", so it can be a program name with args.
38890 set dummy $ac_prog; ac_word=$2
38891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38892 $as_echo_n "checking for $ac_word... " >&6; }
38893 if ${ac_cv_path_BUILD_CC+:} false; then :
38894   $as_echo_n "(cached) " >&6
38895 else
38896   case $BUILD_CC in
38897   [\\/]* | ?:[\\/]*)
38898   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38899   ;;
38900   *)
38901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38902 for as_dir in $PATH
38903 do
38904   IFS=$as_save_IFS
38905   test -z "$as_dir" && as_dir=.
38906     for ac_exec_ext in '' $ac_executable_extensions; do
38907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38908     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38910     break 2
38911   fi
38912 done
38913   done
38914 IFS=$as_save_IFS
38915 
38916   ;;
38917 esac
38918 fi
38919 BUILD_CC=$ac_cv_path_BUILD_CC
38920 if test -n "$BUILD_CC"; then
38921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38922 $as_echo "$BUILD_CC" >&6; }
38923 else
38924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38925 $as_echo "no" >&6; }
38926 fi
38927 
38928 
38929   test -n "$BUILD_CC" && break
38930 done
38931 
38932     else
38933       # If it succeeded, then it was overridden by the user. We will use it
38934       # for the tool.
38935 
38936       # First remove it from the list of overridden variables, so we can test
38937       # for unknown variables in the end.
38938       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38939 
38940       # Check if the provided tool contains a complete path.
38941       tool_specified="$BUILD_CC"
38942       tool_basename="${tool_specified##*/}"
38943       if test "x$tool_basename" = "x$tool_specified"; then
38944         # A command without a complete path is provided, search $PATH.
38945         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38946 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38947         # Extract the first word of "$tool_basename", so it can be a program name with args.
38948 set dummy $tool_basename; ac_word=$2
38949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38950 $as_echo_n "checking for $ac_word... " >&6; }
38951 if ${ac_cv_path_BUILD_CC+:} false; then :
38952   $as_echo_n "(cached) " >&6
38953 else
38954   case $BUILD_CC in
38955   [\\/]* | ?:[\\/]*)
38956   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38957   ;;
38958   *)
38959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38960 for as_dir in $PATH
38961 do
38962   IFS=$as_save_IFS
38963   test -z "$as_dir" && as_dir=.
38964     for ac_exec_ext in '' $ac_executable_extensions; do
38965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38966     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38968     break 2
38969   fi
38970 done
38971   done
38972 IFS=$as_save_IFS
38973 
38974   ;;
38975 esac
38976 fi
38977 BUILD_CC=$ac_cv_path_BUILD_CC
38978 if test -n "$BUILD_CC"; then
38979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38980 $as_echo "$BUILD_CC" >&6; }
38981 else
38982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38983 $as_echo "no" >&6; }
38984 fi
38985 
38986 
38987         if test "x$BUILD_CC" = x; then
38988           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38989         fi
38990       else
38991         # Otherwise we believe it is a complete path. Use it as it is.
38992         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38993 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38995 $as_echo_n "checking for BUILD_CC... " >&6; }
38996         if test ! -x "$tool_specified"; then
38997           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38998 $as_echo "not found" >&6; }
38999           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39000         fi
39001         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39002 $as_echo "$tool_specified" >&6; }
39003       fi
39004     fi
39005   fi
39006 
39007 
39008 
39009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39010 
39011   # First separate the path from the arguments. This will split at the first
39012   # space.
39013   complete="$BUILD_CC"
39014   path="${complete%% *}"
39015   tmp="$complete EOL"
39016   arguments="${tmp#* }"
39017 
39018   # Input might be given as Windows format, start by converting to
39019   # unix format.
39020   new_path=`$CYGPATH -u "$path"`
39021 
39022   # Now try to locate executable using which
39023   new_path=`$WHICH "$new_path" 2> /dev/null`
39024   # bat and cmd files are not always considered executable in cygwin causing which
39025   # to not find them
39026   if test "x$new_path" = x \
39027       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39028       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39029     new_path=`$CYGPATH -u "$path"`
39030   fi
39031   if test "x$new_path" = x; then
39032     # Oops. Which didn't find the executable.
39033     # The splitting of arguments from the executable at a space might have been incorrect,
39034     # since paths with space are more likely in Windows. Give it another try with the whole
39035     # argument.
39036     path="$complete"
39037     arguments="EOL"
39038     new_path=`$CYGPATH -u "$path"`
39039     new_path=`$WHICH "$new_path" 2> /dev/null`
39040     # bat and cmd files are not always considered executable in cygwin causing which
39041     # to not find them
39042     if test "x$new_path" = x \
39043         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39044         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39045       new_path=`$CYGPATH -u "$path"`
39046     fi
39047     if test "x$new_path" = x; then
39048       # It's still not found. Now this is an unrecoverable error.
39049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39050 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39051       has_space=`$ECHO "$complete" | $GREP " "`
39052       if test "x$has_space" != x; then
39053         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39054 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39055       fi
39056       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39057     fi
39058   fi
39059 
39060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39063   # "foo.exe" is OK but "foo" is an error.
39064   #
39065   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39066   # It is also a way to make sure we got the proper file name for the real test later on.
39067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39068   if test "x$test_shortpath" = x; then
39069     # Short path failed, file does not exist as specified.
39070     # Try adding .exe or .cmd
39071     if test -f "${new_path}.exe"; then
39072       input_to_shortpath="${new_path}.exe"
39073     elif test -f "${new_path}.cmd"; then
39074       input_to_shortpath="${new_path}.cmd"
39075     else
39076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39077 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39078       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39079 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39080       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39081     fi
39082   else
39083     input_to_shortpath="$new_path"
39084   fi
39085 
39086   # Call helper function which possibly converts this using DOS-style short mode.
39087   # If so, the updated path is stored in $new_path.
39088   new_path="$input_to_shortpath"
39089 
39090   input_path="$input_to_shortpath"
39091   # Check if we need to convert this using DOS-style short mode. If the path
39092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39093   # take no chances and rewrite it.
39094   # Note: m4 eats our [], so we need to use [ and ] instead.
39095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39096   if test "x$has_forbidden_chars" != x; then
39097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39098     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39099     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39100     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39101       # Going to short mode and back again did indeed matter. Since short mode is
39102       # case insensitive, let's make it lowercase to improve readability.
39103       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39104       # Now convert it back to Unix-stile (cygpath)
39105       input_path=`$CYGPATH -u "$shortmode_path"`
39106       new_path="$input_path"
39107     fi
39108   fi
39109 
39110   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39111   if test "x$test_cygdrive_prefix" = x; then
39112     # As a simple fix, exclude /usr/bin since it's not a real path.
39113     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39114       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39115       # a path prefixed by /cygdrive for fixpath to work.
39116       new_path="$CYGWIN_ROOT_PATH$input_path"
39117     fi
39118   fi
39119 
39120   # remove trailing .exe if any
39121   new_path="${new_path/%.exe/}"
39122 
39123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39124 
39125   # First separate the path from the arguments. This will split at the first
39126   # space.
39127   complete="$BUILD_CC"
39128   path="${complete%% *}"
39129   tmp="$complete EOL"
39130   arguments="${tmp#* }"
39131 
39132   # Input might be given as Windows format, start by converting to
39133   # unix format.
39134   new_path="$path"
39135 
39136   windows_path="$new_path"
39137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39138     unix_path=`$CYGPATH -u "$windows_path"`
39139     new_path="$unix_path"
39140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39142     new_path="$unix_path"
39143   fi
39144 
39145 
39146   # Now try to locate executable using which
39147   new_path=`$WHICH "$new_path" 2> /dev/null`
39148 
39149   if test "x$new_path" = x; then
39150     # Oops. Which didn't find the executable.
39151     # The splitting of arguments from the executable at a space might have been incorrect,
39152     # since paths with space are more likely in Windows. Give it another try with the whole
39153     # argument.
39154     path="$complete"
39155     arguments="EOL"
39156     new_path="$path"
39157 
39158   windows_path="$new_path"
39159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39160     unix_path=`$CYGPATH -u "$windows_path"`
39161     new_path="$unix_path"
39162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39164     new_path="$unix_path"
39165   fi
39166 
39167 
39168     new_path=`$WHICH "$new_path" 2> /dev/null`
39169 
39170     if test "x$new_path" = x; then
39171       # It's still not found. Now this is an unrecoverable error.
39172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39173 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39174       has_space=`$ECHO "$complete" | $GREP " "`
39175       if test "x$has_space" != x; then
39176         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39178       fi
39179       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39180     fi
39181   fi
39182 
39183   # Now new_path has a complete unix path to the binary
39184   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39185     # Keep paths in /bin as-is, but remove trailing .exe if any
39186     new_path="${new_path/%.exe/}"
39187     # Do not save /bin paths to all_fixpath_prefixes!
39188   else
39189     # Not in mixed or Windows style, start by that.
39190     new_path=`cmd //c echo $new_path`
39191 
39192   input_path="$new_path"
39193   # Check if we need to convert this using DOS-style short mode. If the path
39194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39195   # take no chances and rewrite it.
39196   # Note: m4 eats our [], so we need to use [ and ] instead.
39197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39198   if test "x$has_forbidden_chars" != x; then
39199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39200     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39201   fi
39202 
39203     # Output is in $new_path
39204 
39205   windows_path="$new_path"
39206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39207     unix_path=`$CYGPATH -u "$windows_path"`
39208     new_path="$unix_path"
39209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39211     new_path="$unix_path"
39212   fi
39213 
39214     # remove trailing .exe if any
39215     new_path="${new_path/%.exe/}"
39216 
39217     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39218     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39219   fi
39220 
39221   else
39222     # We're on a posix platform. Hooray! :)
39223     # First separate the path from the arguments. This will split at the first
39224     # space.
39225     complete="$BUILD_CC"
39226     path="${complete%% *}"
39227     tmp="$complete EOL"
39228     arguments="${tmp#* }"
39229 
39230     # Cannot rely on the command "which" here since it doesn't always work.
39231     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39232     if test -z "$is_absolute_path"; then
39233       # Path to executable is not absolute. Find it.
39234       IFS_save="$IFS"
39235       IFS=:
39236       for p in $PATH; do
39237         if test -f "$p/$path" && test -x "$p/$path"; then
39238           new_path="$p/$path"
39239           break
39240         fi
39241       done
39242       IFS="$IFS_save"
39243     else
39244       # This is an absolute path, we can use it without further modifications.
39245       new_path="$path"
39246     fi
39247 
39248     if test "x$new_path" = x; then
39249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39250 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39251       has_space=`$ECHO "$complete" | $GREP " "`
39252       if test "x$has_space" != x; then
39253         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39254 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39255       fi
39256       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39257     fi
39258   fi
39259 
39260   # Now join together the path and the arguments once again
39261   if test "x$arguments" != xEOL; then
39262     new_complete="$new_path ${arguments% *}"
39263   else
39264     new_complete="$new_path"
39265   fi
39266 
39267   if test "x$complete" != "x$new_complete"; then
39268     BUILD_CC="$new_complete"
39269     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39270 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39271   fi
39272 
39273 
39274 
39275   # Publish this variable in the help.
39276 
39277 
39278   if test "x$BUILD_CXX" = x; then
39279     # The variable is not set by user, try to locate tool using the code snippet
39280     for ac_prog in cl CC g++
39281 do
39282   # Extract the first word of "$ac_prog", so it can be a program name with args.
39283 set dummy $ac_prog; ac_word=$2
39284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39285 $as_echo_n "checking for $ac_word... " >&6; }
39286 if ${ac_cv_path_BUILD_CXX+:} false; then :
39287   $as_echo_n "(cached) " >&6
39288 else
39289   case $BUILD_CXX in
39290   [\\/]* | ?:[\\/]*)
39291   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39292   ;;
39293   *)
39294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39295 for as_dir in $PATH
39296 do
39297   IFS=$as_save_IFS
39298   test -z "$as_dir" && as_dir=.
39299     for ac_exec_ext in '' $ac_executable_extensions; do
39300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39301     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39303     break 2
39304   fi
39305 done
39306   done
39307 IFS=$as_save_IFS
39308 
39309   ;;
39310 esac
39311 fi
39312 BUILD_CXX=$ac_cv_path_BUILD_CXX
39313 if test -n "$BUILD_CXX"; then
39314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39315 $as_echo "$BUILD_CXX" >&6; }
39316 else
39317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39318 $as_echo "no" >&6; }
39319 fi
39320 
39321 
39322   test -n "$BUILD_CXX" && break
39323 done
39324 
39325   else
39326     # The variable is set, but is it from the command line or the environment?
39327 
39328     # Try to remove the string !BUILD_CXX! from our list.
39329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39331       # If it failed, the variable was not from the command line. Ignore it,
39332       # but warn the user (except for BASH, which is always set by the calling BASH).
39333       if test "xBUILD_CXX" != xBASH; then
39334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39335 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39336       fi
39337       # Try to locate tool using the code snippet
39338       for ac_prog in cl CC g++
39339 do
39340   # Extract the first word of "$ac_prog", so it can be a program name with args.
39341 set dummy $ac_prog; ac_word=$2
39342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39343 $as_echo_n "checking for $ac_word... " >&6; }
39344 if ${ac_cv_path_BUILD_CXX+:} false; then :
39345   $as_echo_n "(cached) " >&6
39346 else
39347   case $BUILD_CXX in
39348   [\\/]* | ?:[\\/]*)
39349   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39350   ;;
39351   *)
39352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39353 for as_dir in $PATH
39354 do
39355   IFS=$as_save_IFS
39356   test -z "$as_dir" && as_dir=.
39357     for ac_exec_ext in '' $ac_executable_extensions; do
39358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39359     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39361     break 2
39362   fi
39363 done
39364   done
39365 IFS=$as_save_IFS
39366 
39367   ;;
39368 esac
39369 fi
39370 BUILD_CXX=$ac_cv_path_BUILD_CXX
39371 if test -n "$BUILD_CXX"; then
39372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39373 $as_echo "$BUILD_CXX" >&6; }
39374 else
39375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39376 $as_echo "no" >&6; }
39377 fi
39378 
39379 
39380   test -n "$BUILD_CXX" && break
39381 done
39382 
39383     else
39384       # If it succeeded, then it was overridden by the user. We will use it
39385       # for the tool.
39386 
39387       # First remove it from the list of overridden variables, so we can test
39388       # for unknown variables in the end.
39389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39390 
39391       # Check if the provided tool contains a complete path.
39392       tool_specified="$BUILD_CXX"
39393       tool_basename="${tool_specified##*/}"
39394       if test "x$tool_basename" = "x$tool_specified"; then
39395         # A command without a complete path is provided, search $PATH.
39396         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39397 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39398         # Extract the first word of "$tool_basename", so it can be a program name with args.
39399 set dummy $tool_basename; ac_word=$2
39400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39401 $as_echo_n "checking for $ac_word... " >&6; }
39402 if ${ac_cv_path_BUILD_CXX+:} false; then :
39403   $as_echo_n "(cached) " >&6
39404 else
39405   case $BUILD_CXX in
39406   [\\/]* | ?:[\\/]*)
39407   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39408   ;;
39409   *)
39410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39411 for as_dir in $PATH
39412 do
39413   IFS=$as_save_IFS
39414   test -z "$as_dir" && as_dir=.
39415     for ac_exec_ext in '' $ac_executable_extensions; do
39416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39417     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39419     break 2
39420   fi
39421 done
39422   done
39423 IFS=$as_save_IFS
39424 
39425   ;;
39426 esac
39427 fi
39428 BUILD_CXX=$ac_cv_path_BUILD_CXX
39429 if test -n "$BUILD_CXX"; then
39430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39431 $as_echo "$BUILD_CXX" >&6; }
39432 else
39433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39434 $as_echo "no" >&6; }
39435 fi
39436 
39437 
39438         if test "x$BUILD_CXX" = x; then
39439           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39440         fi
39441       else
39442         # Otherwise we believe it is a complete path. Use it as it is.
39443         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39444 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39446 $as_echo_n "checking for BUILD_CXX... " >&6; }
39447         if test ! -x "$tool_specified"; then
39448           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39449 $as_echo "not found" >&6; }
39450           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39451         fi
39452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39453 $as_echo "$tool_specified" >&6; }
39454       fi
39455     fi
39456   fi
39457 
39458 
39459 
39460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39461 
39462   # First separate the path from the arguments. This will split at the first
39463   # space.
39464   complete="$BUILD_CXX"
39465   path="${complete%% *}"
39466   tmp="$complete EOL"
39467   arguments="${tmp#* }"
39468 
39469   # Input might be given as Windows format, start by converting to
39470   # unix format.
39471   new_path=`$CYGPATH -u "$path"`
39472 
39473   # Now try to locate executable using which
39474   new_path=`$WHICH "$new_path" 2> /dev/null`
39475   # bat and cmd files are not always considered executable in cygwin causing which
39476   # to not find them
39477   if test "x$new_path" = x \
39478       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39479       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39480     new_path=`$CYGPATH -u "$path"`
39481   fi
39482   if test "x$new_path" = x; then
39483     # Oops. Which didn't find the executable.
39484     # The splitting of arguments from the executable at a space might have been incorrect,
39485     # since paths with space are more likely in Windows. Give it another try with the whole
39486     # argument.
39487     path="$complete"
39488     arguments="EOL"
39489     new_path=`$CYGPATH -u "$path"`
39490     new_path=`$WHICH "$new_path" 2> /dev/null`
39491     # bat and cmd files are not always considered executable in cygwin causing which
39492     # to not find them
39493     if test "x$new_path" = x \
39494         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39495         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39496       new_path=`$CYGPATH -u "$path"`
39497     fi
39498     if test "x$new_path" = x; then
39499       # It's still not found. Now this is an unrecoverable error.
39500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39501 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39502       has_space=`$ECHO "$complete" | $GREP " "`
39503       if test "x$has_space" != x; then
39504         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39505 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39506       fi
39507       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39508     fi
39509   fi
39510 
39511   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39512   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39513   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39514   # "foo.exe" is OK but "foo" is an error.
39515   #
39516   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39517   # It is also a way to make sure we got the proper file name for the real test later on.
39518   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39519   if test "x$test_shortpath" = x; then
39520     # Short path failed, file does not exist as specified.
39521     # Try adding .exe or .cmd
39522     if test -f "${new_path}.exe"; then
39523       input_to_shortpath="${new_path}.exe"
39524     elif test -f "${new_path}.cmd"; then
39525       input_to_shortpath="${new_path}.cmd"
39526     else
39527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39528 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39529       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39530 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39531       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39532     fi
39533   else
39534     input_to_shortpath="$new_path"
39535   fi
39536 
39537   # Call helper function which possibly converts this using DOS-style short mode.
39538   # If so, the updated path is stored in $new_path.
39539   new_path="$input_to_shortpath"
39540 
39541   input_path="$input_to_shortpath"
39542   # Check if we need to convert this using DOS-style short mode. If the path
39543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39544   # take no chances and rewrite it.
39545   # Note: m4 eats our [], so we need to use [ and ] instead.
39546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39547   if test "x$has_forbidden_chars" != x; then
39548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39552       # Going to short mode and back again did indeed matter. Since short mode is
39553       # case insensitive, let's make it lowercase to improve readability.
39554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39555       # Now convert it back to Unix-stile (cygpath)
39556       input_path=`$CYGPATH -u "$shortmode_path"`
39557       new_path="$input_path"
39558     fi
39559   fi
39560 
39561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39562   if test "x$test_cygdrive_prefix" = x; then
39563     # As a simple fix, exclude /usr/bin since it's not a real path.
39564     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39566       # a path prefixed by /cygdrive for fixpath to work.
39567       new_path="$CYGWIN_ROOT_PATH$input_path"
39568     fi
39569   fi
39570 
39571   # remove trailing .exe if any
39572   new_path="${new_path/%.exe/}"
39573 
39574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39575 
39576   # First separate the path from the arguments. This will split at the first
39577   # space.
39578   complete="$BUILD_CXX"
39579   path="${complete%% *}"
39580   tmp="$complete EOL"
39581   arguments="${tmp#* }"
39582 
39583   # Input might be given as Windows format, start by converting to
39584   # unix format.
39585   new_path="$path"
39586 
39587   windows_path="$new_path"
39588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39589     unix_path=`$CYGPATH -u "$windows_path"`
39590     new_path="$unix_path"
39591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39593     new_path="$unix_path"
39594   fi
39595 
39596 
39597   # Now try to locate executable using which
39598   new_path=`$WHICH "$new_path" 2> /dev/null`
39599 
39600   if test "x$new_path" = x; then
39601     # Oops. Which didn't find the executable.
39602     # The splitting of arguments from the executable at a space might have been incorrect,
39603     # since paths with space are more likely in Windows. Give it another try with the whole
39604     # argument.
39605     path="$complete"
39606     arguments="EOL"
39607     new_path="$path"
39608 
39609   windows_path="$new_path"
39610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39611     unix_path=`$CYGPATH -u "$windows_path"`
39612     new_path="$unix_path"
39613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39615     new_path="$unix_path"
39616   fi
39617 
39618 
39619     new_path=`$WHICH "$new_path" 2> /dev/null`
39620 
39621     if test "x$new_path" = x; then
39622       # It's still not found. Now this is an unrecoverable error.
39623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39624 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39625       has_space=`$ECHO "$complete" | $GREP " "`
39626       if test "x$has_space" != x; then
39627         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39628 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39629       fi
39630       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39631     fi
39632   fi
39633 
39634   # Now new_path has a complete unix path to the binary
39635   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39636     # Keep paths in /bin as-is, but remove trailing .exe if any
39637     new_path="${new_path/%.exe/}"
39638     # Do not save /bin paths to all_fixpath_prefixes!
39639   else
39640     # Not in mixed or Windows style, start by that.
39641     new_path=`cmd //c echo $new_path`
39642 
39643   input_path="$new_path"
39644   # Check if we need to convert this using DOS-style short mode. If the path
39645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39646   # take no chances and rewrite it.
39647   # Note: m4 eats our [], so we need to use [ and ] instead.
39648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39649   if test "x$has_forbidden_chars" != x; then
39650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39651     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39652   fi
39653 
39654     # Output is in $new_path
39655 
39656   windows_path="$new_path"
39657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39658     unix_path=`$CYGPATH -u "$windows_path"`
39659     new_path="$unix_path"
39660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39662     new_path="$unix_path"
39663   fi
39664 
39665     # remove trailing .exe if any
39666     new_path="${new_path/%.exe/}"
39667 
39668     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39669     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39670   fi
39671 
39672   else
39673     # We're on a posix platform. Hooray! :)
39674     # First separate the path from the arguments. This will split at the first
39675     # space.
39676     complete="$BUILD_CXX"
39677     path="${complete%% *}"
39678     tmp="$complete EOL"
39679     arguments="${tmp#* }"
39680 
39681     # Cannot rely on the command "which" here since it doesn't always work.
39682     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39683     if test -z "$is_absolute_path"; then
39684       # Path to executable is not absolute. Find it.
39685       IFS_save="$IFS"
39686       IFS=:
39687       for p in $PATH; do
39688         if test -f "$p/$path" && test -x "$p/$path"; then
39689           new_path="$p/$path"
39690           break
39691         fi
39692       done
39693       IFS="$IFS_save"
39694     else
39695       # This is an absolute path, we can use it without further modifications.
39696       new_path="$path"
39697     fi
39698 
39699     if test "x$new_path" = x; then
39700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39701 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39702       has_space=`$ECHO "$complete" | $GREP " "`
39703       if test "x$has_space" != x; then
39704         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39705 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39706       fi
39707       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39708     fi
39709   fi
39710 
39711   # Now join together the path and the arguments once again
39712   if test "x$arguments" != xEOL; then
39713     new_complete="$new_path ${arguments% *}"
39714   else
39715     new_complete="$new_path"
39716   fi
39717 
39718   if test "x$complete" != "x$new_complete"; then
39719     BUILD_CXX="$new_complete"
39720     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39721 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39722   fi
39723 
39724 
39725 
39726   # Publish this variable in the help.
39727 
39728 
39729   if test "x$BUILD_LD" = x; then
39730     # The variable is not set by user, try to locate tool using the code snippet
39731     for ac_prog in ld
39732 do
39733   # Extract the first word of "$ac_prog", so it can be a program name with args.
39734 set dummy $ac_prog; ac_word=$2
39735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39736 $as_echo_n "checking for $ac_word... " >&6; }
39737 if ${ac_cv_path_BUILD_LD+:} false; then :
39738   $as_echo_n "(cached) " >&6
39739 else
39740   case $BUILD_LD in
39741   [\\/]* | ?:[\\/]*)
39742   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39743   ;;
39744   *)
39745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39746 for as_dir in $PATH
39747 do
39748   IFS=$as_save_IFS
39749   test -z "$as_dir" && as_dir=.
39750     for ac_exec_ext in '' $ac_executable_extensions; do
39751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39752     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39754     break 2
39755   fi
39756 done
39757   done
39758 IFS=$as_save_IFS
39759 
39760   ;;
39761 esac
39762 fi
39763 BUILD_LD=$ac_cv_path_BUILD_LD
39764 if test -n "$BUILD_LD"; then
39765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39766 $as_echo "$BUILD_LD" >&6; }
39767 else
39768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39769 $as_echo "no" >&6; }
39770 fi
39771 
39772 
39773   test -n "$BUILD_LD" && break
39774 done
39775 
39776   else
39777     # The variable is set, but is it from the command line or the environment?
39778 
39779     # Try to remove the string !BUILD_LD! from our list.
39780     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39781     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39782       # If it failed, the variable was not from the command line. Ignore it,
39783       # but warn the user (except for BASH, which is always set by the calling BASH).
39784       if test "xBUILD_LD" != xBASH; then
39785         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39786 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39787       fi
39788       # Try to locate tool using the code snippet
39789       for ac_prog in ld
39790 do
39791   # Extract the first word of "$ac_prog", so it can be a program name with args.
39792 set dummy $ac_prog; ac_word=$2
39793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39794 $as_echo_n "checking for $ac_word... " >&6; }
39795 if ${ac_cv_path_BUILD_LD+:} false; then :
39796   $as_echo_n "(cached) " >&6
39797 else
39798   case $BUILD_LD in
39799   [\\/]* | ?:[\\/]*)
39800   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39801   ;;
39802   *)
39803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39804 for as_dir in $PATH
39805 do
39806   IFS=$as_save_IFS
39807   test -z "$as_dir" && as_dir=.
39808     for ac_exec_ext in '' $ac_executable_extensions; do
39809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39810     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39812     break 2
39813   fi
39814 done
39815   done
39816 IFS=$as_save_IFS
39817 
39818   ;;
39819 esac
39820 fi
39821 BUILD_LD=$ac_cv_path_BUILD_LD
39822 if test -n "$BUILD_LD"; then
39823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39824 $as_echo "$BUILD_LD" >&6; }
39825 else
39826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39827 $as_echo "no" >&6; }
39828 fi
39829 
39830 
39831   test -n "$BUILD_LD" && break
39832 done
39833 
39834     else
39835       # If it succeeded, then it was overridden by the user. We will use it
39836       # for the tool.
39837 
39838       # First remove it from the list of overridden variables, so we can test
39839       # for unknown variables in the end.
39840       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39841 
39842       # Check if the provided tool contains a complete path.
39843       tool_specified="$BUILD_LD"
39844       tool_basename="${tool_specified##*/}"
39845       if test "x$tool_basename" = "x$tool_specified"; then
39846         # A command without a complete path is provided, search $PATH.
39847         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39848 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39849         # Extract the first word of "$tool_basename", so it can be a program name with args.
39850 set dummy $tool_basename; ac_word=$2
39851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39852 $as_echo_n "checking for $ac_word... " >&6; }
39853 if ${ac_cv_path_BUILD_LD+:} false; then :
39854   $as_echo_n "(cached) " >&6
39855 else
39856   case $BUILD_LD in
39857   [\\/]* | ?:[\\/]*)
39858   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39859   ;;
39860   *)
39861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39862 for as_dir in $PATH
39863 do
39864   IFS=$as_save_IFS
39865   test -z "$as_dir" && as_dir=.
39866     for ac_exec_ext in '' $ac_executable_extensions; do
39867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39868     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39870     break 2
39871   fi
39872 done
39873   done
39874 IFS=$as_save_IFS
39875 
39876   ;;
39877 esac
39878 fi
39879 BUILD_LD=$ac_cv_path_BUILD_LD
39880 if test -n "$BUILD_LD"; then
39881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39882 $as_echo "$BUILD_LD" >&6; }
39883 else
39884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39885 $as_echo "no" >&6; }
39886 fi
39887 
39888 
39889         if test "x$BUILD_LD" = x; then
39890           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39891         fi
39892       else
39893         # Otherwise we believe it is a complete path. Use it as it is.
39894         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39895 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39897 $as_echo_n "checking for BUILD_LD... " >&6; }
39898         if test ! -x "$tool_specified"; then
39899           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39900 $as_echo "not found" >&6; }
39901           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39902         fi
39903         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39904 $as_echo "$tool_specified" >&6; }
39905       fi
39906     fi
39907   fi
39908 
39909 
39910 
39911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39912 
39913   # First separate the path from the arguments. This will split at the first
39914   # space.
39915   complete="$BUILD_LD"
39916   path="${complete%% *}"
39917   tmp="$complete EOL"
39918   arguments="${tmp#* }"
39919 
39920   # Input might be given as Windows format, start by converting to
39921   # unix format.
39922   new_path=`$CYGPATH -u "$path"`
39923 
39924   # Now try to locate executable using which
39925   new_path=`$WHICH "$new_path" 2> /dev/null`
39926   # bat and cmd files are not always considered executable in cygwin causing which
39927   # to not find them
39928   if test "x$new_path" = x \
39929       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39930       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39931     new_path=`$CYGPATH -u "$path"`
39932   fi
39933   if test "x$new_path" = x; then
39934     # Oops. Which didn't find the executable.
39935     # The splitting of arguments from the executable at a space might have been incorrect,
39936     # since paths with space are more likely in Windows. Give it another try with the whole
39937     # argument.
39938     path="$complete"
39939     arguments="EOL"
39940     new_path=`$CYGPATH -u "$path"`
39941     new_path=`$WHICH "$new_path" 2> /dev/null`
39942     # bat and cmd files are not always considered executable in cygwin causing which
39943     # to not find them
39944     if test "x$new_path" = x \
39945         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39946         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39947       new_path=`$CYGPATH -u "$path"`
39948     fi
39949     if test "x$new_path" = x; then
39950       # It's still not found. Now this is an unrecoverable error.
39951       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39952 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39953       has_space=`$ECHO "$complete" | $GREP " "`
39954       if test "x$has_space" != x; then
39955         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39956 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39957       fi
39958       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39959     fi
39960   fi
39961 
39962   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39963   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39964   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39965   # "foo.exe" is OK but "foo" is an error.
39966   #
39967   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39968   # It is also a way to make sure we got the proper file name for the real test later on.
39969   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39970   if test "x$test_shortpath" = x; then
39971     # Short path failed, file does not exist as specified.
39972     # Try adding .exe or .cmd
39973     if test -f "${new_path}.exe"; then
39974       input_to_shortpath="${new_path}.exe"
39975     elif test -f "${new_path}.cmd"; then
39976       input_to_shortpath="${new_path}.cmd"
39977     else
39978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39979 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39980       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39981 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39982       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39983     fi
39984   else
39985     input_to_shortpath="$new_path"
39986   fi
39987 
39988   # Call helper function which possibly converts this using DOS-style short mode.
39989   # If so, the updated path is stored in $new_path.
39990   new_path="$input_to_shortpath"
39991 
39992   input_path="$input_to_shortpath"
39993   # Check if we need to convert this using DOS-style short mode. If the path
39994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39995   # take no chances and rewrite it.
39996   # Note: m4 eats our [], so we need to use [ and ] instead.
39997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39998   if test "x$has_forbidden_chars" != x; then
39999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40000     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40001     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40002     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40003       # Going to short mode and back again did indeed matter. Since short mode is
40004       # case insensitive, let's make it lowercase to improve readability.
40005       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40006       # Now convert it back to Unix-stile (cygpath)
40007       input_path=`$CYGPATH -u "$shortmode_path"`
40008       new_path="$input_path"
40009     fi
40010   fi
40011 
40012   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40013   if test "x$test_cygdrive_prefix" = x; then
40014     # As a simple fix, exclude /usr/bin since it's not a real path.
40015     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40016       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40017       # a path prefixed by /cygdrive for fixpath to work.
40018       new_path="$CYGWIN_ROOT_PATH$input_path"
40019     fi
40020   fi
40021 
40022   # remove trailing .exe if any
40023   new_path="${new_path/%.exe/}"
40024 
40025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40026 
40027   # First separate the path from the arguments. This will split at the first
40028   # space.
40029   complete="$BUILD_LD"
40030   path="${complete%% *}"
40031   tmp="$complete EOL"
40032   arguments="${tmp#* }"
40033 
40034   # Input might be given as Windows format, start by converting to
40035   # unix format.
40036   new_path="$path"
40037 
40038   windows_path="$new_path"
40039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40040     unix_path=`$CYGPATH -u "$windows_path"`
40041     new_path="$unix_path"
40042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40044     new_path="$unix_path"
40045   fi
40046 
40047 
40048   # Now try to locate executable using which
40049   new_path=`$WHICH "$new_path" 2> /dev/null`
40050 
40051   if test "x$new_path" = x; then
40052     # Oops. Which didn't find the executable.
40053     # The splitting of arguments from the executable at a space might have been incorrect,
40054     # since paths with space are more likely in Windows. Give it another try with the whole
40055     # argument.
40056     path="$complete"
40057     arguments="EOL"
40058     new_path="$path"
40059 
40060   windows_path="$new_path"
40061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40062     unix_path=`$CYGPATH -u "$windows_path"`
40063     new_path="$unix_path"
40064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40066     new_path="$unix_path"
40067   fi
40068 
40069 
40070     new_path=`$WHICH "$new_path" 2> /dev/null`
40071 
40072     if test "x$new_path" = x; then
40073       # It's still not found. Now this is an unrecoverable error.
40074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40075 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40076       has_space=`$ECHO "$complete" | $GREP " "`
40077       if test "x$has_space" != x; then
40078         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40079 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40080       fi
40081       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40082     fi
40083   fi
40084 
40085   # Now new_path has a complete unix path to the binary
40086   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40087     # Keep paths in /bin as-is, but remove trailing .exe if any
40088     new_path="${new_path/%.exe/}"
40089     # Do not save /bin paths to all_fixpath_prefixes!
40090   else
40091     # Not in mixed or Windows style, start by that.
40092     new_path=`cmd //c echo $new_path`
40093 
40094   input_path="$new_path"
40095   # Check if we need to convert this using DOS-style short mode. If the path
40096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40097   # take no chances and rewrite it.
40098   # Note: m4 eats our [], so we need to use [ and ] instead.
40099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40100   if test "x$has_forbidden_chars" != x; then
40101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40102     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40103   fi
40104 
40105     # Output is in $new_path
40106 
40107   windows_path="$new_path"
40108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40109     unix_path=`$CYGPATH -u "$windows_path"`
40110     new_path="$unix_path"
40111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40112     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40113     new_path="$unix_path"
40114   fi
40115 
40116     # remove trailing .exe if any
40117     new_path="${new_path/%.exe/}"
40118 
40119     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40120     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40121   fi
40122 
40123   else
40124     # We're on a posix platform. Hooray! :)
40125     # First separate the path from the arguments. This will split at the first
40126     # space.
40127     complete="$BUILD_LD"
40128     path="${complete%% *}"
40129     tmp="$complete EOL"
40130     arguments="${tmp#* }"
40131 
40132     # Cannot rely on the command "which" here since it doesn't always work.
40133     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40134     if test -z "$is_absolute_path"; then
40135       # Path to executable is not absolute. Find it.
40136       IFS_save="$IFS"
40137       IFS=:
40138       for p in $PATH; do
40139         if test -f "$p/$path" && test -x "$p/$path"; then
40140           new_path="$p/$path"
40141           break
40142         fi
40143       done
40144       IFS="$IFS_save"
40145     else
40146       # This is an absolute path, we can use it without further modifications.
40147       new_path="$path"
40148     fi
40149 
40150     if test "x$new_path" = x; then
40151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40152 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40153       has_space=`$ECHO "$complete" | $GREP " "`
40154       if test "x$has_space" != x; then
40155         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40156 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40157       fi
40158       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40159     fi
40160   fi
40161 
40162   # Now join together the path and the arguments once again
40163   if test "x$arguments" != xEOL; then
40164     new_complete="$new_path ${arguments% *}"
40165   else
40166     new_complete="$new_path"
40167   fi
40168 
40169   if test "x$complete" != "x$new_complete"; then
40170     BUILD_LD="$new_complete"
40171     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40172 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40173   fi
40174 
40175   else
40176     # If we are not cross compiling, use the normal target compilers for
40177     # building the build platform executables.
40178     BUILD_CC="$CC"
40179     BUILD_CXX="$CXX"
40180     BUILD_LD="$LD"
40181   fi
40182 
40183 
40184 
40185 
40186 
40187 
40188   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40189     # For hotspot, we need these in Windows mixed path,
40190     # so rewrite them all. Need added .exe suffix.
40191     HOTSPOT_CXX="$CXX.exe"
40192     HOTSPOT_LD="$LD.exe"
40193     HOTSPOT_MT="$MT.exe"
40194     HOTSPOT_RC="$RC.exe"
40195 
40196   unix_path="$HOTSPOT_CXX"
40197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40198     windows_path=`$CYGPATH -m "$unix_path"`
40199     HOTSPOT_CXX="$windows_path"
40200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201     windows_path=`cmd //c echo $unix_path`
40202     HOTSPOT_CXX="$windows_path"
40203   fi
40204 
40205 
40206   unix_path="$HOTSPOT_LD"
40207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40208     windows_path=`$CYGPATH -m "$unix_path"`
40209     HOTSPOT_LD="$windows_path"
40210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40211     windows_path=`cmd //c echo $unix_path`
40212     HOTSPOT_LD="$windows_path"
40213   fi
40214 
40215 
40216   unix_path="$HOTSPOT_MT"
40217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40218     windows_path=`$CYGPATH -m "$unix_path"`
40219     HOTSPOT_MT="$windows_path"
40220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40221     windows_path=`cmd //c echo $unix_path`
40222     HOTSPOT_MT="$windows_path"
40223   fi
40224 
40225 
40226   unix_path="$HOTSPOT_RC"
40227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228     windows_path=`$CYGPATH -m "$unix_path"`
40229     HOTSPOT_RC="$windows_path"
40230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231     windows_path=`cmd //c echo $unix_path`
40232     HOTSPOT_RC="$windows_path"
40233   fi
40234 
40235 
40236 
40237   else
40238     HOTSPOT_CXX="$CXX"
40239     HOTSPOT_LD="$LD"
40240   fi
40241 
40242 
40243 
40244   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40245     USE_CLANG=true
40246   fi
40247 
40248 
40249   # LDEXE is the linker to use, when creating executables. Not really used.
40250   # FIXME: These should just be removed!
40251   LDEXE="$LD"
40252   LDEXECXX="$LDCXX"
40253 
40254 
40255 
40256 
40257   # The package path is used only on macosx?
40258   # FIXME: clean this up, and/or move it elsewhere.
40259   PACKAGE_PATH=/opt/local
40260 
40261 
40262   # Check for extra potential brokenness.
40263   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40264     # On Windows, double-check that we got the right compiler.
40265     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40266     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40267     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40268       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40269         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40270       fi
40271     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40272       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40273         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40274       fi
40275     fi
40276   fi
40277 
40278   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40279     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40280     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40281     # This is later checked when setting flags.
40282   fi
40283 
40284   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40285   # in executable.'
40286   USING_BROKEN_SUSE_LD=no
40287   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40288     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40289 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40290     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40291     echo "int main() { }" > main.c
40292     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40293       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40294 $as_echo "no" >&6; }
40295       USING_BROKEN_SUSE_LD=no
40296     else
40297       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40298 $as_echo "yes" >&6; }
40299       USING_BROKEN_SUSE_LD=yes
40300     fi
40301     rm -rf version-script.map main.c a.out
40302   fi
40303 
40304 
40305 
40306 # Setup the JTReg Regression Test Harness.
40307 
40308 
40309 # Check whether --with-jtreg was given.
40310 if test "${with_jtreg+set}" = set; then :
40311   withval=$with_jtreg;
40312 else
40313   with_jtreg=no
40314 fi
40315 
40316 
40317   if test "x$with_jtreg" = xno; then
40318     # jtreg disabled
40319     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40320 $as_echo_n "checking for jtreg... " >&6; }
40321     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40322 $as_echo "no" >&6; }
40323   else
40324     if test "x$with_jtreg" != xyes; then
40325       # with path specified.
40326       JT_HOME="$with_jtreg"
40327     fi
40328 
40329     if test "x$JT_HOME" != x; then
40330       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40331 $as_echo_n "checking for jtreg... " >&6; }
40332 
40333       # use JT_HOME enviroment var.
40334 
40335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40336 
40337   # Input might be given as Windows format, start by converting to
40338   # unix format.
40339   path="$JT_HOME"
40340   new_path=`$CYGPATH -u "$path"`
40341 
40342   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40343   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40344   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40345   # "foo.exe" is OK but "foo" is an error.
40346   #
40347   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40348   # It is also a way to make sure we got the proper file name for the real test later on.
40349   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40350   if test "x$test_shortpath" = x; then
40351     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40352 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40353     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40354   fi
40355 
40356   # Call helper function which possibly converts this using DOS-style short mode.
40357   # If so, the updated path is stored in $new_path.
40358 
40359   input_path="$new_path"
40360   # Check if we need to convert this using DOS-style short mode. If the path
40361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40362   # take no chances and rewrite it.
40363   # Note: m4 eats our [], so we need to use [ and ] instead.
40364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40365   if test "x$has_forbidden_chars" != x; then
40366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40367     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40368     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40369     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40370       # Going to short mode and back again did indeed matter. Since short mode is
40371       # case insensitive, let's make it lowercase to improve readability.
40372       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40373       # Now convert it back to Unix-stile (cygpath)
40374       input_path=`$CYGPATH -u "$shortmode_path"`
40375       new_path="$input_path"
40376     fi
40377   fi
40378 
40379   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40380   if test "x$test_cygdrive_prefix" = x; then
40381     # As a simple fix, exclude /usr/bin since it's not a real path.
40382     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40383       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40384       # a path prefixed by /cygdrive for fixpath to work.
40385       new_path="$CYGWIN_ROOT_PATH$input_path"
40386     fi
40387   fi
40388 
40389 
40390   if test "x$path" != "x$new_path"; then
40391     JT_HOME="$new_path"
40392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40393 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40394   fi
40395 
40396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40397 
40398   path="$JT_HOME"
40399   has_colon=`$ECHO $path | $GREP ^.:`
40400   new_path="$path"
40401   if test "x$has_colon" = x; then
40402     # Not in mixed or Windows style, start by that.
40403     new_path=`cmd //c echo $path`
40404   fi
40405 
40406 
40407   input_path="$new_path"
40408   # Check if we need to convert this using DOS-style short mode. If the path
40409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40410   # take no chances and rewrite it.
40411   # Note: m4 eats our [], so we need to use [ and ] instead.
40412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40413   if test "x$has_forbidden_chars" != x; then
40414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40415     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40416   fi
40417 
40418 
40419   windows_path="$new_path"
40420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40421     unix_path=`$CYGPATH -u "$windows_path"`
40422     new_path="$unix_path"
40423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40425     new_path="$unix_path"
40426   fi
40427 
40428   if test "x$path" != "x$new_path"; then
40429     JT_HOME="$new_path"
40430     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40431 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40432   fi
40433 
40434   # Save the first 10 bytes of this path to the storage, so fixpath can work.
40435   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40436 
40437   else
40438     # We're on a posix platform. Hooray! :)
40439     path="$JT_HOME"
40440     has_space=`$ECHO "$path" | $GREP " "`
40441     if test "x$has_space" != x; then
40442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40443 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40444       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40445     fi
40446 
40447     # Use eval to expand a potential ~
40448     eval path="$path"
40449     if test ! -f "$path" && test ! -d "$path"; then
40450       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40451     fi
40452 
40453     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40454   fi
40455 
40456 
40457       # jtreg win32 script works for everybody
40458       JTREGEXE="$JT_HOME/win32/bin/jtreg"
40459 
40460       if test ! -f "$JTREGEXE"; then
40461         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40462       fi
40463 
40464       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40465 $as_echo "$JTREGEXE" >&6; }
40466     else
40467       # try to find jtreg on path
40468 
40469 
40470 
40471   # Publish this variable in the help.
40472 
40473 
40474   if test "x$JTREGEXE" = x; then
40475     # The variable is not set by user, try to locate tool using the code snippet
40476     for ac_prog in jtreg
40477 do
40478   # Extract the first word of "$ac_prog", so it can be a program name with args.
40479 set dummy $ac_prog; ac_word=$2
40480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40481 $as_echo_n "checking for $ac_word... " >&6; }
40482 if ${ac_cv_path_JTREGEXE+:} false; then :
40483   $as_echo_n "(cached) " >&6
40484 else
40485   case $JTREGEXE in
40486   [\\/]* | ?:[\\/]*)
40487   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40488   ;;
40489   *)
40490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40491 for as_dir in $PATH
40492 do
40493   IFS=$as_save_IFS
40494   test -z "$as_dir" && as_dir=.
40495     for ac_exec_ext in '' $ac_executable_extensions; do
40496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40497     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40499     break 2
40500   fi
40501 done
40502   done
40503 IFS=$as_save_IFS
40504 
40505   ;;
40506 esac
40507 fi
40508 JTREGEXE=$ac_cv_path_JTREGEXE
40509 if test -n "$JTREGEXE"; then
40510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40511 $as_echo "$JTREGEXE" >&6; }
40512 else
40513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40514 $as_echo "no" >&6; }
40515 fi
40516 
40517 
40518   test -n "$JTREGEXE" && break
40519 done
40520 
40521   else
40522     # The variable is set, but is it from the command line or the environment?
40523 
40524     # Try to remove the string !JTREGEXE! from our list.
40525     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40526     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40527       # If it failed, the variable was not from the command line. Ignore it,
40528       # but warn the user (except for BASH, which is always set by the calling BASH).
40529       if test "xJTREGEXE" != xBASH; then
40530         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40531 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40532       fi
40533       # Try to locate tool using the code snippet
40534       for ac_prog in jtreg
40535 do
40536   # Extract the first word of "$ac_prog", so it can be a program name with args.
40537 set dummy $ac_prog; ac_word=$2
40538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40539 $as_echo_n "checking for $ac_word... " >&6; }
40540 if ${ac_cv_path_JTREGEXE+:} false; then :
40541   $as_echo_n "(cached) " >&6
40542 else
40543   case $JTREGEXE in
40544   [\\/]* | ?:[\\/]*)
40545   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40546   ;;
40547   *)
40548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40549 for as_dir in $PATH
40550 do
40551   IFS=$as_save_IFS
40552   test -z "$as_dir" && as_dir=.
40553     for ac_exec_ext in '' $ac_executable_extensions; do
40554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40555     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40557     break 2
40558   fi
40559 done
40560   done
40561 IFS=$as_save_IFS
40562 
40563   ;;
40564 esac
40565 fi
40566 JTREGEXE=$ac_cv_path_JTREGEXE
40567 if test -n "$JTREGEXE"; then
40568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40569 $as_echo "$JTREGEXE" >&6; }
40570 else
40571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40572 $as_echo "no" >&6; }
40573 fi
40574 
40575 
40576   test -n "$JTREGEXE" && break
40577 done
40578 
40579     else
40580       # If it succeeded, then it was overridden by the user. We will use it
40581       # for the tool.
40582 
40583       # First remove it from the list of overridden variables, so we can test
40584       # for unknown variables in the end.
40585       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40586 
40587       # Check if the provided tool contains a complete path.
40588       tool_specified="$JTREGEXE"
40589       tool_basename="${tool_specified##*/}"
40590       if test "x$tool_basename" = "x$tool_specified"; then
40591         # A command without a complete path is provided, search $PATH.
40592         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40593 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40594         # Extract the first word of "$tool_basename", so it can be a program name with args.
40595 set dummy $tool_basename; ac_word=$2
40596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40597 $as_echo_n "checking for $ac_word... " >&6; }
40598 if ${ac_cv_path_JTREGEXE+:} false; then :
40599   $as_echo_n "(cached) " >&6
40600 else
40601   case $JTREGEXE in
40602   [\\/]* | ?:[\\/]*)
40603   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40604   ;;
40605   *)
40606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40607 for as_dir in $PATH
40608 do
40609   IFS=$as_save_IFS
40610   test -z "$as_dir" && as_dir=.
40611     for ac_exec_ext in '' $ac_executable_extensions; do
40612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40613     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40615     break 2
40616   fi
40617 done
40618   done
40619 IFS=$as_save_IFS
40620 
40621   ;;
40622 esac
40623 fi
40624 JTREGEXE=$ac_cv_path_JTREGEXE
40625 if test -n "$JTREGEXE"; then
40626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40627 $as_echo "$JTREGEXE" >&6; }
40628 else
40629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40630 $as_echo "no" >&6; }
40631 fi
40632 
40633 
40634         if test "x$JTREGEXE" = x; then
40635           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40636         fi
40637       else
40638         # Otherwise we believe it is a complete path. Use it as it is.
40639         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40640 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40641         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40642 $as_echo_n "checking for JTREGEXE... " >&6; }
40643         if test ! -x "$tool_specified"; then
40644           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40645 $as_echo "not found" >&6; }
40646           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40647         fi
40648         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40649 $as_echo "$tool_specified" >&6; }
40650       fi
40651     fi
40652   fi
40653 
40654 
40655 
40656   if test "x$JTREGEXE" = x; then
40657     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40658   fi
40659 
40660 
40661       JT_HOME="`$DIRNAME $JTREGEXE`"
40662     fi
40663   fi
40664 
40665 
40666 
40667 
40668 
40669 
40670   # Option used to tell the compiler whether to create 32- or 64-bit executables
40671   if test "x$TOOLCHAIN_TYPE" = xxlc; then
40672     COMPILER_TARGET_BITS_FLAG="-q"
40673   else
40674     COMPILER_TARGET_BITS_FLAG="-m"
40675   fi
40676 
40677 
40678   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40679   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40680     ARFLAGS="-r"
40681   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40682     ARFLAGS="-X64"
40683   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40684     # lib.exe is used as AR to create static libraries.
40685     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40686   else
40687     ARFLAGS=""
40688   fi
40689 
40690 
40691   ## Setup strip.
40692   # FIXME: should this really be per platform, or should it be per toolchain type?
40693   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40694   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40695   if test "x$OPENJDK_TARGET_OS" = xlinux; then
40696     STRIPFLAGS="-g"
40697   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40698     STRIPFLAGS="-x"
40699   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40700     STRIPFLAGS="-S"
40701   elif test "x$OPENJDK_TARGET_OS" = xaix; then
40702     STRIPFLAGS="-X32_64"
40703   fi
40704 
40705   if test "x$OPENJDK_TARGET_OS" != xwindows; then
40706     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40707   fi
40708 
40709 
40710   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40711     # FIXME: break out into MCSFLAGS
40712     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40713   fi
40714 
40715 
40716   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40717     CC_OUT_OPTION=-Fo
40718     EXE_OUT_OPTION=-out:
40719     LD_OUT_OPTION=-out:
40720     AR_OUT_OPTION=-out:
40721   else
40722     # The option used to specify the target .o,.a or .so file.
40723     # When compiling, how to specify the to be created object file.
40724     CC_OUT_OPTION='-o$(SPACE)'
40725     # When linking, how to specify the to be created executable.
40726     EXE_OUT_OPTION='-o$(SPACE)'
40727     # When linking, how to specify the to be created dynamically linkable library.
40728     LD_OUT_OPTION='-o$(SPACE)'
40729     # When archiving, how to specify the to be create static archive for object files.
40730     AR_OUT_OPTION='rcs$(SPACE)'
40731   fi
40732 
40733 
40734 
40735 
40736 
40737   # On Windows, we need to set RC flags.
40738   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40739     RC_FLAGS="-nologo -l 0x409 -r"
40740     if test "x$VARIANT" = xOPT; then
40741       RC_FLAGS="$RC_FLAGS -d NDEBUG"
40742     fi
40743 
40744     # The version variables used to create RC_FLAGS may be overridden
40745     # in a custom configure script, or possibly the command line.
40746     # Let those variables be expanded at make time in spec.gmk.
40747     # The \$ are escaped to the shell, and the $(...) variables
40748     # are evaluated by make.
40749     RC_FLAGS="$RC_FLAGS \
40750         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40751         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40752         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40753         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40754         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40755         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40756         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40757   fi
40758 
40759 
40760   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40761     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40762     CCXXFLAGS="$CCXXFLAGS -nologo"
40763   fi
40764 
40765   if test "x$SYSROOT" != "x"; then
40766     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40767       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40768         # Solaris Studio does not have a concept of sysroot. Instead we must
40769         # make sure the default include and lib dirs are appended to each
40770         # compile and link command line.
40771         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40772         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40773             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40774             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40775       fi
40776     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40777       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40778       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40779     elif test "x$TOOLCHAIN_TYPE" = xclang; then
40780       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40781       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40782     fi
40783     # Propagate the sysroot args to hotspot
40784     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40785     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40786     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40787   fi
40788 
40789 
40790 
40791 
40792 # FIXME: Currently we must test this after toolchain but before flags. Fix!
40793 
40794 # Now we can test some aspects on the target using configure macros.
40795 
40796 
40797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40798 $as_echo_n "checking for ANSI C header files... " >&6; }
40799 if ${ac_cv_header_stdc+:} false; then :
40800   $as_echo_n "(cached) " >&6
40801 else
40802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40803 /* end confdefs.h.  */
40804 #include <stdlib.h>
40805 #include <stdarg.h>
40806 #include <string.h>
40807 #include <float.h>
40808 
40809 int
40810 main ()
40811 {
40812 
40813   ;
40814   return 0;
40815 }
40816 _ACEOF
40817 if ac_fn_cxx_try_compile "$LINENO"; then :
40818   ac_cv_header_stdc=yes
40819 else
40820   ac_cv_header_stdc=no
40821 fi
40822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40823 
40824 if test $ac_cv_header_stdc = yes; then
40825   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40827 /* end confdefs.h.  */
40828 #include <string.h>
40829 
40830 _ACEOF
40831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40832   $EGREP "memchr" >/dev/null 2>&1; then :
40833 
40834 else
40835   ac_cv_header_stdc=no
40836 fi
40837 rm -f conftest*
40838 
40839 fi
40840 
40841 if test $ac_cv_header_stdc = yes; then
40842   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40844 /* end confdefs.h.  */
40845 #include <stdlib.h>
40846 
40847 _ACEOF
40848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40849   $EGREP "free" >/dev/null 2>&1; then :
40850 
40851 else
40852   ac_cv_header_stdc=no
40853 fi
40854 rm -f conftest*
40855 
40856 fi
40857 
40858 if test $ac_cv_header_stdc = yes; then
40859   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40860   if test "$cross_compiling" = yes; then :
40861   :
40862 else
40863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40864 /* end confdefs.h.  */
40865 #include <ctype.h>
40866 #include <stdlib.h>
40867 #if ((' ' & 0x0FF) == 0x020)
40868 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40869 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40870 #else
40871 # define ISLOWER(c) \
40872                    (('a' <= (c) && (c) <= 'i') \
40873                      || ('j' <= (c) && (c) <= 'r') \
40874                      || ('s' <= (c) && (c) <= 'z'))
40875 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40876 #endif
40877 
40878 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40879 int
40880 main ()
40881 {
40882   int i;
40883   for (i = 0; i < 256; i++)
40884     if (XOR (islower (i), ISLOWER (i))
40885         || toupper (i) != TOUPPER (i))
40886       return 2;
40887   return 0;
40888 }
40889 _ACEOF
40890 if ac_fn_cxx_try_run "$LINENO"; then :
40891 
40892 else
40893   ac_cv_header_stdc=no
40894 fi
40895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40896   conftest.$ac_objext conftest.beam conftest.$ac_ext
40897 fi
40898 
40899 fi
40900 fi
40901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40902 $as_echo "$ac_cv_header_stdc" >&6; }
40903 if test $ac_cv_header_stdc = yes; then
40904 
40905 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
40906 
40907 fi
40908 
40909 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
40910 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40911                   inttypes.h stdint.h unistd.h
40912 do :
40913   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40914 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40915 "
40916 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40917   cat >>confdefs.h <<_ACEOF
40918 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40919 _ACEOF
40920 
40921 fi
40922 
40923 done
40924 
40925 
40926 
40927   ###############################################################################
40928   #
40929   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40930   # (The JVM can use 32 or 64 bit Java pointers but that decision
40931   # is made at runtime.)
40932   #
40933 
40934   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40935     # Always specify -m flag on Solaris
40936     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40937 
40938   # When we add flags to the "official" CFLAGS etc, we need to
40939   # keep track of these additions in ADDED_CFLAGS etc. These
40940   # will later be checked to make sure only controlled additions
40941   # have been made to CFLAGS etc.
40942   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40943   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40944   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40945 
40946   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40947   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40948   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40949 
40950   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40951   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40952   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40953 
40954   elif test "x$COMPILE_TYPE" = xreduced; then
40955     if test "x$OPENJDK_TARGET_OS" != xwindows; then
40956       # Specify -m if running reduced on other Posix platforms
40957 
40958   # When we add flags to the "official" CFLAGS etc, we need to
40959   # keep track of these additions in ADDED_CFLAGS etc. These
40960   # will later be checked to make sure only controlled additions
40961   # have been made to CFLAGS etc.
40962   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40963   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40964   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40965 
40966   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40967   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40968   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40969 
40970   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40971   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40972   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40973 
40974     fi
40975   fi
40976 
40977   # Make compilation sanity check
40978   for ac_header in stdio.h
40979 do :
40980   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40981 if test "x$ac_cv_header_stdio_h" = xyes; then :
40982   cat >>confdefs.h <<_ACEOF
40983 #define HAVE_STDIO_H 1
40984 _ACEOF
40985 
40986 else
40987 
40988     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40989 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40990     if test "x$COMPILE_TYPE" = xreduced; then
40991       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40992 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40993     elif test "x$COMPILE_TYPE" = xcross; then
40994       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40995 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40996     fi
40997     as_fn_error $? "Cannot continue." "$LINENO" 5
40998 
40999 fi
41000 
41001 done
41002 
41003 
41004   # The cast to long int works around a bug in the HP C Compiler
41005 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41006 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41007 # This bug is HP SR number 8606223364.
41008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41009 $as_echo_n "checking size of int *... " >&6; }
41010 if ${ac_cv_sizeof_int_p+:} false; then :
41011   $as_echo_n "(cached) " >&6
41012 else
41013   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41014 
41015 else
41016   if test "$ac_cv_type_int_p" = yes; then
41017      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41018 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41019 as_fn_error 77 "cannot compute sizeof (int *)
41020 See \`config.log' for more details" "$LINENO" 5; }
41021    else
41022      ac_cv_sizeof_int_p=0
41023    fi
41024 fi
41025 
41026 fi
41027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41028 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41029 
41030 
41031 
41032 cat >>confdefs.h <<_ACEOF
41033 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41034 _ACEOF
41035 
41036 
41037 
41038   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41039   if test "x$ac_cv_sizeof_int_p" = x; then
41040     # The test failed, lets stick to the assumed value.
41041     { $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
41042 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41043   else
41044     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41045 
41046     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41047       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41048       # Let's try to implicitely set the compilers target architecture and retry the test
41049       { $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
41050 $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;}
41051       { $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
41052 $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;}
41053 
41054   # When we add flags to the "official" CFLAGS etc, we need to
41055   # keep track of these additions in ADDED_CFLAGS etc. These
41056   # will later be checked to make sure only controlled additions
41057   # have been made to CFLAGS etc.
41058   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41059   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41060   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41061 
41062   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41063   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41064   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41065 
41066   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41067   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41068   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41069 
41070 
41071       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41072       unset ac_cv_sizeof_int_p
41073       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41074       cat >>confdefs.h <<_ACEOF
41075 #undef SIZEOF_INT_P
41076 _ACEOF
41077 
41078       # The cast to long int works around a bug in the HP C Compiler
41079 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41080 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41081 # This bug is HP SR number 8606223364.
41082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41083 $as_echo_n "checking size of int *... " >&6; }
41084 if ${ac_cv_sizeof_int_p+:} false; then :
41085   $as_echo_n "(cached) " >&6
41086 else
41087   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41088 
41089 else
41090   if test "$ac_cv_type_int_p" = yes; then
41091      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41092 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41093 as_fn_error 77 "cannot compute sizeof (int *)
41094 See \`config.log' for more details" "$LINENO" 5; }
41095    else
41096      ac_cv_sizeof_int_p=0
41097    fi
41098 fi
41099 
41100 fi
41101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41102 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41103 
41104 
41105 
41106 cat >>confdefs.h <<_ACEOF
41107 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41108 _ACEOF
41109 
41110 
41111 
41112       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41113 
41114       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41115         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
41116       fi
41117     fi
41118   fi
41119 
41120   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41121 $as_echo_n "checking for target address size... " >&6; }
41122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41123 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41124 
41125 
41126   ###############################################################################
41127   #
41128   # Is the target little of big endian?
41129   #
41130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41131 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41132 if ${ac_cv_c_bigendian+:} false; then :
41133   $as_echo_n "(cached) " >&6
41134 else
41135   ac_cv_c_bigendian=unknown
41136     # See if we're dealing with a universal compiler.
41137     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41138 /* end confdefs.h.  */
41139 #ifndef __APPLE_CC__
41140                not a universal capable compiler
41141              #endif
41142              typedef int dummy;
41143 
41144 _ACEOF
41145 if ac_fn_cxx_try_compile "$LINENO"; then :
41146 
41147         # Check for potential -arch flags.  It is not universal unless
41148         # there are at least two -arch flags with different values.
41149         ac_arch=
41150         ac_prev=
41151         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41152          if test -n "$ac_prev"; then
41153            case $ac_word in
41154              i?86 | x86_64 | ppc | ppc64)
41155                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41156                  ac_arch=$ac_word
41157                else
41158                  ac_cv_c_bigendian=universal
41159                  break
41160                fi
41161                ;;
41162            esac
41163            ac_prev=
41164          elif test "x$ac_word" = "x-arch"; then
41165            ac_prev=arch
41166          fi
41167        done
41168 fi
41169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41170     if test $ac_cv_c_bigendian = unknown; then
41171       # See if sys/param.h defines the BYTE_ORDER macro.
41172       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41173 /* end confdefs.h.  */
41174 #include <sys/types.h>
41175              #include <sys/param.h>
41176 
41177 int
41178 main ()
41179 {
41180 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41181                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41182                      && LITTLE_ENDIAN)
41183               bogus endian macros
41184              #endif
41185 
41186   ;
41187   return 0;
41188 }
41189 _ACEOF
41190 if ac_fn_cxx_try_compile "$LINENO"; then :
41191   # It does; now see whether it defined to BIG_ENDIAN or not.
41192          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41193 /* end confdefs.h.  */
41194 #include <sys/types.h>
41195                 #include <sys/param.h>
41196 
41197 int
41198 main ()
41199 {
41200 #if BYTE_ORDER != BIG_ENDIAN
41201                  not big endian
41202                 #endif
41203 
41204   ;
41205   return 0;
41206 }
41207 _ACEOF
41208 if ac_fn_cxx_try_compile "$LINENO"; then :
41209   ac_cv_c_bigendian=yes
41210 else
41211   ac_cv_c_bigendian=no
41212 fi
41213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41214 fi
41215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41216     fi
41217     if test $ac_cv_c_bigendian = unknown; then
41218       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41219       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41220 /* end confdefs.h.  */
41221 #include <limits.h>
41222 
41223 int
41224 main ()
41225 {
41226 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41227               bogus endian macros
41228              #endif
41229 
41230   ;
41231   return 0;
41232 }
41233 _ACEOF
41234 if ac_fn_cxx_try_compile "$LINENO"; then :
41235   # It does; now see whether it defined to _BIG_ENDIAN or not.
41236          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41237 /* end confdefs.h.  */
41238 #include <limits.h>
41239 
41240 int
41241 main ()
41242 {
41243 #ifndef _BIG_ENDIAN
41244                  not big endian
41245                 #endif
41246 
41247   ;
41248   return 0;
41249 }
41250 _ACEOF
41251 if ac_fn_cxx_try_compile "$LINENO"; then :
41252   ac_cv_c_bigendian=yes
41253 else
41254   ac_cv_c_bigendian=no
41255 fi
41256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41257 fi
41258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41259     fi
41260     if test $ac_cv_c_bigendian = unknown; then
41261       # Compile a test program.
41262       if test "$cross_compiling" = yes; then :
41263   # Try to guess by grepping values from an object file.
41264          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41265 /* end confdefs.h.  */
41266 short int ascii_mm[] =
41267                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41268                 short int ascii_ii[] =
41269                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41270                 int use_ascii (int i) {
41271                   return ascii_mm[i] + ascii_ii[i];
41272                 }
41273                 short int ebcdic_ii[] =
41274                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41275                 short int ebcdic_mm[] =
41276                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41277                 int use_ebcdic (int i) {
41278                   return ebcdic_mm[i] + ebcdic_ii[i];
41279                 }
41280                 extern int foo;
41281 
41282 int
41283 main ()
41284 {
41285 return use_ascii (foo) == use_ebcdic (foo);
41286   ;
41287   return 0;
41288 }
41289 _ACEOF
41290 if ac_fn_cxx_try_compile "$LINENO"; then :
41291   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41292               ac_cv_c_bigendian=yes
41293             fi
41294             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41295               if test "$ac_cv_c_bigendian" = unknown; then
41296                 ac_cv_c_bigendian=no
41297               else
41298                 # finding both strings is unlikely to happen, but who knows?
41299                 ac_cv_c_bigendian=unknown
41300               fi
41301             fi
41302 fi
41303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41304 else
41305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41306 /* end confdefs.h.  */
41307 $ac_includes_default
41308 int
41309 main ()
41310 {
41311 
41312              /* Are we little or big endian?  From Harbison&Steele.  */
41313              union
41314              {
41315                long int l;
41316                char c[sizeof (long int)];
41317              } u;
41318              u.l = 1;
41319              return u.c[sizeof (long int) - 1] == 1;
41320 
41321   ;
41322   return 0;
41323 }
41324 _ACEOF
41325 if ac_fn_cxx_try_run "$LINENO"; then :
41326   ac_cv_c_bigendian=no
41327 else
41328   ac_cv_c_bigendian=yes
41329 fi
41330 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41331   conftest.$ac_objext conftest.beam conftest.$ac_ext
41332 fi
41333 
41334     fi
41335 fi
41336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41337 $as_echo "$ac_cv_c_bigendian" >&6; }
41338  case $ac_cv_c_bigendian in #(
41339    yes)
41340      ENDIAN="big";; #(
41341    no)
41342      ENDIAN="little" ;; #(
41343    universal)
41344      ENDIAN="universal_endianness"
41345      ;; #(
41346    *)
41347      ENDIAN="unknown" ;;
41348  esac
41349 
41350 
41351   if test "x$ENDIAN" = xuniversal_endianness; then
41352     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41353   fi
41354   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41355     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
41356   fi
41357 
41358 
41359 # Configure flags for the tools
41360 
41361   ###############################################################################
41362   #
41363   # How to compile shared libraries.
41364   #
41365 
41366   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41367     PICFLAG="-fPIC"
41368     C_FLAG_REORDER=''
41369     CXX_FLAG_REORDER=''
41370 
41371     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41372       # Linking is different on MacOSX
41373       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41374       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41375       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41376       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41377       SET_SHARED_LIBRARY_MAPFILE=''
41378     else
41379       # Default works for linux, might work on other platforms as well.
41380       SHARED_LIBRARY_FLAGS='-shared'
41381       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41382       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41383       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41384       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41385     fi
41386   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41387     PICFLAG=''
41388     C_FLAG_REORDER=''
41389     CXX_FLAG_REORDER=''
41390 
41391     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41392       # Linking is different on MacOSX
41393       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41394       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41395       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41396       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41397       SET_SHARED_LIBRARY_MAPFILE=''
41398     else
41399       # Default works for linux, might work on other platforms as well.
41400       SHARED_LIBRARY_FLAGS='-shared'
41401       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41402       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41403       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41404       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41405     fi
41406   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41407     PICFLAG="-KPIC"
41408     C_FLAG_REORDER='-xF'
41409     CXX_FLAG_REORDER='-xF'
41410     SHARED_LIBRARY_FLAGS="-G"
41411     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41412     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41413     SET_SHARED_LIBRARY_NAME=''
41414     SET_SHARED_LIBRARY_MAPFILE='-M$1'
41415   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41416     PICFLAG="-qpic=large"
41417     C_FLAG_REORDER=''
41418     CXX_FLAG_REORDER=''
41419     SHARED_LIBRARY_FLAGS="-qmkshrobj"
41420     SET_EXECUTABLE_ORIGIN=""
41421     SET_SHARED_LIBRARY_ORIGIN=''
41422     SET_SHARED_LIBRARY_NAME=''
41423     SET_SHARED_LIBRARY_MAPFILE=''
41424   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41425     PICFLAG=""
41426     C_FLAG_REORDER=''
41427     CXX_FLAG_REORDER=''
41428     SHARED_LIBRARY_FLAGS="-LD"
41429     SET_EXECUTABLE_ORIGIN=''
41430     SET_SHARED_LIBRARY_ORIGIN=''
41431     SET_SHARED_LIBRARY_NAME=''
41432     SET_SHARED_LIBRARY_MAPFILE=''
41433   fi
41434 
41435 
41436 
41437 
41438 
41439 
41440 
41441 
41442 
41443   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41444     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41445     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41446     CFLAGS_JDKLIB_EXTRA='-xstrconst'
41447   fi
41448   # The (cross) compiler is now configured, we can now test capabilities
41449   # of the target platform.
41450 
41451 
41452 
41453   ###############################################################################
41454   #
41455   # Setup the opt flags for different compilers
41456   # and different operating systems.
41457   #
41458 
41459   # FIXME: this was indirectly the old default, but just inherited.
41460   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41461   #   C_FLAG_DEPS="-MMD -MF"
41462   # fi
41463 
41464   # Generate make dependency files
41465   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41466     C_FLAG_DEPS="-MMD -MF"
41467   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41468     C_FLAG_DEPS="-MMD -MF"
41469   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41470     C_FLAG_DEPS="-xMMD -xMF"
41471   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41472     C_FLAG_DEPS="-qmakedep=gcc -MF"
41473   fi
41474   CXX_FLAG_DEPS="$C_FLAG_DEPS"
41475 
41476 
41477 
41478   # Debug symbols
41479   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41480     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41481       CFLAGS_DEBUG_SYMBOLS="-g1"
41482       CXXFLAGS_DEBUG_SYMBOLS="-g1"
41483     else
41484       CFLAGS_DEBUG_SYMBOLS="-g"
41485       CXXFLAGS_DEBUG_SYMBOLS="-g"
41486     fi
41487   elif test "x$TOOLCHAIN_TYPE" = xclang; then
41488     CFLAGS_DEBUG_SYMBOLS="-g"
41489     CXXFLAGS_DEBUG_SYMBOLS="-g"
41490   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41491     CFLAGS_DEBUG_SYMBOLS="-g -xs"
41492     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41493   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41494     CFLAGS_DEBUG_SYMBOLS="-g"
41495     CXXFLAGS_DEBUG_SYMBOLS="-g"
41496   fi
41497 
41498 
41499 
41500   # Optimization levels
41501   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41502     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41503 
41504     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41505       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41506       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41507       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41508       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41509       C_O_FLAG_NONE="-xregs=no%frameptr"
41510       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41511       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41512       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41513       CXX_O_FLAG_NONE="-xregs=no%frameptr"
41514       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41515         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41516         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41517       fi
41518     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41519       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41520       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41521       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41522       C_O_FLAG_NONE=""
41523       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41524       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41525       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41526       CXX_O_FLAG_NONE=""
41527     fi
41528   else
41529     # The remaining toolchains share opt flags between CC and CXX;
41530     # setup for C and duplicate afterwards.
41531     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41532       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41533         # On MacOSX we optimize for size, something
41534         # we should do for all platforms?
41535         C_O_FLAG_HIGHEST="-Os"
41536         C_O_FLAG_HI="-Os"
41537         C_O_FLAG_NORM="-Os"
41538         C_O_FLAG_NONE=""
41539       else
41540         C_O_FLAG_HIGHEST="-O3"
41541         C_O_FLAG_HI="-O3"
41542         C_O_FLAG_NORM="-O2"
41543         C_O_FLAG_NONE="-O0"
41544       fi
41545     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41546       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41547         # On MacOSX we optimize for size, something
41548         # we should do for all platforms?
41549         C_O_FLAG_HIGHEST="-Os"
41550         C_O_FLAG_HI="-Os"
41551         C_O_FLAG_NORM="-Os"
41552         C_O_FLAG_NONE=""
41553       else
41554         C_O_FLAG_HIGHEST="-O3"
41555         C_O_FLAG_HI="-O3"
41556         C_O_FLAG_NORM="-O2"
41557         C_O_FLAG_NONE="-O0"
41558       fi
41559     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41560       C_O_FLAG_HIGHEST="-O3"
41561       C_O_FLAG_HI="-O3 -qstrict"
41562       C_O_FLAG_NORM="-O2"
41563       C_O_FLAG_NONE=""
41564     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41565       C_O_FLAG_HIGHEST="-O2"
41566       C_O_FLAG_HI="-O1"
41567       C_O_FLAG_NORM="-O1"
41568       C_O_FLAG_NONE="-Od"
41569     fi
41570     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41571     CXX_O_FLAG_HI="$C_O_FLAG_HI"
41572     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41573     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41574   fi
41575 
41576 
41577 
41578 
41579 
41580 
41581 
41582 
41583 
41584 
41585 
41586   # Special extras...
41587   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41588     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41589       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41590       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41591     fi
41592   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41593     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41594     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41595     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41596   fi
41597 
41598   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41599     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41600 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41601   fi
41602 
41603   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41604     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41605 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41606   fi
41607 
41608   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41609     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41610 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41611   fi
41612 
41613 
41614 # Check whether --with-extra-cflags was given.
41615 if test "${with_extra_cflags+set}" = set; then :
41616   withval=$with_extra_cflags;
41617 fi
41618 
41619 
41620 
41621 # Check whether --with-extra-cxxflags was given.
41622 if test "${with_extra_cxxflags+set}" = set; then :
41623   withval=$with_extra_cxxflags;
41624 fi
41625 
41626 
41627 
41628 # Check whether --with-extra-ldflags was given.
41629 if test "${with_extra_ldflags+set}" = set; then :
41630   withval=$with_extra_ldflags;
41631 fi
41632 
41633 
41634   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41635   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41636   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41637 
41638   # Hotspot needs these set in their legacy form
41639   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41640   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41641   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41642 
41643 
41644 
41645 
41646 
41647   ###############################################################################
41648   #
41649   # Now setup the CFLAGS and LDFLAGS for the JDK build.
41650   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41651   #
41652 
41653   # Setup compiler/platform specific flags to CFLAGS_JDK,
41654   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41655   if test "x$TOOLCHAIN_TYPE" = xgcc; then
41656     # these options are used for both C and C++ compiles
41657     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41658         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41659     case $OPENJDK_TARGET_CPU_ARCH in
41660       arm )
41661         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41662         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41663         ;;
41664       ppc )
41665         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41666         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41667         ;;
41668       * )
41669         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41670         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41671         ;;
41672     esac
41673   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41674     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41675     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41676       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41677       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41678     fi
41679 
41680     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41681     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41682   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41683     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41684     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41685   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41686     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41687     -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41688     -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41689     -DWIN32 -DIAL"
41690     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41691       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41692     else
41693       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41694     fi
41695   fi
41696 
41697   ###############################################################################
41698 
41699   # Adjust flags according to debug level.
41700   case $DEBUG_LEVEL in
41701     fastdebug )
41702       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41703       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41704       C_O_FLAG_HI="$C_O_FLAG_NORM"
41705       C_O_FLAG_NORM="$C_O_FLAG_NORM"
41706       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41707       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41708       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41709       ;;
41710     slowdebug )
41711       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41712       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41713       C_O_FLAG_HI="$C_O_FLAG_NONE"
41714       C_O_FLAG_NORM="$C_O_FLAG_NONE"
41715       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41716       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41717       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41718       ;;
41719   esac
41720 
41721   # Setup LP64
41722   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41723 
41724   # Set some common defines. These works for all compilers, but assume
41725   # -D is universally accepted.
41726 
41727   # Setup endianness
41728   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41729     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41730     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41731     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41732     #   Note: -Dmacro         is the same as    #define macro 1
41733     #         -Dmacro=        is the same as    #define macro
41734     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41735       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41736     else
41737       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41738     fi
41739   else
41740     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41741     # are defined in the system?
41742     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41743       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41744     else
41745       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41746     fi
41747   fi
41748 
41749   # Setup target OS define. Use OS target name but in upper case.
41750   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41751   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41752 
41753   # Setup target CPU
41754   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41755 
41756   # Setup debug/release defines
41757   if test "x$DEBUG_LEVEL" = xrelease; then
41758     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41759     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41760       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41761     fi
41762   else
41763     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41764   fi
41765 
41766   # Setup release name
41767   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41768 
41769 
41770   # Set some additional per-OS defines.
41771   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41772     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41773   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41774     # FIXME: PPC64 should not be here.
41775     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41776   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41777     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41778   fi
41779 
41780   # Additional macosx handling
41781   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41782     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41783       # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41784       # FIXME: clean this up, and/or move it elsewhere.
41785 
41786       # Setting these parameters makes it an error to link to macosx APIs that are
41787       # newer than the given OS version and makes the linked binaries compatible
41788       # even if built on a newer version of the OS.
41789       # The expected format is X.Y.Z
41790       MACOSX_VERSION_MIN=10.7.0
41791 
41792 
41793       # The macro takes the version with no dots, ex: 1070
41794       # Let the flags variables get resolved in make for easier override on make
41795       # command line.
41796       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41797       LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41798     fi
41799   fi
41800 
41801   # Setup some hard coded includes
41802   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41803       -I${JDK_OUTPUTDIR}/include \
41804       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41805       -I${JDK_TOPDIR}/src/share/javavm/export \
41806       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41807       -I${JDK_TOPDIR}/src/share/native/common \
41808       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41809 
41810   # The shared libraries are compiled using the picflag.
41811   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41812   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41813 
41814   # Executable flags
41815   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41816   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41817 
41818 
41819 
41820 
41821 
41822 
41823   # Setup LDFLAGS et al.
41824   #
41825   # Now this is odd. The JDK native libraries have to link against libjvm.so
41826   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41827   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41828   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41829   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41830   # libraries will link to whatever is in memory. Yuck.
41831   #
41832   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41833   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41834     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41835     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41836       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41837     fi
41838     # TODO: make -debug optional "--disable-full-debug-symbols"
41839     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41840     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41841     LDFLAGS_JDKLIB_SUFFIX=""
41842     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41843       LDFLAGS_STACK_SIZE=1048576
41844     else
41845       LDFLAGS_STACK_SIZE=327680
41846     fi
41847     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41848   else
41849     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41850       # If this is a --hash-style=gnu system, use --hash-style=both, why?
41851       # We have previously set HAS_GNU_HASH if this is the case
41852       if test -n "$HAS_GNU_HASH"; then
41853         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41854       fi
41855       if test "x$OPENJDK_TARGET_OS" = xlinux; then
41856         # And since we now know that the linker is gnu, then add -z defs, to forbid
41857         # undefined symbols in object files.
41858         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41859         if test "x$DEBUG_LEVEL" = "xrelease"; then
41860           # When building release libraries, tell the linker optimize them.
41861           # Should this be supplied to the OSS linker as well?
41862           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41863         fi
41864       fi
41865     fi
41866 
41867     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41868       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41869       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41870     fi
41871 
41872     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41873         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41874 
41875     # On some platforms (mac) the linker warns about non existing -L dirs.
41876     # Add server first if available. Linking aginst client does not always produce the same results.
41877     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41878     # Default to server for other variants.
41879     if test "x$JVM_VARIANT_SERVER" = xtrue; then
41880       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41881     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41882       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41883     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41884       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41885     else
41886       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41887     fi
41888 
41889     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41890     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41891       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41892     fi
41893 
41894     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41895     if test "x$OPENJDK_TARGET_OS" = xlinux; then
41896       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41897     fi
41898   fi
41899 
41900 
41901 
41902 
41903 
41904 
41905 
41906 
41907   # Some Zero and Shark settings.
41908   # ZERO_ARCHFLAG tells the compiler which mode to build for
41909   case "${OPENJDK_TARGET_CPU}" in
41910     s390)
41911       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41912       ;;
41913     *)
41914       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41915   esac
41916 
41917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41918 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41919   supports=yes
41920 
41921   saved_cflags="$CFLAGS"
41922   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41923   ac_ext=c
41924 ac_cpp='$CPP $CPPFLAGS'
41925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41928 
41929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41930 /* end confdefs.h.  */
41931 int i;
41932 _ACEOF
41933 if ac_fn_c_try_compile "$LINENO"; then :
41934 
41935 else
41936   supports=no
41937 fi
41938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41939   ac_ext=cpp
41940 ac_cpp='$CXXCPP $CPPFLAGS'
41941 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41942 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41943 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41944 
41945   CFLAGS="$saved_cflags"
41946 
41947   saved_cxxflags="$CXXFLAGS"
41948   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41949   ac_ext=cpp
41950 ac_cpp='$CXXCPP $CPPFLAGS'
41951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41954 
41955   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41956 /* end confdefs.h.  */
41957 int i;
41958 _ACEOF
41959 if ac_fn_cxx_try_compile "$LINENO"; then :
41960 
41961 else
41962   supports=no
41963 fi
41964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41965   ac_ext=cpp
41966 ac_cpp='$CXXCPP $CPPFLAGS'
41967 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41968 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41969 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41970 
41971   CXXFLAGS="$saved_cxxflags"
41972 
41973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41974 $as_echo "$supports" >&6; }
41975   if test "x$supports" = "xyes" ; then
41976     :
41977   else
41978     ZERO_ARCHFLAG=""
41979   fi
41980 
41981 
41982 
41983   # Check that the compiler supports -mX (or -qX on AIX) flags
41984   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41985 
41986   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41987 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41988   supports=yes
41989 
41990   saved_cflags="$CFLAGS"
41991   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41992   ac_ext=c
41993 ac_cpp='$CPP $CPPFLAGS'
41994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41997 
41998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41999 /* end confdefs.h.  */
42000 int i;
42001 _ACEOF
42002 if ac_fn_c_try_compile "$LINENO"; then :
42003 
42004 else
42005   supports=no
42006 fi
42007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42008   ac_ext=cpp
42009 ac_cpp='$CXXCPP $CPPFLAGS'
42010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42013 
42014   CFLAGS="$saved_cflags"
42015 
42016   saved_cxxflags="$CXXFLAGS"
42017   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42018   ac_ext=cpp
42019 ac_cpp='$CXXCPP $CPPFLAGS'
42020 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42021 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42022 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42023 
42024   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42025 /* end confdefs.h.  */
42026 int i;
42027 _ACEOF
42028 if ac_fn_cxx_try_compile "$LINENO"; then :
42029 
42030 else
42031   supports=no
42032 fi
42033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42034   ac_ext=cpp
42035 ac_cpp='$CXXCPP $CPPFLAGS'
42036 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42037 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42038 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42039 
42040   CXXFLAGS="$saved_cxxflags"
42041 
42042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42043 $as_echo "$supports" >&6; }
42044   if test "x$supports" = "xyes" ; then
42045     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42046   else
42047     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42048   fi
42049 
42050 
42051 
42052   case "${TOOLCHAIN_TYPE}" in
42053     microsoft)
42054       CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42055       ;;
42056     solstudio)
42057       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42058       ;;
42059     gcc)
42060       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42061       ;;
42062     clang)
42063       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42064       ;;
42065   esac
42066 
42067 
42068 
42069 # Setup debug symbols (need objcopy from the toolchain for that)
42070 
42071   #
42072   # ENABLE_DEBUG_SYMBOLS
42073   # This must be done after the toolchain is setup, since we're looking at objcopy.
42074   #
42075   # Check whether --enable-debug-symbols was given.
42076 if test "${enable_debug_symbols+set}" = set; then :
42077   enableval=$enable_debug_symbols;
42078 fi
42079 
42080 
42081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42082 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42083 
42084   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42085     # explicit enabling of enable-debug-symbols and can't find objcopy
42086     #   this is an error
42087     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42088   fi
42089 
42090   if test "x$enable_debug_symbols" = "xyes"; then
42091     ENABLE_DEBUG_SYMBOLS=true
42092   elif test "x$enable_debug_symbols" = "xno"; then
42093     ENABLE_DEBUG_SYMBOLS=false
42094   else
42095     # Default is on if objcopy is found
42096     if test "x$OBJCOPY" != x; then
42097       ENABLE_DEBUG_SYMBOLS=true
42098     # MacOS X and Windows don't use objcopy but default is on for those OSes
42099     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42100       ENABLE_DEBUG_SYMBOLS=true
42101     else
42102       ENABLE_DEBUG_SYMBOLS=false
42103     fi
42104   fi
42105 
42106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42107 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42108 
42109   #
42110   # ZIP_DEBUGINFO_FILES
42111   #
42112   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42113 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42114   # Check whether --enable-zip-debug-info was given.
42115 if test "${enable_zip_debug_info+set}" = set; then :
42116   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42117 else
42118   enable_zip_debug_info="yes"
42119 fi
42120 
42121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42122 $as_echo "${enable_zip_debug_info}" >&6; }
42123 
42124   if test "x${enable_zip_debug_info}" = "xno"; then
42125     ZIP_DEBUGINFO_FILES=false
42126   else
42127     ZIP_DEBUGINFO_FILES=true
42128   fi
42129 
42130 
42131 
42132 
42133 
42134 ###############################################################################
42135 #
42136 # Check dependencies for external and internal libraries.
42137 #
42138 ###############################################################################
42139 
42140 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42141 
42142   # When using cygwin or msys, we need a wrapper binary that renames
42143   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42144   # @files and rewrites these too! This wrapper binary is
42145   # called fixpath.
42146   FIXPATH=
42147   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42148     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42149 $as_echo_n "checking if fixpath can be created... " >&6; }
42150     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42151     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42152     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42153       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42154       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42155       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42156       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42157     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42158       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42159       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42160 
42161       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42162       # @ was chosen as separator to minimize risk of other tools messing around with it
42163       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42164       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42165 
42166       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42167     fi
42168     rm -f $OUTPUT_ROOT/fixpath*
42169     cd $OUTPUT_ROOT
42170     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42171     cd $CURDIR
42172 
42173     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42174       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42175 $as_echo "no" >&6; }
42176       cat $OUTPUT_ROOT/fixpath1.log
42177       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42178     fi
42179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42180 $as_echo "yes" >&6; }
42181     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42182 $as_echo_n "checking if fixpath.exe works... " >&6; }
42183     cd $OUTPUT_ROOT
42184     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42185     cd $CURDIR
42186     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42188 $as_echo "no" >&6; }
42189       cat $OUTPUT_ROOT/fixpath2.log
42190       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42191     fi
42192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42193 $as_echo "yes" >&6; }
42194     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42195   fi
42196 
42197 
42198 
42199 
42200 
42201 
42202   ###############################################################################
42203   #
42204   # OS specific settings that we never will need to probe.
42205   #
42206   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42207     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42208 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42209     PULSE_NOT_NEEDED=yes
42210     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42211 $as_echo "pulse" >&6; }
42212   fi
42213 
42214   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42216 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42217     ALSA_NOT_NEEDED=yes
42218     PULSE_NOT_NEEDED=yes
42219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42220 $as_echo "alsa pulse" >&6; }
42221   fi
42222 
42223   if test "x$OPENJDK_TARGET_OS" = xaix; then
42224     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42225 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42226     ALSA_NOT_NEEDED=yes
42227     PULSE_NOT_NEEDED=yes
42228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42229 $as_echo "alsa pulse" >&6; }
42230   fi
42231 
42232 
42233   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42234     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42235 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42236     CUPS_NOT_NEEDED=yes
42237     ALSA_NOT_NEEDED=yes
42238     PULSE_NOT_NEEDED=yes
42239     X11_NOT_NEEDED=yes
42240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42241 $as_echo "alsa cups pulse x11" >&6; }
42242   fi
42243 
42244   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42245     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42246 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42247     ALSA_NOT_NEEDED=yes
42248     PULSE_NOT_NEEDED=yes
42249     X11_NOT_NEEDED=yes
42250     # If the java runtime framework is disabled, then we need X11.
42251     # This will be adjusted below.
42252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42253 $as_echo "alsa pulse x11" >&6; }
42254   fi
42255 
42256   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42257     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42258 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42259     ALSA_NOT_NEEDED=yes
42260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42261 $as_echo "alsa" >&6; }
42262   fi
42263 
42264   if test "x$OPENJDK" = "xfalse"; then
42265     FREETYPE_NOT_NEEDED=yes
42266   fi
42267 
42268   if test "x$SUPPORT_HEADFUL" = xno; then
42269     X11_NOT_NEEDED=yes
42270   fi
42271 
42272   ###############################################################################
42273   #
42274   # Check for MacOSX support for OpenJDK.
42275   #
42276 
42277 
42278   # Check whether --enable-macosx-runtime-support was given.
42279 if test "${enable_macosx_runtime_support+set}" = set; then :
42280   enableval=$enable_macosx_runtime_support;
42281 fi
42282 
42283   if test "x$enable_macosx_runtime_support" != x; then
42284     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42285 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42286   fi
42287 
42288 
42289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42290 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42291   if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42293 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42294   else
42295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42296 $as_echo "no" >&6; }
42297   fi
42298 
42299 
42300 
42301   ###############################################################################
42302   #
42303   # Check for X Windows
42304   #
42305 
42306   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42307   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42308   # --x-libraries for the sysroot, if that seems to be correct.
42309   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42310     if test "x$SYSROOT" != "x"; then
42311       if test "x$x_includes" = xNONE; then
42312         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42313           x_includes="$SYSROOT/usr/X11R6/include"
42314         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42315           x_includes="$SYSROOT/usr/include"
42316         fi
42317       fi
42318       if test "x$x_libraries" = xNONE; then
42319         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42320           x_libraries="$SYSROOT/usr/X11R6/lib"
42321         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42322           x_libraries="$SYSROOT/usr/lib64"
42323         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42324           x_libraries="$SYSROOT/usr/lib"
42325         fi
42326       fi
42327     fi
42328   fi
42329 
42330   # Now let autoconf do it's magic
42331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42332 $as_echo_n "checking for X... " >&6; }
42333 
42334 
42335 # Check whether --with-x was given.
42336 if test "${with_x+set}" = set; then :
42337   withval=$with_x;
42338 fi
42339 
42340 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42341 if test "x$with_x" = xno; then
42342   # The user explicitly disabled X.
42343   have_x=disabled
42344 else
42345   case $x_includes,$x_libraries in #(
42346     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42347     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42348   $as_echo_n "(cached) " >&6
42349 else
42350   # One or both of the vars are not set, and there is no cached value.
42351 ac_x_includes=no ac_x_libraries=no
42352 rm -f -r conftest.dir
42353 if mkdir conftest.dir; then
42354   cd conftest.dir
42355   cat >Imakefile <<'_ACEOF'
42356 incroot:
42357         @echo incroot='${INCROOT}'
42358 usrlibdir:
42359         @echo usrlibdir='${USRLIBDIR}'
42360 libdir:
42361         @echo libdir='${LIBDIR}'
42362 _ACEOF
42363   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42364     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42365     for ac_var in incroot usrlibdir libdir; do
42366       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42367     done
42368     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42369     for ac_extension in a so sl dylib la dll; do
42370       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42371          test -f "$ac_im_libdir/libX11.$ac_extension"; then
42372         ac_im_usrlibdir=$ac_im_libdir; break
42373       fi
42374     done
42375     # Screen out bogus values from the imake configuration.  They are
42376     # bogus both because they are the default anyway, and because
42377     # using them would break gcc on systems where it needs fixed includes.
42378     case $ac_im_incroot in
42379         /usr/include) ac_x_includes= ;;
42380         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42381     esac
42382     case $ac_im_usrlibdir in
42383         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
42384         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42385     esac
42386   fi
42387   cd ..
42388   rm -f -r conftest.dir
42389 fi
42390 
42391 # Standard set of common directories for X headers.
42392 # Check X11 before X11Rn because it is often a symlink to the current release.
42393 ac_x_header_dirs='
42394 /usr/X11/include
42395 /usr/X11R7/include
42396 /usr/X11R6/include
42397 /usr/X11R5/include
42398 /usr/X11R4/include
42399 
42400 /usr/include/X11
42401 /usr/include/X11R7
42402 /usr/include/X11R6
42403 /usr/include/X11R5
42404 /usr/include/X11R4
42405 
42406 /usr/local/X11/include
42407 /usr/local/X11R7/include
42408 /usr/local/X11R6/include
42409 /usr/local/X11R5/include
42410 /usr/local/X11R4/include
42411 
42412 /usr/local/include/X11
42413 /usr/local/include/X11R7
42414 /usr/local/include/X11R6
42415 /usr/local/include/X11R5
42416 /usr/local/include/X11R4
42417 
42418 /usr/X386/include
42419 /usr/x386/include
42420 /usr/XFree86/include/X11
42421 
42422 /usr/include
42423 /usr/local/include
42424 /usr/unsupported/include
42425 /usr/athena/include
42426 /usr/local/x11r5/include
42427 /usr/lpp/Xamples/include
42428 
42429 /usr/openwin/include
42430 /usr/openwin/share/include'
42431 
42432 if test "$ac_x_includes" = no; then
42433   # Guess where to find include files, by looking for Xlib.h.
42434   # First, try using that file with no special directory specified.
42435   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42436 /* end confdefs.h.  */
42437 #include <X11/Xlib.h>
42438 _ACEOF
42439 if ac_fn_cxx_try_cpp "$LINENO"; then :
42440   # We can compile using X headers with no special include directory.
42441 ac_x_includes=
42442 else
42443   for ac_dir in $ac_x_header_dirs; do
42444   if test -r "$ac_dir/X11/Xlib.h"; then
42445     ac_x_includes=$ac_dir
42446     break
42447   fi
42448 done
42449 fi
42450 rm -f conftest.err conftest.i conftest.$ac_ext
42451 fi # $ac_x_includes = no
42452 
42453 if test "$ac_x_libraries" = no; then
42454   # Check for the libraries.
42455   # See if we find them without any special options.
42456   # Don't add to $LIBS permanently.
42457   ac_save_LIBS=$LIBS
42458   LIBS="-lX11 $LIBS"
42459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42460 /* end confdefs.h.  */
42461 #include <X11/Xlib.h>
42462 int
42463 main ()
42464 {
42465 XrmInitialize ()
42466   ;
42467   return 0;
42468 }
42469 _ACEOF
42470 if ac_fn_cxx_try_link "$LINENO"; then :
42471   LIBS=$ac_save_LIBS
42472 # We can link X programs with no special library path.
42473 ac_x_libraries=
42474 else
42475   LIBS=$ac_save_LIBS
42476 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42477 do
42478   # Don't even attempt the hair of trying to link an X program!
42479   for ac_extension in a so sl dylib la dll; do
42480     if test -r "$ac_dir/libX11.$ac_extension"; then
42481       ac_x_libraries=$ac_dir
42482       break 2
42483     fi
42484   done
42485 done
42486 fi
42487 rm -f core conftest.err conftest.$ac_objext \
42488     conftest$ac_exeext conftest.$ac_ext
42489 fi # $ac_x_libraries = no
42490 
42491 case $ac_x_includes,$ac_x_libraries in #(
42492   no,* | *,no | *\'*)
42493     # Didn't find X, or a directory has "'" in its name.
42494     ac_cv_have_x="have_x=no";; #(
42495   *)
42496     # Record where we found X for the cache.
42497     ac_cv_have_x="have_x=yes\
42498         ac_x_includes='$ac_x_includes'\
42499         ac_x_libraries='$ac_x_libraries'"
42500 esac
42501 fi
42502 ;; #(
42503     *) have_x=yes;;
42504   esac
42505   eval "$ac_cv_have_x"
42506 fi # $with_x != no
42507 
42508 if test "$have_x" != yes; then
42509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42510 $as_echo "$have_x" >&6; }
42511   no_x=yes
42512 else
42513   # If each of the values was on the command line, it overrides each guess.
42514   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42515   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42516   # Update the cache value to reflect the command line values.
42517   ac_cv_have_x="have_x=yes\
42518         ac_x_includes='$x_includes'\
42519         ac_x_libraries='$x_libraries'"
42520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42521 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42522 fi
42523 
42524   if test "$no_x" = yes; then
42525   # Not all programs may use this symbol, but it does not hurt to define it.
42526 
42527 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42528 
42529   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42530 else
42531   if test -n "$x_includes"; then
42532     X_CFLAGS="$X_CFLAGS -I$x_includes"
42533   fi
42534 
42535   # It would also be nice to do this for all -L options, not just this one.
42536   if test -n "$x_libraries"; then
42537     X_LIBS="$X_LIBS -L$x_libraries"
42538     # For Solaris; some versions of Sun CC require a space after -R and
42539     # others require no space.  Words are not sufficient . . . .
42540     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42541 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
42542     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42543     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42544     ac_cxx_werror_flag=yes
42545     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42546 /* end confdefs.h.  */
42547 
42548 int
42549 main ()
42550 {
42551 
42552   ;
42553   return 0;
42554 }
42555 _ACEOF
42556 if ac_fn_cxx_try_link "$LINENO"; then :
42557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42558 $as_echo "no" >&6; }
42559        X_LIBS="$X_LIBS -R$x_libraries"
42560 else
42561   LIBS="$ac_xsave_LIBS -R $x_libraries"
42562        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42563 /* end confdefs.h.  */
42564 
42565 int
42566 main ()
42567 {
42568 
42569   ;
42570   return 0;
42571 }
42572 _ACEOF
42573 if ac_fn_cxx_try_link "$LINENO"; then :
42574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42575 $as_echo "yes" >&6; }
42576           X_LIBS="$X_LIBS -R $x_libraries"
42577 else
42578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42579 $as_echo "neither works" >&6; }
42580 fi
42581 rm -f core conftest.err conftest.$ac_objext \
42582     conftest$ac_exeext conftest.$ac_ext
42583 fi
42584 rm -f core conftest.err conftest.$ac_objext \
42585     conftest$ac_exeext conftest.$ac_ext
42586     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42587     LIBS=$ac_xsave_LIBS
42588   fi
42589 
42590   # Check for system-dependent libraries X programs must link with.
42591   # Do this before checking for the system-independent R6 libraries
42592   # (-lICE), since we may need -lsocket or whatever for X linking.
42593 
42594   if test "$ISC" = yes; then
42595     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42596   else
42597     # Martyn Johnson says this is needed for Ultrix, if the X
42598     # libraries were built with DECnet support.  And Karl Berry says
42599     # the Alpha needs dnet_stub (dnet does not exist).
42600     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42601     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42602 /* end confdefs.h.  */
42603 
42604 /* Override any GCC internal prototype to avoid an error.
42605    Use char because int might match the return type of a GCC
42606    builtin and then its argument prototype would still apply.  */
42607 #ifdef __cplusplus
42608 extern "C"
42609 #endif
42610 char XOpenDisplay ();
42611 int
42612 main ()
42613 {
42614 return XOpenDisplay ();
42615   ;
42616   return 0;
42617 }
42618 _ACEOF
42619 if ac_fn_cxx_try_link "$LINENO"; then :
42620 
42621 else
42622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42623 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42624 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42625   $as_echo_n "(cached) " >&6
42626 else
42627   ac_check_lib_save_LIBS=$LIBS
42628 LIBS="-ldnet  $LIBS"
42629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42630 /* end confdefs.h.  */
42631 
42632 /* Override any GCC internal prototype to avoid an error.
42633    Use char because int might match the return type of a GCC
42634    builtin and then its argument prototype would still apply.  */
42635 #ifdef __cplusplus
42636 extern "C"
42637 #endif
42638 char dnet_ntoa ();
42639 int
42640 main ()
42641 {
42642 return dnet_ntoa ();
42643   ;
42644   return 0;
42645 }
42646 _ACEOF
42647 if ac_fn_cxx_try_link "$LINENO"; then :
42648   ac_cv_lib_dnet_dnet_ntoa=yes
42649 else
42650   ac_cv_lib_dnet_dnet_ntoa=no
42651 fi
42652 rm -f core conftest.err conftest.$ac_objext \
42653     conftest$ac_exeext conftest.$ac_ext
42654 LIBS=$ac_check_lib_save_LIBS
42655 fi
42656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42657 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42658 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42659   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42660 fi
42661 
42662     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42663       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42664 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42665 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42666   $as_echo_n "(cached) " >&6
42667 else
42668   ac_check_lib_save_LIBS=$LIBS
42669 LIBS="-ldnet_stub  $LIBS"
42670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42671 /* end confdefs.h.  */
42672 
42673 /* Override any GCC internal prototype to avoid an error.
42674    Use char because int might match the return type of a GCC
42675    builtin and then its argument prototype would still apply.  */
42676 #ifdef __cplusplus
42677 extern "C"
42678 #endif
42679 char dnet_ntoa ();
42680 int
42681 main ()
42682 {
42683 return dnet_ntoa ();
42684   ;
42685   return 0;
42686 }
42687 _ACEOF
42688 if ac_fn_cxx_try_link "$LINENO"; then :
42689   ac_cv_lib_dnet_stub_dnet_ntoa=yes
42690 else
42691   ac_cv_lib_dnet_stub_dnet_ntoa=no
42692 fi
42693 rm -f core conftest.err conftest.$ac_objext \
42694     conftest$ac_exeext conftest.$ac_ext
42695 LIBS=$ac_check_lib_save_LIBS
42696 fi
42697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42698 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42699 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42700   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42701 fi
42702 
42703     fi
42704 fi
42705 rm -f core conftest.err conftest.$ac_objext \
42706     conftest$ac_exeext conftest.$ac_ext
42707     LIBS="$ac_xsave_LIBS"
42708 
42709     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42710     # to get the SysV transport functions.
42711     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42712     # needs -lnsl.
42713     # The nsl library prevents programs from opening the X display
42714     # on Irix 5.2, according to T.E. Dickey.
42715     # The functions gethostbyname, getservbyname, and inet_addr are
42716     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42717     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42718 if test "x$ac_cv_func_gethostbyname" = xyes; then :
42719 
42720 fi
42721 
42722     if test $ac_cv_func_gethostbyname = no; then
42723       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42724 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42725 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42726   $as_echo_n "(cached) " >&6
42727 else
42728   ac_check_lib_save_LIBS=$LIBS
42729 LIBS="-lnsl  $LIBS"
42730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42731 /* end confdefs.h.  */
42732 
42733 /* Override any GCC internal prototype to avoid an error.
42734    Use char because int might match the return type of a GCC
42735    builtin and then its argument prototype would still apply.  */
42736 #ifdef __cplusplus
42737 extern "C"
42738 #endif
42739 char gethostbyname ();
42740 int
42741 main ()
42742 {
42743 return gethostbyname ();
42744   ;
42745   return 0;
42746 }
42747 _ACEOF
42748 if ac_fn_cxx_try_link "$LINENO"; then :
42749   ac_cv_lib_nsl_gethostbyname=yes
42750 else
42751   ac_cv_lib_nsl_gethostbyname=no
42752 fi
42753 rm -f core conftest.err conftest.$ac_objext \
42754     conftest$ac_exeext conftest.$ac_ext
42755 LIBS=$ac_check_lib_save_LIBS
42756 fi
42757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42758 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42759 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42760   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42761 fi
42762 
42763       if test $ac_cv_lib_nsl_gethostbyname = no; then
42764         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42765 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42766 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42767   $as_echo_n "(cached) " >&6
42768 else
42769   ac_check_lib_save_LIBS=$LIBS
42770 LIBS="-lbsd  $LIBS"
42771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42772 /* end confdefs.h.  */
42773 
42774 /* Override any GCC internal prototype to avoid an error.
42775    Use char because int might match the return type of a GCC
42776    builtin and then its argument prototype would still apply.  */
42777 #ifdef __cplusplus
42778 extern "C"
42779 #endif
42780 char gethostbyname ();
42781 int
42782 main ()
42783 {
42784 return gethostbyname ();
42785   ;
42786   return 0;
42787 }
42788 _ACEOF
42789 if ac_fn_cxx_try_link "$LINENO"; then :
42790   ac_cv_lib_bsd_gethostbyname=yes
42791 else
42792   ac_cv_lib_bsd_gethostbyname=no
42793 fi
42794 rm -f core conftest.err conftest.$ac_objext \
42795     conftest$ac_exeext conftest.$ac_ext
42796 LIBS=$ac_check_lib_save_LIBS
42797 fi
42798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42799 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42800 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42801   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42802 fi
42803 
42804       fi
42805     fi
42806 
42807     # lieder@skyler.mavd.honeywell.com says without -lsocket,
42808     # socket/setsockopt and other routines are undefined under SCO ODT
42809     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42810     # on later versions), says Simon Leinen: it contains gethostby*
42811     # variants that don't use the name server (or something).  -lsocket
42812     # must be given before -lnsl if both are needed.  We assume that
42813     # if connect needs -lnsl, so does gethostbyname.
42814     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42815 if test "x$ac_cv_func_connect" = xyes; then :
42816 
42817 fi
42818 
42819     if test $ac_cv_func_connect = no; then
42820       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42821 $as_echo_n "checking for connect in -lsocket... " >&6; }
42822 if ${ac_cv_lib_socket_connect+:} false; then :
42823   $as_echo_n "(cached) " >&6
42824 else
42825   ac_check_lib_save_LIBS=$LIBS
42826 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42828 /* end confdefs.h.  */
42829 
42830 /* Override any GCC internal prototype to avoid an error.
42831    Use char because int might match the return type of a GCC
42832    builtin and then its argument prototype would still apply.  */
42833 #ifdef __cplusplus
42834 extern "C"
42835 #endif
42836 char connect ();
42837 int
42838 main ()
42839 {
42840 return connect ();
42841   ;
42842   return 0;
42843 }
42844 _ACEOF
42845 if ac_fn_cxx_try_link "$LINENO"; then :
42846   ac_cv_lib_socket_connect=yes
42847 else
42848   ac_cv_lib_socket_connect=no
42849 fi
42850 rm -f core conftest.err conftest.$ac_objext \
42851     conftest$ac_exeext conftest.$ac_ext
42852 LIBS=$ac_check_lib_save_LIBS
42853 fi
42854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42855 $as_echo "$ac_cv_lib_socket_connect" >&6; }
42856 if test "x$ac_cv_lib_socket_connect" = xyes; then :
42857   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42858 fi
42859 
42860     fi
42861 
42862     # Guillermo Gomez says -lposix is necessary on A/UX.
42863     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42864 if test "x$ac_cv_func_remove" = xyes; then :
42865 
42866 fi
42867 
42868     if test $ac_cv_func_remove = no; then
42869       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42870 $as_echo_n "checking for remove in -lposix... " >&6; }
42871 if ${ac_cv_lib_posix_remove+:} false; then :
42872   $as_echo_n "(cached) " >&6
42873 else
42874   ac_check_lib_save_LIBS=$LIBS
42875 LIBS="-lposix  $LIBS"
42876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42877 /* end confdefs.h.  */
42878 
42879 /* Override any GCC internal prototype to avoid an error.
42880    Use char because int might match the return type of a GCC
42881    builtin and then its argument prototype would still apply.  */
42882 #ifdef __cplusplus
42883 extern "C"
42884 #endif
42885 char remove ();
42886 int
42887 main ()
42888 {
42889 return remove ();
42890   ;
42891   return 0;
42892 }
42893 _ACEOF
42894 if ac_fn_cxx_try_link "$LINENO"; then :
42895   ac_cv_lib_posix_remove=yes
42896 else
42897   ac_cv_lib_posix_remove=no
42898 fi
42899 rm -f core conftest.err conftest.$ac_objext \
42900     conftest$ac_exeext conftest.$ac_ext
42901 LIBS=$ac_check_lib_save_LIBS
42902 fi
42903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42904 $as_echo "$ac_cv_lib_posix_remove" >&6; }
42905 if test "x$ac_cv_lib_posix_remove" = xyes; then :
42906   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42907 fi
42908 
42909     fi
42910 
42911     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42912     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42913 if test "x$ac_cv_func_shmat" = xyes; then :
42914 
42915 fi
42916 
42917     if test $ac_cv_func_shmat = no; then
42918       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42919 $as_echo_n "checking for shmat in -lipc... " >&6; }
42920 if ${ac_cv_lib_ipc_shmat+:} false; then :
42921   $as_echo_n "(cached) " >&6
42922 else
42923   ac_check_lib_save_LIBS=$LIBS
42924 LIBS="-lipc  $LIBS"
42925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42926 /* end confdefs.h.  */
42927 
42928 /* Override any GCC internal prototype to avoid an error.
42929    Use char because int might match the return type of a GCC
42930    builtin and then its argument prototype would still apply.  */
42931 #ifdef __cplusplus
42932 extern "C"
42933 #endif
42934 char shmat ();
42935 int
42936 main ()
42937 {
42938 return shmat ();
42939   ;
42940   return 0;
42941 }
42942 _ACEOF
42943 if ac_fn_cxx_try_link "$LINENO"; then :
42944   ac_cv_lib_ipc_shmat=yes
42945 else
42946   ac_cv_lib_ipc_shmat=no
42947 fi
42948 rm -f core conftest.err conftest.$ac_objext \
42949     conftest$ac_exeext conftest.$ac_ext
42950 LIBS=$ac_check_lib_save_LIBS
42951 fi
42952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42953 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42954 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42955   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42956 fi
42957 
42958     fi
42959   fi
42960 
42961   # Check for libraries that X11R6 Xt/Xaw programs need.
42962   ac_save_LDFLAGS=$LDFLAGS
42963   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42964   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42965   # check for ICE first), but we must link in the order -lSM -lICE or
42966   # we get undefined symbols.  So assume we have SM if we have ICE.
42967   # These have to be linked with before -lX11, unlike the other
42968   # libraries we check for below, so use a different variable.
42969   # John Interrante, Karl Berry
42970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42971 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42972 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42973   $as_echo_n "(cached) " >&6
42974 else
42975   ac_check_lib_save_LIBS=$LIBS
42976 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42978 /* end confdefs.h.  */
42979 
42980 /* Override any GCC internal prototype to avoid an error.
42981    Use char because int might match the return type of a GCC
42982    builtin and then its argument prototype would still apply.  */
42983 #ifdef __cplusplus
42984 extern "C"
42985 #endif
42986 char IceConnectionNumber ();
42987 int
42988 main ()
42989 {
42990 return IceConnectionNumber ();
42991   ;
42992   return 0;
42993 }
42994 _ACEOF
42995 if ac_fn_cxx_try_link "$LINENO"; then :
42996   ac_cv_lib_ICE_IceConnectionNumber=yes
42997 else
42998   ac_cv_lib_ICE_IceConnectionNumber=no
42999 fi
43000 rm -f core conftest.err conftest.$ac_objext \
43001     conftest$ac_exeext conftest.$ac_ext
43002 LIBS=$ac_check_lib_save_LIBS
43003 fi
43004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43005 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43006 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43007   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43008 fi
43009 
43010   LDFLAGS=$ac_save_LDFLAGS
43011 
43012 fi
43013 
43014 
43015   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43016   # this doesn't make sense so we remove it.
43017   if test "x$COMPILE_TYPE" = xcross; then
43018     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43019   fi
43020 
43021   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43022 
43023   # Print a helpful message on how to acquire the necessary build dependency.
43024   # x11 is the help tag: freetype, cups, pulse, alsa etc
43025   MISSING_DEPENDENCY=x11
43026 
43027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43028     cygwin_help $MISSING_DEPENDENCY
43029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43030     msys_help $MISSING_DEPENDENCY
43031   else
43032     PKGHANDLER_COMMAND=
43033 
43034     case $PKGHANDLER in
43035       apt-get)
43036         apt_help     $MISSING_DEPENDENCY ;;
43037       yum)
43038         yum_help     $MISSING_DEPENDENCY ;;
43039       port)
43040         port_help    $MISSING_DEPENDENCY ;;
43041       pkgutil)
43042         pkgutil_help $MISSING_DEPENDENCY ;;
43043       pkgadd)
43044         pkgadd_help  $MISSING_DEPENDENCY ;;
43045     esac
43046 
43047     if test "x$PKGHANDLER_COMMAND" != x; then
43048       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43049     fi
43050   fi
43051 
43052     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43053   fi
43054 
43055   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43056     OPENWIN_HOME="/usr/openwin"
43057     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43058     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43059         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43060         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43061         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43062   fi
43063 
43064   #
43065   # Weird Sol10 something check...TODO change to try compile
43066   #
43067   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43068     if test "`uname -r`" = "5.10"; then
43069       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43070         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43071       fi
43072     fi
43073   fi
43074 
43075   ac_ext=c
43076 ac_cpp='$CPP $CPPFLAGS'
43077 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43078 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43079 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43080 
43081   OLD_CFLAGS="$CFLAGS"
43082   CFLAGS="$CFLAGS $X_CFLAGS"
43083 
43084   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43085   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43086 do :
43087   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43088 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43089         # include <X11/Xlib.h>
43090         # include <X11/Xutil.h>
43091 
43092 
43093 "
43094 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43095   cat >>confdefs.h <<_ACEOF
43096 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43097 _ACEOF
43098  X11_A_OK=yes
43099 else
43100   X11_A_OK=no; break
43101 fi
43102 
43103 done
43104 
43105 
43106   CFLAGS="$OLD_CFLAGS"
43107   ac_ext=cpp
43108 ac_cpp='$CXXCPP $CPPFLAGS'
43109 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43110 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43111 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43112 
43113 
43114   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43115 
43116   # Print a helpful message on how to acquire the necessary build dependency.
43117   # x11 is the help tag: freetype, cups, pulse, alsa etc
43118   MISSING_DEPENDENCY=x11
43119 
43120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43121     cygwin_help $MISSING_DEPENDENCY
43122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43123     msys_help $MISSING_DEPENDENCY
43124   else
43125     PKGHANDLER_COMMAND=
43126 
43127     case $PKGHANDLER in
43128       apt-get)
43129         apt_help     $MISSING_DEPENDENCY ;;
43130       yum)
43131         yum_help     $MISSING_DEPENDENCY ;;
43132       port)
43133         port_help    $MISSING_DEPENDENCY ;;
43134       pkgutil)
43135         pkgutil_help $MISSING_DEPENDENCY ;;
43136       pkgadd)
43137         pkgadd_help  $MISSING_DEPENDENCY ;;
43138     esac
43139 
43140     if test "x$PKGHANDLER_COMMAND" != x; then
43141       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43142     fi
43143   fi
43144 
43145     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43146   fi
43147 
43148 
43149 
43150 
43151 
43152 
43153   ###############################################################################
43154   #
43155   # The common unix printing system cups is used to print from java.
43156   #
43157 
43158 # Check whether --with-cups was given.
43159 if test "${with_cups+set}" = set; then :
43160   withval=$with_cups;
43161 fi
43162 
43163 
43164 # Check whether --with-cups-include was given.
43165 if test "${with_cups_include+set}" = set; then :
43166   withval=$with_cups_include;
43167 fi
43168 
43169 
43170   if test "x$CUPS_NOT_NEEDED" = xyes; then
43171     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43172       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43173 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43174     fi
43175     CUPS_CFLAGS=
43176   else
43177     CUPS_FOUND=no
43178 
43179     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43180       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43181     fi
43182 
43183     if test "x${with_cups}" != x; then
43184       CUPS_CFLAGS="-I${with_cups}/include"
43185       CUPS_FOUND=yes
43186     fi
43187     if test "x${with_cups_include}" != x; then
43188       CUPS_CFLAGS="-I${with_cups_include}"
43189       CUPS_FOUND=yes
43190     fi
43191     if test "x$CUPS_FOUND" = xno; then
43192 
43193 
43194   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43195     # Source the builddeps file again, to make sure it uses the latest variables!
43196     . $builddepsfile
43197     # Look for a target and build machine specific resource!
43198     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43199     if test "x$resource" = x; then
43200       # Ok, lets instead look for a target specific resource
43201       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43202     fi
43203     if test "x$resource" = x; then
43204       # Ok, lets instead look for a build specific resource
43205       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43206     fi
43207     if test "x$resource" = x; then
43208       # Ok, lets instead look for a generic resource
43209       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43210       resource=${builddep_cups}
43211     fi
43212     if test "x$resource" != x; then
43213       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43214 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43215       # If the resource in the builddeps.conf file is an existing directory,
43216       # for example /java/linux/cups
43217       if test -d ${resource}; then
43218         depdir=${resource}
43219       else
43220 
43221   # cups is for example mymodule
43222   # $resource is for example libs/general/libmymod_1_2_3.zip
43223   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43224   # $with_builddeps_dir is for example /localhome/builddeps
43225   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43226   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43227   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43228   filename=`basename $resource`
43229   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43230   filebase=${filename%%.*}
43231   extension=${filename#*.}
43232   installdir=$with_builddeps_dir/$filebase
43233   if test ! -f $installdir/$filename.unpacked; then
43234     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43235 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43236     if test ! -d $installdir; then
43237       mkdir -p $installdir
43238     fi
43239     if test ! -d $installdir; then
43240       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43241     fi
43242     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43243     touch $tmpfile
43244     if test ! -f $tmpfile; then
43245       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43246     fi
43247 
43248   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43249   # $tmpfile is the local file name for the downloaded file.
43250   VALID_TOOL=no
43251   if test "x$BDEPS_FTP" = xwget; then
43252     VALID_TOOL=yes
43253     wget -O $tmpfile $with_builddeps_server/$resource
43254   fi
43255   if test "x$BDEPS_FTP" = xlftp; then
43256     VALID_TOOL=yes
43257     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43258   fi
43259   if test "x$BDEPS_FTP" = xftp; then
43260     VALID_TOOL=yes
43261     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43262     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43263     FTPUSERPWD=${FTPSERVER%%@*}
43264     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43265       FTPUSER=${userpwd%%:*}
43266       FTPPWD=${userpwd#*@}
43267       FTPSERVER=${FTPSERVER#*@}
43268     else
43269       FTPUSER=ftp
43270       FTPPWD=ftp
43271     fi
43272     # the "pass" command does not work on some
43273     # ftp clients (read ftp.exe) but if it works,
43274     # passive mode is better!
43275     ( \
43276         echo "user $FTPUSER $FTPPWD"        ; \
43277         echo "pass"                         ; \
43278         echo "bin"                          ; \
43279         echo "get $FTPPATH $tmpfile"              ; \
43280     ) | ftp -in $FTPSERVER
43281   fi
43282   if test "x$VALID_TOOL" != xyes; then
43283     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43284   fi
43285 
43286     mv $tmpfile $installdir/$filename
43287     if test ! -s $installdir/$filename; then
43288       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43289     fi
43290     case "$extension" in
43291       zip)  echo "Unzipping $installdir/$filename..."
43292         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43293         ;;
43294       tar.gz) echo "Untaring $installdir/$filename..."
43295         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43296         ;;
43297       tgz) echo "Untaring $installdir/$filename..."
43298         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43299         ;;
43300       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43301         ;;
43302     esac
43303   fi
43304   if test -f $installdir/$filename.unpacked; then
43305     depdir=$installdir
43306   fi
43307 
43308       fi
43309       # Source the builddeps file again, because in the previous command, the depdir
43310       # was updated to point at the current build dependency install directory.
43311       . $builddepsfile
43312       # Now extract variables from the builddeps.conf files.
43313       theroot=${builddep_cups_ROOT}
43314       thecflags=${builddep_cups_CFLAGS}
43315       thelibs=${builddep_cups_LIBS}
43316       if test "x$depdir" = x; then
43317         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43318       fi
43319       CUPS=$depdir
43320       if test "x$theroot" != x; then
43321         CUPS="$theroot"
43322       fi
43323       if test "x$thecflags" != x; then
43324         CUPS_CFLAGS="$thecflags"
43325       fi
43326       if test "x$thelibs" != x; then
43327         CUPS_LIBS="$thelibs"
43328       fi
43329       CUPS_FOUND=yes
43330 
43331     fi
43332 
43333   fi
43334 
43335     fi
43336     if test "x$CUPS_FOUND" = xno; then
43337       # Are the cups headers installed in the default /usr/include location?
43338       for ac_header in cups/cups.h cups/ppd.h
43339 do :
43340   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43341 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43342 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43343   cat >>confdefs.h <<_ACEOF
43344 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43345 _ACEOF
43346 
43347             CUPS_FOUND=yes
43348             CUPS_CFLAGS=
43349             DEFAULT_CUPS=yes
43350 
43351 
43352 fi
43353 
43354 done
43355 
43356     fi
43357     if test "x$CUPS_FOUND" = xno; then
43358       # Getting nervous now? Lets poke around for standard Solaris third-party
43359       # package installation locations.
43360       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43361 $as_echo_n "checking for cups headers... " >&6; }
43362       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43363         # An SFW package seems to be installed!
43364         CUPS_FOUND=yes
43365         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43366       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43367         # A CSW package seems to be installed!
43368         CUPS_FOUND=yes
43369         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43370       fi
43371       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43372 $as_echo "$CUPS_FOUND" >&6; }
43373     fi
43374     if test "x$CUPS_FOUND" = xno; then
43375 
43376   # Print a helpful message on how to acquire the necessary build dependency.
43377   # cups is the help tag: freetype, cups, pulse, alsa etc
43378   MISSING_DEPENDENCY=cups
43379 
43380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43381     cygwin_help $MISSING_DEPENDENCY
43382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43383     msys_help $MISSING_DEPENDENCY
43384   else
43385     PKGHANDLER_COMMAND=
43386 
43387     case $PKGHANDLER in
43388       apt-get)
43389         apt_help     $MISSING_DEPENDENCY ;;
43390       yum)
43391         yum_help     $MISSING_DEPENDENCY ;;
43392       port)
43393         port_help    $MISSING_DEPENDENCY ;;
43394       pkgutil)
43395         pkgutil_help $MISSING_DEPENDENCY ;;
43396       pkgadd)
43397         pkgadd_help  $MISSING_DEPENDENCY ;;
43398     esac
43399 
43400     if test "x$PKGHANDLER_COMMAND" != x; then
43401       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43402     fi
43403   fi
43404 
43405       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43406     fi
43407   fi
43408 
43409 
43410 
43411 
43412 
43413 
43414   ###############################################################################
43415   #
43416   # The ubiquitous freetype library is used to render fonts.
43417   #
43418 
43419 # Check whether --with-freetype was given.
43420 if test "${with_freetype+set}" = set; then :
43421   withval=$with_freetype;
43422 fi
43423 
43424 
43425 # Check whether --with-freetype-include was given.
43426 if test "${with_freetype_include+set}" = set; then :
43427   withval=$with_freetype_include;
43428 fi
43429 
43430 
43431 # Check whether --with-freetype-lib was given.
43432 if test "${with_freetype_lib+set}" = set; then :
43433   withval=$with_freetype_lib;
43434 fi
43435 
43436   # Check whether --enable-freetype-bundling was given.
43437 if test "${enable_freetype_bundling+set}" = set; then :
43438   enableval=$enable_freetype_bundling;
43439 fi
43440 
43441 
43442   FREETYPE_CFLAGS=
43443   FREETYPE_LIBS=
43444   FREETYPE_BUNDLE_LIB_PATH=
43445 
43446   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43447     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43448       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43449 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43450     fi
43451     if test "x$enable_freetype_bundling" != x; then
43452       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43453 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43454     fi
43455   else
43456     # freetype is needed to build; go get it!
43457 
43458     BUNDLE_FREETYPE="$enable_freetype_bundling"
43459 
43460     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43461       # User has specified settings
43462 
43463       if test "x$BUNDLE_FREETYPE" = x; then
43464         # If not specified, default is to bundle freetype
43465         BUNDLE_FREETYPE=yes
43466       fi
43467 
43468       if test "x$with_freetype" != x; then
43469         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43470         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43471       fi
43472 
43473       # Allow --with-freetype-lib and --with-freetype-include to override
43474       if test "x$with_freetype_include" != x; then
43475         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43476       fi
43477       if test "x$with_freetype_lib" != x; then
43478         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43479       fi
43480 
43481       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43482         # Okay, we got it. Check that it works.
43483 
43484   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43485   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43486   METHOD="--with-freetype"
43487 
43488   # First check if the files exists.
43489   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43490     # We found an arbitrary include file. That's a good sign.
43491     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43492 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43493     FOUND_FREETYPE=yes
43494 
43495     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43496     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43497       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43498 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43499       FOUND_FREETYPE=no
43500     else
43501       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43502         # On Windows, we will need both .lib and .dll file.
43503         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43504           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43505 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43506           FOUND_FREETYPE=no
43507         fi
43508       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
43509         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43510         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43511       fi
43512     fi
43513   fi
43514 
43515   if test "x$FOUND_FREETYPE" = xyes; then
43516 
43517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43518 
43519   # Input might be given as Windows format, start by converting to
43520   # unix format.
43521   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43522   new_path=`$CYGPATH -u "$path"`
43523 
43524   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43525   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43526   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43527   # "foo.exe" is OK but "foo" is an error.
43528   #
43529   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43530   # It is also a way to make sure we got the proper file name for the real test later on.
43531   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43532   if test "x$test_shortpath" = x; then
43533     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43534 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43535     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43536   fi
43537 
43538   # Call helper function which possibly converts this using DOS-style short mode.
43539   # If so, the updated path is stored in $new_path.
43540 
43541   input_path="$new_path"
43542   # Check if we need to convert this using DOS-style short mode. If the path
43543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43544   # take no chances and rewrite it.
43545   # Note: m4 eats our [], so we need to use [ and ] instead.
43546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43547   if test "x$has_forbidden_chars" != x; then
43548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43552       # Going to short mode and back again did indeed matter. Since short mode is
43553       # case insensitive, let's make it lowercase to improve readability.
43554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43555       # Now convert it back to Unix-stile (cygpath)
43556       input_path=`$CYGPATH -u "$shortmode_path"`
43557       new_path="$input_path"
43558     fi
43559   fi
43560 
43561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43562   if test "x$test_cygdrive_prefix" = x; then
43563     # As a simple fix, exclude /usr/bin since it's not a real path.
43564     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43566       # a path prefixed by /cygdrive for fixpath to work.
43567       new_path="$CYGWIN_ROOT_PATH$input_path"
43568     fi
43569   fi
43570 
43571 
43572   if test "x$path" != "x$new_path"; then
43573     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43575 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43576   fi
43577 
43578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43579 
43580   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43581   has_colon=`$ECHO $path | $GREP ^.:`
43582   new_path="$path"
43583   if test "x$has_colon" = x; then
43584     # Not in mixed or Windows style, start by that.
43585     new_path=`cmd //c echo $path`
43586   fi
43587 
43588 
43589   input_path="$new_path"
43590   # Check if we need to convert this using DOS-style short mode. If the path
43591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43592   # take no chances and rewrite it.
43593   # Note: m4 eats our [], so we need to use [ and ] instead.
43594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43595   if test "x$has_forbidden_chars" != x; then
43596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43598   fi
43599 
43600 
43601   windows_path="$new_path"
43602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43603     unix_path=`$CYGPATH -u "$windows_path"`
43604     new_path="$unix_path"
43605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43607     new_path="$unix_path"
43608   fi
43609 
43610   if test "x$path" != "x$new_path"; then
43611     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43613 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43614   fi
43615 
43616   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43617   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43618 
43619   else
43620     # We're on a posix platform. Hooray! :)
43621     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43622     has_space=`$ECHO "$path" | $GREP " "`
43623     if test "x$has_space" != x; then
43624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43625 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43626       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43627     fi
43628 
43629     # Use eval to expand a potential ~
43630     eval path="$path"
43631     if test ! -f "$path" && test ! -d "$path"; then
43632       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43633     fi
43634 
43635     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43636   fi
43637 
43638 
43639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43640 
43641   # Input might be given as Windows format, start by converting to
43642   # unix format.
43643   path="$POTENTIAL_FREETYPE_LIB_PATH"
43644   new_path=`$CYGPATH -u "$path"`
43645 
43646   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43647   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43648   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43649   # "foo.exe" is OK but "foo" is an error.
43650   #
43651   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43652   # It is also a way to make sure we got the proper file name for the real test later on.
43653   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43654   if test "x$test_shortpath" = x; then
43655     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43656 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43657     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43658   fi
43659 
43660   # Call helper function which possibly converts this using DOS-style short mode.
43661   # If so, the updated path is stored in $new_path.
43662 
43663   input_path="$new_path"
43664   # Check if we need to convert this using DOS-style short mode. If the path
43665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43666   # take no chances and rewrite it.
43667   # Note: m4 eats our [], so we need to use [ and ] instead.
43668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43669   if test "x$has_forbidden_chars" != x; then
43670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43674       # Going to short mode and back again did indeed matter. Since short mode is
43675       # case insensitive, let's make it lowercase to improve readability.
43676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43677       # Now convert it back to Unix-stile (cygpath)
43678       input_path=`$CYGPATH -u "$shortmode_path"`
43679       new_path="$input_path"
43680     fi
43681   fi
43682 
43683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43684   if test "x$test_cygdrive_prefix" = x; then
43685     # As a simple fix, exclude /usr/bin since it's not a real path.
43686     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43688       # a path prefixed by /cygdrive for fixpath to work.
43689       new_path="$CYGWIN_ROOT_PATH$input_path"
43690     fi
43691   fi
43692 
43693 
43694   if test "x$path" != "x$new_path"; then
43695     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43697 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43698   fi
43699 
43700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43701 
43702   path="$POTENTIAL_FREETYPE_LIB_PATH"
43703   has_colon=`$ECHO $path | $GREP ^.:`
43704   new_path="$path"
43705   if test "x$has_colon" = x; then
43706     # Not in mixed or Windows style, start by that.
43707     new_path=`cmd //c echo $path`
43708   fi
43709 
43710 
43711   input_path="$new_path"
43712   # Check if we need to convert this using DOS-style short mode. If the path
43713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43714   # take no chances and rewrite it.
43715   # Note: m4 eats our [], so we need to use [ and ] instead.
43716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43717   if test "x$has_forbidden_chars" != x; then
43718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43720   fi
43721 
43722 
43723   windows_path="$new_path"
43724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43725     unix_path=`$CYGPATH -u "$windows_path"`
43726     new_path="$unix_path"
43727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43729     new_path="$unix_path"
43730   fi
43731 
43732   if test "x$path" != "x$new_path"; then
43733     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43735 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43736   fi
43737 
43738   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43739   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43740 
43741   else
43742     # We're on a posix platform. Hooray! :)
43743     path="$POTENTIAL_FREETYPE_LIB_PATH"
43744     has_space=`$ECHO "$path" | $GREP " "`
43745     if test "x$has_space" != x; then
43746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43747 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43748       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43749     fi
43750 
43751     # Use eval to expand a potential ~
43752     eval path="$path"
43753     if test ! -f "$path" && test ! -d "$path"; then
43754       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43755     fi
43756 
43757     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43758   fi
43759 
43760 
43761     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43762     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43763 $as_echo_n "checking for freetype includes... " >&6; }
43764     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43765 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43766     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43767     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43768 $as_echo_n "checking for freetype libraries... " >&6; }
43769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43770 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43771   fi
43772 
43773         if test "x$FOUND_FREETYPE" != xyes; then
43774           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43775         fi
43776       else
43777         # User specified only one of lib or include. This is an error.
43778         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43779           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43780 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43781           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43782         else
43783           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43784 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43785           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43786         fi
43787       fi
43788     else
43789       # User did not specify settings, but we need freetype. Try to locate it.
43790 
43791       if test "x$BUNDLE_FREETYPE" = x; then
43792         # If not specified, default is to bundle freetype only on windows
43793         if test "x$OPENJDK_TARGET_OS" = xwindows; then
43794           BUNDLE_FREETYPE=yes
43795         else
43796           BUNDLE_FREETYPE=no
43797         fi
43798       fi
43799 
43800       if test "x$FOUND_FREETYPE" != xyes; then
43801         # Check builddeps
43802 
43803 
43804   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43805     # Source the builddeps file again, to make sure it uses the latest variables!
43806     . $builddepsfile
43807     # Look for a target and build machine specific resource!
43808     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43809     if test "x$resource" = x; then
43810       # Ok, lets instead look for a target specific resource
43811       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43812     fi
43813     if test "x$resource" = x; then
43814       # Ok, lets instead look for a build specific resource
43815       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43816     fi
43817     if test "x$resource" = x; then
43818       # Ok, lets instead look for a generic resource
43819       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43820       resource=${builddep_freetype2}
43821     fi
43822     if test "x$resource" != x; then
43823       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43824 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43825       # If the resource in the builddeps.conf file is an existing directory,
43826       # for example /java/linux/cups
43827       if test -d ${resource}; then
43828         depdir=${resource}
43829       else
43830 
43831   # freetype2 is for example mymodule
43832   # $resource is for example libs/general/libmymod_1_2_3.zip
43833   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43834   # $with_builddeps_dir is for example /localhome/builddeps
43835   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43836   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43837   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43838   filename=`basename $resource`
43839   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43840   filebase=${filename%%.*}
43841   extension=${filename#*.}
43842   installdir=$with_builddeps_dir/$filebase
43843   if test ! -f $installdir/$filename.unpacked; then
43844     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43845 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43846     if test ! -d $installdir; then
43847       mkdir -p $installdir
43848     fi
43849     if test ! -d $installdir; then
43850       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43851     fi
43852     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43853     touch $tmpfile
43854     if test ! -f $tmpfile; then
43855       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43856     fi
43857 
43858   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43859   # $tmpfile is the local file name for the downloaded file.
43860   VALID_TOOL=no
43861   if test "x$BDEPS_FTP" = xwget; then
43862     VALID_TOOL=yes
43863     wget -O $tmpfile $with_builddeps_server/$resource
43864   fi
43865   if test "x$BDEPS_FTP" = xlftp; then
43866     VALID_TOOL=yes
43867     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43868   fi
43869   if test "x$BDEPS_FTP" = xftp; then
43870     VALID_TOOL=yes
43871     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43872     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43873     FTPUSERPWD=${FTPSERVER%%@*}
43874     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43875       FTPUSER=${userpwd%%:*}
43876       FTPPWD=${userpwd#*@}
43877       FTPSERVER=${FTPSERVER#*@}
43878     else
43879       FTPUSER=ftp
43880       FTPPWD=ftp
43881     fi
43882     # the "pass" command does not work on some
43883     # ftp clients (read ftp.exe) but if it works,
43884     # passive mode is better!
43885     ( \
43886         echo "user $FTPUSER $FTPPWD"        ; \
43887         echo "pass"                         ; \
43888         echo "bin"                          ; \
43889         echo "get $FTPPATH $tmpfile"              ; \
43890     ) | ftp -in $FTPSERVER
43891   fi
43892   if test "x$VALID_TOOL" != xyes; then
43893     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43894   fi
43895 
43896     mv $tmpfile $installdir/$filename
43897     if test ! -s $installdir/$filename; then
43898       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43899     fi
43900     case "$extension" in
43901       zip)  echo "Unzipping $installdir/$filename..."
43902         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43903         ;;
43904       tar.gz) echo "Untaring $installdir/$filename..."
43905         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43906         ;;
43907       tgz) echo "Untaring $installdir/$filename..."
43908         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43909         ;;
43910       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43911         ;;
43912     esac
43913   fi
43914   if test -f $installdir/$filename.unpacked; then
43915     depdir=$installdir
43916   fi
43917 
43918       fi
43919       # Source the builddeps file again, because in the previous command, the depdir
43920       # was updated to point at the current build dependency install directory.
43921       . $builddepsfile
43922       # Now extract variables from the builddeps.conf files.
43923       theroot=${builddep_freetype2_ROOT}
43924       thecflags=${builddep_freetype2_CFLAGS}
43925       thelibs=${builddep_freetype2_LIBS}
43926       if test "x$depdir" = x; then
43927         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43928       fi
43929       FREETYPE=$depdir
43930       if test "x$theroot" != x; then
43931         FREETYPE="$theroot"
43932       fi
43933       if test "x$thecflags" != x; then
43934         FREETYPE_CFLAGS="$thecflags"
43935       fi
43936       if test "x$thelibs" != x; then
43937         FREETYPE_LIBS="$thelibs"
43938       fi
43939       FOUND_FREETYPE=yes
43940       else FOUND_FREETYPE=no
43941 
43942     fi
43943     else FOUND_FREETYPE=no
43944 
43945   fi
43946 
43947         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43948         if test "x$FOUND_FREETYPE" = xyes; then
43949           if test "x$BUNDLE_FREETYPE" = xyes; then
43950             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43951 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43952             FOUND_FREETYPE=no
43953           else
43954             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43955 $as_echo_n "checking for freetype... " >&6; }
43956             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43957 $as_echo "yes (using builddeps)" >&6; }
43958           fi
43959         fi
43960       fi
43961 
43962       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
43963       if test "x$SYSROOT" = x; then
43964         if test "x$FOUND_FREETYPE" != xyes; then
43965           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43966           if test "x$PKG_CONFIG" != x; then
43967 
43968 pkg_failed=no
43969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43970 $as_echo_n "checking for FREETYPE... " >&6; }
43971 
43972 if test -n "$FREETYPE_CFLAGS"; then
43973     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43974  elif test -n "$PKG_CONFIG"; then
43975     if test -n "$PKG_CONFIG" && \
43976     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43977   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43978   ac_status=$?
43979   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43980   test $ac_status = 0; }; then
43981   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43982 else
43983   pkg_failed=yes
43984 fi
43985  else
43986     pkg_failed=untried
43987 fi
43988 if test -n "$FREETYPE_LIBS"; then
43989     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43990  elif test -n "$PKG_CONFIG"; then
43991     if test -n "$PKG_CONFIG" && \
43992     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43993   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43994   ac_status=$?
43995   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43996   test $ac_status = 0; }; then
43997   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43998 else
43999   pkg_failed=yes
44000 fi
44001  else
44002     pkg_failed=untried
44003 fi
44004 
44005 
44006 
44007 if test $pkg_failed = yes; then
44008 
44009 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44010         _pkg_short_errors_supported=yes
44011 else
44012         _pkg_short_errors_supported=no
44013 fi
44014         if test $_pkg_short_errors_supported = yes; then
44015                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44016         else
44017                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44018         fi
44019         # Put the nasty error message in config.log where it belongs
44020         echo "$FREETYPE_PKG_ERRORS" >&5
44021 
44022         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44023 $as_echo "no" >&6; }
44024                 FOUND_FREETYPE=no
44025 elif test $pkg_failed = untried; then
44026         FOUND_FREETYPE=no
44027 else
44028         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44029         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44031 $as_echo "yes" >&6; }
44032         FOUND_FREETYPE=yes
44033 fi
44034             if test "x$FOUND_FREETYPE" = xyes; then
44035               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44036               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44037               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44038               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44039                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44040               fi
44041               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44042               if test "x$BUNDLE_FREETYPE" = xyes; then
44043                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44044 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44045                 FOUND_FREETYPE=no
44046               else
44047                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44048 $as_echo_n "checking for freetype... " >&6; }
44049                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44050 $as_echo "yes (using pkg-config)" >&6; }
44051               fi
44052             fi
44053           fi
44054         fi
44055       fi
44056 
44057       if test "x$FOUND_FREETYPE" != xyes; then
44058         # Check in well-known locations
44059         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44060           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44061 
44062   windows_path="$FREETYPE_BASE_DIR"
44063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44064     unix_path=`$CYGPATH -u "$windows_path"`
44065     FREETYPE_BASE_DIR="$unix_path"
44066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44068     FREETYPE_BASE_DIR="$unix_path"
44069   fi
44070 
44071 
44072   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44073   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44074   METHOD="well-known location"
44075 
44076   # First check if the files exists.
44077   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44078     # We found an arbitrary include file. That's a good sign.
44079     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44080 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44081     FOUND_FREETYPE=yes
44082 
44083     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44084     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44085       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44086 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44087       FOUND_FREETYPE=no
44088     else
44089       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44090         # On Windows, we will need both .lib and .dll file.
44091         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44092           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44093 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44094           FOUND_FREETYPE=no
44095         fi
44096       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44097         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44098         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44099       fi
44100     fi
44101   fi
44102 
44103   if test "x$FOUND_FREETYPE" = xyes; then
44104 
44105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44106 
44107   # Input might be given as Windows format, start by converting to
44108   # unix format.
44109   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44110   new_path=`$CYGPATH -u "$path"`
44111 
44112   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44113   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44114   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44115   # "foo.exe" is OK but "foo" is an error.
44116   #
44117   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44118   # It is also a way to make sure we got the proper file name for the real test later on.
44119   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44120   if test "x$test_shortpath" = x; then
44121     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44122 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44123     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44124   fi
44125 
44126   # Call helper function which possibly converts this using DOS-style short mode.
44127   # If so, the updated path is stored in $new_path.
44128 
44129   input_path="$new_path"
44130   # Check if we need to convert this using DOS-style short mode. If the path
44131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44132   # take no chances and rewrite it.
44133   # Note: m4 eats our [], so we need to use [ and ] instead.
44134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44135   if test "x$has_forbidden_chars" != x; then
44136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44137     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44138     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44139     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44140       # Going to short mode and back again did indeed matter. Since short mode is
44141       # case insensitive, let's make it lowercase to improve readability.
44142       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44143       # Now convert it back to Unix-stile (cygpath)
44144       input_path=`$CYGPATH -u "$shortmode_path"`
44145       new_path="$input_path"
44146     fi
44147   fi
44148 
44149   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44150   if test "x$test_cygdrive_prefix" = x; then
44151     # As a simple fix, exclude /usr/bin since it's not a real path.
44152     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44153       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44154       # a path prefixed by /cygdrive for fixpath to work.
44155       new_path="$CYGWIN_ROOT_PATH$input_path"
44156     fi
44157   fi
44158 
44159 
44160   if test "x$path" != "x$new_path"; then
44161     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44163 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44164   fi
44165 
44166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44167 
44168   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44169   has_colon=`$ECHO $path | $GREP ^.:`
44170   new_path="$path"
44171   if test "x$has_colon" = x; then
44172     # Not in mixed or Windows style, start by that.
44173     new_path=`cmd //c echo $path`
44174   fi
44175 
44176 
44177   input_path="$new_path"
44178   # Check if we need to convert this using DOS-style short mode. If the path
44179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44180   # take no chances and rewrite it.
44181   # Note: m4 eats our [], so we need to use [ and ] instead.
44182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44183   if test "x$has_forbidden_chars" != x; then
44184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44185     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44186   fi
44187 
44188 
44189   windows_path="$new_path"
44190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44191     unix_path=`$CYGPATH -u "$windows_path"`
44192     new_path="$unix_path"
44193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44195     new_path="$unix_path"
44196   fi
44197 
44198   if test "x$path" != "x$new_path"; then
44199     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44201 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44202   fi
44203 
44204   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44205   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44206 
44207   else
44208     # We're on a posix platform. Hooray! :)
44209     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44210     has_space=`$ECHO "$path" | $GREP " "`
44211     if test "x$has_space" != x; then
44212       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44213 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44214       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44215     fi
44216 
44217     # Use eval to expand a potential ~
44218     eval path="$path"
44219     if test ! -f "$path" && test ! -d "$path"; then
44220       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44221     fi
44222 
44223     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44224   fi
44225 
44226 
44227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44228 
44229   # Input might be given as Windows format, start by converting to
44230   # unix format.
44231   path="$POTENTIAL_FREETYPE_LIB_PATH"
44232   new_path=`$CYGPATH -u "$path"`
44233 
44234   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44235   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44236   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44237   # "foo.exe" is OK but "foo" is an error.
44238   #
44239   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44240   # It is also a way to make sure we got the proper file name for the real test later on.
44241   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44242   if test "x$test_shortpath" = x; then
44243     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44244 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44245     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44246   fi
44247 
44248   # Call helper function which possibly converts this using DOS-style short mode.
44249   # If so, the updated path is stored in $new_path.
44250 
44251   input_path="$new_path"
44252   # Check if we need to convert this using DOS-style short mode. If the path
44253   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44254   # take no chances and rewrite it.
44255   # Note: m4 eats our [], so we need to use [ and ] instead.
44256   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44257   if test "x$has_forbidden_chars" != x; then
44258     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44259     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44260     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44261     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44262       # Going to short mode and back again did indeed matter. Since short mode is
44263       # case insensitive, let's make it lowercase to improve readability.
44264       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44265       # Now convert it back to Unix-stile (cygpath)
44266       input_path=`$CYGPATH -u "$shortmode_path"`
44267       new_path="$input_path"
44268     fi
44269   fi
44270 
44271   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44272   if test "x$test_cygdrive_prefix" = x; then
44273     # As a simple fix, exclude /usr/bin since it's not a real path.
44274     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44275       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44276       # a path prefixed by /cygdrive for fixpath to work.
44277       new_path="$CYGWIN_ROOT_PATH$input_path"
44278     fi
44279   fi
44280 
44281 
44282   if test "x$path" != "x$new_path"; then
44283     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44284     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44285 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44286   fi
44287 
44288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44289 
44290   path="$POTENTIAL_FREETYPE_LIB_PATH"
44291   has_colon=`$ECHO $path | $GREP ^.:`
44292   new_path="$path"
44293   if test "x$has_colon" = x; then
44294     # Not in mixed or Windows style, start by that.
44295     new_path=`cmd //c echo $path`
44296   fi
44297 
44298 
44299   input_path="$new_path"
44300   # Check if we need to convert this using DOS-style short mode. If the path
44301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44302   # take no chances and rewrite it.
44303   # Note: m4 eats our [], so we need to use [ and ] instead.
44304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44305   if test "x$has_forbidden_chars" != x; then
44306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44307     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44308   fi
44309 
44310 
44311   windows_path="$new_path"
44312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44313     unix_path=`$CYGPATH -u "$windows_path"`
44314     new_path="$unix_path"
44315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44317     new_path="$unix_path"
44318   fi
44319 
44320   if test "x$path" != "x$new_path"; then
44321     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44323 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44324   fi
44325 
44326   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44327   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44328 
44329   else
44330     # We're on a posix platform. Hooray! :)
44331     path="$POTENTIAL_FREETYPE_LIB_PATH"
44332     has_space=`$ECHO "$path" | $GREP " "`
44333     if test "x$has_space" != x; then
44334       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44335 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44336       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44337     fi
44338 
44339     # Use eval to expand a potential ~
44340     eval path="$path"
44341     if test ! -f "$path" && test ! -d "$path"; then
44342       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44343     fi
44344 
44345     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44346   fi
44347 
44348 
44349     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44350     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44351 $as_echo_n "checking for freetype includes... " >&6; }
44352     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44353 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44354     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44355     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44356 $as_echo_n "checking for freetype libraries... " >&6; }
44357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44358 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44359   fi
44360 
44361           if test "x$FOUND_FREETYPE" != xyes; then
44362             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44363 
44364   windows_path="$FREETYPE_BASE_DIR"
44365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44366     unix_path=`$CYGPATH -u "$windows_path"`
44367     FREETYPE_BASE_DIR="$unix_path"
44368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44370     FREETYPE_BASE_DIR="$unix_path"
44371   fi
44372 
44373 
44374   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44375   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44376   METHOD="well-known location"
44377 
44378   # First check if the files exists.
44379   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44380     # We found an arbitrary include file. That's a good sign.
44381     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44382 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44383     FOUND_FREETYPE=yes
44384 
44385     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44386     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44387       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44388 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44389       FOUND_FREETYPE=no
44390     else
44391       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44392         # On Windows, we will need both .lib and .dll file.
44393         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44394           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44395 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44396           FOUND_FREETYPE=no
44397         fi
44398       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44399         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44400         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44401       fi
44402     fi
44403   fi
44404 
44405   if test "x$FOUND_FREETYPE" = xyes; then
44406 
44407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44408 
44409   # Input might be given as Windows format, start by converting to
44410   # unix format.
44411   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44412   new_path=`$CYGPATH -u "$path"`
44413 
44414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44417   # "foo.exe" is OK but "foo" is an error.
44418   #
44419   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44420   # It is also a way to make sure we got the proper file name for the real test later on.
44421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44422   if test "x$test_shortpath" = x; then
44423     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44424 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44425     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44426   fi
44427 
44428   # Call helper function which possibly converts this using DOS-style short mode.
44429   # If so, the updated path is stored in $new_path.
44430 
44431   input_path="$new_path"
44432   # Check if we need to convert this using DOS-style short mode. If the path
44433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44434   # take no chances and rewrite it.
44435   # Note: m4 eats our [], so we need to use [ and ] instead.
44436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44437   if test "x$has_forbidden_chars" != x; then
44438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44442       # Going to short mode and back again did indeed matter. Since short mode is
44443       # case insensitive, let's make it lowercase to improve readability.
44444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44445       # Now convert it back to Unix-stile (cygpath)
44446       input_path=`$CYGPATH -u "$shortmode_path"`
44447       new_path="$input_path"
44448     fi
44449   fi
44450 
44451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44452   if test "x$test_cygdrive_prefix" = x; then
44453     # As a simple fix, exclude /usr/bin since it's not a real path.
44454     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44456       # a path prefixed by /cygdrive for fixpath to work.
44457       new_path="$CYGWIN_ROOT_PATH$input_path"
44458     fi
44459   fi
44460 
44461 
44462   if test "x$path" != "x$new_path"; then
44463     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44465 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44466   fi
44467 
44468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44469 
44470   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44471   has_colon=`$ECHO $path | $GREP ^.:`
44472   new_path="$path"
44473   if test "x$has_colon" = x; then
44474     # Not in mixed or Windows style, start by that.
44475     new_path=`cmd //c echo $path`
44476   fi
44477 
44478 
44479   input_path="$new_path"
44480   # Check if we need to convert this using DOS-style short mode. If the path
44481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44482   # take no chances and rewrite it.
44483   # Note: m4 eats our [], so we need to use [ and ] instead.
44484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44485   if test "x$has_forbidden_chars" != x; then
44486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44488   fi
44489 
44490 
44491   windows_path="$new_path"
44492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44493     unix_path=`$CYGPATH -u "$windows_path"`
44494     new_path="$unix_path"
44495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44497     new_path="$unix_path"
44498   fi
44499 
44500   if test "x$path" != "x$new_path"; then
44501     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44503 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44504   fi
44505 
44506   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44507   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44508 
44509   else
44510     # We're on a posix platform. Hooray! :)
44511     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44512     has_space=`$ECHO "$path" | $GREP " "`
44513     if test "x$has_space" != x; then
44514       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44515 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44516       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44517     fi
44518 
44519     # Use eval to expand a potential ~
44520     eval path="$path"
44521     if test ! -f "$path" && test ! -d "$path"; then
44522       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44523     fi
44524 
44525     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44526   fi
44527 
44528 
44529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44530 
44531   # Input might be given as Windows format, start by converting to
44532   # unix format.
44533   path="$POTENTIAL_FREETYPE_LIB_PATH"
44534   new_path=`$CYGPATH -u "$path"`
44535 
44536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44539   # "foo.exe" is OK but "foo" is an error.
44540   #
44541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44542   # It is also a way to make sure we got the proper file name for the real test later on.
44543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44544   if test "x$test_shortpath" = x; then
44545     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44546 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44547     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44548   fi
44549 
44550   # Call helper function which possibly converts this using DOS-style short mode.
44551   # If so, the updated path is stored in $new_path.
44552 
44553   input_path="$new_path"
44554   # Check if we need to convert this using DOS-style short mode. If the path
44555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44556   # take no chances and rewrite it.
44557   # Note: m4 eats our [], so we need to use [ and ] instead.
44558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44559   if test "x$has_forbidden_chars" != x; then
44560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44561     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44562     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44563     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44564       # Going to short mode and back again did indeed matter. Since short mode is
44565       # case insensitive, let's make it lowercase to improve readability.
44566       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44567       # Now convert it back to Unix-stile (cygpath)
44568       input_path=`$CYGPATH -u "$shortmode_path"`
44569       new_path="$input_path"
44570     fi
44571   fi
44572 
44573   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44574   if test "x$test_cygdrive_prefix" = x; then
44575     # As a simple fix, exclude /usr/bin since it's not a real path.
44576     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44577       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44578       # a path prefixed by /cygdrive for fixpath to work.
44579       new_path="$CYGWIN_ROOT_PATH$input_path"
44580     fi
44581   fi
44582 
44583 
44584   if test "x$path" != "x$new_path"; then
44585     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44587 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44588   fi
44589 
44590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44591 
44592   path="$POTENTIAL_FREETYPE_LIB_PATH"
44593   has_colon=`$ECHO $path | $GREP ^.:`
44594   new_path="$path"
44595   if test "x$has_colon" = x; then
44596     # Not in mixed or Windows style, start by that.
44597     new_path=`cmd //c echo $path`
44598   fi
44599 
44600 
44601   input_path="$new_path"
44602   # Check if we need to convert this using DOS-style short mode. If the path
44603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44604   # take no chances and rewrite it.
44605   # Note: m4 eats our [], so we need to use [ and ] instead.
44606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44607   if test "x$has_forbidden_chars" != x; then
44608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44610   fi
44611 
44612 
44613   windows_path="$new_path"
44614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44615     unix_path=`$CYGPATH -u "$windows_path"`
44616     new_path="$unix_path"
44617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44619     new_path="$unix_path"
44620   fi
44621 
44622   if test "x$path" != "x$new_path"; then
44623     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44625 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44626   fi
44627 
44628   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44629   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44630 
44631   else
44632     # We're on a posix platform. Hooray! :)
44633     path="$POTENTIAL_FREETYPE_LIB_PATH"
44634     has_space=`$ECHO "$path" | $GREP " "`
44635     if test "x$has_space" != x; then
44636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44637 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44638       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44639     fi
44640 
44641     # Use eval to expand a potential ~
44642     eval path="$path"
44643     if test ! -f "$path" && test ! -d "$path"; then
44644       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44645     fi
44646 
44647     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44648   fi
44649 
44650 
44651     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44653 $as_echo_n "checking for freetype includes... " >&6; }
44654     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44655 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44656     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44657     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44658 $as_echo_n "checking for freetype libraries... " >&6; }
44659     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44660 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44661   fi
44662 
44663           fi
44664         else
44665           FREETYPE_BASE_DIR="$SYSROOT/usr"
44666 
44667   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44668   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44669   METHOD="well-known location"
44670 
44671   # First check if the files exists.
44672   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44673     # We found an arbitrary include file. That's a good sign.
44674     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44675 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44676     FOUND_FREETYPE=yes
44677 
44678     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44679     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44680       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44681 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44682       FOUND_FREETYPE=no
44683     else
44684       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44685         # On Windows, we will need both .lib and .dll file.
44686         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44687           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44688 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44689           FOUND_FREETYPE=no
44690         fi
44691       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44692         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44693         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44694       fi
44695     fi
44696   fi
44697 
44698   if test "x$FOUND_FREETYPE" = xyes; then
44699 
44700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44701 
44702   # Input might be given as Windows format, start by converting to
44703   # unix format.
44704   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44705   new_path=`$CYGPATH -u "$path"`
44706 
44707   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44708   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44709   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44710   # "foo.exe" is OK but "foo" is an error.
44711   #
44712   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44713   # It is also a way to make sure we got the proper file name for the real test later on.
44714   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44715   if test "x$test_shortpath" = x; then
44716     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44717 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44718     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44719   fi
44720 
44721   # Call helper function which possibly converts this using DOS-style short mode.
44722   # If so, the updated path is stored in $new_path.
44723 
44724   input_path="$new_path"
44725   # Check if we need to convert this using DOS-style short mode. If the path
44726   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44727   # take no chances and rewrite it.
44728   # Note: m4 eats our [], so we need to use [ and ] instead.
44729   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44730   if test "x$has_forbidden_chars" != x; then
44731     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44732     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44733     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44734     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44735       # Going to short mode and back again did indeed matter. Since short mode is
44736       # case insensitive, let's make it lowercase to improve readability.
44737       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44738       # Now convert it back to Unix-stile (cygpath)
44739       input_path=`$CYGPATH -u "$shortmode_path"`
44740       new_path="$input_path"
44741     fi
44742   fi
44743 
44744   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44745   if test "x$test_cygdrive_prefix" = x; then
44746     # As a simple fix, exclude /usr/bin since it's not a real path.
44747     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44748       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44749       # a path prefixed by /cygdrive for fixpath to work.
44750       new_path="$CYGWIN_ROOT_PATH$input_path"
44751     fi
44752   fi
44753 
44754 
44755   if test "x$path" != "x$new_path"; then
44756     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44757     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44758 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44759   fi
44760 
44761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44762 
44763   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44764   has_colon=`$ECHO $path | $GREP ^.:`
44765   new_path="$path"
44766   if test "x$has_colon" = x; then
44767     # Not in mixed or Windows style, start by that.
44768     new_path=`cmd //c echo $path`
44769   fi
44770 
44771 
44772   input_path="$new_path"
44773   # Check if we need to convert this using DOS-style short mode. If the path
44774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44775   # take no chances and rewrite it.
44776   # Note: m4 eats our [], so we need to use [ and ] instead.
44777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44778   if test "x$has_forbidden_chars" != x; then
44779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44780     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44781   fi
44782 
44783 
44784   windows_path="$new_path"
44785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44786     unix_path=`$CYGPATH -u "$windows_path"`
44787     new_path="$unix_path"
44788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44790     new_path="$unix_path"
44791   fi
44792 
44793   if test "x$path" != "x$new_path"; then
44794     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44795     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44796 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44797   fi
44798 
44799   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44800   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44801 
44802   else
44803     # We're on a posix platform. Hooray! :)
44804     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44805     has_space=`$ECHO "$path" | $GREP " "`
44806     if test "x$has_space" != x; then
44807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44808 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44809       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44810     fi
44811 
44812     # Use eval to expand a potential ~
44813     eval path="$path"
44814     if test ! -f "$path" && test ! -d "$path"; then
44815       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44816     fi
44817 
44818     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44819   fi
44820 
44821 
44822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44823 
44824   # Input might be given as Windows format, start by converting to
44825   # unix format.
44826   path="$POTENTIAL_FREETYPE_LIB_PATH"
44827   new_path=`$CYGPATH -u "$path"`
44828 
44829   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44830   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44831   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44832   # "foo.exe" is OK but "foo" is an error.
44833   #
44834   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44835   # It is also a way to make sure we got the proper file name for the real test later on.
44836   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44837   if test "x$test_shortpath" = x; then
44838     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44839 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44840     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44841   fi
44842 
44843   # Call helper function which possibly converts this using DOS-style short mode.
44844   # If so, the updated path is stored in $new_path.
44845 
44846   input_path="$new_path"
44847   # Check if we need to convert this using DOS-style short mode. If the path
44848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44849   # take no chances and rewrite it.
44850   # Note: m4 eats our [], so we need to use [ and ] instead.
44851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44852   if test "x$has_forbidden_chars" != x; then
44853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44854     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44855     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44856     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44857       # Going to short mode and back again did indeed matter. Since short mode is
44858       # case insensitive, let's make it lowercase to improve readability.
44859       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44860       # Now convert it back to Unix-stile (cygpath)
44861       input_path=`$CYGPATH -u "$shortmode_path"`
44862       new_path="$input_path"
44863     fi
44864   fi
44865 
44866   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44867   if test "x$test_cygdrive_prefix" = x; then
44868     # As a simple fix, exclude /usr/bin since it's not a real path.
44869     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44870       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44871       # a path prefixed by /cygdrive for fixpath to work.
44872       new_path="$CYGWIN_ROOT_PATH$input_path"
44873     fi
44874   fi
44875 
44876 
44877   if test "x$path" != "x$new_path"; then
44878     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44879     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44880 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44881   fi
44882 
44883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884 
44885   path="$POTENTIAL_FREETYPE_LIB_PATH"
44886   has_colon=`$ECHO $path | $GREP ^.:`
44887   new_path="$path"
44888   if test "x$has_colon" = x; then
44889     # Not in mixed or Windows style, start by that.
44890     new_path=`cmd //c echo $path`
44891   fi
44892 
44893 
44894   input_path="$new_path"
44895   # Check if we need to convert this using DOS-style short mode. If the path
44896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44897   # take no chances and rewrite it.
44898   # Note: m4 eats our [], so we need to use [ and ] instead.
44899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44900   if test "x$has_forbidden_chars" != x; then
44901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44903   fi
44904 
44905 
44906   windows_path="$new_path"
44907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44908     unix_path=`$CYGPATH -u "$windows_path"`
44909     new_path="$unix_path"
44910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44912     new_path="$unix_path"
44913   fi
44914 
44915   if test "x$path" != "x$new_path"; then
44916     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44917     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44918 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44919   fi
44920 
44921   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44922   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44923 
44924   else
44925     # We're on a posix platform. Hooray! :)
44926     path="$POTENTIAL_FREETYPE_LIB_PATH"
44927     has_space=`$ECHO "$path" | $GREP " "`
44928     if test "x$has_space" != x; then
44929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44930 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44931       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44932     fi
44933 
44934     # Use eval to expand a potential ~
44935     eval path="$path"
44936     if test ! -f "$path" && test ! -d "$path"; then
44937       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44938     fi
44939 
44940     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44941   fi
44942 
44943 
44944     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44945     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44946 $as_echo_n "checking for freetype includes... " >&6; }
44947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44948 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44949     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44950     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44951 $as_echo_n "checking for freetype libraries... " >&6; }
44952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44953 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44954   fi
44955 
44956 
44957           if test "x$FOUND_FREETYPE" != xyes; then
44958             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
44959 
44960   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44961   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44962   METHOD="well-known location"
44963 
44964   # First check if the files exists.
44965   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44966     # We found an arbitrary include file. That's a good sign.
44967     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44968 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44969     FOUND_FREETYPE=yes
44970 
44971     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44972     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44973       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44974 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44975       FOUND_FREETYPE=no
44976     else
44977       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44978         # On Windows, we will need both .lib and .dll file.
44979         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44980           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44981 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44982           FOUND_FREETYPE=no
44983         fi
44984       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
44985         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44986         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44987       fi
44988     fi
44989   fi
44990 
44991   if test "x$FOUND_FREETYPE" = xyes; then
44992 
44993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44994 
44995   # Input might be given as Windows format, start by converting to
44996   # unix format.
44997   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44998   new_path=`$CYGPATH -u "$path"`
44999 
45000   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45001   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45002   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45003   # "foo.exe" is OK but "foo" is an error.
45004   #
45005   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45006   # It is also a way to make sure we got the proper file name for the real test later on.
45007   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45008   if test "x$test_shortpath" = x; then
45009     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45010 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45011     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45012   fi
45013 
45014   # Call helper function which possibly converts this using DOS-style short mode.
45015   # If so, the updated path is stored in $new_path.
45016 
45017   input_path="$new_path"
45018   # Check if we need to convert this using DOS-style short mode. If the path
45019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45020   # take no chances and rewrite it.
45021   # Note: m4 eats our [], so we need to use [ and ] instead.
45022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45023   if test "x$has_forbidden_chars" != x; then
45024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45025     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45026     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45027     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45028       # Going to short mode and back again did indeed matter. Since short mode is
45029       # case insensitive, let's make it lowercase to improve readability.
45030       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45031       # Now convert it back to Unix-stile (cygpath)
45032       input_path=`$CYGPATH -u "$shortmode_path"`
45033       new_path="$input_path"
45034     fi
45035   fi
45036 
45037   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45038   if test "x$test_cygdrive_prefix" = x; then
45039     # As a simple fix, exclude /usr/bin since it's not a real path.
45040     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45041       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45042       # a path prefixed by /cygdrive for fixpath to work.
45043       new_path="$CYGWIN_ROOT_PATH$input_path"
45044     fi
45045   fi
45046 
45047 
45048   if test "x$path" != "x$new_path"; then
45049     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45050     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45051 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45052   fi
45053 
45054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45055 
45056   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45057   has_colon=`$ECHO $path | $GREP ^.:`
45058   new_path="$path"
45059   if test "x$has_colon" = x; then
45060     # Not in mixed or Windows style, start by that.
45061     new_path=`cmd //c echo $path`
45062   fi
45063 
45064 
45065   input_path="$new_path"
45066   # Check if we need to convert this using DOS-style short mode. If the path
45067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45068   # take no chances and rewrite it.
45069   # Note: m4 eats our [], so we need to use [ and ] instead.
45070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45071   if test "x$has_forbidden_chars" != x; then
45072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45073     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45074   fi
45075 
45076 
45077   windows_path="$new_path"
45078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45079     unix_path=`$CYGPATH -u "$windows_path"`
45080     new_path="$unix_path"
45081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45083     new_path="$unix_path"
45084   fi
45085 
45086   if test "x$path" != "x$new_path"; then
45087     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45088     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45089 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45090   fi
45091 
45092   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45093   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45094 
45095   else
45096     # We're on a posix platform. Hooray! :)
45097     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45098     has_space=`$ECHO "$path" | $GREP " "`
45099     if test "x$has_space" != x; then
45100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45101 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45102       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45103     fi
45104 
45105     # Use eval to expand a potential ~
45106     eval path="$path"
45107     if test ! -f "$path" && test ! -d "$path"; then
45108       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45109     fi
45110 
45111     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45112   fi
45113 
45114 
45115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45116 
45117   # Input might be given as Windows format, start by converting to
45118   # unix format.
45119   path="$POTENTIAL_FREETYPE_LIB_PATH"
45120   new_path=`$CYGPATH -u "$path"`
45121 
45122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45125   # "foo.exe" is OK but "foo" is an error.
45126   #
45127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45128   # It is also a way to make sure we got the proper file name for the real test later on.
45129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45130   if test "x$test_shortpath" = x; then
45131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45132 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45133     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45134   fi
45135 
45136   # Call helper function which possibly converts this using DOS-style short mode.
45137   # If so, the updated path is stored in $new_path.
45138 
45139   input_path="$new_path"
45140   # Check if we need to convert this using DOS-style short mode. If the path
45141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45142   # take no chances and rewrite it.
45143   # Note: m4 eats our [], so we need to use [ and ] instead.
45144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45145   if test "x$has_forbidden_chars" != x; then
45146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45150       # Going to short mode and back again did indeed matter. Since short mode is
45151       # case insensitive, let's make it lowercase to improve readability.
45152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45153       # Now convert it back to Unix-stile (cygpath)
45154       input_path=`$CYGPATH -u "$shortmode_path"`
45155       new_path="$input_path"
45156     fi
45157   fi
45158 
45159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45160   if test "x$test_cygdrive_prefix" = x; then
45161     # As a simple fix, exclude /usr/bin since it's not a real path.
45162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45164       # a path prefixed by /cygdrive for fixpath to work.
45165       new_path="$CYGWIN_ROOT_PATH$input_path"
45166     fi
45167   fi
45168 
45169 
45170   if test "x$path" != "x$new_path"; then
45171     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45173 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45174   fi
45175 
45176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45177 
45178   path="$POTENTIAL_FREETYPE_LIB_PATH"
45179   has_colon=`$ECHO $path | $GREP ^.:`
45180   new_path="$path"
45181   if test "x$has_colon" = x; then
45182     # Not in mixed or Windows style, start by that.
45183     new_path=`cmd //c echo $path`
45184   fi
45185 
45186 
45187   input_path="$new_path"
45188   # Check if we need to convert this using DOS-style short mode. If the path
45189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45190   # take no chances and rewrite it.
45191   # Note: m4 eats our [], so we need to use [ and ] instead.
45192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45193   if test "x$has_forbidden_chars" != x; then
45194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45196   fi
45197 
45198 
45199   windows_path="$new_path"
45200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45201     unix_path=`$CYGPATH -u "$windows_path"`
45202     new_path="$unix_path"
45203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45205     new_path="$unix_path"
45206   fi
45207 
45208   if test "x$path" != "x$new_path"; then
45209     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45211 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45212   fi
45213 
45214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45216 
45217   else
45218     # We're on a posix platform. Hooray! :)
45219     path="$POTENTIAL_FREETYPE_LIB_PATH"
45220     has_space=`$ECHO "$path" | $GREP " "`
45221     if test "x$has_space" != x; then
45222       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45223 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45224       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45225     fi
45226 
45227     # Use eval to expand a potential ~
45228     eval path="$path"
45229     if test ! -f "$path" && test ! -d "$path"; then
45230       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45231     fi
45232 
45233     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45234   fi
45235 
45236 
45237     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45238     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45239 $as_echo_n "checking for freetype includes... " >&6; }
45240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45241 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45242     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45244 $as_echo_n "checking for freetype libraries... " >&6; }
45245     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45246 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45247   fi
45248 
45249           fi
45250 
45251           if test "x$FOUND_FREETYPE" != xyes; then
45252             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45253 
45254   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45255   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45256   METHOD="well-known location"
45257 
45258   # First check if the files exists.
45259   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45260     # We found an arbitrary include file. That's a good sign.
45261     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45262 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45263     FOUND_FREETYPE=yes
45264 
45265     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45266     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45267       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45268 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45269       FOUND_FREETYPE=no
45270     else
45271       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45272         # On Windows, we will need both .lib and .dll file.
45273         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45274           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45275 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45276           FOUND_FREETYPE=no
45277         fi
45278       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45279         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45280         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45281       fi
45282     fi
45283   fi
45284 
45285   if test "x$FOUND_FREETYPE" = xyes; then
45286 
45287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45288 
45289   # Input might be given as Windows format, start by converting to
45290   # unix format.
45291   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45292   new_path=`$CYGPATH -u "$path"`
45293 
45294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45297   # "foo.exe" is OK but "foo" is an error.
45298   #
45299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45300   # It is also a way to make sure we got the proper file name for the real test later on.
45301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45302   if test "x$test_shortpath" = x; then
45303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45304 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45305     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45306   fi
45307 
45308   # Call helper function which possibly converts this using DOS-style short mode.
45309   # If so, the updated path is stored in $new_path.
45310 
45311   input_path="$new_path"
45312   # Check if we need to convert this using DOS-style short mode. If the path
45313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45314   # take no chances and rewrite it.
45315   # Note: m4 eats our [], so we need to use [ and ] instead.
45316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45317   if test "x$has_forbidden_chars" != x; then
45318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45322       # Going to short mode and back again did indeed matter. Since short mode is
45323       # case insensitive, let's make it lowercase to improve readability.
45324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45325       # Now convert it back to Unix-stile (cygpath)
45326       input_path=`$CYGPATH -u "$shortmode_path"`
45327       new_path="$input_path"
45328     fi
45329   fi
45330 
45331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45332   if test "x$test_cygdrive_prefix" = x; then
45333     # As a simple fix, exclude /usr/bin since it's not a real path.
45334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45336       # a path prefixed by /cygdrive for fixpath to work.
45337       new_path="$CYGWIN_ROOT_PATH$input_path"
45338     fi
45339   fi
45340 
45341 
45342   if test "x$path" != "x$new_path"; then
45343     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45345 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45346   fi
45347 
45348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45349 
45350   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45351   has_colon=`$ECHO $path | $GREP ^.:`
45352   new_path="$path"
45353   if test "x$has_colon" = x; then
45354     # Not in mixed or Windows style, start by that.
45355     new_path=`cmd //c echo $path`
45356   fi
45357 
45358 
45359   input_path="$new_path"
45360   # Check if we need to convert this using DOS-style short mode. If the path
45361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45362   # take no chances and rewrite it.
45363   # Note: m4 eats our [], so we need to use [ and ] instead.
45364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45365   if test "x$has_forbidden_chars" != x; then
45366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45368   fi
45369 
45370 
45371   windows_path="$new_path"
45372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45373     unix_path=`$CYGPATH -u "$windows_path"`
45374     new_path="$unix_path"
45375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45377     new_path="$unix_path"
45378   fi
45379 
45380   if test "x$path" != "x$new_path"; then
45381     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45383 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45384   fi
45385 
45386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45388 
45389   else
45390     # We're on a posix platform. Hooray! :)
45391     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45392     has_space=`$ECHO "$path" | $GREP " "`
45393     if test "x$has_space" != x; then
45394       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45395 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45396       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45397     fi
45398 
45399     # Use eval to expand a potential ~
45400     eval path="$path"
45401     if test ! -f "$path" && test ! -d "$path"; then
45402       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45403     fi
45404 
45405     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45406   fi
45407 
45408 
45409   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45410 
45411   # Input might be given as Windows format, start by converting to
45412   # unix format.
45413   path="$POTENTIAL_FREETYPE_LIB_PATH"
45414   new_path=`$CYGPATH -u "$path"`
45415 
45416   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45417   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45418   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45419   # "foo.exe" is OK but "foo" is an error.
45420   #
45421   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45422   # It is also a way to make sure we got the proper file name for the real test later on.
45423   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45424   if test "x$test_shortpath" = x; then
45425     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45426 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45427     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45428   fi
45429 
45430   # Call helper function which possibly converts this using DOS-style short mode.
45431   # If so, the updated path is stored in $new_path.
45432 
45433   input_path="$new_path"
45434   # Check if we need to convert this using DOS-style short mode. If the path
45435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45436   # take no chances and rewrite it.
45437   # Note: m4 eats our [], so we need to use [ and ] instead.
45438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45439   if test "x$has_forbidden_chars" != x; then
45440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45441     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45442     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45443     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45444       # Going to short mode and back again did indeed matter. Since short mode is
45445       # case insensitive, let's make it lowercase to improve readability.
45446       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45447       # Now convert it back to Unix-stile (cygpath)
45448       input_path=`$CYGPATH -u "$shortmode_path"`
45449       new_path="$input_path"
45450     fi
45451   fi
45452 
45453   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45454   if test "x$test_cygdrive_prefix" = x; then
45455     # As a simple fix, exclude /usr/bin since it's not a real path.
45456     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45457       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45458       # a path prefixed by /cygdrive for fixpath to work.
45459       new_path="$CYGWIN_ROOT_PATH$input_path"
45460     fi
45461   fi
45462 
45463 
45464   if test "x$path" != "x$new_path"; then
45465     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45467 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45468   fi
45469 
45470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45471 
45472   path="$POTENTIAL_FREETYPE_LIB_PATH"
45473   has_colon=`$ECHO $path | $GREP ^.:`
45474   new_path="$path"
45475   if test "x$has_colon" = x; then
45476     # Not in mixed or Windows style, start by that.
45477     new_path=`cmd //c echo $path`
45478   fi
45479 
45480 
45481   input_path="$new_path"
45482   # Check if we need to convert this using DOS-style short mode. If the path
45483   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45484   # take no chances and rewrite it.
45485   # Note: m4 eats our [], so we need to use [ and ] instead.
45486   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45487   if test "x$has_forbidden_chars" != x; then
45488     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45489     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45490   fi
45491 
45492 
45493   windows_path="$new_path"
45494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45495     unix_path=`$CYGPATH -u "$windows_path"`
45496     new_path="$unix_path"
45497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45499     new_path="$unix_path"
45500   fi
45501 
45502   if test "x$path" != "x$new_path"; then
45503     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45504     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45505 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45506   fi
45507 
45508   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45509   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45510 
45511   else
45512     # We're on a posix platform. Hooray! :)
45513     path="$POTENTIAL_FREETYPE_LIB_PATH"
45514     has_space=`$ECHO "$path" | $GREP " "`
45515     if test "x$has_space" != x; then
45516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45517 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45518       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45519     fi
45520 
45521     # Use eval to expand a potential ~
45522     eval path="$path"
45523     if test ! -f "$path" && test ! -d "$path"; then
45524       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45525     fi
45526 
45527     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45528   fi
45529 
45530 
45531     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45533 $as_echo_n "checking for freetype includes... " >&6; }
45534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45535 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45536     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45538 $as_echo_n "checking for freetype libraries... " >&6; }
45539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45540 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45541   fi
45542 
45543           fi
45544 
45545           if test "x$FOUND_FREETYPE" != xyes; then
45546             FREETYPE_BASE_DIR="$SYSROOT/usr"
45547             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45548 
45549   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45550   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45551   METHOD="well-known location"
45552 
45553   # First check if the files exists.
45554   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45555     # We found an arbitrary include file. That's a good sign.
45556     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45557 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45558     FOUND_FREETYPE=yes
45559 
45560     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45561     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45562       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45563 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45564       FOUND_FREETYPE=no
45565     else
45566       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45567         # On Windows, we will need both .lib and .dll file.
45568         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45569           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45570 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45571           FOUND_FREETYPE=no
45572         fi
45573       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45574         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45575         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45576       fi
45577     fi
45578   fi
45579 
45580   if test "x$FOUND_FREETYPE" = xyes; then
45581 
45582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45583 
45584   # Input might be given as Windows format, start by converting to
45585   # unix format.
45586   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45587   new_path=`$CYGPATH -u "$path"`
45588 
45589   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45590   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45591   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45592   # "foo.exe" is OK but "foo" is an error.
45593   #
45594   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45595   # It is also a way to make sure we got the proper file name for the real test later on.
45596   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45597   if test "x$test_shortpath" = x; then
45598     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45599 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45600     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45601   fi
45602 
45603   # Call helper function which possibly converts this using DOS-style short mode.
45604   # If so, the updated path is stored in $new_path.
45605 
45606   input_path="$new_path"
45607   # Check if we need to convert this using DOS-style short mode. If the path
45608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45609   # take no chances and rewrite it.
45610   # Note: m4 eats our [], so we need to use [ and ] instead.
45611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45612   if test "x$has_forbidden_chars" != x; then
45613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45614     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45615     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45616     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45617       # Going to short mode and back again did indeed matter. Since short mode is
45618       # case insensitive, let's make it lowercase to improve readability.
45619       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45620       # Now convert it back to Unix-stile (cygpath)
45621       input_path=`$CYGPATH -u "$shortmode_path"`
45622       new_path="$input_path"
45623     fi
45624   fi
45625 
45626   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45627   if test "x$test_cygdrive_prefix" = x; then
45628     # As a simple fix, exclude /usr/bin since it's not a real path.
45629     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45630       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45631       # a path prefixed by /cygdrive for fixpath to work.
45632       new_path="$CYGWIN_ROOT_PATH$input_path"
45633     fi
45634   fi
45635 
45636 
45637   if test "x$path" != "x$new_path"; then
45638     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45639     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45640 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45641   fi
45642 
45643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45644 
45645   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45646   has_colon=`$ECHO $path | $GREP ^.:`
45647   new_path="$path"
45648   if test "x$has_colon" = x; then
45649     # Not in mixed or Windows style, start by that.
45650     new_path=`cmd //c echo $path`
45651   fi
45652 
45653 
45654   input_path="$new_path"
45655   # Check if we need to convert this using DOS-style short mode. If the path
45656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45657   # take no chances and rewrite it.
45658   # Note: m4 eats our [], so we need to use [ and ] instead.
45659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45660   if test "x$has_forbidden_chars" != x; then
45661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45662     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45663   fi
45664 
45665 
45666   windows_path="$new_path"
45667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45668     unix_path=`$CYGPATH -u "$windows_path"`
45669     new_path="$unix_path"
45670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45672     new_path="$unix_path"
45673   fi
45674 
45675   if test "x$path" != "x$new_path"; then
45676     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45677     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45678 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45679   fi
45680 
45681   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45682   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45683 
45684   else
45685     # We're on a posix platform. Hooray! :)
45686     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45687     has_space=`$ECHO "$path" | $GREP " "`
45688     if test "x$has_space" != x; then
45689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45690 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45691       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45692     fi
45693 
45694     # Use eval to expand a potential ~
45695     eval path="$path"
45696     if test ! -f "$path" && test ! -d "$path"; then
45697       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45698     fi
45699 
45700     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45701   fi
45702 
45703 
45704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45705 
45706   # Input might be given as Windows format, start by converting to
45707   # unix format.
45708   path="$POTENTIAL_FREETYPE_LIB_PATH"
45709   new_path=`$CYGPATH -u "$path"`
45710 
45711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45714   # "foo.exe" is OK but "foo" is an error.
45715   #
45716   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45717   # It is also a way to make sure we got the proper file name for the real test later on.
45718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45719   if test "x$test_shortpath" = x; then
45720     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45721 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45722     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45723   fi
45724 
45725   # Call helper function which possibly converts this using DOS-style short mode.
45726   # If so, the updated path is stored in $new_path.
45727 
45728   input_path="$new_path"
45729   # Check if we need to convert this using DOS-style short mode. If the path
45730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45731   # take no chances and rewrite it.
45732   # Note: m4 eats our [], so we need to use [ and ] instead.
45733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45734   if test "x$has_forbidden_chars" != x; then
45735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45736     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45737     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45738     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45739       # Going to short mode and back again did indeed matter. Since short mode is
45740       # case insensitive, let's make it lowercase to improve readability.
45741       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45742       # Now convert it back to Unix-stile (cygpath)
45743       input_path=`$CYGPATH -u "$shortmode_path"`
45744       new_path="$input_path"
45745     fi
45746   fi
45747 
45748   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45749   if test "x$test_cygdrive_prefix" = x; then
45750     # As a simple fix, exclude /usr/bin since it's not a real path.
45751     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45752       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45753       # a path prefixed by /cygdrive for fixpath to work.
45754       new_path="$CYGWIN_ROOT_PATH$input_path"
45755     fi
45756   fi
45757 
45758 
45759   if test "x$path" != "x$new_path"; then
45760     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45762 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45763   fi
45764 
45765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45766 
45767   path="$POTENTIAL_FREETYPE_LIB_PATH"
45768   has_colon=`$ECHO $path | $GREP ^.:`
45769   new_path="$path"
45770   if test "x$has_colon" = x; then
45771     # Not in mixed or Windows style, start by that.
45772     new_path=`cmd //c echo $path`
45773   fi
45774 
45775 
45776   input_path="$new_path"
45777   # Check if we need to convert this using DOS-style short mode. If the path
45778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45779   # take no chances and rewrite it.
45780   # Note: m4 eats our [], so we need to use [ and ] instead.
45781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45782   if test "x$has_forbidden_chars" != x; then
45783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45784     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45785   fi
45786 
45787 
45788   windows_path="$new_path"
45789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45790     unix_path=`$CYGPATH -u "$windows_path"`
45791     new_path="$unix_path"
45792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45794     new_path="$unix_path"
45795   fi
45796 
45797   if test "x$path" != "x$new_path"; then
45798     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45799     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45800 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45801   fi
45802 
45803   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45804   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45805 
45806   else
45807     # We're on a posix platform. Hooray! :)
45808     path="$POTENTIAL_FREETYPE_LIB_PATH"
45809     has_space=`$ECHO "$path" | $GREP " "`
45810     if test "x$has_space" != x; then
45811       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45812 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45813       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45814     fi
45815 
45816     # Use eval to expand a potential ~
45817     eval path="$path"
45818     if test ! -f "$path" && test ! -d "$path"; then
45819       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45820     fi
45821 
45822     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45823   fi
45824 
45825 
45826     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45827     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45828 $as_echo_n "checking for freetype includes... " >&6; }
45829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45830 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45831     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45832     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45833 $as_echo_n "checking for freetype libraries... " >&6; }
45834     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45835 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45836   fi
45837 
45838             else
45839 
45840   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45841   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45842   METHOD="well-known location"
45843 
45844   # First check if the files exists.
45845   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45846     # We found an arbitrary include file. That's a good sign.
45847     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45848 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45849     FOUND_FREETYPE=yes
45850 
45851     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45852     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45853       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45854 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45855       FOUND_FREETYPE=no
45856     else
45857       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45858         # On Windows, we will need both .lib and .dll file.
45859         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45860           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45861 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45862           FOUND_FREETYPE=no
45863         fi
45864       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
45865         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45866         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45867       fi
45868     fi
45869   fi
45870 
45871   if test "x$FOUND_FREETYPE" = xyes; then
45872 
45873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45874 
45875   # Input might be given as Windows format, start by converting to
45876   # unix format.
45877   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45878   new_path=`$CYGPATH -u "$path"`
45879 
45880   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45881   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45882   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45883   # "foo.exe" is OK but "foo" is an error.
45884   #
45885   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45886   # It is also a way to make sure we got the proper file name for the real test later on.
45887   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45888   if test "x$test_shortpath" = x; then
45889     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45890 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45891     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45892   fi
45893 
45894   # Call helper function which possibly converts this using DOS-style short mode.
45895   # If so, the updated path is stored in $new_path.
45896 
45897   input_path="$new_path"
45898   # Check if we need to convert this using DOS-style short mode. If the path
45899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45900   # take no chances and rewrite it.
45901   # Note: m4 eats our [], so we need to use [ and ] instead.
45902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45903   if test "x$has_forbidden_chars" != x; then
45904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45908       # Going to short mode and back again did indeed matter. Since short mode is
45909       # case insensitive, let's make it lowercase to improve readability.
45910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45911       # Now convert it back to Unix-stile (cygpath)
45912       input_path=`$CYGPATH -u "$shortmode_path"`
45913       new_path="$input_path"
45914     fi
45915   fi
45916 
45917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45918   if test "x$test_cygdrive_prefix" = x; then
45919     # As a simple fix, exclude /usr/bin since it's not a real path.
45920     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45922       # a path prefixed by /cygdrive for fixpath to work.
45923       new_path="$CYGWIN_ROOT_PATH$input_path"
45924     fi
45925   fi
45926 
45927 
45928   if test "x$path" != "x$new_path"; then
45929     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45931 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45932   fi
45933 
45934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45935 
45936   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45937   has_colon=`$ECHO $path | $GREP ^.:`
45938   new_path="$path"
45939   if test "x$has_colon" = x; then
45940     # Not in mixed or Windows style, start by that.
45941     new_path=`cmd //c echo $path`
45942   fi
45943 
45944 
45945   input_path="$new_path"
45946   # Check if we need to convert this using DOS-style short mode. If the path
45947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45948   # take no chances and rewrite it.
45949   # Note: m4 eats our [], so we need to use [ and ] instead.
45950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45951   if test "x$has_forbidden_chars" != x; then
45952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45954   fi
45955 
45956 
45957   windows_path="$new_path"
45958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45959     unix_path=`$CYGPATH -u "$windows_path"`
45960     new_path="$unix_path"
45961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45963     new_path="$unix_path"
45964   fi
45965 
45966   if test "x$path" != "x$new_path"; then
45967     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45969 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45970   fi
45971 
45972   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45973   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45974 
45975   else
45976     # We're on a posix platform. Hooray! :)
45977     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45978     has_space=`$ECHO "$path" | $GREP " "`
45979     if test "x$has_space" != x; then
45980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45981 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45982       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45983     fi
45984 
45985     # Use eval to expand a potential ~
45986     eval path="$path"
45987     if test ! -f "$path" && test ! -d "$path"; then
45988       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45989     fi
45990 
45991     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45992   fi
45993 
45994 
45995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45996 
45997   # Input might be given as Windows format, start by converting to
45998   # unix format.
45999   path="$POTENTIAL_FREETYPE_LIB_PATH"
46000   new_path=`$CYGPATH -u "$path"`
46001 
46002   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46003   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46004   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46005   # "foo.exe" is OK but "foo" is an error.
46006   #
46007   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46008   # It is also a way to make sure we got the proper file name for the real test later on.
46009   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46010   if test "x$test_shortpath" = x; then
46011     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46012 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46013     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46014   fi
46015 
46016   # Call helper function which possibly converts this using DOS-style short mode.
46017   # If so, the updated path is stored in $new_path.
46018 
46019   input_path="$new_path"
46020   # Check if we need to convert this using DOS-style short mode. If the path
46021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46022   # take no chances and rewrite it.
46023   # Note: m4 eats our [], so we need to use [ and ] instead.
46024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46025   if test "x$has_forbidden_chars" != x; then
46026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46027     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46028     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46029     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46030       # Going to short mode and back again did indeed matter. Since short mode is
46031       # case insensitive, let's make it lowercase to improve readability.
46032       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46033       # Now convert it back to Unix-stile (cygpath)
46034       input_path=`$CYGPATH -u "$shortmode_path"`
46035       new_path="$input_path"
46036     fi
46037   fi
46038 
46039   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46040   if test "x$test_cygdrive_prefix" = x; then
46041     # As a simple fix, exclude /usr/bin since it's not a real path.
46042     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46043       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46044       # a path prefixed by /cygdrive for fixpath to work.
46045       new_path="$CYGWIN_ROOT_PATH$input_path"
46046     fi
46047   fi
46048 
46049 
46050   if test "x$path" != "x$new_path"; then
46051     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46053 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46054   fi
46055 
46056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46057 
46058   path="$POTENTIAL_FREETYPE_LIB_PATH"
46059   has_colon=`$ECHO $path | $GREP ^.:`
46060   new_path="$path"
46061   if test "x$has_colon" = x; then
46062     # Not in mixed or Windows style, start by that.
46063     new_path=`cmd //c echo $path`
46064   fi
46065 
46066 
46067   input_path="$new_path"
46068   # Check if we need to convert this using DOS-style short mode. If the path
46069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46070   # take no chances and rewrite it.
46071   # Note: m4 eats our [], so we need to use [ and ] instead.
46072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46073   if test "x$has_forbidden_chars" != x; then
46074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46076   fi
46077 
46078 
46079   windows_path="$new_path"
46080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46081     unix_path=`$CYGPATH -u "$windows_path"`
46082     new_path="$unix_path"
46083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46085     new_path="$unix_path"
46086   fi
46087 
46088   if test "x$path" != "x$new_path"; then
46089     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46091 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46092   fi
46093 
46094   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46095   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46096 
46097   else
46098     # We're on a posix platform. Hooray! :)
46099     path="$POTENTIAL_FREETYPE_LIB_PATH"
46100     has_space=`$ECHO "$path" | $GREP " "`
46101     if test "x$has_space" != x; then
46102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46103 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46104       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46105     fi
46106 
46107     # Use eval to expand a potential ~
46108     eval path="$path"
46109     if test ! -f "$path" && test ! -d "$path"; then
46110       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46111     fi
46112 
46113     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46114   fi
46115 
46116 
46117     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46118     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46119 $as_echo_n "checking for freetype includes... " >&6; }
46120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46121 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46122     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46124 $as_echo_n "checking for freetype libraries... " >&6; }
46125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46126 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46127   fi
46128 
46129               if test "x$FOUND_FREETYPE" != xyes; then
46130 
46131   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46132   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46133   METHOD="well-known location"
46134 
46135   # First check if the files exists.
46136   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46137     # We found an arbitrary include file. That's a good sign.
46138     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46139 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46140     FOUND_FREETYPE=yes
46141 
46142     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46143     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46144       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46145 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46146       FOUND_FREETYPE=no
46147     else
46148       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46149         # On Windows, we will need both .lib and .dll file.
46150         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46151           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46152 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46153           FOUND_FREETYPE=no
46154         fi
46155       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
46156         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46157         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46158       fi
46159     fi
46160   fi
46161 
46162   if test "x$FOUND_FREETYPE" = xyes; then
46163 
46164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46165 
46166   # Input might be given as Windows format, start by converting to
46167   # unix format.
46168   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46169   new_path=`$CYGPATH -u "$path"`
46170 
46171   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46172   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46173   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46174   # "foo.exe" is OK but "foo" is an error.
46175   #
46176   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46177   # It is also a way to make sure we got the proper file name for the real test later on.
46178   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46179   if test "x$test_shortpath" = x; then
46180     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46181 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46182     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46183   fi
46184 
46185   # Call helper function which possibly converts this using DOS-style short mode.
46186   # If so, the updated path is stored in $new_path.
46187 
46188   input_path="$new_path"
46189   # Check if we need to convert this using DOS-style short mode. If the path
46190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46191   # take no chances and rewrite it.
46192   # Note: m4 eats our [], so we need to use [ and ] instead.
46193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46194   if test "x$has_forbidden_chars" != x; then
46195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46196     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46197     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46198     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46199       # Going to short mode and back again did indeed matter. Since short mode is
46200       # case insensitive, let's make it lowercase to improve readability.
46201       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46202       # Now convert it back to Unix-stile (cygpath)
46203       input_path=`$CYGPATH -u "$shortmode_path"`
46204       new_path="$input_path"
46205     fi
46206   fi
46207 
46208   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46209   if test "x$test_cygdrive_prefix" = x; then
46210     # As a simple fix, exclude /usr/bin since it's not a real path.
46211     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46212       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46213       # a path prefixed by /cygdrive for fixpath to work.
46214       new_path="$CYGWIN_ROOT_PATH$input_path"
46215     fi
46216   fi
46217 
46218 
46219   if test "x$path" != "x$new_path"; then
46220     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46221     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46222 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46223   fi
46224 
46225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46226 
46227   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46228   has_colon=`$ECHO $path | $GREP ^.:`
46229   new_path="$path"
46230   if test "x$has_colon" = x; then
46231     # Not in mixed or Windows style, start by that.
46232     new_path=`cmd //c echo $path`
46233   fi
46234 
46235 
46236   input_path="$new_path"
46237   # Check if we need to convert this using DOS-style short mode. If the path
46238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46239   # take no chances and rewrite it.
46240   # Note: m4 eats our [], so we need to use [ and ] instead.
46241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46242   if test "x$has_forbidden_chars" != x; then
46243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46244     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46245   fi
46246 
46247 
46248   windows_path="$new_path"
46249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46250     unix_path=`$CYGPATH -u "$windows_path"`
46251     new_path="$unix_path"
46252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46254     new_path="$unix_path"
46255   fi
46256 
46257   if test "x$path" != "x$new_path"; then
46258     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46260 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46261   fi
46262 
46263   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46264   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46265 
46266   else
46267     # We're on a posix platform. Hooray! :)
46268     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46269     has_space=`$ECHO "$path" | $GREP " "`
46270     if test "x$has_space" != x; then
46271       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46272 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46273       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46274     fi
46275 
46276     # Use eval to expand a potential ~
46277     eval path="$path"
46278     if test ! -f "$path" && test ! -d "$path"; then
46279       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46280     fi
46281 
46282     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46283   fi
46284 
46285 
46286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46287 
46288   # Input might be given as Windows format, start by converting to
46289   # unix format.
46290   path="$POTENTIAL_FREETYPE_LIB_PATH"
46291   new_path=`$CYGPATH -u "$path"`
46292 
46293   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46294   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46295   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46296   # "foo.exe" is OK but "foo" is an error.
46297   #
46298   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46299   # It is also a way to make sure we got the proper file name for the real test later on.
46300   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46301   if test "x$test_shortpath" = x; then
46302     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46303 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46304     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46305   fi
46306 
46307   # Call helper function which possibly converts this using DOS-style short mode.
46308   # If so, the updated path is stored in $new_path.
46309 
46310   input_path="$new_path"
46311   # Check if we need to convert this using DOS-style short mode. If the path
46312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46313   # take no chances and rewrite it.
46314   # Note: m4 eats our [], so we need to use [ and ] instead.
46315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46316   if test "x$has_forbidden_chars" != x; then
46317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46318     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46319     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46320     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46321       # Going to short mode and back again did indeed matter. Since short mode is
46322       # case insensitive, let's make it lowercase to improve readability.
46323       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46324       # Now convert it back to Unix-stile (cygpath)
46325       input_path=`$CYGPATH -u "$shortmode_path"`
46326       new_path="$input_path"
46327     fi
46328   fi
46329 
46330   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46331   if test "x$test_cygdrive_prefix" = x; then
46332     # As a simple fix, exclude /usr/bin since it's not a real path.
46333     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46334       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46335       # a path prefixed by /cygdrive for fixpath to work.
46336       new_path="$CYGWIN_ROOT_PATH$input_path"
46337     fi
46338   fi
46339 
46340 
46341   if test "x$path" != "x$new_path"; then
46342     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46343     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46344 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46345   fi
46346 
46347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46348 
46349   path="$POTENTIAL_FREETYPE_LIB_PATH"
46350   has_colon=`$ECHO $path | $GREP ^.:`
46351   new_path="$path"
46352   if test "x$has_colon" = x; then
46353     # Not in mixed or Windows style, start by that.
46354     new_path=`cmd //c echo $path`
46355   fi
46356 
46357 
46358   input_path="$new_path"
46359   # Check if we need to convert this using DOS-style short mode. If the path
46360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46361   # take no chances and rewrite it.
46362   # Note: m4 eats our [], so we need to use [ and ] instead.
46363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46364   if test "x$has_forbidden_chars" != x; then
46365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46366     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46367   fi
46368 
46369 
46370   windows_path="$new_path"
46371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46372     unix_path=`$CYGPATH -u "$windows_path"`
46373     new_path="$unix_path"
46374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46376     new_path="$unix_path"
46377   fi
46378 
46379   if test "x$path" != "x$new_path"; then
46380     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46381     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46382 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46383   fi
46384 
46385   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46386   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46387 
46388   else
46389     # We're on a posix platform. Hooray! :)
46390     path="$POTENTIAL_FREETYPE_LIB_PATH"
46391     has_space=`$ECHO "$path" | $GREP " "`
46392     if test "x$has_space" != x; then
46393       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46394 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46395       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46396     fi
46397 
46398     # Use eval to expand a potential ~
46399     eval path="$path"
46400     if test ! -f "$path" && test ! -d "$path"; then
46401       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46402     fi
46403 
46404     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46405   fi
46406 
46407 
46408     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46410 $as_echo_n "checking for freetype includes... " >&6; }
46411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46412 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46413     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46414     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46415 $as_echo_n "checking for freetype libraries... " >&6; }
46416     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46417 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46418   fi
46419 
46420               fi
46421             fi
46422           fi
46423         fi
46424       fi # end check in well-known locations
46425 
46426       if test "x$FOUND_FREETYPE" != xyes; then
46427 
46428   # Print a helpful message on how to acquire the necessary build dependency.
46429   # freetype is the help tag: freetype, cups, pulse, alsa etc
46430   MISSING_DEPENDENCY=freetype
46431 
46432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46433     cygwin_help $MISSING_DEPENDENCY
46434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46435     msys_help $MISSING_DEPENDENCY
46436   else
46437     PKGHANDLER_COMMAND=
46438 
46439     case $PKGHANDLER in
46440       apt-get)
46441         apt_help     $MISSING_DEPENDENCY ;;
46442       yum)
46443         yum_help     $MISSING_DEPENDENCY ;;
46444       port)
46445         port_help    $MISSING_DEPENDENCY ;;
46446       pkgutil)
46447         pkgutil_help $MISSING_DEPENDENCY ;;
46448       pkgadd)
46449         pkgadd_help  $MISSING_DEPENDENCY ;;
46450     esac
46451 
46452     if test "x$PKGHANDLER_COMMAND" != x; then
46453       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46454     fi
46455   fi
46456 
46457         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46458       fi
46459     fi # end user specified settings
46460 
46461     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46462     if test "x$FREETYPE_CFLAGS" = x; then
46463 
46464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46465 
46466   # Input might be given as Windows format, start by converting to
46467   # unix format.
46468   path="$FREETYPE_INCLUDE_PATH"
46469   new_path=`$CYGPATH -u "$path"`
46470 
46471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46474   # "foo.exe" is OK but "foo" is an error.
46475   #
46476   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46477   # It is also a way to make sure we got the proper file name for the real test later on.
46478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46479   if test "x$test_shortpath" = x; then
46480     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46481 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46482     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46483   fi
46484 
46485   # Call helper function which possibly converts this using DOS-style short mode.
46486   # If so, the updated path is stored in $new_path.
46487 
46488   input_path="$new_path"
46489   # Check if we need to convert this using DOS-style short mode. If the path
46490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46491   # take no chances and rewrite it.
46492   # Note: m4 eats our [], so we need to use [ and ] instead.
46493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46494   if test "x$has_forbidden_chars" != x; then
46495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46496     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46497     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46498     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46499       # Going to short mode and back again did indeed matter. Since short mode is
46500       # case insensitive, let's make it lowercase to improve readability.
46501       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46502       # Now convert it back to Unix-stile (cygpath)
46503       input_path=`$CYGPATH -u "$shortmode_path"`
46504       new_path="$input_path"
46505     fi
46506   fi
46507 
46508   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46509   if test "x$test_cygdrive_prefix" = x; then
46510     # As a simple fix, exclude /usr/bin since it's not a real path.
46511     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46512       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46513       # a path prefixed by /cygdrive for fixpath to work.
46514       new_path="$CYGWIN_ROOT_PATH$input_path"
46515     fi
46516   fi
46517 
46518 
46519   if test "x$path" != "x$new_path"; then
46520     FREETYPE_INCLUDE_PATH="$new_path"
46521     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46522 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46523   fi
46524 
46525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46526 
46527   path="$FREETYPE_INCLUDE_PATH"
46528   has_colon=`$ECHO $path | $GREP ^.:`
46529   new_path="$path"
46530   if test "x$has_colon" = x; then
46531     # Not in mixed or Windows style, start by that.
46532     new_path=`cmd //c echo $path`
46533   fi
46534 
46535 
46536   input_path="$new_path"
46537   # Check if we need to convert this using DOS-style short mode. If the path
46538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46539   # take no chances and rewrite it.
46540   # Note: m4 eats our [], so we need to use [ and ] instead.
46541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46542   if test "x$has_forbidden_chars" != x; then
46543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46544     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46545   fi
46546 
46547 
46548   windows_path="$new_path"
46549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46550     unix_path=`$CYGPATH -u "$windows_path"`
46551     new_path="$unix_path"
46552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46554     new_path="$unix_path"
46555   fi
46556 
46557   if test "x$path" != "x$new_path"; then
46558     FREETYPE_INCLUDE_PATH="$new_path"
46559     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46560 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46561   fi
46562 
46563   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46564   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46565 
46566   else
46567     # We're on a posix platform. Hooray! :)
46568     path="$FREETYPE_INCLUDE_PATH"
46569     has_space=`$ECHO "$path" | $GREP " "`
46570     if test "x$has_space" != x; then
46571       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46572 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46573       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46574     fi
46575 
46576     # Use eval to expand a potential ~
46577     eval path="$path"
46578     if test ! -f "$path" && test ! -d "$path"; then
46579       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46580     fi
46581 
46582     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46583   fi
46584 
46585       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46586         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46587       else
46588         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46589       fi
46590     fi
46591 
46592     if test "x$FREETYPE_LIBS" = x; then
46593 
46594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46595 
46596   # Input might be given as Windows format, start by converting to
46597   # unix format.
46598   path="$FREETYPE_LIB_PATH"
46599   new_path=`$CYGPATH -u "$path"`
46600 
46601   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46602   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46603   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46604   # "foo.exe" is OK but "foo" is an error.
46605   #
46606   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46607   # It is also a way to make sure we got the proper file name for the real test later on.
46608   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46609   if test "x$test_shortpath" = x; then
46610     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46611 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46612     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46613   fi
46614 
46615   # Call helper function which possibly converts this using DOS-style short mode.
46616   # If so, the updated path is stored in $new_path.
46617 
46618   input_path="$new_path"
46619   # Check if we need to convert this using DOS-style short mode. If the path
46620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46621   # take no chances and rewrite it.
46622   # Note: m4 eats our [], so we need to use [ and ] instead.
46623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46624   if test "x$has_forbidden_chars" != x; then
46625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46626     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46627     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46628     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46629       # Going to short mode and back again did indeed matter. Since short mode is
46630       # case insensitive, let's make it lowercase to improve readability.
46631       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46632       # Now convert it back to Unix-stile (cygpath)
46633       input_path=`$CYGPATH -u "$shortmode_path"`
46634       new_path="$input_path"
46635     fi
46636   fi
46637 
46638   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46639   if test "x$test_cygdrive_prefix" = x; then
46640     # As a simple fix, exclude /usr/bin since it's not a real path.
46641     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46642       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46643       # a path prefixed by /cygdrive for fixpath to work.
46644       new_path="$CYGWIN_ROOT_PATH$input_path"
46645     fi
46646   fi
46647 
46648 
46649   if test "x$path" != "x$new_path"; then
46650     FREETYPE_LIB_PATH="$new_path"
46651     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46652 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46653   fi
46654 
46655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46656 
46657   path="$FREETYPE_LIB_PATH"
46658   has_colon=`$ECHO $path | $GREP ^.:`
46659   new_path="$path"
46660   if test "x$has_colon" = x; then
46661     # Not in mixed or Windows style, start by that.
46662     new_path=`cmd //c echo $path`
46663   fi
46664 
46665 
46666   input_path="$new_path"
46667   # Check if we need to convert this using DOS-style short mode. If the path
46668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46669   # take no chances and rewrite it.
46670   # Note: m4 eats our [], so we need to use [ and ] instead.
46671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46672   if test "x$has_forbidden_chars" != x; then
46673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46674     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46675   fi
46676 
46677 
46678   windows_path="$new_path"
46679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46680     unix_path=`$CYGPATH -u "$windows_path"`
46681     new_path="$unix_path"
46682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46684     new_path="$unix_path"
46685   fi
46686 
46687   if test "x$path" != "x$new_path"; then
46688     FREETYPE_LIB_PATH="$new_path"
46689     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46690 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46691   fi
46692 
46693   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46694   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46695 
46696   else
46697     # We're on a posix platform. Hooray! :)
46698     path="$FREETYPE_LIB_PATH"
46699     has_space=`$ECHO "$path" | $GREP " "`
46700     if test "x$has_space" != x; then
46701       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46702 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46703       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46704     fi
46705 
46706     # Use eval to expand a potential ~
46707     eval path="$path"
46708     if test ! -f "$path" && test ! -d "$path"; then
46709       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46710     fi
46711 
46712     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46713   fi
46714 
46715       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46716         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46717       else
46718         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46719       fi
46720     fi
46721 
46722     # Try to compile it
46723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46724 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
46725     ac_ext=cpp
46726 ac_cpp='$CXXCPP $CPPFLAGS'
46727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46730 
46731     PREV_CXXCFLAGS="$CXXFLAGS"
46732     PREV_LIBS="$LIBS"
46733     PREV_CXX="$CXX"
46734     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46735     LIBS="$LIBS $FREETYPE_LIBS"
46736     CXX="$FIXPATH $CXX"
46737     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46738 /* end confdefs.h.  */
46739 
46740           #include<ft2build.h>
46741           #include FT_FREETYPE_H
46742           int main () {
46743             FT_Init_FreeType(NULL);
46744             return 0;
46745           }
46746 
46747 _ACEOF
46748 if ac_fn_cxx_try_link "$LINENO"; then :
46749 
46750           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46751 $as_echo "yes" >&6; }
46752 
46753 else
46754 
46755           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46756 $as_echo "no" >&6; }
46757           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46758 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46759           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46760 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46761 
46762 
46763   # Print a helpful message on how to acquire the necessary build dependency.
46764   # freetype is the help tag: freetype, cups, pulse, alsa etc
46765   MISSING_DEPENDENCY=freetype
46766 
46767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46768     cygwin_help $MISSING_DEPENDENCY
46769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46770     msys_help $MISSING_DEPENDENCY
46771   else
46772     PKGHANDLER_COMMAND=
46773 
46774     case $PKGHANDLER in
46775       apt-get)
46776         apt_help     $MISSING_DEPENDENCY ;;
46777       yum)
46778         yum_help     $MISSING_DEPENDENCY ;;
46779       port)
46780         port_help    $MISSING_DEPENDENCY ;;
46781       pkgutil)
46782         pkgutil_help $MISSING_DEPENDENCY ;;
46783       pkgadd)
46784         pkgadd_help  $MISSING_DEPENDENCY ;;
46785     esac
46786 
46787     if test "x$PKGHANDLER_COMMAND" != x; then
46788       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46789     fi
46790   fi
46791 
46792 
46793           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46794 
46795 
46796 fi
46797 rm -f core conftest.err conftest.$ac_objext \
46798     conftest$ac_exeext conftest.$ac_ext
46799     CXXCFLAGS="$PREV_CXXFLAGS"
46800     LIBS="$PREV_LIBS"
46801     CXX="$PREV_CXX"
46802     ac_ext=cpp
46803 ac_cpp='$CXXCPP $CPPFLAGS'
46804 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46805 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46806 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46807 
46808 
46809     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46810 $as_echo_n "checking if we should bundle freetype... " >&6; }
46811     if test "x$BUNDLE_FREETYPE" = xyes; then
46812       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46813     fi
46814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46815 $as_echo "$BUNDLE_FREETYPE" >&6; }
46816 
46817   fi # end freetype needed
46818 
46819 
46820 
46821 
46822 
46823 
46824 
46825   ###############################################################################
46826   #
46827   # Check for alsa headers and libraries. Used on Linux/GNU systems.
46828   #
46829 
46830 # Check whether --with-alsa was given.
46831 if test "${with_alsa+set}" = set; then :
46832   withval=$with_alsa;
46833 fi
46834 
46835 
46836 # Check whether --with-alsa-include was given.
46837 if test "${with_alsa_include+set}" = set; then :
46838   withval=$with_alsa_include;
46839 fi
46840 
46841 
46842 # Check whether --with-alsa-lib was given.
46843 if test "${with_alsa_lib+set}" = set; then :
46844   withval=$with_alsa_lib;
46845 fi
46846 
46847 
46848   if test "x$ALSA_NOT_NEEDED" = xyes; then
46849     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46850       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46851 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46852     fi
46853     ALSA_CFLAGS=
46854     ALSA_LIBS=
46855   else
46856     ALSA_FOUND=no
46857 
46858     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46859       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46860     fi
46861 
46862     if test "x${with_alsa}" != x; then
46863       ALSA_LIBS="-L${with_alsa}/lib -lasound"
46864       ALSA_CFLAGS="-I${with_alsa}/include"
46865       ALSA_FOUND=yes
46866     fi
46867     if test "x${with_alsa_include}" != x; then
46868       ALSA_CFLAGS="-I${with_alsa_include}"
46869       ALSA_FOUND=yes
46870     fi
46871     if test "x${with_alsa_lib}" != x; then
46872       ALSA_LIBS="-L${with_alsa_lib} -lasound"
46873       ALSA_FOUND=yes
46874     fi
46875     if test "x$ALSA_FOUND" = xno; then
46876 
46877 
46878   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46879     # Source the builddeps file again, to make sure it uses the latest variables!
46880     . $builddepsfile
46881     # Look for a target and build machine specific resource!
46882     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46883     if test "x$resource" = x; then
46884       # Ok, lets instead look for a target specific resource
46885       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46886     fi
46887     if test "x$resource" = x; then
46888       # Ok, lets instead look for a build specific resource
46889       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46890     fi
46891     if test "x$resource" = x; then
46892       # Ok, lets instead look for a generic resource
46893       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46894       resource=${builddep_alsa}
46895     fi
46896     if test "x$resource" != x; then
46897       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46898 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46899       # If the resource in the builddeps.conf file is an existing directory,
46900       # for example /java/linux/cups
46901       if test -d ${resource}; then
46902         depdir=${resource}
46903       else
46904 
46905   # alsa is for example mymodule
46906   # $resource is for example libs/general/libmymod_1_2_3.zip
46907   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46908   # $with_builddeps_dir is for example /localhome/builddeps
46909   # depdir is the name of the variable into which we store the depdir, eg MYMOD
46910   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46911   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46912   filename=`basename $resource`
46913   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46914   filebase=${filename%%.*}
46915   extension=${filename#*.}
46916   installdir=$with_builddeps_dir/$filebase
46917   if test ! -f $installdir/$filename.unpacked; then
46918     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46919 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46920     if test ! -d $installdir; then
46921       mkdir -p $installdir
46922     fi
46923     if test ! -d $installdir; then
46924       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46925     fi
46926     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46927     touch $tmpfile
46928     if test ! -f $tmpfile; then
46929       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46930     fi
46931 
46932   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46933   # $tmpfile is the local file name for the downloaded file.
46934   VALID_TOOL=no
46935   if test "x$BDEPS_FTP" = xwget; then
46936     VALID_TOOL=yes
46937     wget -O $tmpfile $with_builddeps_server/$resource
46938   fi
46939   if test "x$BDEPS_FTP" = xlftp; then
46940     VALID_TOOL=yes
46941     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46942   fi
46943   if test "x$BDEPS_FTP" = xftp; then
46944     VALID_TOOL=yes
46945     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46946     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46947     FTPUSERPWD=${FTPSERVER%%@*}
46948     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46949       FTPUSER=${userpwd%%:*}
46950       FTPPWD=${userpwd#*@}
46951       FTPSERVER=${FTPSERVER#*@}
46952     else
46953       FTPUSER=ftp
46954       FTPPWD=ftp
46955     fi
46956     # the "pass" command does not work on some
46957     # ftp clients (read ftp.exe) but if it works,
46958     # passive mode is better!
46959     ( \
46960         echo "user $FTPUSER $FTPPWD"        ; \
46961         echo "pass"                         ; \
46962         echo "bin"                          ; \
46963         echo "get $FTPPATH $tmpfile"              ; \
46964     ) | ftp -in $FTPSERVER
46965   fi
46966   if test "x$VALID_TOOL" != xyes; then
46967     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46968   fi
46969 
46970     mv $tmpfile $installdir/$filename
46971     if test ! -s $installdir/$filename; then
46972       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46973     fi
46974     case "$extension" in
46975       zip)  echo "Unzipping $installdir/$filename..."
46976         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46977         ;;
46978       tar.gz) echo "Untaring $installdir/$filename..."
46979         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46980         ;;
46981       tgz) echo "Untaring $installdir/$filename..."
46982         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46983         ;;
46984       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46985         ;;
46986     esac
46987   fi
46988   if test -f $installdir/$filename.unpacked; then
46989     depdir=$installdir
46990   fi
46991 
46992       fi
46993       # Source the builddeps file again, because in the previous command, the depdir
46994       # was updated to point at the current build dependency install directory.
46995       . $builddepsfile
46996       # Now extract variables from the builddeps.conf files.
46997       theroot=${builddep_alsa_ROOT}
46998       thecflags=${builddep_alsa_CFLAGS}
46999       thelibs=${builddep_alsa_LIBS}
47000       if test "x$depdir" = x; then
47001         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47002       fi
47003       ALSA=$depdir
47004       if test "x$theroot" != x; then
47005         ALSA="$theroot"
47006       fi
47007       if test "x$thecflags" != x; then
47008         ALSA_CFLAGS="$thecflags"
47009       fi
47010       if test "x$thelibs" != x; then
47011         ALSA_LIBS="$thelibs"
47012       fi
47013       ALSA_FOUND=yes
47014       else ALSA_FOUND=no
47015 
47016     fi
47017     else ALSA_FOUND=no
47018 
47019   fi
47020 
47021     fi
47022     # Do not try pkg-config if we have a sysroot set.
47023     if test "x$SYSROOT" = x; then
47024       if test "x$ALSA_FOUND" = xno; then
47025 
47026 pkg_failed=no
47027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47028 $as_echo_n "checking for ALSA... " >&6; }
47029 
47030 if test -n "$ALSA_CFLAGS"; then
47031     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47032  elif test -n "$PKG_CONFIG"; then
47033     if test -n "$PKG_CONFIG" && \
47034     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47035   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47036   ac_status=$?
47037   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47038   test $ac_status = 0; }; then
47039   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47040 else
47041   pkg_failed=yes
47042 fi
47043  else
47044     pkg_failed=untried
47045 fi
47046 if test -n "$ALSA_LIBS"; then
47047     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47048  elif test -n "$PKG_CONFIG"; then
47049     if test -n "$PKG_CONFIG" && \
47050     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47051   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47052   ac_status=$?
47053   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47054   test $ac_status = 0; }; then
47055   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47056 else
47057   pkg_failed=yes
47058 fi
47059  else
47060     pkg_failed=untried
47061 fi
47062 
47063 
47064 
47065 if test $pkg_failed = yes; then
47066 
47067 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47068         _pkg_short_errors_supported=yes
47069 else
47070         _pkg_short_errors_supported=no
47071 fi
47072         if test $_pkg_short_errors_supported = yes; then
47073                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47074         else
47075                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47076         fi
47077         # Put the nasty error message in config.log where it belongs
47078         echo "$ALSA_PKG_ERRORS" >&5
47079 
47080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47081 $as_echo "no" >&6; }
47082                 ALSA_FOUND=no
47083 elif test $pkg_failed = untried; then
47084         ALSA_FOUND=no
47085 else
47086         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47087         ALSA_LIBS=$pkg_cv_ALSA_LIBS
47088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47089 $as_echo "yes" >&6; }
47090         ALSA_FOUND=yes
47091 fi
47092       fi
47093     fi
47094     if test "x$ALSA_FOUND" = xno; then
47095       for ac_header in alsa/asoundlib.h
47096 do :
47097   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47098 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47099   cat >>confdefs.h <<_ACEOF
47100 #define HAVE_ALSA_ASOUNDLIB_H 1
47101 _ACEOF
47102 
47103             ALSA_FOUND=yes
47104             ALSA_CFLAGS=-Iignoreme
47105             ALSA_LIBS=-lasound
47106             DEFAULT_ALSA=yes
47107 
47108 else
47109   ALSA_FOUND=no
47110 fi
47111 
47112 done
47113 
47114     fi
47115     if test "x$ALSA_FOUND" = xno; then
47116 
47117   # Print a helpful message on how to acquire the necessary build dependency.
47118   # alsa is the help tag: freetype, cups, pulse, alsa etc
47119   MISSING_DEPENDENCY=alsa
47120 
47121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47122     cygwin_help $MISSING_DEPENDENCY
47123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47124     msys_help $MISSING_DEPENDENCY
47125   else
47126     PKGHANDLER_COMMAND=
47127 
47128     case $PKGHANDLER in
47129       apt-get)
47130         apt_help     $MISSING_DEPENDENCY ;;
47131       yum)
47132         yum_help     $MISSING_DEPENDENCY ;;
47133       port)
47134         port_help    $MISSING_DEPENDENCY ;;
47135       pkgutil)
47136         pkgutil_help $MISSING_DEPENDENCY ;;
47137       pkgadd)
47138         pkgadd_help  $MISSING_DEPENDENCY ;;
47139     esac
47140 
47141     if test "x$PKGHANDLER_COMMAND" != x; then
47142       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47143     fi
47144   fi
47145 
47146       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47147     fi
47148   fi
47149 
47150 
47151 
47152 
47153 
47154 
47155   ###############################################################################
47156   #
47157   # Check for the jpeg library
47158   #
47159 
47160   USE_EXTERNAL_LIBJPEG=true
47161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47162 $as_echo_n "checking for main in -ljpeg... " >&6; }
47163 if ${ac_cv_lib_jpeg_main+:} false; then :
47164   $as_echo_n "(cached) " >&6
47165 else
47166   ac_check_lib_save_LIBS=$LIBS
47167 LIBS="-ljpeg  $LIBS"
47168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47169 /* end confdefs.h.  */
47170 
47171 
47172 int
47173 main ()
47174 {
47175 return main ();
47176   ;
47177   return 0;
47178 }
47179 _ACEOF
47180 if ac_fn_cxx_try_link "$LINENO"; then :
47181   ac_cv_lib_jpeg_main=yes
47182 else
47183   ac_cv_lib_jpeg_main=no
47184 fi
47185 rm -f core conftest.err conftest.$ac_objext \
47186     conftest$ac_exeext conftest.$ac_ext
47187 LIBS=$ac_check_lib_save_LIBS
47188 fi
47189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47190 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
47191 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47192   cat >>confdefs.h <<_ACEOF
47193 #define HAVE_LIBJPEG 1
47194 _ACEOF
47195 
47196   LIBS="-ljpeg $LIBS"
47197 
47198 else
47199    USE_EXTERNAL_LIBJPEG=false
47200       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47201 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47202 
47203 fi
47204 
47205 
47206 
47207   ###############################################################################
47208   #
47209   # Check for the gif library
47210   #
47211 
47212 
47213 # Check whether --with-giflib was given.
47214 if test "${with_giflib+set}" = set; then :
47215   withval=$with_giflib;
47216 fi
47217 
47218 
47219 
47220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47221 $as_echo_n "checking for which giflib to use... " >&6; }
47222 
47223   # default is bundled
47224   DEFAULT_GIFLIB=bundled
47225 
47226   #
47227   # if user didn't specify, use DEFAULT_GIFLIB
47228   #
47229   if test "x${with_giflib}" = "x"; then
47230     with_giflib=${DEFAULT_GIFLIB}
47231   fi
47232 
47233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47234 $as_echo "${with_giflib}" >&6; }
47235 
47236   if test "x${with_giflib}" = "xbundled"; then
47237     USE_EXTERNAL_LIBGIF=false
47238   elif test "x${with_giflib}" = "xsystem"; then
47239     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47240 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47241 
47242 else
47243    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47244 fi
47245 
47246 
47247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47248 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47249 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47250   $as_echo_n "(cached) " >&6
47251 else
47252   ac_check_lib_save_LIBS=$LIBS
47253 LIBS="-lgif  $LIBS"
47254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47255 /* end confdefs.h.  */
47256 
47257 /* Override any GCC internal prototype to avoid an error.
47258    Use char because int might match the return type of a GCC
47259    builtin and then its argument prototype would still apply.  */
47260 #ifdef __cplusplus
47261 extern "C"
47262 #endif
47263 char DGifGetCode ();
47264 int
47265 main ()
47266 {
47267 return DGifGetCode ();
47268   ;
47269   return 0;
47270 }
47271 _ACEOF
47272 if ac_fn_cxx_try_link "$LINENO"; then :
47273   ac_cv_lib_gif_DGifGetCode=yes
47274 else
47275   ac_cv_lib_gif_DGifGetCode=no
47276 fi
47277 rm -f core conftest.err conftest.$ac_objext \
47278     conftest$ac_exeext conftest.$ac_ext
47279 LIBS=$ac_check_lib_save_LIBS
47280 fi
47281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47282 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47283 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47284   cat >>confdefs.h <<_ACEOF
47285 #define HAVE_LIBGIF 1
47286 _ACEOF
47287 
47288   LIBS="-lgif $LIBS"
47289 
47290 else
47291    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47292 fi
47293 
47294 
47295     USE_EXTERNAL_LIBGIF=true
47296   else
47297     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47298   fi
47299 
47300 
47301   ###############################################################################
47302   #
47303   # Check for the png library
47304   #
47305 
47306 
47307 # Check whether --with-libpng was given.
47308 if test "${with_libpng+set}" = set; then :
47309   withval=$with_libpng;
47310 fi
47311 
47312 
47313 
47314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47315 $as_echo_n "checking for which libpng to use... " >&6; }
47316 
47317   # default is bundled
47318   DEFAULT_LIBPNG=bundled
47319 
47320   #
47321   # if user didn't specify, use DEFAULT_LIBPNG
47322   #
47323   if test "x${with_libpng}" = "x"; then
47324       with_libpng=${DEFAULT_LIBPNG}
47325   fi
47326 
47327   if test "x${with_libpng}" = "xbundled"; then
47328       USE_EXTERNAL_LIBPNG=false
47329       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47330 $as_echo "bundled" >&6; }
47331   elif test "x${with_libpng}" = "xsystem"; then
47332 
47333 pkg_failed=no
47334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47335 $as_echo_n "checking for PNG... " >&6; }
47336 
47337 if test -n "$PNG_CFLAGS"; then
47338     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47339  elif test -n "$PKG_CONFIG"; then
47340     if test -n "$PKG_CONFIG" && \
47341     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47342   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47343   ac_status=$?
47344   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47345   test $ac_status = 0; }; then
47346   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47347 else
47348   pkg_failed=yes
47349 fi
47350  else
47351     pkg_failed=untried
47352 fi
47353 if test -n "$PNG_LIBS"; then
47354     pkg_cv_PNG_LIBS="$PNG_LIBS"
47355  elif test -n "$PKG_CONFIG"; then
47356     if test -n "$PKG_CONFIG" && \
47357     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47358   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47359   ac_status=$?
47360   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47361   test $ac_status = 0; }; then
47362   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47363 else
47364   pkg_failed=yes
47365 fi
47366  else
47367     pkg_failed=untried
47368 fi
47369 
47370 
47371 
47372 if test $pkg_failed = yes; then
47373 
47374 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47375         _pkg_short_errors_supported=yes
47376 else
47377         _pkg_short_errors_supported=no
47378 fi
47379         if test $_pkg_short_errors_supported = yes; then
47380                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47381         else
47382                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47383         fi
47384         # Put the nasty error message in config.log where it belongs
47385         echo "$PNG_PKG_ERRORS" >&5
47386 
47387         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47388 $as_echo "no" >&6; }
47389                  LIBPNG_FOUND=no
47390 elif test $pkg_failed = untried; then
47391          LIBPNG_FOUND=no
47392 else
47393         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47394         PNG_LIBS=$pkg_cv_PNG_LIBS
47395         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47396 $as_echo "yes" >&6; }
47397          LIBPNG_FOUND=yes
47398 fi
47399       if test "x${LIBPNG_FOUND}" = "xyes"; then
47400           USE_EXTERNAL_LIBPNG=true
47401           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47402 $as_echo "system" >&6; }
47403       else
47404           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47405 $as_echo "system not found" >&6; }
47406           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47407       fi
47408   else
47409       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47410   fi
47411 
47412 
47413   ###############################################################################
47414   #
47415   # Check for the zlib library
47416   #
47417 
47418 
47419 # Check whether --with-zlib was given.
47420 if test "${with_zlib+set}" = set; then :
47421   withval=$with_zlib;
47422 fi
47423 
47424 
47425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47426 $as_echo_n "checking for compress in -lz... " >&6; }
47427 if ${ac_cv_lib_z_compress+:} false; then :
47428   $as_echo_n "(cached) " >&6
47429 else
47430   ac_check_lib_save_LIBS=$LIBS
47431 LIBS="-lz  $LIBS"
47432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47433 /* end confdefs.h.  */
47434 
47435 /* Override any GCC internal prototype to avoid an error.
47436    Use char because int might match the return type of a GCC
47437    builtin and then its argument prototype would still apply.  */
47438 #ifdef __cplusplus
47439 extern "C"
47440 #endif
47441 char compress ();
47442 int
47443 main ()
47444 {
47445 return compress ();
47446   ;
47447   return 0;
47448 }
47449 _ACEOF
47450 if ac_fn_cxx_try_link "$LINENO"; then :
47451   ac_cv_lib_z_compress=yes
47452 else
47453   ac_cv_lib_z_compress=no
47454 fi
47455 rm -f core conftest.err conftest.$ac_objext \
47456     conftest$ac_exeext conftest.$ac_ext
47457 LIBS=$ac_check_lib_save_LIBS
47458 fi
47459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47460 $as_echo "$ac_cv_lib_z_compress" >&6; }
47461 if test "x$ac_cv_lib_z_compress" = xyes; then :
47462    ZLIB_FOUND=yes
47463 else
47464    ZLIB_FOUND=no
47465 fi
47466 
47467 
47468   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47469 $as_echo_n "checking for which zlib to use... " >&6; }
47470 
47471   DEFAULT_ZLIB=bundled
47472   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47473     #
47474     # On macosx default is system...on others default is
47475     #
47476     DEFAULT_ZLIB=system
47477   fi
47478 
47479   if test "x${ZLIB_FOUND}" != "xyes"; then
47480     #
47481     # If we don't find any system...set default to bundled
47482     #
47483     DEFAULT_ZLIB=bundled
47484   fi
47485 
47486   #
47487   # If user didn't specify, use DEFAULT_ZLIB
47488   #
47489   if test "x${with_zlib}" = "x"; then
47490     with_zlib=${DEFAULT_ZLIB}
47491   fi
47492 
47493   if test "x${with_zlib}" = "xbundled"; then
47494     USE_EXTERNAL_LIBZ=false
47495     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47496 $as_echo "bundled" >&6; }
47497   elif test "x${with_zlib}" = "xsystem"; then
47498     if test "x${ZLIB_FOUND}" = "xyes"; then
47499       USE_EXTERNAL_LIBZ=true
47500       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47501 $as_echo "system" >&6; }
47502     else
47503       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47504 $as_echo "system not found" >&6; }
47505       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47506     fi
47507   else
47508     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47509   fi
47510 
47511 
47512 
47513   ###############################################################################
47514   LIBZIP_CAN_USE_MMAP=true
47515 
47516 
47517 
47518   ###############################################################################
47519   #
47520   # Check if altzone exists in time.h
47521   #
47522 
47523   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47524 /* end confdefs.h.  */
47525 #include <time.h>
47526 int
47527 main ()
47528 {
47529 return (int)altzone;
47530   ;
47531   return 0;
47532 }
47533 _ACEOF
47534 if ac_fn_cxx_try_link "$LINENO"; then :
47535   has_altzone=yes
47536 else
47537   has_altzone=no
47538 fi
47539 rm -f core conftest.err conftest.$ac_objext \
47540     conftest$ac_exeext conftest.$ac_ext
47541   if test "x$has_altzone" = xyes; then
47542 
47543 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47544 
47545   fi
47546 
47547   ###############################################################################
47548   #
47549   # Check the maths library
47550   #
47551 
47552   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47553 $as_echo_n "checking for cos in -lm... " >&6; }
47554 if ${ac_cv_lib_m_cos+:} false; then :
47555   $as_echo_n "(cached) " >&6
47556 else
47557   ac_check_lib_save_LIBS=$LIBS
47558 LIBS="-lm  $LIBS"
47559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47560 /* end confdefs.h.  */
47561 
47562 /* Override any GCC internal prototype to avoid an error.
47563    Use char because int might match the return type of a GCC
47564    builtin and then its argument prototype would still apply.  */
47565 #ifdef __cplusplus
47566 extern "C"
47567 #endif
47568 char cos ();
47569 int
47570 main ()
47571 {
47572 return cos ();
47573   ;
47574   return 0;
47575 }
47576 _ACEOF
47577 if ac_fn_cxx_try_link "$LINENO"; then :
47578   ac_cv_lib_m_cos=yes
47579 else
47580   ac_cv_lib_m_cos=no
47581 fi
47582 rm -f core conftest.err conftest.$ac_objext \
47583     conftest$ac_exeext conftest.$ac_ext
47584 LIBS=$ac_check_lib_save_LIBS
47585 fi
47586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47587 $as_echo "$ac_cv_lib_m_cos" >&6; }
47588 if test "x$ac_cv_lib_m_cos" = xyes; then :
47589   cat >>confdefs.h <<_ACEOF
47590 #define HAVE_LIBM 1
47591 _ACEOF
47592 
47593   LIBS="-lm $LIBS"
47594 
47595 else
47596 
47597         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47598 $as_echo "$as_me: Maths library was not found" >&6;}
47599 
47600 
47601 fi
47602 
47603 
47604 
47605   ###############################################################################
47606   #
47607   # Check for libdl.so
47608 
47609   save_LIBS="$LIBS"
47610   LIBS=""
47611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47612 $as_echo_n "checking for dlopen in -ldl... " >&6; }
47613 if ${ac_cv_lib_dl_dlopen+:} false; then :
47614   $as_echo_n "(cached) " >&6
47615 else
47616   ac_check_lib_save_LIBS=$LIBS
47617 LIBS="-ldl  $LIBS"
47618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47619 /* end confdefs.h.  */
47620 
47621 /* Override any GCC internal prototype to avoid an error.
47622    Use char because int might match the return type of a GCC
47623    builtin and then its argument prototype would still apply.  */
47624 #ifdef __cplusplus
47625 extern "C"
47626 #endif
47627 char dlopen ();
47628 int
47629 main ()
47630 {
47631 return dlopen ();
47632   ;
47633   return 0;
47634 }
47635 _ACEOF
47636 if ac_fn_cxx_try_link "$LINENO"; then :
47637   ac_cv_lib_dl_dlopen=yes
47638 else
47639   ac_cv_lib_dl_dlopen=no
47640 fi
47641 rm -f core conftest.err conftest.$ac_objext \
47642     conftest$ac_exeext conftest.$ac_ext
47643 LIBS=$ac_check_lib_save_LIBS
47644 fi
47645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47646 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47647 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47648   cat >>confdefs.h <<_ACEOF
47649 #define HAVE_LIBDL 1
47650 _ACEOF
47651 
47652   LIBS="-ldl $LIBS"
47653 
47654 fi
47655 
47656   LIBDL="$LIBS"
47657 
47658   LIBS="$save_LIBS"
47659 
47660 
47661   ###############################################################################
47662   #
47663   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47664   # dynamic build is configured on command line.
47665   #
47666 
47667 # Check whether --with-stdc++lib was given.
47668 if test "${with_stdc__lib+set}" = set; then :
47669   withval=$with_stdc__lib;
47670         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47671                 && test "x$with_stdc__lib" != xdefault; then
47672           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47673         fi
47674 
47675 else
47676   with_stdc__lib=default
47677 
47678 fi
47679 
47680 
47681   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47682     # Test if -lstdc++ works.
47683     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47684 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47685     ac_ext=cpp
47686 ac_cpp='$CXXCPP $CPPFLAGS'
47687 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47688 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47689 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47690 
47691     OLD_CXXFLAGS="$CXXFLAGS"
47692     CXXFLAGS="$CXXFLAGS -lstdc++"
47693     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47694 /* end confdefs.h.  */
47695 
47696 int
47697 main ()
47698 {
47699 return 0;
47700   ;
47701   return 0;
47702 }
47703 _ACEOF
47704 if ac_fn_cxx_try_link "$LINENO"; then :
47705   has_dynamic_libstdcxx=yes
47706 else
47707   has_dynamic_libstdcxx=no
47708 fi
47709 rm -f core conftest.err conftest.$ac_objext \
47710     conftest$ac_exeext conftest.$ac_ext
47711     CXXFLAGS="$OLD_CXXFLAGS"
47712     ac_ext=cpp
47713 ac_cpp='$CXXCPP $CPPFLAGS'
47714 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47715 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47716 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47717 
47718     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47719 $as_echo "$has_dynamic_libstdcxx" >&6; }
47720 
47721     # Test if stdc++ can be linked statically.
47722     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47723 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47724     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47725     ac_ext=cpp
47726 ac_cpp='$CXXCPP $CPPFLAGS'
47727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47730 
47731     OLD_LIBS="$LIBS"
47732     OLD_CXX="$CXX"
47733     LIBS="$STATIC_STDCXX_FLAGS"
47734     CXX="$CC"
47735     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47736 /* end confdefs.h.  */
47737 
47738 int
47739 main ()
47740 {
47741 return 0;
47742   ;
47743   return 0;
47744 }
47745 _ACEOF
47746 if ac_fn_cxx_try_link "$LINENO"; then :
47747   has_static_libstdcxx=yes
47748 else
47749   has_static_libstdcxx=no
47750 fi
47751 rm -f core conftest.err conftest.$ac_objext \
47752     conftest$ac_exeext conftest.$ac_ext
47753     LIBS="$OLD_LIBS"
47754     CXX="$OLD_CXX"
47755     ac_ext=cpp
47756 ac_cpp='$CXXCPP $CPPFLAGS'
47757 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47758 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47759 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47760 
47761     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47762 $as_echo "$has_static_libstdcxx" >&6; }
47763 
47764     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47765       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47766     fi
47767 
47768     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47769       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47770     fi
47771 
47772     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47773       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47774     fi
47775 
47776     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47777 $as_echo_n "checking how to link with libstdc++... " >&6; }
47778     # If dynamic was requested, it's available since it would fail above otherwise.
47779     # If dynamic wasn't requested, go with static unless it isn't available.
47780     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47781       LIBCXX="$LIBCXX -lstdc++"
47782       LDCXX="$CXX"
47783       STATIC_CXX_SETTING="STATIC_CXX=false"
47784       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47785 $as_echo "dynamic" >&6; }
47786     else
47787       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47788       LDCXX="$CC"
47789       STATIC_CXX_SETTING="STATIC_CXX=true"
47790       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47791 $as_echo "static" >&6; }
47792     fi
47793   fi
47794 
47795 
47796   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47797     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47798 
47799 pkg_failed=no
47800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47801 $as_echo_n "checking for LIBFFI... " >&6; }
47802 
47803 if test -n "$LIBFFI_CFLAGS"; then
47804     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47805  elif test -n "$PKG_CONFIG"; then
47806     if test -n "$PKG_CONFIG" && \
47807     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47808   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47809   ac_status=$?
47810   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47811   test $ac_status = 0; }; then
47812   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47813 else
47814   pkg_failed=yes
47815 fi
47816  else
47817     pkg_failed=untried
47818 fi
47819 if test -n "$LIBFFI_LIBS"; then
47820     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47821  elif test -n "$PKG_CONFIG"; then
47822     if test -n "$PKG_CONFIG" && \
47823     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47824   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47825   ac_status=$?
47826   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47827   test $ac_status = 0; }; then
47828   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47829 else
47830   pkg_failed=yes
47831 fi
47832  else
47833     pkg_failed=untried
47834 fi
47835 
47836 
47837 
47838 if test $pkg_failed = yes; then
47839 
47840 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47841         _pkg_short_errors_supported=yes
47842 else
47843         _pkg_short_errors_supported=no
47844 fi
47845         if test $_pkg_short_errors_supported = yes; then
47846                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47847         else
47848                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47849         fi
47850         # Put the nasty error message in config.log where it belongs
47851         echo "$LIBFFI_PKG_ERRORS" >&5
47852 
47853         as_fn_error $? "Package requirements (libffi) were not met:
47854 
47855 $LIBFFI_PKG_ERRORS
47856 
47857 Consider adjusting the PKG_CONFIG_PATH environment variable if you
47858 installed software in a non-standard prefix.
47859 
47860 Alternatively, you may set the environment variables LIBFFI_CFLAGS
47861 and LIBFFI_LIBS to avoid the need to call pkg-config.
47862 See the pkg-config man page for more details.
47863 " "$LINENO" 5
47864 elif test $pkg_failed = untried; then
47865         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47866 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47867 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47868 is in your PATH or set the PKG_CONFIG environment variable to the full
47869 path to pkg-config.
47870 
47871 Alternatively, you may set the environment variables LIBFFI_CFLAGS
47872 and LIBFFI_LIBS to avoid the need to call pkg-config.
47873 See the pkg-config man page for more details.
47874 
47875 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47876 See \`config.log' for more details" "$LINENO" 5; }
47877 else
47878         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47879         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47880         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47881 $as_echo "yes" >&6; }
47882         :
47883 fi
47884 
47885   fi
47886 
47887   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47888     # Extract the first word of "llvm-config", so it can be a program name with args.
47889 set dummy llvm-config; ac_word=$2
47890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47891 $as_echo_n "checking for $ac_word... " >&6; }
47892 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47893   $as_echo_n "(cached) " >&6
47894 else
47895   if test -n "$LLVM_CONFIG"; then
47896   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47897 else
47898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47899 for as_dir in $PATH
47900 do
47901   IFS=$as_save_IFS
47902   test -z "$as_dir" && as_dir=.
47903     for ac_exec_ext in '' $ac_executable_extensions; do
47904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47905     ac_cv_prog_LLVM_CONFIG="llvm-config"
47906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47907     break 2
47908   fi
47909 done
47910   done
47911 IFS=$as_save_IFS
47912 
47913 fi
47914 fi
47915 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47916 if test -n "$LLVM_CONFIG"; then
47917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47918 $as_echo "$LLVM_CONFIG" >&6; }
47919 else
47920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47921 $as_echo "no" >&6; }
47922 fi
47923 
47924 
47925 
47926     if test "x$LLVM_CONFIG" != xllvm-config; then
47927       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47928     fi
47929 
47930     llvm_components="jit mcjit engine nativecodegen native"
47931     unset LLVM_CFLAGS
47932     for flag in $("$LLVM_CONFIG" --cxxflags); do
47933       if echo "${flag}" | grep -q '^-[ID]'; then
47934         if test "${flag}" != "-D_DEBUG" ; then
47935           if test "${LLVM_CFLAGS}" != "" ; then
47936             LLVM_CFLAGS="${LLVM_CFLAGS} "
47937           fi
47938           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47939         fi
47940       fi
47941     done
47942     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47943     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47944 
47945     unset LLVM_LDFLAGS
47946     for flag in $("${LLVM_CONFIG}" --ldflags); do
47947       if echo "${flag}" | grep -q '^-L'; then
47948         if test "${LLVM_LDFLAGS}" != ""; then
47949           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47950         fi
47951         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47952       fi
47953     done
47954 
47955     unset LLVM_LIBS
47956     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47957       if echo "${flag}" | grep -q '^-l'; then
47958         if test "${LLVM_LIBS}" != ""; then
47959           LLVM_LIBS="${LLVM_LIBS} "
47960         fi
47961         LLVM_LIBS="${LLVM_LIBS}${flag}"
47962       fi
47963     done
47964 
47965 
47966 
47967 
47968   fi
47969 
47970   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47971   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47972     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47973   fi
47974 
47975   # TODO better (platform agnostic) test
47976   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47977     LIBCXX="-lstdc++"
47978   fi
47979 
47980 
47981 
47982 
47983   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47984 
47985 
47986 # Check whether --with-msvcr-dll was given.
47987 if test "${with_msvcr_dll+set}" = set; then :
47988   withval=$with_msvcr_dll;
47989 fi
47990 
47991 
47992   if test "x$with_msvcr_dll" != x; then
47993     # If given explicitely by user, do not probe. If not present, fail directly.
47994 
47995   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47996   METHOD="--with-msvcr-dll"
47997   if test -e "$POSSIBLE_MSVCR_DLL"; then
47998     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47999 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48000 
48001     # Need to check if the found msvcr is correct architecture
48002     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48003 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48004     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48005     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48006       CORRECT_MSVCR_ARCH=386
48007     else
48008       CORRECT_MSVCR_ARCH=x86-64
48009     fi
48010     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48011       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48012 $as_echo "ok" >&6; }
48013       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48014       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48015 $as_echo_n "checking for msvcr100.dll... " >&6; }
48016       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48017 $as_echo "$MSVCR_DLL" >&6; }
48018     else
48019       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48020 $as_echo "incorrect, ignoring" >&6; }
48021       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48022 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48023     fi
48024   fi
48025 
48026     if test "x$MSVCR_DLL" = x; then
48027       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48028     fi
48029   fi
48030 
48031   if test "x$MSVCR_DLL" = x; then
48032     # Probe: Using well-known location from Visual Studio 10.0
48033     if test "x$VCINSTALLDIR" != x; then
48034       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48035 
48036   windows_path="$CYGWIN_VC_INSTALL_DIR"
48037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48038     unix_path=`$CYGPATH -u "$windows_path"`
48039     CYGWIN_VC_INSTALL_DIR="$unix_path"
48040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48042     CYGWIN_VC_INSTALL_DIR="$unix_path"
48043   fi
48044 
48045       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48046         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48047       else
48048         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48049       fi
48050 
48051   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48052   METHOD="well-known location in VCINSTALLDIR"
48053   if test -e "$POSSIBLE_MSVCR_DLL"; then
48054     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48055 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48056 
48057     # Need to check if the found msvcr is correct architecture
48058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48059 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48060     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48061     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48062       CORRECT_MSVCR_ARCH=386
48063     else
48064       CORRECT_MSVCR_ARCH=x86-64
48065     fi
48066     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48068 $as_echo "ok" >&6; }
48069       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48070       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48071 $as_echo_n "checking for msvcr100.dll... " >&6; }
48072       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48073 $as_echo "$MSVCR_DLL" >&6; }
48074     else
48075       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48076 $as_echo "incorrect, ignoring" >&6; }
48077       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48078 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48079     fi
48080   fi
48081 
48082     fi
48083   fi
48084 
48085   if test "x$MSVCR_DLL" = x; then
48086     # Probe: Check in the Boot JDK directory.
48087     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48088 
48089   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48090   METHOD="well-known location in Boot JDK"
48091   if test -e "$POSSIBLE_MSVCR_DLL"; then
48092     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48093 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48094 
48095     # Need to check if the found msvcr is correct architecture
48096     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48097 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48098     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48099     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48100       CORRECT_MSVCR_ARCH=386
48101     else
48102       CORRECT_MSVCR_ARCH=x86-64
48103     fi
48104     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48105       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48106 $as_echo "ok" >&6; }
48107       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48108       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48109 $as_echo_n "checking for msvcr100.dll... " >&6; }
48110       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48111 $as_echo "$MSVCR_DLL" >&6; }
48112     else
48113       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48114 $as_echo "incorrect, ignoring" >&6; }
48115       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48116 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48117     fi
48118   fi
48119 
48120   fi
48121 
48122   if test "x$MSVCR_DLL" = x; then
48123     # Probe: Look in the Windows system32 directory
48124     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48125 
48126   windows_path="$CYGWIN_SYSTEMROOT"
48127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48128     unix_path=`$CYGPATH -u "$windows_path"`
48129     CYGWIN_SYSTEMROOT="$unix_path"
48130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48132     CYGWIN_SYSTEMROOT="$unix_path"
48133   fi
48134 
48135     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48136 
48137   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48138   METHOD="well-known location in SYSTEMROOT"
48139   if test -e "$POSSIBLE_MSVCR_DLL"; then
48140     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48141 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48142 
48143     # Need to check if the found msvcr is correct architecture
48144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48145 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48146     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48147     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48148       CORRECT_MSVCR_ARCH=386
48149     else
48150       CORRECT_MSVCR_ARCH=x86-64
48151     fi
48152     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48153       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48154 $as_echo "ok" >&6; }
48155       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48156       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48157 $as_echo_n "checking for msvcr100.dll... " >&6; }
48158       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48159 $as_echo "$MSVCR_DLL" >&6; }
48160     else
48161       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48162 $as_echo "incorrect, ignoring" >&6; }
48163       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48164 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48165     fi
48166   fi
48167 
48168   fi
48169 
48170   if test "x$MSVCR_DLL" = x; then
48171     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48172     if test "x$VS100COMNTOOLS" != x; then
48173       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48174 
48175   windows_path="$CYGWIN_VS_TOOLS_DIR"
48176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48177     unix_path=`$CYGPATH -u "$windows_path"`
48178     CYGWIN_VS_TOOLS_DIR="$unix_path"
48179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48180     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48181     CYGWIN_VS_TOOLS_DIR="$unix_path"
48182   fi
48183 
48184       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48185         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48186       else
48187         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48188       fi
48189 
48190   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48191   METHOD="search of VS100COMNTOOLS"
48192   if test -e "$POSSIBLE_MSVCR_DLL"; then
48193     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48194 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48195 
48196     # Need to check if the found msvcr is correct architecture
48197     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48198 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48199     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48200     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48201       CORRECT_MSVCR_ARCH=386
48202     else
48203       CORRECT_MSVCR_ARCH=x86-64
48204     fi
48205     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48206       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48207 $as_echo "ok" >&6; }
48208       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48209       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48210 $as_echo_n "checking for msvcr100.dll... " >&6; }
48211       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48212 $as_echo "$MSVCR_DLL" >&6; }
48213     else
48214       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48215 $as_echo "incorrect, ignoring" >&6; }
48216       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48217 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48218     fi
48219   fi
48220 
48221     fi
48222   fi
48223 
48224   if test "x$MSVCR_DLL" = x; then
48225     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48226     # (This was the original behaviour; kept since it might turn up something)
48227     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48228       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48229         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48230       else
48231         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48232         if test "x$POSSIBLE_MSVCR_DLL" = x; then
48233           # We're grasping at straws now...
48234           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48235         fi
48236       fi
48237 
48238 
48239   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48240   METHOD="search of VCINSTALLDIR"
48241   if test -e "$POSSIBLE_MSVCR_DLL"; then
48242     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48243 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48244 
48245     # Need to check if the found msvcr is correct architecture
48246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48247 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48248     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48249     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48250       CORRECT_MSVCR_ARCH=386
48251     else
48252       CORRECT_MSVCR_ARCH=x86-64
48253     fi
48254     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48255       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48256 $as_echo "ok" >&6; }
48257       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48258       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48259 $as_echo_n "checking for msvcr100.dll... " >&6; }
48260       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48261 $as_echo "$MSVCR_DLL" >&6; }
48262     else
48263       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48264 $as_echo "incorrect, ignoring" >&6; }
48265       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48266 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48267     fi
48268   fi
48269 
48270     fi
48271   fi
48272 
48273   if test "x$MSVCR_DLL" = x; then
48274     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48275 $as_echo_n "checking for msvcr100.dll... " >&6; }
48276     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48277 $as_echo "no" >&6; }
48278     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48279   fi
48280 
48281 
48282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48283 
48284   # Input might be given as Windows format, start by converting to
48285   # unix format.
48286   path="$MSVCR_DLL"
48287   new_path=`$CYGPATH -u "$path"`
48288 
48289   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48290   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48291   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48292   # "foo.exe" is OK but "foo" is an error.
48293   #
48294   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48295   # It is also a way to make sure we got the proper file name for the real test later on.
48296   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48297   if test "x$test_shortpath" = x; then
48298     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48299 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48300     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48301   fi
48302 
48303   # Call helper function which possibly converts this using DOS-style short mode.
48304   # If so, the updated path is stored in $new_path.
48305 
48306   input_path="$new_path"
48307   # Check if we need to convert this using DOS-style short mode. If the path
48308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48309   # take no chances and rewrite it.
48310   # Note: m4 eats our [], so we need to use [ and ] instead.
48311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48312   if test "x$has_forbidden_chars" != x; then
48313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48314     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48315     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48316     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48317       # Going to short mode and back again did indeed matter. Since short mode is
48318       # case insensitive, let's make it lowercase to improve readability.
48319       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48320       # Now convert it back to Unix-stile (cygpath)
48321       input_path=`$CYGPATH -u "$shortmode_path"`
48322       new_path="$input_path"
48323     fi
48324   fi
48325 
48326   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48327   if test "x$test_cygdrive_prefix" = x; then
48328     # As a simple fix, exclude /usr/bin since it's not a real path.
48329     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48330       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48331       # a path prefixed by /cygdrive for fixpath to work.
48332       new_path="$CYGWIN_ROOT_PATH$input_path"
48333     fi
48334   fi
48335 
48336 
48337   if test "x$path" != "x$new_path"; then
48338     MSVCR_DLL="$new_path"
48339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48340 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48341   fi
48342 
48343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48344 
48345   path="$MSVCR_DLL"
48346   has_colon=`$ECHO $path | $GREP ^.:`
48347   new_path="$path"
48348   if test "x$has_colon" = x; then
48349     # Not in mixed or Windows style, start by that.
48350     new_path=`cmd //c echo $path`
48351   fi
48352 
48353 
48354   input_path="$new_path"
48355   # Check if we need to convert this using DOS-style short mode. If the path
48356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48357   # take no chances and rewrite it.
48358   # Note: m4 eats our [], so we need to use [ and ] instead.
48359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48360   if test "x$has_forbidden_chars" != x; then
48361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48362     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48363   fi
48364 
48365 
48366   windows_path="$new_path"
48367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48368     unix_path=`$CYGPATH -u "$windows_path"`
48369     new_path="$unix_path"
48370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48372     new_path="$unix_path"
48373   fi
48374 
48375   if test "x$path" != "x$new_path"; then
48376     MSVCR_DLL="$new_path"
48377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48378 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48379   fi
48380 
48381   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48382   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48383 
48384   else
48385     # We're on a posix platform. Hooray! :)
48386     path="$MSVCR_DLL"
48387     has_space=`$ECHO "$path" | $GREP " "`
48388     if test "x$has_space" != x; then
48389       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48390 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48391       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48392     fi
48393 
48394     # Use eval to expand a potential ~
48395     eval path="$path"
48396     if test ! -f "$path" && test ! -d "$path"; then
48397       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48398     fi
48399 
48400     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48401   fi
48402 
48403 
48404 
48405 
48406 # Check whether --with-dxsdk was given.
48407 if test "${with_dxsdk+set}" = set; then :
48408   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48409 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48410 fi
48411 
48412 
48413 
48414 
48415 # Check whether --with-dxsdk-lib was given.
48416 if test "${with_dxsdk_lib+set}" = set; then :
48417   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48418 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48419 fi
48420 
48421 
48422 
48423 
48424 # Check whether --with-dxsdk-include was given.
48425 if test "${with_dxsdk_include+set}" = set; then :
48426   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48427 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48428 fi
48429 
48430 
48431   fi
48432 
48433 
48434 
48435 ###############################################################################
48436 #
48437 # We need to do some final tweaking, when everything else is done.
48438 #
48439 ###############################################################################
48440 
48441 
48442   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48443 
48444 
48445   # The name of the Service Agent jar.
48446   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48447   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48448     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48449   fi
48450 
48451 
48452 
48453     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48454 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48455 
48456     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48457       ENABLE_INTREE_EC=yes
48458       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48459 $as_echo "yes" >&6; }
48460     else
48461       ENABLE_INTREE_EC=no
48462       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48463 $as_echo "no" >&6; }
48464     fi
48465 
48466 
48467 
48468 
48469 ###############################################################################
48470 #
48471 # Configure parts of the build that only affect the build performance,
48472 # not the result.
48473 #
48474 ###############################################################################
48475 
48476 
48477   # How many cores do we have on this build system?
48478 
48479 # Check whether --with-num-cores was given.
48480 if test "${with_num_cores+set}" = set; then :
48481   withval=$with_num_cores;
48482 fi
48483 
48484   if test "x$with_num_cores" = x; then
48485     # The number of cores were not specified, try to probe them.
48486 
48487   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48488 $as_echo_n "checking for number of cores... " >&6; }
48489   NUM_CORES=1
48490   FOUND_CORES=no
48491 
48492   if test -f /proc/cpuinfo; then
48493     # Looks like a Linux (or cygwin) system
48494     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48495     FOUND_CORES=yes
48496   elif test -x /usr/sbin/psrinfo; then
48497     # Looks like a Solaris system
48498     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48499     FOUND_CORES=yes
48500   elif test -x /usr/sbin/system_profiler; then
48501     # Looks like a MacOSX system
48502     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48503     FOUND_CORES=yes
48504   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48505     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48506     FOUND_CORES=yes
48507   elif test -n "$NUMBER_OF_PROCESSORS"; then
48508     # On windows, look in the env
48509     NUM_CORES=$NUMBER_OF_PROCESSORS
48510     FOUND_CORES=yes
48511   fi
48512 
48513   if test "x$FOUND_CORES" = xyes; then
48514     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48515 $as_echo "$NUM_CORES" >&6; }
48516   else
48517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48518 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
48519     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48520 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48521   fi
48522 
48523   else
48524     NUM_CORES=$with_num_cores
48525   fi
48526 
48527 
48528 
48529   # How much memory do we have on this build system?
48530 
48531 # Check whether --with-memory-size was given.
48532 if test "${with_memory_size+set}" = set; then :
48533   withval=$with_memory_size;
48534 fi
48535 
48536   if test "x$with_memory_size" = x; then
48537     # The memory size was not specified, try to probe it.
48538 
48539   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48540 $as_echo_n "checking for memory size... " >&6; }
48541   # Default to 1024 MB
48542   MEMORY_SIZE=1024
48543   FOUND_MEM=no
48544 
48545   if test -f /proc/meminfo; then
48546     # Looks like a Linux (or cygwin) system
48547     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48548     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48549     FOUND_MEM=yes
48550   elif test -x /usr/sbin/prtconf; then
48551     # Looks like a Solaris or AIX system
48552     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48553     FOUND_MEM=yes
48554   elif test -x /usr/sbin/system_profiler; then
48555     # Looks like a MacOSX system
48556     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48557     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48558     FOUND_MEM=yes
48559   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48560     # Windows, but without cygwin
48561     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48562     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48563     FOUND_MEM=yes
48564   fi
48565 
48566   if test "x$FOUND_MEM" = xyes; then
48567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48568 $as_echo "$MEMORY_SIZE MB" >&6; }
48569   else
48570     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48571 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48572     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48573 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48574   fi
48575 
48576   else
48577     MEMORY_SIZE=$with_memory_size
48578   fi
48579 
48580 
48581 
48582   # Provide a decent default number of parallel jobs for make depending on
48583   # number of cores, amount of memory and machine architecture.
48584 
48585 # Check whether --with-jobs was given.
48586 if test "${with_jobs+set}" = set; then :
48587   withval=$with_jobs;
48588 fi
48589 
48590   if test "x$with_jobs" = x; then
48591     # Number of jobs was not specified, calculate.
48592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48593 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48594     # Approximate memory in GB, rounding up a bit.
48595     memory_gb=`expr $MEMORY_SIZE / 1100`
48596     # Pick the lowest of memory in gb and number of cores.
48597     if test "$memory_gb" -lt "$NUM_CORES"; then
48598       JOBS="$memory_gb"
48599     else
48600       JOBS="$NUM_CORES"
48601       # On bigger machines, leave some room for other processes to run
48602       if test "$JOBS" -gt "4"; then
48603         JOBS=`expr $JOBS '*' 90 / 100`
48604       fi
48605     fi
48606     # Cap number of jobs to 16
48607     if test "$JOBS" -gt "16"; then
48608       JOBS=16
48609     fi
48610     if test "$JOBS" -eq "0"; then
48611       JOBS=1
48612     fi
48613     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48614 $as_echo "$JOBS" >&6; }
48615   else
48616     JOBS=$with_jobs
48617   fi
48618 
48619 
48620 
48621 # Setup smart javac (after cores and memory have been setup)
48622 
48623 
48624 # Check whether --with-sjavac-server-java was given.
48625 if test "${with_sjavac_server_java+set}" = set; then :
48626   withval=$with_sjavac_server_java;
48627 fi
48628 
48629 
48630   if test "x$with_sjavac_server_java" != x; then
48631     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48632     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48633     if test "x$FOUND_VERSION" = x; then
48634       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48635     fi
48636   else
48637     SJAVAC_SERVER_JAVA=""
48638     # Hotspot specific options.
48639 
48640   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48641   $ECHO "Command: $JAVA -verbosegc -version" >&5
48642   OUTPUT=`$JAVA -verbosegc -version 2>&1`
48643   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48644   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48645   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48646     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48647     JVM_ARG_OK=true
48648   else
48649     $ECHO "Arg failed:" >&5
48650     $ECHO "$OUTPUT" >&5
48651     JVM_ARG_OK=false
48652   fi
48653 
48654     # JRockit specific options.
48655 
48656   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48657   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48658   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48659   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48660   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48661   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48662     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48663     JVM_ARG_OK=true
48664   else
48665     $ECHO "Arg failed:" >&5
48666     $ECHO "$OUTPUT" >&5
48667     JVM_ARG_OK=false
48668   fi
48669 
48670     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48671   fi
48672 
48673 
48674   if test "$MEMORY_SIZE" -gt "2500"; then
48675 
48676   $ECHO "Check if jvm arg is ok: -d64" >&5
48677   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48678   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48679   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48680   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48681   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48682     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48683     JVM_ARG_OK=true
48684   else
48685     $ECHO "Arg failed:" >&5
48686     $ECHO "$OUTPUT" >&5
48687     JVM_ARG_OK=false
48688   fi
48689 
48690     if test "$JVM_ARG_OK" = true; then
48691       JVM_64BIT=true
48692       JVM_ARG_OK=false
48693     fi
48694   fi
48695 
48696   if test "$JVM_64BIT" = true; then
48697     if test "$MEMORY_SIZE" -gt "17000"; then
48698 
48699   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48700   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48701   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48702   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48703   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48704   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48705     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48706     JVM_ARG_OK=true
48707   else
48708     $ECHO "Arg failed:" >&5
48709     $ECHO "$OUTPUT" >&5
48710     JVM_ARG_OK=false
48711   fi
48712 
48713     fi
48714     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48715 
48716   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48717   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48718   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48719   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48720   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48721   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48722     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48723     JVM_ARG_OK=true
48724   else
48725     $ECHO "Arg failed:" >&5
48726     $ECHO "$OUTPUT" >&5
48727     JVM_ARG_OK=false
48728   fi
48729 
48730     fi
48731     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48732 
48733   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48734   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48735   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48736   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48737   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48738   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48739     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48740     JVM_ARG_OK=true
48741   else
48742     $ECHO "Arg failed:" >&5
48743     $ECHO "$OUTPUT" >&5
48744     JVM_ARG_OK=false
48745   fi
48746 
48747     fi
48748     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48749 
48750   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48751   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48752   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48753   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48754   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48755   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48756     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48757     JVM_ARG_OK=true
48758   else
48759     $ECHO "Arg failed:" >&5
48760     $ECHO "$OUTPUT" >&5
48761     JVM_ARG_OK=false
48762   fi
48763 
48764     fi
48765   fi
48766   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48767 
48768   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48769   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48770   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48771   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48772   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48773   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48774     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48775     JVM_ARG_OK=true
48776   else
48777     $ECHO "Arg failed:" >&5
48778     $ECHO "$OUTPUT" >&5
48779     JVM_ARG_OK=false
48780   fi
48781 
48782   fi
48783   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48784 
48785   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48786   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48787   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48788   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48789   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48790   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48791     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48792     JVM_ARG_OK=true
48793   else
48794     $ECHO "Arg failed:" >&5
48795     $ECHO "$OUTPUT" >&5
48796     JVM_ARG_OK=false
48797   fi
48798 
48799   fi
48800   if test "$JVM_ARG_OK" = false; then
48801 
48802   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48803   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48804   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48805   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48806   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48807   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48808     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48809     JVM_ARG_OK=true
48810   else
48811     $ECHO "Arg failed:" >&5
48812     $ECHO "$OUTPUT" >&5
48813     JVM_ARG_OK=false
48814   fi
48815 
48816   fi
48817 
48818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48819 $as_echo_n "checking whether to use sjavac... " >&6; }
48820   # Check whether --enable-sjavac was given.
48821 if test "${enable_sjavac+set}" = set; then :
48822   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48823 else
48824   ENABLE_SJAVAC='no'
48825 fi
48826 
48827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48828 $as_echo "$ENABLE_SJAVAC" >&6; }
48829 
48830 
48831   if test "x$ENABLE_SJAVAC" = xyes; then
48832     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48833   else
48834     SJAVAC_SERVER_DIR=
48835   fi
48836 
48837 
48838 
48839 # Can the C/C++ compiler use precompiled headers?
48840 
48841 
48842   ###############################################################################
48843   #
48844   # Can the C/C++ compiler use precompiled headers?
48845   #
48846   # Check whether --enable-precompiled-headers was given.
48847 if test "${enable_precompiled_headers+set}" = set; then :
48848   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48849 else
48850   ENABLE_PRECOMPH=yes
48851 fi
48852 
48853 
48854   USE_PRECOMPILED_HEADER=1
48855   if test "x$ENABLE_PRECOMPH" = xno; then
48856     USE_PRECOMPILED_HEADER=0
48857   fi
48858 
48859   if test "x$ENABLE_PRECOMPH" = xyes; then
48860     # Check that the compiler actually supports precomp headers.
48861     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48862       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48863 $as_echo_n "checking that precompiled headers work... " >&6; }
48864       echo "int alfa();" > conftest.h
48865       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48866       if test ! -f conftest.hpp.gch; then
48867         USE_PRECOMPILED_HEADER=0
48868         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48869 $as_echo "no" >&6; }
48870       else
48871         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48872 $as_echo "yes" >&6; }
48873       fi
48874       rm -f conftest.h conftest.hpp.gch
48875     fi
48876   fi
48877 
48878 
48879 
48880 
48881 # Setup use of ccache, if available
48882 
48883   # Check whether --enable-ccache was given.
48884 if test "${enable_ccache+set}" = set; then :
48885   enableval=$enable_ccache;
48886 fi
48887 
48888 
48889   CCACHE=
48890   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48891 $as_echo_n "checking is ccache enabled... " >&6; }
48892   ENABLE_CCACHE=$enable_ccache
48893   if test "x$enable_ccache" = xyes; then
48894     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48895 $as_echo "yes" >&6; }
48896     OLD_PATH="$PATH"
48897     if test "x$TOOLCHAIN_PATH" != x; then
48898       PATH=$TOOLCHAIN_PATH:$PATH
48899     fi
48900 
48901 
48902 
48903   # Publish this variable in the help.
48904 
48905 
48906   if test "x$CCACHE" = x; then
48907     # The variable is not set by user, try to locate tool using the code snippet
48908     for ac_prog in ccache
48909 do
48910   # Extract the first word of "$ac_prog", so it can be a program name with args.
48911 set dummy $ac_prog; ac_word=$2
48912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48913 $as_echo_n "checking for $ac_word... " >&6; }
48914 if ${ac_cv_path_CCACHE+:} false; then :
48915   $as_echo_n "(cached) " >&6
48916 else
48917   case $CCACHE in
48918   [\\/]* | ?:[\\/]*)
48919   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48920   ;;
48921   *)
48922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48923 for as_dir in $PATH
48924 do
48925   IFS=$as_save_IFS
48926   test -z "$as_dir" && as_dir=.
48927     for ac_exec_ext in '' $ac_executable_extensions; do
48928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48929     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48931     break 2
48932   fi
48933 done
48934   done
48935 IFS=$as_save_IFS
48936 
48937   ;;
48938 esac
48939 fi
48940 CCACHE=$ac_cv_path_CCACHE
48941 if test -n "$CCACHE"; then
48942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48943 $as_echo "$CCACHE" >&6; }
48944 else
48945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48946 $as_echo "no" >&6; }
48947 fi
48948 
48949 
48950   test -n "$CCACHE" && break
48951 done
48952 
48953   else
48954     # The variable is set, but is it from the command line or the environment?
48955 
48956     # Try to remove the string !CCACHE! from our list.
48957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48959       # If it failed, the variable was not from the command line. Ignore it,
48960       # but warn the user (except for BASH, which is always set by the calling BASH).
48961       if test "xCCACHE" != xBASH; then
48962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48963 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48964       fi
48965       # Try to locate tool using the code snippet
48966       for ac_prog in ccache
48967 do
48968   # Extract the first word of "$ac_prog", so it can be a program name with args.
48969 set dummy $ac_prog; ac_word=$2
48970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48971 $as_echo_n "checking for $ac_word... " >&6; }
48972 if ${ac_cv_path_CCACHE+:} false; then :
48973   $as_echo_n "(cached) " >&6
48974 else
48975   case $CCACHE in
48976   [\\/]* | ?:[\\/]*)
48977   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48978   ;;
48979   *)
48980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48981 for as_dir in $PATH
48982 do
48983   IFS=$as_save_IFS
48984   test -z "$as_dir" && as_dir=.
48985     for ac_exec_ext in '' $ac_executable_extensions; do
48986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48987     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48989     break 2
48990   fi
48991 done
48992   done
48993 IFS=$as_save_IFS
48994 
48995   ;;
48996 esac
48997 fi
48998 CCACHE=$ac_cv_path_CCACHE
48999 if test -n "$CCACHE"; then
49000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49001 $as_echo "$CCACHE" >&6; }
49002 else
49003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49004 $as_echo "no" >&6; }
49005 fi
49006 
49007 
49008   test -n "$CCACHE" && break
49009 done
49010 
49011     else
49012       # If it succeeded, then it was overridden by the user. We will use it
49013       # for the tool.
49014 
49015       # First remove it from the list of overridden variables, so we can test
49016       # for unknown variables in the end.
49017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49018 
49019       # Check if the provided tool contains a complete path.
49020       tool_specified="$CCACHE"
49021       tool_basename="${tool_specified##*/}"
49022       if test "x$tool_basename" = "x$tool_specified"; then
49023         # A command without a complete path is provided, search $PATH.
49024         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49025 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49026         # Extract the first word of "$tool_basename", so it can be a program name with args.
49027 set dummy $tool_basename; ac_word=$2
49028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49029 $as_echo_n "checking for $ac_word... " >&6; }
49030 if ${ac_cv_path_CCACHE+:} false; then :
49031   $as_echo_n "(cached) " >&6
49032 else
49033   case $CCACHE in
49034   [\\/]* | ?:[\\/]*)
49035   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49036   ;;
49037   *)
49038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49039 for as_dir in $PATH
49040 do
49041   IFS=$as_save_IFS
49042   test -z "$as_dir" && as_dir=.
49043     for ac_exec_ext in '' $ac_executable_extensions; do
49044   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49045     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49047     break 2
49048   fi
49049 done
49050   done
49051 IFS=$as_save_IFS
49052 
49053   ;;
49054 esac
49055 fi
49056 CCACHE=$ac_cv_path_CCACHE
49057 if test -n "$CCACHE"; then
49058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49059 $as_echo "$CCACHE" >&6; }
49060 else
49061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49062 $as_echo "no" >&6; }
49063 fi
49064 
49065 
49066         if test "x$CCACHE" = x; then
49067           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49068         fi
49069       else
49070         # Otherwise we believe it is a complete path. Use it as it is.
49071         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49072 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49074 $as_echo_n "checking for CCACHE... " >&6; }
49075         if test ! -x "$tool_specified"; then
49076           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49077 $as_echo "not found" >&6; }
49078           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49079         fi
49080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49081 $as_echo "$tool_specified" >&6; }
49082       fi
49083     fi
49084   fi
49085 
49086 
49087 
49088   if test "x$CCACHE" = x; then
49089     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49090   fi
49091 
49092 
49093     CCACHE_STATUS="enabled"
49094     PATH="$OLD_PATH"
49095   elif test "x$enable_ccache" = xno; then
49096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49097 $as_echo "no, explicitly disabled" >&6; }
49098   elif test "x$enable_ccache" = x; then
49099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49100 $as_echo "no" >&6; }
49101   else
49102     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49103 $as_echo "unknown" >&6; }
49104     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49105   fi
49106 
49107 
49108 
49109 # Check whether --with-ccache-dir was given.
49110 if test "${with_ccache_dir+set}" = set; then :
49111   withval=$with_ccache_dir;
49112 fi
49113 
49114 
49115   if test "x$with_ccache_dir" != x; then
49116     # When using a non home ccache directory, assume the use is to share ccache files
49117     # with other users. Thus change the umask.
49118     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49119     if test "x$CCACHE" = x; then
49120       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49121 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49122     fi
49123   fi
49124 
49125   if test "x$CCACHE" != x; then
49126 
49127   if test "x$CCACHE" != x; then
49128     # Only use ccache if it is 3.1.4 or later, which supports
49129     # precompiled headers.
49130     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49131 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49132     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49133     if test "x$HAS_GOOD_CCACHE" = x; then
49134       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49135 $as_echo "no, disabling ccache" >&6; }
49136       CCACHE=
49137       CCACHE_STATUS="disabled"
49138     else
49139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49140 $as_echo "yes" >&6; }
49141       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49142 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49143       PUSHED_FLAGS="$CXXFLAGS"
49144       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49145       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49146 /* end confdefs.h.  */
49147 
49148 int
49149 main ()
49150 {
49151 
49152   ;
49153   return 0;
49154 }
49155 _ACEOF
49156 if ac_fn_cxx_try_compile "$LINENO"; then :
49157   CC_KNOWS_CCACHE_TRICK=yes
49158 else
49159   CC_KNOWS_CCACHE_TRICK=no
49160 fi
49161 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49162       CXXFLAGS="$PUSHED_FLAGS"
49163       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49165 $as_echo "yes" >&6; }
49166       else
49167         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49168 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
49169         CCACHE=
49170         CCACHE_STATUS="disabled"
49171       fi
49172     fi
49173   fi
49174 
49175   if test "x$CCACHE" != x; then
49176     CCACHE_SLOPPINESS=time_macros
49177     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49178     CCACHE_FLAGS=-fpch-preprocess
49179 
49180     if test "x$SET_CCACHE_DIR" != x; then
49181       mkdir -p $CCACHE_DIR > /dev/null 2>&1
49182       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49183     fi
49184   fi
49185 
49186   fi
49187 
49188 
49189 ###############################################################################
49190 #
49191 # And now the finish...
49192 #
49193 ###############################################################################
49194 
49195 # Check for some common pitfalls
49196 
49197   if test x"$OPENJDK_BUILD_OS" = xwindows; then
49198     file_to_test="$SRC_ROOT/LICENSE"
49199     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49200       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
49201     fi
49202   fi
49203 
49204 
49205   # Did user specify any unknown variables?
49206 
49207   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49208     # Replace the separating ! with spaces before presenting for end user.
49209     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49210     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49211 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49212   fi
49213 
49214 
49215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49216 $as_echo_n "checking if build directory is on local disk... " >&6; }
49217 
49218   # df -l lists only local disks; if the given directory is not found then
49219   # a non-zero exit code is given
49220   if test "x$DF" = x; then
49221     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49222       # msys does not have df; use Windows "net use" instead.
49223       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49224       if test "x$IS_NETWORK_DISK" = x; then
49225         OUTPUT_DIR_IS_LOCAL="yes"
49226       else
49227         OUTPUT_DIR_IS_LOCAL="no"
49228       fi
49229     else
49230       # No df here, say it's local
49231       OUTPUT_DIR_IS_LOCAL="yes"
49232     fi
49233   else
49234     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49235       OUTPUT_DIR_IS_LOCAL="yes"
49236     else
49237       OUTPUT_DIR_IS_LOCAL="no"
49238     fi
49239   fi
49240 
49241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49242 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49243 
49244 
49245 
49246   # Check if the user has any old-style ALT_ variables set.
49247   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49248 
49249   # Before generating output files, test if they exist. If they do, this is a reconfigure.
49250   # Since we can't properly handle the dependencies for this, warn the user about the situation
49251   if test -e $OUTPUT_ROOT/spec.gmk; then
49252     IS_RECONFIGURE=yes
49253   else
49254     IS_RECONFIGURE=no
49255   fi
49256 
49257 
49258 # At the end, call the custom hook. (Dummy macro if no custom sources available)
49259 
49260 
49261 # We're messing a bit with internal autoconf variables to put the config.status
49262 # in the output directory instead of the current directory.
49263 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49264 
49265 # Create the actual output files. Now the main work of configure is done.
49266 cat >confcache <<\_ACEOF
49267 # This file is a shell script that caches the results of configure
49268 # tests run on this system so they can be shared between configure
49269 # scripts and configure runs, see configure's option --config-cache.
49270 # It is not useful on other systems.  If it contains results you don't
49271 # want to keep, you may remove or edit it.
49272 #
49273 # config.status only pays attention to the cache file if you give it
49274 # the --recheck option to rerun configure.
49275 #
49276 # `ac_cv_env_foo' variables (set or unset) will be overridden when
49277 # loading this file, other *unset* `ac_cv_foo' will be assigned the
49278 # following values.
49279 
49280 _ACEOF
49281 
49282 # The following way of writing the cache mishandles newlines in values,
49283 # but we know of no workaround that is simple, portable, and efficient.
49284 # So, we kill variables containing newlines.
49285 # Ultrix sh set writes to stderr and can't be redirected directly,
49286 # and sets the high bit in the cache file unless we assign to the vars.
49287 (
49288   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49289     eval ac_val=\$$ac_var
49290     case $ac_val in #(
49291     *${as_nl}*)
49292       case $ac_var in #(
49293       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49294 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49295       esac
49296       case $ac_var in #(
49297       _ | IFS | as_nl) ;; #(
49298       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49299       *) { eval $ac_var=; unset $ac_var;} ;;
49300       esac ;;
49301     esac
49302   done
49303 
49304   (set) 2>&1 |
49305     case $as_nl`(ac_space=' '; set) 2>&1` in #(
49306     *${as_nl}ac_space=\ *)
49307       # `set' does not quote correctly, so add quotes: double-quote
49308       # substitution turns \\\\ into \\, and sed turns \\ into \.
49309       sed -n \
49310         "s/'/'\\\\''/g;
49311           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49312       ;; #(
49313     *)
49314       # `set' quotes correctly as required by POSIX, so do not add quotes.
49315       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49316       ;;
49317     esac |
49318     sort
49319 ) |
49320   sed '
49321      /^ac_cv_env_/b end
49322      t clear
49323      :clear
49324      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49325      t end
49326      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49327      :end' >>confcache
49328 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49329   if test -w "$cache_file"; then
49330     if test "x$cache_file" != "x/dev/null"; then
49331       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49332 $as_echo "$as_me: updating cache $cache_file" >&6;}
49333       if test ! -f "$cache_file" || test -h "$cache_file"; then
49334         cat confcache >"$cache_file"
49335       else
49336         case $cache_file in #(
49337         */* | ?:*)
49338           mv -f confcache "$cache_file"$$ &&
49339           mv -f "$cache_file"$$ "$cache_file" ;; #(
49340         *)
49341           mv -f confcache "$cache_file" ;;
49342         esac
49343       fi
49344     fi
49345   else
49346     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49347 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49348   fi
49349 fi
49350 rm -f confcache
49351 
49352 test "x$prefix" = xNONE && prefix=$ac_default_prefix
49353 # Let make expand exec_prefix.
49354 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49355 
49356 DEFS=-DHAVE_CONFIG_H
49357 
49358 ac_libobjs=
49359 ac_ltlibobjs=
49360 U=
49361 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49362   # 1. Remove the extension, and $U if already installed.
49363   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49364   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49365   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49366   #    will be set to the directory where LIBOBJS objects are built.
49367   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49368   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49369 done
49370 LIBOBJS=$ac_libobjs
49371 
49372 LTLIBOBJS=$ac_ltlibobjs
49373 
49374 
49375 
49376 : "${CONFIG_STATUS=./config.status}"
49377 ac_write_fail=0
49378 ac_clean_files_save=$ac_clean_files
49379 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49380 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49381 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49382 as_write_fail=0
49383 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49384 #! $SHELL
49385 # Generated by $as_me.
49386 # Run this file to recreate the current configuration.
49387 # Compiler output produced by configure, useful for debugging
49388 # configure, is in config.log if it exists.
49389 
49390 debug=false
49391 ac_cs_recheck=false
49392 ac_cs_silent=false
49393 
49394 SHELL=\${CONFIG_SHELL-$SHELL}
49395 export SHELL
49396 _ASEOF
49397 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49398 ## -------------------- ##
49399 ## M4sh Initialization. ##
49400 ## -------------------- ##
49401 
49402 # Be more Bourne compatible
49403 DUALCASE=1; export DUALCASE # for MKS sh
49404 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49405   emulate sh
49406   NULLCMD=:
49407   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49408   # is contrary to our usage.  Disable this feature.
49409   alias -g '${1+"$@"}'='"$@"'
49410   setopt NO_GLOB_SUBST
49411 else
49412   case `(set -o) 2>/dev/null` in #(
49413   *posix*) :
49414     set -o posix ;; #(
49415   *) :
49416      ;;
49417 esac
49418 fi
49419 
49420 
49421 as_nl='
49422 '
49423 export as_nl
49424 # Printing a long string crashes Solaris 7 /usr/bin/printf.
49425 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49426 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49427 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49428 # Prefer a ksh shell builtin over an external printf program on Solaris,
49429 # but without wasting forks for bash or zsh.
49430 if test -z "$BASH_VERSION$ZSH_VERSION" \
49431     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49432   as_echo='print -r --'
49433   as_echo_n='print -rn --'
49434 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49435   as_echo='printf %s\n'
49436   as_echo_n='printf %s'
49437 else
49438   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49439     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49440     as_echo_n='/usr/ucb/echo -n'
49441   else
49442     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49443     as_echo_n_body='eval
49444       arg=$1;
49445       case $arg in #(
49446       *"$as_nl"*)
49447         expr "X$arg" : "X\\(.*\\)$as_nl";
49448         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49449       esac;
49450       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49451     '
49452     export as_echo_n_body
49453     as_echo_n='sh -c $as_echo_n_body as_echo'
49454   fi
49455   export as_echo_body
49456   as_echo='sh -c $as_echo_body as_echo'
49457 fi
49458 
49459 # The user is always right.
49460 if test "${PATH_SEPARATOR+set}" != set; then
49461   PATH_SEPARATOR=:
49462   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49463     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49464       PATH_SEPARATOR=';'
49465   }
49466 fi
49467 
49468 
49469 # IFS
49470 # We need space, tab and new line, in precisely that order.  Quoting is
49471 # there to prevent editors from complaining about space-tab.
49472 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
49473 # splitting by setting IFS to empty value.)
49474 IFS=" ""        $as_nl"
49475 
49476 # Find who we are.  Look in the path if we contain no directory separator.
49477 as_myself=
49478 case $0 in #((
49479   *[\\/]* ) as_myself=$0 ;;
49480   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49481 for as_dir in $PATH
49482 do
49483   IFS=$as_save_IFS
49484   test -z "$as_dir" && as_dir=.
49485     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49486   done
49487 IFS=$as_save_IFS
49488 
49489      ;;
49490 esac
49491 # We did not find ourselves, most probably we were run as `sh COMMAND'
49492 # in which case we are not to be found in the path.
49493 if test "x$as_myself" = x; then
49494   as_myself=$0
49495 fi
49496 if test ! -f "$as_myself"; then
49497   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49498   exit 1
49499 fi
49500 
49501 # Unset variables that we do not need and which cause bugs (e.g. in
49502 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49503 # suppresses any "Segmentation fault" message there.  '((' could
49504 # trigger a bug in pdksh 5.2.14.
49505 for as_var in BASH_ENV ENV MAIL MAILPATH
49506 do eval test x\${$as_var+set} = xset \
49507   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49508 done
49509 PS1='$ '
49510 PS2='> '
49511 PS4='+ '
49512 
49513 # NLS nuisances.
49514 LC_ALL=C
49515 export LC_ALL
49516 LANGUAGE=C
49517 export LANGUAGE
49518 
49519 # CDPATH.
49520 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49521 
49522 
49523 # as_fn_error STATUS ERROR [LINENO LOG_FD]
49524 # ----------------------------------------
49525 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49526 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49527 # script with STATUS, using 1 if that was 0.
49528 as_fn_error ()
49529 {
49530   as_status=$1; test $as_status -eq 0 && as_status=1
49531   if test "$4"; then
49532     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49533     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49534   fi
49535   $as_echo "$as_me: error: $2" >&2
49536   as_fn_exit $as_status
49537 } # as_fn_error
49538 
49539 
49540 # as_fn_set_status STATUS
49541 # -----------------------
49542 # Set $? to STATUS, without forking.
49543 as_fn_set_status ()
49544 {
49545   return $1
49546 } # as_fn_set_status
49547 
49548 # as_fn_exit STATUS
49549 # -----------------
49550 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49551 as_fn_exit ()
49552 {
49553   set +e
49554   as_fn_set_status $1
49555   exit $1
49556 } # as_fn_exit
49557 
49558 # as_fn_unset VAR
49559 # ---------------
49560 # Portably unset VAR.
49561 as_fn_unset ()
49562 {
49563   { eval $1=; unset $1;}
49564 }
49565 as_unset=as_fn_unset
49566 # as_fn_append VAR VALUE
49567 # ----------------------
49568 # Append the text in VALUE to the end of the definition contained in VAR. Take
49569 # advantage of any shell optimizations that allow amortized linear growth over
49570 # repeated appends, instead of the typical quadratic growth present in naive
49571 # implementations.
49572 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49573   eval 'as_fn_append ()
49574   {
49575     eval $1+=\$2
49576   }'
49577 else
49578   as_fn_append ()
49579   {
49580     eval $1=\$$1\$2
49581   }
49582 fi # as_fn_append
49583 
49584 # as_fn_arith ARG...
49585 # ------------------
49586 # Perform arithmetic evaluation on the ARGs, and store the result in the
49587 # global $as_val. Take advantage of shells that can avoid forks. The arguments
49588 # must be portable across $(()) and expr.
49589 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49590   eval 'as_fn_arith ()
49591   {
49592     as_val=$(( $* ))
49593   }'
49594 else
49595   as_fn_arith ()
49596   {
49597     as_val=`expr "$@" || test $? -eq 1`
49598   }
49599 fi # as_fn_arith
49600 
49601 
49602 if expr a : '\(a\)' >/dev/null 2>&1 &&
49603    test "X`expr 00001 : '.*\(...\)'`" = X001; then
49604   as_expr=expr
49605 else
49606   as_expr=false
49607 fi
49608 
49609 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49610   as_basename=basename
49611 else
49612   as_basename=false
49613 fi
49614 
49615 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49616   as_dirname=dirname
49617 else
49618   as_dirname=false
49619 fi
49620 
49621 as_me=`$as_basename -- "$0" ||
49622 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49623          X"$0" : 'X\(//\)$' \| \
49624          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49625 $as_echo X/"$0" |
49626     sed '/^.*\/\([^/][^/]*\)\/*$/{
49627             s//\1/
49628             q
49629           }
49630           /^X\/\(\/\/\)$/{
49631             s//\1/
49632             q
49633           }
49634           /^X\/\(\/\).*/{
49635             s//\1/
49636             q
49637           }
49638           s/.*/./; q'`
49639 
49640 # Avoid depending upon Character Ranges.
49641 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49642 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49643 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49644 as_cr_digits='0123456789'
49645 as_cr_alnum=$as_cr_Letters$as_cr_digits
49646 
49647 ECHO_C= ECHO_N= ECHO_T=
49648 case `echo -n x` in #(((((
49649 -n*)
49650   case `echo 'xy\c'` in
49651   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
49652   xy)  ECHO_C='\c';;
49653   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49654        ECHO_T=' ';;
49655   esac;;
49656 *)
49657   ECHO_N='-n';;
49658 esac
49659 
49660 rm -f conf$$ conf$$.exe conf$$.file
49661 if test -d conf$$.dir; then
49662   rm -f conf$$.dir/conf$$.file
49663 else
49664   rm -f conf$$.dir
49665   mkdir conf$$.dir 2>/dev/null
49666 fi
49667 if (echo >conf$$.file) 2>/dev/null; then
49668   if ln -s conf$$.file conf$$ 2>/dev/null; then
49669     as_ln_s='ln -s'
49670     # ... but there are two gotchas:
49671     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49672     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49673     # In both cases, we have to default to `cp -pR'.
49674     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49675       as_ln_s='cp -pR'
49676   elif ln conf$$.file conf$$ 2>/dev/null; then
49677     as_ln_s=ln
49678   else
49679     as_ln_s='cp -pR'
49680   fi
49681 else
49682   as_ln_s='cp -pR'
49683 fi
49684 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49685 rmdir conf$$.dir 2>/dev/null
49686 
49687 
49688 # as_fn_mkdir_p
49689 # -------------
49690 # Create "$as_dir" as a directory, including parents if necessary.
49691 as_fn_mkdir_p ()
49692 {
49693 
49694   case $as_dir in #(
49695   -*) as_dir=./$as_dir;;
49696   esac
49697   test -d "$as_dir" || eval $as_mkdir_p || {
49698     as_dirs=
49699     while :; do
49700       case $as_dir in #(
49701       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49702       *) as_qdir=$as_dir;;
49703       esac
49704       as_dirs="'$as_qdir' $as_dirs"
49705       as_dir=`$as_dirname -- "$as_dir" ||
49706 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49707          X"$as_dir" : 'X\(//\)[^/]' \| \
49708          X"$as_dir" : 'X\(//\)$' \| \
49709          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49710 $as_echo X"$as_dir" |
49711     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49712             s//\1/
49713             q
49714           }
49715           /^X\(\/\/\)[^/].*/{
49716             s//\1/
49717             q
49718           }
49719           /^X\(\/\/\)$/{
49720             s//\1/
49721             q
49722           }
49723           /^X\(\/\).*/{
49724             s//\1/
49725             q
49726           }
49727           s/.*/./; q'`
49728       test -d "$as_dir" && break
49729     done
49730     test -z "$as_dirs" || eval "mkdir $as_dirs"
49731   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49732 
49733 
49734 } # as_fn_mkdir_p
49735 if mkdir -p . 2>/dev/null; then
49736   as_mkdir_p='mkdir -p "$as_dir"'
49737 else
49738   test -d ./-p && rmdir ./-p
49739   as_mkdir_p=false
49740 fi
49741 
49742 
49743 # as_fn_executable_p FILE
49744 # -----------------------
49745 # Test if FILE is an executable regular file.
49746 as_fn_executable_p ()
49747 {
49748   test -f "$1" && test -x "$1"
49749 } # as_fn_executable_p
49750 as_test_x='test -x'
49751 as_executable_p=as_fn_executable_p
49752 
49753 # Sed expression to map a string onto a valid CPP name.
49754 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49755 
49756 # Sed expression to map a string onto a valid variable name.
49757 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49758 
49759 
49760 exec 6>&1
49761 ## ----------------------------------- ##
49762 ## Main body of $CONFIG_STATUS script. ##
49763 ## ----------------------------------- ##
49764 _ASEOF
49765 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49766 
49767 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49768 # Save the log message, to keep $0 and so on meaningful, and to
49769 # report actual input values of CONFIG_FILES etc. instead of their
49770 # values after options handling.
49771 ac_log="
49772 This file was extended by OpenJDK $as_me jdk9, which was
49773 generated by GNU Autoconf 2.69.  Invocation command line was
49774 
49775   CONFIG_FILES    = $CONFIG_FILES
49776   CONFIG_HEADERS  = $CONFIG_HEADERS
49777   CONFIG_LINKS    = $CONFIG_LINKS
49778   CONFIG_COMMANDS = $CONFIG_COMMANDS
49779   $ $0 $@
49780 
49781 on `(hostname || uname -n) 2>/dev/null | sed 1q`
49782 "
49783 
49784 _ACEOF
49785 
49786 case $ac_config_files in *"
49787 "*) set x $ac_config_files; shift; ac_config_files=$*;;
49788 esac
49789 
49790 case $ac_config_headers in *"
49791 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49792 esac
49793 
49794 
49795 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49796 # Files that config.status was made for.
49797 config_files="$ac_config_files"
49798 config_headers="$ac_config_headers"
49799 
49800 _ACEOF
49801 
49802 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49803 ac_cs_usage="\
49804 \`$as_me' instantiates files and other configuration actions
49805 from templates according to the current configuration.  Unless the files
49806 and actions are specified as TAGs, all are instantiated by default.
49807 
49808 Usage: $0 [OPTION]... [TAG]...
49809 
49810   -h, --help       print this help, then exit
49811   -V, --version    print version number and configuration settings, then exit
49812       --config     print configuration, then exit
49813   -q, --quiet, --silent
49814                    do not print progress messages
49815   -d, --debug      don't remove temporary files
49816       --recheck    update $as_me by reconfiguring in the same conditions
49817       --file=FILE[:TEMPLATE]
49818                    instantiate the configuration file FILE
49819       --header=FILE[:TEMPLATE]
49820                    instantiate the configuration header FILE
49821 
49822 Configuration files:
49823 $config_files
49824 
49825 Configuration headers:
49826 $config_headers
49827 
49828 Report bugs to <build-dev@openjdk.java.net>.
49829 OpenJDK home page: <http://openjdk.java.net>."
49830 
49831 _ACEOF
49832 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49833 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49834 ac_cs_version="\\
49835 OpenJDK config.status jdk9
49836 configured by $0, generated by GNU Autoconf 2.69,
49837   with options \\"\$ac_cs_config\\"
49838 
49839 Copyright (C) 2012 Free Software Foundation, Inc.
49840 This config.status script is free software; the Free Software Foundation
49841 gives unlimited permission to copy, distribute and modify it."
49842 
49843 ac_pwd='$ac_pwd'
49844 srcdir='$srcdir'
49845 AWK='$AWK'
49846 test -n "\$AWK" || AWK=awk
49847 _ACEOF
49848 
49849 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49850 # The default lists apply if the user does not specify any file.
49851 ac_need_defaults=:
49852 while test $# != 0
49853 do
49854   case $1 in
49855   --*=?*)
49856     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49857     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49858     ac_shift=:
49859     ;;
49860   --*=)
49861     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49862     ac_optarg=
49863     ac_shift=:
49864     ;;
49865   *)
49866     ac_option=$1
49867     ac_optarg=$2
49868     ac_shift=shift
49869     ;;
49870   esac
49871 
49872   case $ac_option in
49873   # Handling of the options.
49874   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49875     ac_cs_recheck=: ;;
49876   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49877     $as_echo "$ac_cs_version"; exit ;;
49878   --config | --confi | --conf | --con | --co | --c )
49879     $as_echo "$ac_cs_config"; exit ;;
49880   --debug | --debu | --deb | --de | --d | -d )
49881     debug=: ;;
49882   --file | --fil | --fi | --f )
49883     $ac_shift
49884     case $ac_optarg in
49885     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49886     '') as_fn_error $? "missing file argument" ;;
49887     esac
49888     as_fn_append CONFIG_FILES " '$ac_optarg'"
49889     ac_need_defaults=false;;
49890   --header | --heade | --head | --hea )
49891     $ac_shift
49892     case $ac_optarg in
49893     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49894     esac
49895     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49896     ac_need_defaults=false;;
49897   --he | --h)
49898     # Conflict between --help and --header
49899     as_fn_error $? "ambiguous option: \`$1'
49900 Try \`$0 --help' for more information.";;
49901   --help | --hel | -h )
49902     $as_echo "$ac_cs_usage"; exit ;;
49903   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49904   | -silent | --silent | --silen | --sile | --sil | --si | --s)
49905     ac_cs_silent=: ;;
49906 
49907   # This is an error.
49908   -*) as_fn_error $? "unrecognized option: \`$1'
49909 Try \`$0 --help' for more information." ;;
49910 
49911   *) as_fn_append ac_config_targets " $1"
49912      ac_need_defaults=false ;;
49913 
49914   esac
49915   shift
49916 done
49917 
49918 ac_configure_extra_args=
49919 
49920 if $ac_cs_silent; then
49921   exec 6>/dev/null
49922   ac_configure_extra_args="$ac_configure_extra_args --silent"
49923 fi
49924 
49925 _ACEOF
49926 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49927 if \$ac_cs_recheck; then
49928   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49929   shift
49930   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49931   CONFIG_SHELL='$SHELL'
49932   export CONFIG_SHELL
49933   exec "\$@"
49934 fi
49935 
49936 _ACEOF
49937 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49938 exec 5>>config.log
49939 {
49940   echo
49941   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49942 ## Running $as_me. ##
49943 _ASBOX
49944   $as_echo "$ac_log"
49945 } >&5
49946 
49947 _ACEOF
49948 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49949 _ACEOF
49950 
49951 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49952 
49953 # Handling of arguments.
49954 for ac_config_target in $ac_config_targets
49955 do
49956   case $ac_config_target in
49957     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49958     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49959     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49960     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49961     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49962     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49963     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49964 
49965   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49966   esac
49967 done
49968 
49969 
49970 # If the user did not use the arguments to specify the items to instantiate,
49971 # then the envvar interface is used.  Set only those that are not.
49972 # We use the long form for the default assignment because of an extremely
49973 # bizarre bug on SunOS 4.1.3.
49974 if $ac_need_defaults; then
49975   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49976   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49977 fi
49978 
49979 # Have a temporary directory for convenience.  Make it in the build tree
49980 # simply because there is no reason against having it here, and in addition,
49981 # creating and moving files from /tmp can sometimes cause problems.
49982 # Hook for its removal unless debugging.
49983 # Note that there is a small window in which the directory will not be cleaned:
49984 # after its creation but before its name has been assigned to `$tmp'.
49985 $debug ||
49986 {
49987   tmp= ac_tmp=
49988   trap 'exit_status=$?
49989   : "${ac_tmp:=$tmp}"
49990   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49991 ' 0
49992   trap 'as_fn_exit 1' 1 2 13 15
49993 }
49994 # Create a (secure) tmp directory for tmp files.
49995 
49996 {
49997   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49998   test -d "$tmp"
49999 }  ||
50000 {
50001   tmp=./conf$$-$RANDOM
50002   (umask 077 && mkdir "$tmp")
50003 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50004 ac_tmp=$tmp
50005 
50006 # Set up the scripts for CONFIG_FILES section.
50007 # No need to generate them if there are no CONFIG_FILES.
50008 # This happens for instance with `./config.status config.h'.
50009 if test -n "$CONFIG_FILES"; then
50010 
50011 
50012 ac_cr=`echo X | tr X '\015'`
50013 # On cygwin, bash can eat \r inside `` if the user requested igncr.
50014 # But we know of no other shell where ac_cr would be empty at this
50015 # point, so we can use a bashism as a fallback.
50016 if test "x$ac_cr" = x; then
50017   eval ac_cr=\$\'\\r\'
50018 fi
50019 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50020 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50021   ac_cs_awk_cr='\\r'
50022 else
50023   ac_cs_awk_cr=$ac_cr
50024 fi
50025 
50026 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50027 _ACEOF
50028 
50029 
50030 {
50031   echo "cat >conf$$subs.awk <<_ACEOF" &&
50032   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50033   echo "_ACEOF"
50034 } >conf$$subs.sh ||
50035   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50036 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50037 ac_delim='%!_!# '
50038 for ac_last_try in false false false false false :; do
50039   . ./conf$$subs.sh ||
50040     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50041 
50042   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50043   if test $ac_delim_n = $ac_delim_num; then
50044     break
50045   elif $ac_last_try; then
50046     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50047   else
50048     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50049   fi
50050 done
50051 rm -f conf$$subs.sh
50052 
50053 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50054 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50055 _ACEOF
50056 sed -n '
50057 h
50058 s/^/S["/; s/!.*/"]=/
50059 p
50060 g
50061 s/^[^!]*!//
50062 :repl
50063 t repl
50064 s/'"$ac_delim"'$//
50065 t delim
50066 :nl
50067 h
50068 s/\(.\{148\}\)..*/\1/
50069 t more1
50070 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50071 p
50072 n
50073 b repl
50074 :more1
50075 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50076 p
50077 g
50078 s/.\{148\}//
50079 t nl
50080 :delim
50081 h
50082 s/\(.\{148\}\)..*/\1/
50083 t more2
50084 s/["\\]/\\&/g; s/^/"/; s/$/"/
50085 p
50086 b
50087 :more2
50088 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50089 p
50090 g
50091 s/.\{148\}//
50092 t delim
50093 ' <conf$$subs.awk | sed '
50094 /^[^""]/{
50095   N
50096   s/\n//
50097 }
50098 ' >>$CONFIG_STATUS || ac_write_fail=1
50099 rm -f conf$$subs.awk
50100 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50101 _ACAWK
50102 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50103   for (key in S) S_is_set[key] = 1
50104   FS = ""
50105 
50106 }
50107 {
50108   line = $ 0
50109   nfields = split(line, field, "@")
50110   substed = 0
50111   len = length(field[1])
50112   for (i = 2; i < nfields; i++) {
50113     key = field[i]
50114     keylen = length(key)
50115     if (S_is_set[key]) {
50116       value = S[key]
50117       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50118       len += length(value) + length(field[++i])
50119       substed = 1
50120     } else
50121       len += 1 + keylen
50122   }
50123 
50124   print line
50125 }
50126 
50127 _ACAWK
50128 _ACEOF
50129 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50130 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50131   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50132 else
50133   cat
50134 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50135   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50136 _ACEOF
50137 
50138 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50139 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50140 # trailing colons and then remove the whole line if VPATH becomes empty
50141 # (actually we leave an empty line to preserve line numbers).
50142 if test "x$srcdir" = x.; then
50143   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
50144 h
50145 s///
50146 s/^/:/
50147 s/[      ]*$/:/
50148 s/:\$(srcdir):/:/g
50149 s/:\${srcdir}:/:/g
50150 s/:@srcdir@:/:/g
50151 s/^:*//
50152 s/:*$//
50153 x
50154 s/\(=[   ]*\).*/\1/
50155 G
50156 s/\n//
50157 s/^[^=]*=[       ]*$//
50158 }'
50159 fi
50160 
50161 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50162 fi # test -n "$CONFIG_FILES"
50163 
50164 # Set up the scripts for CONFIG_HEADERS section.
50165 # No need to generate them if there are no CONFIG_HEADERS.
50166 # This happens for instance with `./config.status Makefile'.
50167 if test -n "$CONFIG_HEADERS"; then
50168 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50169 BEGIN {
50170 _ACEOF
50171 
50172 # Transform confdefs.h into an awk script `defines.awk', embedded as
50173 # here-document in config.status, that substitutes the proper values into
50174 # config.h.in to produce config.h.
50175 
50176 # Create a delimiter string that does not exist in confdefs.h, to ease
50177 # handling of long lines.
50178 ac_delim='%!_!# '
50179 for ac_last_try in false false :; do
50180   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50181   if test -z "$ac_tt"; then
50182     break
50183   elif $ac_last_try; then
50184     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50185   else
50186     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50187   fi
50188 done
50189 
50190 # For the awk script, D is an array of macro values keyed by name,
50191 # likewise P contains macro parameters if any.  Preserve backslash
50192 # newline sequences.
50193 
50194 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50195 sed -n '
50196 s/.\{148\}/&'"$ac_delim"'/g
50197 t rset
50198 :rset
50199 s/^[     ]*#[    ]*define[       ][      ]*/ /
50200 t def
50201 d
50202 :def
50203 s/\\$//
50204 t bsnl
50205 s/["\\]/\\&/g
50206 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
50207 D["\1"]=" \3"/p
50208 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
50209 d
50210 :bsnl
50211 s/["\\]/\\&/g
50212 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
50213 D["\1"]=" \3\\\\\\n"\\/p
50214 t cont
50215 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50216 t cont
50217 d
50218 :cont
50219 n
50220 s/.\{148\}/&'"$ac_delim"'/g
50221 t clear
50222 :clear
50223 s/\\$//
50224 t bsnlc
50225 s/["\\]/\\&/g; s/^/"/; s/$/"/p
50226 d
50227 :bsnlc
50228 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50229 b cont
50230 ' <confdefs.h | sed '
50231 s/'"$ac_delim"'/"\\\
50232 "/g' >>$CONFIG_STATUS || ac_write_fail=1
50233 
50234 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50235   for (key in D) D_is_set[key] = 1
50236   FS = ""
50237 }
50238 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50239   line = \$ 0
50240   split(line, arg, " ")
50241   if (arg[1] == "#") {
50242     defundef = arg[2]
50243     mac1 = arg[3]
50244   } else {
50245     defundef = substr(arg[1], 2)
50246     mac1 = arg[2]
50247   }
50248   split(mac1, mac2, "(") #)
50249   macro = mac2[1]
50250   prefix = substr(line, 1, index(line, defundef) - 1)
50251   if (D_is_set[macro]) {
50252     # Preserve the white space surrounding the "#".
50253     print prefix "define", macro P[macro] D[macro]
50254     next
50255   } else {
50256     # Replace #undef with comments.  This is necessary, for example,
50257     # in the case of _POSIX_SOURCE, which is predefined and required
50258     # on some systems where configure will not decide to define it.
50259     if (defundef == "undef") {
50260       print "/*", prefix defundef, macro, "*/"
50261       next
50262     }
50263   }
50264 }
50265 { print }
50266 _ACAWK
50267 _ACEOF
50268 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50269   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50270 fi # test -n "$CONFIG_HEADERS"
50271 
50272 
50273 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50274 shift
50275 for ac_tag
50276 do
50277   case $ac_tag in
50278   :[FHLC]) ac_mode=$ac_tag; continue;;
50279   esac
50280   case $ac_mode$ac_tag in
50281   :[FHL]*:*);;
50282   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50283   :[FH]-) ac_tag=-:-;;
50284   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50285   esac
50286   ac_save_IFS=$IFS
50287   IFS=:
50288   set x $ac_tag
50289   IFS=$ac_save_IFS
50290   shift
50291   ac_file=$1
50292   shift
50293 
50294   case $ac_mode in
50295   :L) ac_source=$1;;
50296   :[FH])
50297     ac_file_inputs=
50298     for ac_f
50299     do
50300       case $ac_f in
50301       -) ac_f="$ac_tmp/stdin";;
50302       *) # Look for the file first in the build tree, then in the source tree
50303          # (if the path is not absolute).  The absolute path cannot be DOS-style,
50304          # because $ac_f cannot contain `:'.
50305          test -f "$ac_f" ||
50306            case $ac_f in
50307            [\\/$]*) false;;
50308            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50309            esac ||
50310            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50311       esac
50312       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50313       as_fn_append ac_file_inputs " '$ac_f'"
50314     done
50315 
50316     # Let's still pretend it is `configure' which instantiates (i.e., don't
50317     # use $as_me), people would be surprised to read:
50318     #    /* config.h.  Generated by config.status.  */
50319     configure_input='Generated from '`
50320           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50321         `' by configure.'
50322     if test x"$ac_file" != x-; then
50323       configure_input="$ac_file.  $configure_input"
50324       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50325 $as_echo "$as_me: creating $ac_file" >&6;}
50326     fi
50327     # Neutralize special characters interpreted by sed in replacement strings.
50328     case $configure_input in #(
50329     *\&* | *\|* | *\\* )
50330        ac_sed_conf_input=`$as_echo "$configure_input" |
50331        sed 's/[\\\\&|]/\\\\&/g'`;; #(
50332     *) ac_sed_conf_input=$configure_input;;
50333     esac
50334 
50335     case $ac_tag in
50336     *:-:* | *:-) cat >"$ac_tmp/stdin" \
50337       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50338     esac
50339     ;;
50340   esac
50341 
50342   ac_dir=`$as_dirname -- "$ac_file" ||
50343 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50344          X"$ac_file" : 'X\(//\)[^/]' \| \
50345          X"$ac_file" : 'X\(//\)$' \| \
50346          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50347 $as_echo X"$ac_file" |
50348     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50349             s//\1/
50350             q
50351           }
50352           /^X\(\/\/\)[^/].*/{
50353             s//\1/
50354             q
50355           }
50356           /^X\(\/\/\)$/{
50357             s//\1/
50358             q
50359           }
50360           /^X\(\/\).*/{
50361             s//\1/
50362             q
50363           }
50364           s/.*/./; q'`
50365   as_dir="$ac_dir"; as_fn_mkdir_p
50366   ac_builddir=.
50367 
50368 case "$ac_dir" in
50369 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50370 *)
50371   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50372   # A ".." for each directory in $ac_dir_suffix.
50373   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50374   case $ac_top_builddir_sub in
50375   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50376   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50377   esac ;;
50378 esac
50379 ac_abs_top_builddir=$ac_pwd
50380 ac_abs_builddir=$ac_pwd$ac_dir_suffix
50381 # for backward compatibility:
50382 ac_top_builddir=$ac_top_build_prefix
50383 
50384 case $srcdir in
50385   .)  # We are building in place.
50386     ac_srcdir=.
50387     ac_top_srcdir=$ac_top_builddir_sub
50388     ac_abs_top_srcdir=$ac_pwd ;;
50389   [\\/]* | ?:[\\/]* )  # Absolute name.
50390     ac_srcdir=$srcdir$ac_dir_suffix;
50391     ac_top_srcdir=$srcdir
50392     ac_abs_top_srcdir=$srcdir ;;
50393   *) # Relative name.
50394     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50395     ac_top_srcdir=$ac_top_build_prefix$srcdir
50396     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50397 esac
50398 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50399 
50400 
50401   case $ac_mode in
50402   :F)
50403   #
50404   # CONFIG_FILE
50405   #
50406 
50407 _ACEOF
50408 
50409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50410 # If the template does not know about datarootdir, expand it.
50411 # FIXME: This hack should be removed a few years after 2.60.
50412 ac_datarootdir_hack=; ac_datarootdir_seen=
50413 ac_sed_dataroot='
50414 /datarootdir/ {
50415   p
50416   q
50417 }
50418 /@datadir@/p
50419 /@docdir@/p
50420 /@infodir@/p
50421 /@localedir@/p
50422 /@mandir@/p'
50423 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50424 *datarootdir*) ac_datarootdir_seen=yes;;
50425 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50426   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50427 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50428 _ACEOF
50429 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50430   ac_datarootdir_hack='
50431   s&@datadir@&$datadir&g
50432   s&@docdir@&$docdir&g
50433   s&@infodir@&$infodir&g
50434   s&@localedir@&$localedir&g
50435   s&@mandir@&$mandir&g
50436   s&\\\${datarootdir}&$datarootdir&g' ;;
50437 esac
50438 _ACEOF
50439 
50440 # Neutralize VPATH when `$srcdir' = `.'.
50441 # Shell code in configure.ac might set extrasub.
50442 # FIXME: do we really want to maintain this feature?
50443 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50444 ac_sed_extra="$ac_vpsub
50445 $extrasub
50446 _ACEOF
50447 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50448 :t
50449 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50450 s|@configure_input@|$ac_sed_conf_input|;t t
50451 s&@top_builddir@&$ac_top_builddir_sub&;t t
50452 s&@top_build_prefix@&$ac_top_build_prefix&;t t
50453 s&@srcdir@&$ac_srcdir&;t t
50454 s&@abs_srcdir@&$ac_abs_srcdir&;t t
50455 s&@top_srcdir@&$ac_top_srcdir&;t t
50456 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50457 s&@builddir@&$ac_builddir&;t t
50458 s&@abs_builddir@&$ac_abs_builddir&;t t
50459 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50460 $ac_datarootdir_hack
50461 "
50462 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50463   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50464 
50465 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50466   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50467   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
50468       "$ac_tmp/out"`; test -z "$ac_out"; } &&
50469   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50470 which seems to be undefined.  Please make sure it is defined" >&5
50471 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50472 which seems to be undefined.  Please make sure it is defined" >&2;}
50473 
50474   rm -f "$ac_tmp/stdin"
50475   case $ac_file in
50476   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50477   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50478   esac \
50479   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50480  ;;
50481   :H)
50482   #
50483   # CONFIG_HEADER
50484   #
50485   if test x"$ac_file" != x-; then
50486     {
50487       $as_echo "/* $configure_input  */" \
50488       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50489     } >"$ac_tmp/config.h" \
50490       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50491     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50492       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50493 $as_echo "$as_me: $ac_file is unchanged" >&6;}
50494     else
50495       rm -f "$ac_file"
50496       mv "$ac_tmp/config.h" "$ac_file" \
50497         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50498     fi
50499   else
50500     $as_echo "/* $configure_input  */" \
50501       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50502       || as_fn_error $? "could not create -" "$LINENO" 5
50503   fi
50504  ;;
50505 
50506 
50507   esac
50508 
50509 done # for ac_tag
50510 
50511 
50512 as_fn_exit 0
50513 _ACEOF
50514 ac_clean_files=$ac_clean_files_save
50515 
50516 test $ac_write_fail = 0 ||
50517   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50518 
50519 
50520 # configure is writing to config.log, and then calls config.status.
50521 # config.status does its own redirection, appending to config.log.
50522 # Unfortunately, on DOS this fails, as config.log is still kept open
50523 # by configure, so config.status won't be able to write to it; its
50524 # output is simply discarded.  So we exec the FD to /dev/null,
50525 # effectively closing config.log, so it can be properly (re)opened and
50526 # appended to by config.status.  When coming back to configure, we
50527 # need to make the FD available again.
50528 if test "$no_create" != yes; then
50529   ac_cs_success=:
50530   ac_config_status_args=
50531   test "$silent" = yes &&
50532     ac_config_status_args="$ac_config_status_args --quiet"
50533   exec 5>/dev/null
50534   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50535   exec 5>>config.log
50536   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50537   # would make configure fail if this is the last instruction.
50538   $ac_cs_success || as_fn_exit 1
50539 fi
50540 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50541   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50542 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50543 fi
50544 
50545 
50546 # Try to move the config.log file to the output directory.
50547 if test -e ./config.log; then
50548   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50549 fi
50550 
50551 # Make the compare script executable
50552 $CHMOD +x $OUTPUT_ROOT/compare.sh
50553 
50554 # Finally output some useful information to the user
50555 
50556   # Finally output some useful information to the user
50557 
50558   printf "\n"
50559   printf "====================================================\n"
50560   if test "x$no_create" != "xyes"; then
50561     if test "x$IS_RECONFIGURE" != "xyes"; then
50562       printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50563     else
50564       printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50565     fi
50566   else
50567     if test "x$IS_RECONFIGURE" != "xyes"; then
50568       printf "A configuration has been successfully checked but not created\n"
50569     else
50570       printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50571     fi
50572   fi
50573   if test "x$CONFIGURE_COMMAND_LINE" != x; then
50574     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50575   else
50576     printf "using default settings.\n"
50577   fi
50578 
50579   printf "\n"
50580   printf "Configuration summary:\n"
50581   printf "* Debug level:    $DEBUG_LEVEL\n"
50582   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
50583   printf "* JDK variant:    $JDK_VARIANT\n"
50584   printf "* JVM variants:   $with_jvm_variants\n"
50585   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50586 
50587   printf "\n"
50588   printf "Tools summary:\n"
50589   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50590     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50591   fi
50592   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50593   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50594   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50595   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50596 
50597   printf "\n"
50598   printf "Build performance summary:\n"
50599   printf "* Cores to use:   $JOBS\n"
50600   printf "* Memory limit:   $MEMORY_SIZE MB\n"
50601   if test "x$CCACHE_STATUS" != "x"; then
50602     printf "* ccache status:  $CCACHE_STATUS\n"
50603   fi
50604   printf "\n"
50605 
50606   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50607     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50608     printf "will result in longer build times.\n"
50609     printf "\n"
50610   fi
50611 
50612   if test "x$FOUND_ALT_VARIABLES" != "x"; then
50613     printf "WARNING: You have old-style ALT_ environment variables set.\n"
50614     printf "These are not respected, and will be ignored. It is recommended\n"
50615     printf "that you clean your environment. The following variables are set:\n"
50616     printf "$FOUND_ALT_VARIABLES\n"
50617     printf "\n"
50618   fi
50619 
50620   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50621     printf "WARNING: Your build output directory is not on a local disk.\n"
50622     printf "This will severely degrade build performance!\n"
50623     printf "It is recommended that you create an output directory on a local disk,\n"
50624     printf "and run the configure script again from that directory.\n"
50625     printf "\n"
50626   fi
50627 
50628   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50629     printf "WARNING: The result of this configuration has overridden an older\n"
50630     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50631     printf "proper build. Failure to do so might result in strange build problems.\n"
50632     printf "\n"
50633   fi
50634 
50635   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50636     printf "WARNING: The result of this configuration was not saved.\n"
50637     printf "You should run without '--no-create | -n' to create the configuration.\n"
50638     printf "\n"
50639   fi
50640