1 #!/bin/bash
   2 #
   3 # ##########################################################
   4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
   5 # ##########################################################
   6 #
   7 #! /bin/sh
   8 # Guess values for system-dependent variables and create Makefiles.
   9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
  10 #
  11 # Report bugs to <build-dev@openjdk.java.net>.
  12 #
  13 #
  14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
  15 #
  16 #
  17 # This configure script is free software; the Free Software Foundation
  18 # gives unlimited permission to copy, distribute and modify it.
  19 ## -------------------- ##
  20 ## M4sh Initialization. ##
  21 ## -------------------- ##
  22 
  23 # Be more Bourne compatible
  24 DUALCASE=1; export DUALCASE # for MKS sh
  25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  26   emulate sh
  27   NULLCMD=:
  28   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  29   # is contrary to our usage.  Disable this feature.
  30   alias -g '${1+"$@"}'='"$@"'
  31   setopt NO_GLOB_SUBST
  32 else
  33   case `(set -o) 2>/dev/null` in #(
  34   *posix*) :
  35     set -o posix ;; #(
  36   *) :
  37      ;;
  38 esac
  39 fi
  40 
  41 
  42 as_nl='
  43 '
  44 export as_nl
  45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  49 # Prefer a ksh shell builtin over an external printf program on Solaris,
  50 # but without wasting forks for bash or zsh.
  51 if test -z "$BASH_VERSION$ZSH_VERSION" \
  52     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  53   as_echo='print -r --'
  54   as_echo_n='print -rn --'
  55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  56   as_echo='printf %s\n'
  57   as_echo_n='printf %s'
  58 else
  59   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  60     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  61     as_echo_n='/usr/ucb/echo -n'
  62   else
  63     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  64     as_echo_n_body='eval
  65       arg=$1;
  66       case $arg in #(
  67       *"$as_nl"*)
  68         expr "X$arg" : "X\\(.*\\)$as_nl";
  69         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  70       esac;
  71       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  72     '
  73     export as_echo_n_body
  74     as_echo_n='sh -c $as_echo_n_body as_echo'
  75   fi
  76   export as_echo_body
  77   as_echo='sh -c $as_echo_body as_echo'
  78 fi
  79 
  80 # The user is always right.
  81 if test "${PATH_SEPARATOR+set}" != set; then
  82   PATH_SEPARATOR=:
  83   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  84     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  85       PATH_SEPARATOR=';'
  86   }
  87 fi
  88 
  89 
  90 # IFS
  91 # We need space, tab and new line, in precisely that order.  Quoting is
  92 # there to prevent editors from complaining about space-tab.
  93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  94 # splitting by setting IFS to empty value.)
  95 IFS=" ""        $as_nl"
  96 
  97 # Find who we are.  Look in the path if we contain no directory separator.
  98 as_myself=
  99 case $0 in #((
 100   *[\\/]* ) as_myself=$0 ;;
 101   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 102 for as_dir in $PATH
 103 do
 104   IFS=$as_save_IFS
 105   test -z "$as_dir" && as_dir=.
 106     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 107   done
 108 IFS=$as_save_IFS
 109 
 110      ;;
 111 esac
 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
 113 # in which case we are not to be found in the path.
 114 if test "x$as_myself" = x; then
 115   as_myself=$0
 116 fi
 117 if test ! -f "$as_myself"; then
 118   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 119   exit 1
 120 fi
 121 
 122 # Unset variables that we do not need and which cause bugs (e.g. in
 123 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 124 # suppresses any "Segmentation fault" message there.  '((' could
 125 # trigger a bug in pdksh 5.2.14.
 126 for as_var in BASH_ENV ENV MAIL MAILPATH
 127 do eval test x\${$as_var+set} = xset \
 128   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 129 done
 130 PS1='$ '
 131 PS2='> '
 132 PS4='+ '
 133 
 134 # NLS nuisances.
 135 LC_ALL=C
 136 export LC_ALL
 137 LANGUAGE=C
 138 export LANGUAGE
 139 
 140 # CDPATH.
 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 142 
 143 # Use a proper internal environment variable to ensure we don't fall
 144   # into an infinite loop, continuously re-executing ourselves.
 145   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 146     _as_can_reexec=no; export _as_can_reexec;
 147     # We cannot yet assume a decent shell, so we have to provide a
 148 # neutralization value for shells without unset; and this also
 149 # works around shells that cannot unset nonexistent variables.
 150 # Preserve -v and -x to the replacement shell.
 151 BASH_ENV=/dev/null
 152 ENV=/dev/null
 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 154 case $- in # ((((
 155   *v*x* | *x*v* ) as_opts=-vx ;;
 156   *v* ) as_opts=-v ;;
 157   *x* ) as_opts=-x ;;
 158   * ) as_opts= ;;
 159 esac
 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 161 # Admittedly, this is quite paranoid, since all the known shells bail
 162 # out after a failed `exec'.
 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 164 as_fn_exit 255
 165   fi
 166   # We don't want this to propagate to other subprocesses.
 167           { _as_can_reexec=; unset _as_can_reexec;}
 168 if test "x$CONFIG_SHELL" = x; then
 169   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 170   emulate sh
 171   NULLCMD=:
 172   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 173   # is contrary to our usage.  Disable this feature.
 174   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 175   setopt NO_GLOB_SUBST
 176 else
 177   case \`(set -o) 2>/dev/null\` in #(
 178   *posix*) :
 179     set -o posix ;; #(
 180   *) :
 181      ;;
 182 esac
 183 fi
 184 "
 185   as_required="as_fn_return () { (exit \$1); }
 186 as_fn_success () { as_fn_return 0; }
 187 as_fn_failure () { as_fn_return 1; }
 188 as_fn_ret_success () { return 0; }
 189 as_fn_ret_failure () { return 1; }
 190 
 191 exitcode=0
 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 197 
 198 else
 199   exitcode=1; echo positional parameters were not saved.
 200 fi
 201 test x\$exitcode = x0 || exit 1
 202 test -x / || exit 1"
 203   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 204   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 205   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 206   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 207 test \$(( 1 + 1 )) = 2 || exit 1"
 208   if (eval "$as_required") 2>/dev/null; then :
 209   as_have_required=yes
 210 else
 211   as_have_required=no
 212 fi
 213   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 214 
 215 else
 216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 217 as_found=false
 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 219 do
 220   IFS=$as_save_IFS
 221   test -z "$as_dir" && as_dir=.
 222   as_found=:
 223   case $as_dir in #(
 224          /*)
 225            for as_base in sh bash ksh sh5; do
 226              # Try only shells that exist, to save several forks.
 227              as_shell=$as_dir/$as_base
 228              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 229                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 230   CONFIG_SHELL=$as_shell as_have_required=yes
 231                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 232   break 2
 233 fi
 234 fi
 235            done;;
 236        esac
 237   as_found=false
 238 done
 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 240               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 241   CONFIG_SHELL=$SHELL as_have_required=yes
 242 fi; }
 243 IFS=$as_save_IFS
 244 
 245 
 246       if test "x$CONFIG_SHELL" != x; then :
 247   export CONFIG_SHELL
 248              # We cannot yet assume a decent shell, so we have to provide a
 249 # neutralization value for shells without unset; and this also
 250 # works around shells that cannot unset nonexistent variables.
 251 # Preserve -v and -x to the replacement shell.
 252 BASH_ENV=/dev/null
 253 ENV=/dev/null
 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 255 case $- in # ((((
 256   *v*x* | *x*v* ) as_opts=-vx ;;
 257   *v* ) as_opts=-v ;;
 258   *x* ) as_opts=-x ;;
 259   * ) as_opts= ;;
 260 esac
 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 262 # Admittedly, this is quite paranoid, since all the known shells bail
 263 # out after a failed `exec'.
 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 265 exit 255
 266 fi
 267 
 268     if test x$as_have_required = xno; then :
 269   $as_echo "$0: This script requires a shell more modern than all"
 270   $as_echo "$0: the shells that I found on your system."
 271   if test x${ZSH_VERSION+set} = xset ; then
 272     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 273     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 274   else
 275     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 276 $0: build-dev@openjdk.java.net about your system, including
 277 $0: any error possibly output before this message. Then
 278 $0: install a modern shell, or manually run the script
 279 $0: under such a shell if you do have one."
 280   fi
 281   exit 1
 282 fi
 283 fi
 284 fi
 285 SHELL=${CONFIG_SHELL-/bin/sh}
 286 export SHELL
 287 # Unset more variables known to interfere with behavior of common tools.
 288 CLICOLOR_FORCE= GREP_OPTIONS=
 289 unset CLICOLOR_FORCE GREP_OPTIONS
 290 
 291 ## --------------------- ##
 292 ## M4sh Shell Functions. ##
 293 ## --------------------- ##
 294 # as_fn_unset VAR
 295 # ---------------
 296 # Portably unset VAR.
 297 as_fn_unset ()
 298 {
 299   { eval $1=; unset $1;}
 300 }
 301 as_unset=as_fn_unset
 302 
 303 # as_fn_set_status STATUS
 304 # -----------------------
 305 # Set $? to STATUS, without forking.
 306 as_fn_set_status ()
 307 {
 308   return $1
 309 } # as_fn_set_status
 310 
 311 # as_fn_exit STATUS
 312 # -----------------
 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 314 as_fn_exit ()
 315 {
 316   set +e
 317   as_fn_set_status $1
 318   exit $1
 319 } # as_fn_exit
 320 
 321 # as_fn_mkdir_p
 322 # -------------
 323 # Create "$as_dir" as a directory, including parents if necessary.
 324 as_fn_mkdir_p ()
 325 {
 326 
 327   case $as_dir in #(
 328   -*) as_dir=./$as_dir;;
 329   esac
 330   test -d "$as_dir" || eval $as_mkdir_p || {
 331     as_dirs=
 332     while :; do
 333       case $as_dir in #(
 334       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 335       *) as_qdir=$as_dir;;
 336       esac
 337       as_dirs="'$as_qdir' $as_dirs"
 338       as_dir=`$as_dirname -- "$as_dir" ||
 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 340          X"$as_dir" : 'X\(//\)[^/]' \| \
 341          X"$as_dir" : 'X\(//\)$' \| \
 342          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 343 $as_echo X"$as_dir" |
 344     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 345             s//\1/
 346             q
 347           }
 348           /^X\(\/\/\)[^/].*/{
 349             s//\1/
 350             q
 351           }
 352           /^X\(\/\/\)$/{
 353             s//\1/
 354             q
 355           }
 356           /^X\(\/\).*/{
 357             s//\1/
 358             q
 359           }
 360           s/.*/./; q'`
 361       test -d "$as_dir" && break
 362     done
 363     test -z "$as_dirs" || eval "mkdir $as_dirs"
 364   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 365 
 366 
 367 } # as_fn_mkdir_p
 368 
 369 # as_fn_executable_p FILE
 370 # -----------------------
 371 # Test if FILE is an executable regular file.
 372 as_fn_executable_p ()
 373 {
 374   test -f "$1" && test -x "$1"
 375 } # as_fn_executable_p
 376 # as_fn_append VAR VALUE
 377 # ----------------------
 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
 379 # advantage of any shell optimizations that allow amortized linear growth over
 380 # repeated appends, instead of the typical quadratic growth present in naive
 381 # implementations.
 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 383   eval 'as_fn_append ()
 384   {
 385     eval $1+=\$2
 386   }'
 387 else
 388   as_fn_append ()
 389   {
 390     eval $1=\$$1\$2
 391   }
 392 fi # as_fn_append
 393 
 394 # as_fn_arith ARG...
 395 # ------------------
 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 398 # must be portable across $(()) and expr.
 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 400   eval 'as_fn_arith ()
 401   {
 402     as_val=$(( $* ))
 403   }'
 404 else
 405   as_fn_arith ()
 406   {
 407     as_val=`expr "$@" || test $? -eq 1`
 408   }
 409 fi # as_fn_arith
 410 
 411 
 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 413 # ----------------------------------------
 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 416 # script with STATUS, using 1 if that was 0.
 417 as_fn_error ()
 418 {
 419   as_status=$1; test $as_status -eq 0 && as_status=1
 420   if test "$4"; then
 421     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 422     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 423   fi
 424   $as_echo "$as_me: error: $2" >&2
 425   as_fn_exit $as_status
 426 } # as_fn_error
 427 
 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
 429    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 430   as_expr=expr
 431 else
 432   as_expr=false
 433 fi
 434 
 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 436   as_basename=basename
 437 else
 438   as_basename=false
 439 fi
 440 
 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 442   as_dirname=dirname
 443 else
 444   as_dirname=false
 445 fi
 446 
 447 as_me=`$as_basename -- "$0" ||
 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 449          X"$0" : 'X\(//\)$' \| \
 450          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 451 $as_echo X/"$0" |
 452     sed '/^.*\/\([^/][^/]*\)\/*$/{
 453             s//\1/
 454             q
 455           }
 456           /^X\/\(\/\/\)$/{
 457             s//\1/
 458             q
 459           }
 460           /^X\/\(\/\).*/{
 461             s//\1/
 462             q
 463           }
 464           s/.*/./; q'`
 465 
 466 # Avoid depending upon Character Ranges.
 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 470 as_cr_digits='0123456789'
 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
 472 
 473 
 474   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 475   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 476   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 477   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 478   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 479   sed -n '
 480     p
 481     /[$]LINENO/=
 482   ' <$as_myself |
 483     sed '
 484       s/[$]LINENO.*/&-/
 485       t lineno
 486       b
 487       :lineno
 488       N
 489       :loop
 490       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 491       t loop
 492       s/-\n.*//
 493     ' >$as_me.lineno &&
 494   chmod +x "$as_me.lineno" ||
 495     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 496 
 497   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 498   # already done that, so ensure we don't try to do so again and fall
 499   # in an infinite loop.  This has already happened in practice.
 500   _as_can_reexec=no; export _as_can_reexec
 501   # Don't try to exec as it changes $[0], causing all sort of problems
 502   # (the dirname of $[0] is not the place where we might find the
 503   # original and so on.  Autoconf is especially sensitive to this).
 504   . "./$as_me.lineno"
 505   # Exit status is that of the last command.
 506   exit
 507 }
 508 
 509 ECHO_C= ECHO_N= ECHO_T=
 510 case `echo -n x` in #(((((
 511 -n*)
 512   case `echo 'xy\c'` in
 513   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 514   xy)  ECHO_C='\c';;
 515   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 516        ECHO_T=' ';;
 517   esac;;
 518 *)
 519   ECHO_N='-n';;
 520 esac
 521 
 522 rm -f conf$$ conf$$.exe conf$$.file
 523 if test -d conf$$.dir; then
 524   rm -f conf$$.dir/conf$$.file
 525 else
 526   rm -f conf$$.dir
 527   mkdir conf$$.dir 2>/dev/null
 528 fi
 529 if (echo >conf$$.file) 2>/dev/null; then
 530   if ln -s conf$$.file conf$$ 2>/dev/null; then
 531     as_ln_s='ln -s'
 532     # ... but there are two gotchas:
 533     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 534     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 535     # In both cases, we have to default to `cp -pR'.
 536     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 537       as_ln_s='cp -pR'
 538   elif ln conf$$.file conf$$ 2>/dev/null; then
 539     as_ln_s=ln
 540   else
 541     as_ln_s='cp -pR'
 542   fi
 543 else
 544   as_ln_s='cp -pR'
 545 fi
 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 547 rmdir conf$$.dir 2>/dev/null
 548 
 549 if mkdir -p . 2>/dev/null; then
 550   as_mkdir_p='mkdir -p "$as_dir"'
 551 else
 552   test -d ./-p && rmdir ./-p
 553   as_mkdir_p=false
 554 fi
 555 
 556 as_test_x='test -x'
 557 as_executable_p=as_fn_executable_p
 558 
 559 # Sed expression to map a string onto a valid CPP name.
 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 561 
 562 # Sed expression to map a string onto a valid variable name.
 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 564 
 565 
 566 test -n "$DJDIR" || exec 7<&0 </dev/null
 567 exec 6>&1
 568 
 569 # Name of the host.
 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 571 # so uname gets run too.
 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 573 
 574 #
 575 # Initializations.
 576 #
 577 ac_default_prefix=/usr/local
 578 ac_clean_files=
 579 ac_config_libobj_dir=.
 580 LIBOBJS=
 581 cross_compiling=no
 582 subdirs=
 583 MFLAGS=
 584 MAKEFLAGS=
 585 
 586 # Identity of this package.
 587 PACKAGE_NAME='OpenJDK'
 588 PACKAGE_TARNAME='openjdk'
 589 PACKAGE_VERSION='jdk9'
 590 PACKAGE_STRING='OpenJDK jdk9'
 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 592 PACKAGE_URL='http://openjdk.java.net'
 593 
 594 # Factoring default headers for most tests.
 595 ac_includes_default="\
 596 #include <stdio.h>
 597 #ifdef HAVE_SYS_TYPES_H
 598 # include <sys/types.h>
 599 #endif
 600 #ifdef HAVE_SYS_STAT_H
 601 # include <sys/stat.h>
 602 #endif
 603 #ifdef STDC_HEADERS
 604 # include <stdlib.h>
 605 # include <stddef.h>
 606 #else
 607 # ifdef HAVE_STDLIB_H
 608 #  include <stdlib.h>
 609 # endif
 610 #endif
 611 #ifdef HAVE_STRING_H
 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 613 #  include <memory.h>
 614 # endif
 615 # include <string.h>
 616 #endif
 617 #ifdef HAVE_STRINGS_H
 618 # include <strings.h>
 619 #endif
 620 #ifdef HAVE_INTTYPES_H
 621 # include <inttypes.h>
 622 #endif
 623 #ifdef HAVE_STDINT_H
 624 # include <stdint.h>
 625 #endif
 626 #ifdef HAVE_UNISTD_H
 627 # include <unistd.h>
 628 #endif"
 629 
 630 ac_subst_vars='LTLIBOBJS
 631 LIBOBJS
 632 CFLAGS_CCACHE
 633 CCACHE
 634 USE_PRECOMPILED_HEADER
 635 SJAVAC_SERVER_DIR
 636 ENABLE_SJAVAC
 637 SJAVAC_SERVER_JAVA_FLAGS
 638 SJAVAC_SERVER_JAVA
 639 JAVA_TOOL_FLAGS_SMALL
 640 JAVA_FLAGS_SMALL
 641 JAVA_FLAGS_BIG
 642 JAVA_FLAGS
 643 JOBS
 644 MEMORY_SIZE
 645 NUM_CORES
 646 ENABLE_INTREE_EC
 647 SALIB_NAME
 648 HOTSPOT_MAKE_ARGS
 649 MSVCP_DLL
 650 MSVCR_DLL
 651 LIBCXX
 652 LLVM_LIBS
 653 LLVM_LDFLAGS
 654 LLVM_CFLAGS
 655 LLVM_CONFIG
 656 LIBFFI_LIBS
 657 LIBFFI_CFLAGS
 658 STATIC_CXX_SETTING
 659 LIBDL
 660 LIBM
 661 LIBZIP_CAN_USE_MMAP
 662 USE_EXTERNAL_LIBZ
 663 USE_EXTERNAL_LIBPNG
 664 PNG_LIBS
 665 PNG_CFLAGS
 666 USE_EXTERNAL_LCMS
 667 LCMS_LIBS
 668 LCMS_CFLAGS
 669 USE_EXTERNAL_LIBGIF
 670 USE_EXTERNAL_LIBJPEG
 671 ALSA_LIBS
 672 ALSA_CFLAGS
 673 FREETYPE_BUNDLE_LIB_PATH
 674 FREETYPE_LIBS
 675 FREETYPE_CFLAGS
 676 CUPS_CFLAGS
 677 X_EXTRA_LIBS
 678 X_LIBS
 679 X_PRE_LIBS
 680 X_CFLAGS
 681 XMKMF
 682 FIXPATH
 683 GCOV_ENABLED
 684 ZIP_DEBUGINFO_FILES
 685 ENABLE_DEBUG_SYMBOLS
 686 CFLAGS_WARNINGS_ARE_ERRORS
 687 DISABLE_WARNING_PREFIX
 688 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 689 ZERO_ARCHFLAG
 690 LDFLAGS_TESTEXE_SUFFIX
 691 LDFLAGS_TESTLIB_SUFFIX
 692 LDFLAGS_TESTEXE
 693 LDFLAGS_TESTLIB
 694 LDFLAGS_CXX_JDK
 695 LDFLAGS_JDKEXE_SUFFIX
 696 LDFLAGS_JDKLIB_SUFFIX
 697 LDFLAGS_JDKEXE
 698 LDFLAGS_JDKLIB
 699 CXXFLAGS_TESTEXE
 700 CXXFLAGS_TESTLIB
 701 CFLAGS_TESTEXE
 702 CFLAGS_TESTLIB
 703 CXXFLAGS_JDKEXE
 704 CXXFLAGS_JDKLIB
 705 CFLAGS_JDKEXE
 706 CFLAGS_JDKLIB
 707 MACOSX_VERSION_MIN
 708 LEGACY_EXTRA_LDFLAGS
 709 LEGACY_EXTRA_CXXFLAGS
 710 LEGACY_EXTRA_CFLAGS
 711 CXX_O_FLAG_NONE
 712 CXX_O_FLAG_DEBUG
 713 CXX_O_FLAG_NORM
 714 CXX_O_FLAG_HI
 715 CXX_O_FLAG_HIGHEST
 716 C_O_FLAG_NONE
 717 C_O_FLAG_DEBUG
 718 C_O_FLAG_NORM
 719 C_O_FLAG_HI
 720 C_O_FLAG_HIGHEST
 721 CXXFLAGS_DEBUG_OPTIONS
 722 CFLAGS_DEBUG_OPTIONS
 723 CXXFLAGS_DEBUG_SYMBOLS
 724 CFLAGS_DEBUG_SYMBOLS
 725 CXX_FLAG_DEPS
 726 C_FLAG_DEPS
 727 SET_SHARED_LIBRARY_MAPFILE
 728 SET_SHARED_LIBRARY_NAME
 729 SET_SHARED_LIBRARY_ORIGIN
 730 SET_EXECUTABLE_ORIGIN
 731 SHARED_LIBRARY_FLAGS
 732 CXX_FLAG_REORDER
 733 C_FLAG_REORDER
 734 SYSROOT_LDFLAGS
 735 SYSROOT_CFLAGS
 736 RC_FLAGS
 737 AR_OUT_OPTION
 738 LD_OUT_OPTION
 739 EXE_OUT_OPTION
 740 CC_OUT_OPTION
 741 POST_MCS_CMD
 742 POST_STRIP_CMD
 743 ARFLAGS
 744 COMPILER_TARGET_BITS_FLAG
 745 JT_HOME
 746 JTREGEXE
 747 USING_BROKEN_SUSE_LD
 748 PACKAGE_PATH
 749 LDEXECXX
 750 LDEXE
 751 USE_CLANG
 752 HOTSPOT_LD
 753 HOTSPOT_CXX
 754 HOTSPOT_RC
 755 HOTSPOT_MT
 756 BUILD_LD
 757 BUILD_CXX
 758 BUILD_CC
 759 ac_ct_OBJDUMP
 760 OBJDUMP
 761 ac_ct_OBJCOPY
 762 OBJCOPY
 763 ac_ct_NM
 764 ac_ct_STRIP
 765 MCS
 766 GNM
 767 NM
 768 STRIP
 769 MSBUILD
 770 DUMPBIN
 771 RC
 772 MT
 773 LIPO
 774 ac_ct_AR
 775 AR
 776 AS
 777 LDCXX
 778 LD
 779 CXXCPP
 780 CPP
 781 ac_ct_CXX
 782 CXXFLAGS
 783 CXX
 784 ac_ct_PROPER_COMPILER_CXX
 785 PROPER_COMPILER_CXX
 786 TOOLCHAIN_PATH_CXX
 787 POTENTIAL_CXX
 788 OBJEXT
 789 EXEEXT
 790 ac_ct_CC
 791 CPPFLAGS
 792 LDFLAGS
 793 CFLAGS
 794 CC
 795 ac_ct_PROPER_COMPILER_CC
 796 PROPER_COMPILER_CC
 797 TOOLCHAIN_PATH_CC
 798 POTENTIAL_CC
 799 VS_LIB
 800 VS_INCLUDE
 801 VS_PATH
 802 CYGWIN_LINK
 803 EXE_SUFFIX
 804 OBJ_SUFFIX
 805 STATIC_LIBRARY
 806 SHARED_LIBRARY
 807 STATIC_LIBRARY_SUFFIX
 808 SHARED_LIBRARY_SUFFIX
 809 LIBRARY_PREFIX
 810 TOOLCHAIN_TYPE
 811 BUILD_HOTSPOT
 812 HOTSPOT_DIST
 813 BUILD_OUTPUT
 814 OVERRIDE_SRC_ROOT
 815 ADD_SRC_ROOT
 816 JDK_TOPDIR
 817 NASHORN_TOPDIR
 818 HOTSPOT_TOPDIR
 819 JAXWS_TOPDIR
 820 JAXP_TOPDIR
 821 CORBA_TOPDIR
 822 LANGTOOLS_TOPDIR
 823 JAVAC_FLAGS
 824 BOOT_JDK_SOURCETARGET
 825 JARSIGNER
 826 NATIVE2ASCII
 827 JAR
 828 JAVAH
 829 JAVAC
 830 JAVA
 831 BOOT_JDK
 832 JAVA_CHECK
 833 JAVAC_CHECK
 834 COOKED_BUILD_NUMBER
 835 JDK_VERSION
 836 COPYRIGHT_YEAR
 837 MACOSX_BUNDLE_ID_BASE
 838 MACOSX_BUNDLE_NAME_BASE
 839 COMPANY_NAME
 840 JDK_RC_PLATFORM_NAME
 841 PRODUCT_SUFFIX
 842 PRODUCT_NAME
 843 LAUNCHER_NAME
 844 MILESTONE
 845 JDK_BUILD_NUMBER
 846 JDK_UPDATE_VERSION
 847 JDK_MICRO_VERSION
 848 JDK_MINOR_VERSION
 849 JDK_MAJOR_VERSION
 850 USER_RELEASE_SUFFIX
 851 COMPRESS_JARS
 852 RMICONNECTOR_IIOP
 853 UNLIMITED_CRYPTO
 854 CACERTS_FILE
 855 TEST_IN_BUILD
 856 BUILD_HEADLESS
 857 SUPPORT_HEADFUL
 858 SUPPORT_HEADLESS
 859 BDEPS_FTP
 860 BDEPS_UNZIP
 861 OS_VERSION_MICRO
 862 OS_VERSION_MINOR
 863 OS_VERSION_MAJOR
 864 PKG_CONFIG
 865 BASH_ARGS
 866 CODESIGN
 867 XATTR
 868 DSYMUTIL
 869 IS_GNU_TIME
 870 TIME
 871 STAT
 872 HG
 873 READELF
 874 OTOOL
 875 LDD
 876 ZIP
 877 UNZIP
 878 FIND_DELETE
 879 OUTPUT_SYNC
 880 OUTPUT_SYNC_SUPPORTED
 881 MAKE
 882 CHECK_TOOLSDIR_MAKE
 883 CHECK_TOOLSDIR_GMAKE
 884 CHECK_MAKE
 885 CHECK_GMAKE
 886 PKGHANDLER
 887 OUTPUT_ROOT
 888 CONF_NAME
 889 SPEC
 890 SDKROOT
 891 XCODEBUILD
 892 BUILD_VARIANT_RELEASE
 893 DEBUG_CLASSFILES
 894 FASTDEBUG
 895 VARIANT
 896 DEBUG_LEVEL
 897 MACOSX_UNIVERSAL
 898 INCLUDE_SA
 899 JVM_VARIANT_CORE
 900 JVM_VARIANT_ZEROSHARK
 901 JVM_VARIANT_ZERO
 902 JVM_VARIANT_KERNEL
 903 JVM_VARIANT_MINIMAL1
 904 JVM_VARIANT_CLIENT
 905 JVM_VARIANT_SERVER
 906 JVM_VARIANTS
 907 JVM_INTERPRETER
 908 JDK_VARIANT
 909 SET_OPENJDK
 910 CANONICAL_TOPDIR
 911 ORIGINAL_TOPDIR
 912 TOPDIR
 913 PATH_SEP
 914 ZERO_ARCHDEF
 915 DEFINE_CROSS_COMPILE_ARCH
 916 LP64
 917 OPENJDK_TARGET_OS_EXPORT_DIR
 918 OPENJDK_TARGET_CPU_JLI_CFLAGS
 919 OPENJDK_TARGET_CPU_OSARCH
 920 OPENJDK_TARGET_CPU_ISADIR
 921 OPENJDK_TARGET_CPU_LIBDIR
 922 OPENJDK_TARGET_CPU_LEGACY_LIB
 923 OPENJDK_TARGET_CPU_LEGACY
 924 REQUIRED_OS_VERSION
 925 REQUIRED_OS_NAME
 926 COMPILE_TYPE
 927 OPENJDK_TARGET_CPU_ENDIAN
 928 OPENJDK_TARGET_CPU_BITS
 929 OPENJDK_TARGET_CPU_ARCH
 930 OPENJDK_TARGET_CPU
 931 OPENJDK_TARGET_OS_ENV
 932 OPENJDK_TARGET_OS_TYPE
 933 OPENJDK_TARGET_OS
 934 OPENJDK_BUILD_CPU_ENDIAN
 935 OPENJDK_BUILD_CPU_BITS
 936 OPENJDK_BUILD_CPU_ARCH
 937 OPENJDK_BUILD_CPU
 938 OPENJDK_BUILD_OS_ENV
 939 OPENJDK_BUILD_OS_TYPE
 940 OPENJDK_BUILD_OS
 941 OPENJDK_BUILD_AUTOCONF_NAME
 942 OPENJDK_TARGET_AUTOCONF_NAME
 943 target_os
 944 target_vendor
 945 target_cpu
 946 target
 947 host_os
 948 host_vendor
 949 host_cpu
 950 host
 951 build_os
 952 build_vendor
 953 build_cpu
 954 build
 955 CPIO
 956 SETFILE
 957 DF
 958 READLINK
 959 CYGPATH
 960 SED
 961 FGREP
 962 EGREP
 963 GREP
 964 AWK
 965 XARGS
 966 WHICH
 967 WC
 968 UNIQ
 969 UNAME
 970 TR
 971 TOUCH
 972 TEE
 973 TAR
 974 TAIL
 975 SORT
 976 SH
 977 RM
 978 PRINTF
 979 NAWK
 980 MV
 981 MKTEMP
 982 MKDIR
 983 LS
 984 LN
 985 HEAD
 986 FIND
 987 FILE
 988 EXPR
 989 ECHO
 990 DIRNAME
 991 DIFF
 992 DATE
 993 CUT
 994 CP
 995 COMM
 996 CMP
 997 CHMOD
 998 CAT
 999 BASH
1000 BASENAME
1001 DATE_WHEN_CONFIGURED
1002 ORIGINAL_PATH
1003 CONFIGURE_COMMAND_LINE
1004 target_alias
1005 host_alias
1006 build_alias
1007 LIBS
1008 ECHO_T
1009 ECHO_N
1010 ECHO_C
1011 DEFS
1012 mandir
1013 localedir
1014 libdir
1015 psdir
1016 pdfdir
1017 dvidir
1018 htmldir
1019 infodir
1020 docdir
1021 oldincludedir
1022 includedir
1023 localstatedir
1024 sharedstatedir
1025 sysconfdir
1026 datadir
1027 datarootdir
1028 libexecdir
1029 sbindir
1030 bindir
1031 program_transform_name
1032 prefix
1033 exec_prefix
1034 PACKAGE_URL
1035 PACKAGE_BUGREPORT
1036 PACKAGE_STRING
1037 PACKAGE_VERSION
1038 PACKAGE_TARNAME
1039 PACKAGE_NAME
1040 PATH_SEPARATOR
1041 SHELL'
1042 ac_subst_files=''
1043 ac_user_opts='
1044 enable_option_checking
1045 with_target_bits
1046 enable_openjdk_only
1047 with_custom_make_dir
1048 with_jdk_variant
1049 with_jvm_interpreter
1050 with_jvm_variants
1051 enable_debug
1052 with_debug_level
1053 with_devkit
1054 with_sys_root
1055 with_sysroot
1056 with_tools_dir
1057 with_toolchain_path
1058 with_extra_path
1059 with_sdk_name
1060 with_conf_name
1061 with_output_sync
1062 with_builddeps_conf
1063 with_builddeps_server
1064 with_builddeps_dir
1065 with_builddeps_group
1066 enable_headful
1067 enable_hotspot_test_in_build
1068 with_cacerts_file
1069 enable_unlimited_crypto
1070 enable_rmiconnector_iiop
1071 with_milestone
1072 with_update_version
1073 with_user_release_suffix
1074 with_build_number
1075 with_copyright_year
1076 with_boot_jdk
1077 with_add_source_root
1078 with_override_source_root
1079 with_adds_and_overrides
1080 with_override_langtools
1081 with_override_corba
1082 with_override_jaxp
1083 with_override_jaxws
1084 with_override_hotspot
1085 with_override_nashorn
1086 with_override_jdk
1087 with_import_hotspot
1088 with_toolchain_type
1089 with_toolchain_version
1090 with_jtreg
1091 with_extra_cflags
1092 with_extra_cxxflags
1093 with_extra_ldflags
1094 enable_debug_symbols
1095 enable_zip_debug_info
1096 enable_native_coverage
1097 with_x
1098 with_cups
1099 with_cups_include
1100 with_freetype
1101 with_freetype_include
1102 with_freetype_lib
1103 with_freetype_src
1104 enable_freetype_bundling
1105 with_alsa
1106 with_alsa_include
1107 with_alsa_lib
1108 with_libjpeg
1109 with_giflib
1110 with_lcms
1111 with_libpng
1112 with_zlib
1113 with_stdc__lib
1114 with_msvcr_dll
1115 with_msvcp_dll
1116 with_dxsdk
1117 with_dxsdk_lib
1118 with_dxsdk_include
1119 with_num_cores
1120 with_memory_size
1121 with_jobs
1122 with_boot_jdk_jvmargs
1123 with_sjavac_server_java
1124 enable_sjavac
1125 enable_precompiled_headers
1126 enable_ccache
1127 with_ccache_dir
1128 '
1129       ac_precious_vars='build_alias
1130 host_alias
1131 target_alias
1132 BASENAME
1133 BASH
1134 CAT
1135 CHMOD
1136 CMP
1137 COMM
1138 CP
1139 CUT
1140 DATE
1141 DIFF
1142 DIRNAME
1143 ECHO
1144 EXPR
1145 FILE
1146 FIND
1147 HEAD
1148 LN
1149 LS
1150 MKDIR
1151 MKTEMP
1152 MV
1153 NAWK
1154 PRINTF
1155 RM
1156 SH
1157 SORT
1158 TAIL
1159 TAR
1160 TEE
1161 TOUCH
1162 TR
1163 UNAME
1164 UNIQ
1165 WC
1166 WHICH
1167 XARGS
1168 AWK
1169 GREP
1170 EGREP
1171 FGREP
1172 SED
1173 CYGPATH
1174 READLINK
1175 DF
1176 SETFILE
1177 CPIO
1178 UNZIP
1179 ZIP
1180 LDD
1181 OTOOL
1182 READELF
1183 HG
1184 STAT
1185 TIME
1186 DSYMUTIL
1187 XATTR
1188 CODESIGN
1189 PKG_CONFIG
1190 JAVA
1191 JAVAC
1192 JAVAH
1193 JAR
1194 NATIVE2ASCII
1195 JARSIGNER
1196 CC
1197 CFLAGS
1198 LDFLAGS
1199 LIBS
1200 CPPFLAGS
1201 CXX
1202 CXXFLAGS
1203 CCC
1204 CPP
1205 CXXCPP
1206 AS
1207 AR
1208 LIPO
1209 STRIP
1210 NM
1211 GNM
1212 MCS
1213 OBJCOPY
1214 OBJDUMP
1215 BUILD_CC
1216 BUILD_CXX
1217 BUILD_LD
1218 JTREGEXE
1219 XMKMF
1220 FREETYPE_CFLAGS
1221 FREETYPE_LIBS
1222 ALSA_CFLAGS
1223 ALSA_LIBS
1224 LCMS_CFLAGS
1225 LCMS_LIBS
1226 PNG_CFLAGS
1227 PNG_LIBS
1228 LIBFFI_CFLAGS
1229 LIBFFI_LIBS
1230 CCACHE'
1231 
1232 
1233 # Initialize some variables set by options.
1234 ac_init_help=
1235 ac_init_version=false
1236 ac_unrecognized_opts=
1237 ac_unrecognized_sep=
1238 # The variables have the same names as the options, with
1239 # dashes changed to underlines.
1240 cache_file=/dev/null
1241 exec_prefix=NONE
1242 no_create=
1243 no_recursion=
1244 prefix=NONE
1245 program_prefix=NONE
1246 program_suffix=NONE
1247 program_transform_name=s,x,x,
1248 silent=
1249 site=
1250 srcdir=
1251 verbose=
1252 x_includes=NONE
1253 x_libraries=NONE
1254 
1255 # Installation directory options.
1256 # These are left unexpanded so users can "make install exec_prefix=/foo"
1257 # and all the variables that are supposed to be based on exec_prefix
1258 # by default will actually change.
1259 # Use braces instead of parens because sh, perl, etc. also accept them.
1260 # (The list follows the same order as the GNU Coding Standards.)
1261 bindir='${exec_prefix}/bin'
1262 sbindir='${exec_prefix}/sbin'
1263 libexecdir='${exec_prefix}/libexec'
1264 datarootdir='${prefix}/share'
1265 datadir='${datarootdir}'
1266 sysconfdir='${prefix}/etc'
1267 sharedstatedir='${prefix}/com'
1268 localstatedir='${prefix}/var'
1269 includedir='${prefix}/include'
1270 oldincludedir='/usr/include'
1271 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1272 infodir='${datarootdir}/info'
1273 htmldir='${docdir}'
1274 dvidir='${docdir}'
1275 pdfdir='${docdir}'
1276 psdir='${docdir}'
1277 libdir='${exec_prefix}/lib'
1278 localedir='${datarootdir}/locale'
1279 mandir='${datarootdir}/man'
1280 
1281 ac_prev=
1282 ac_dashdash=
1283 for ac_option
1284 do
1285   # If the previous option needs an argument, assign it.
1286   if test -n "$ac_prev"; then
1287     eval $ac_prev=\$ac_option
1288     ac_prev=
1289     continue
1290   fi
1291 
1292   case $ac_option in
1293   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1294   *=)   ac_optarg= ;;
1295   *)    ac_optarg=yes ;;
1296   esac
1297 
1298   # Accept the important Cygnus configure options, so we can diagnose typos.
1299 
1300   case $ac_dashdash$ac_option in
1301   --)
1302     ac_dashdash=yes ;;
1303 
1304   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1305     ac_prev=bindir ;;
1306   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1307     bindir=$ac_optarg ;;
1308 
1309   -build | --build | --buil | --bui | --bu)
1310     ac_prev=build_alias ;;
1311   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1312     build_alias=$ac_optarg ;;
1313 
1314   -cache-file | --cache-file | --cache-fil | --cache-fi \
1315   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1316     ac_prev=cache_file ;;
1317   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1318   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1319     cache_file=$ac_optarg ;;
1320 
1321   --config-cache | -C)
1322     cache_file=config.cache ;;
1323 
1324   -datadir | --datadir | --datadi | --datad)
1325     ac_prev=datadir ;;
1326   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1327     datadir=$ac_optarg ;;
1328 
1329   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1330   | --dataroo | --dataro | --datar)
1331     ac_prev=datarootdir ;;
1332   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1333   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1334     datarootdir=$ac_optarg ;;
1335 
1336   -disable-* | --disable-*)
1337     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1338     # Reject names that are not valid shell variable names.
1339     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1340       as_fn_error $? "invalid feature name: $ac_useropt"
1341     ac_useropt_orig=$ac_useropt
1342     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1343     case $ac_user_opts in
1344       *"
1345 "enable_$ac_useropt"
1346 "*) ;;
1347       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1348          ac_unrecognized_sep=', ';;
1349     esac
1350     eval enable_$ac_useropt=no ;;
1351 
1352   -docdir | --docdir | --docdi | --doc | --do)
1353     ac_prev=docdir ;;
1354   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1355     docdir=$ac_optarg ;;
1356 
1357   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1358     ac_prev=dvidir ;;
1359   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1360     dvidir=$ac_optarg ;;
1361 
1362   -enable-* | --enable-*)
1363     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1364     # Reject names that are not valid shell variable names.
1365     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366       as_fn_error $? "invalid feature name: $ac_useropt"
1367     ac_useropt_orig=$ac_useropt
1368     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369     case $ac_user_opts in
1370       *"
1371 "enable_$ac_useropt"
1372 "*) ;;
1373       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1374          ac_unrecognized_sep=', ';;
1375     esac
1376     eval enable_$ac_useropt=\$ac_optarg ;;
1377 
1378   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1379   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1380   | --exec | --exe | --ex)
1381     ac_prev=exec_prefix ;;
1382   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1383   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1384   | --exec=* | --exe=* | --ex=*)
1385     exec_prefix=$ac_optarg ;;
1386 
1387   -gas | --gas | --ga | --g)
1388     # Obsolete; use --with-gas.
1389     with_gas=yes ;;
1390 
1391   -help | --help | --hel | --he | -h)
1392     ac_init_help=long ;;
1393   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1394     ac_init_help=recursive ;;
1395   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1396     ac_init_help=short ;;
1397 
1398   -host | --host | --hos | --ho)
1399     ac_prev=host_alias ;;
1400   -host=* | --host=* | --hos=* | --ho=*)
1401     host_alias=$ac_optarg ;;
1402 
1403   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1404     ac_prev=htmldir ;;
1405   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1406   | --ht=*)
1407     htmldir=$ac_optarg ;;
1408 
1409   -includedir | --includedir | --includedi | --included | --include \
1410   | --includ | --inclu | --incl | --inc)
1411     ac_prev=includedir ;;
1412   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1413   | --includ=* | --inclu=* | --incl=* | --inc=*)
1414     includedir=$ac_optarg ;;
1415 
1416   -infodir | --infodir | --infodi | --infod | --info | --inf)
1417     ac_prev=infodir ;;
1418   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1419     infodir=$ac_optarg ;;
1420 
1421   -libdir | --libdir | --libdi | --libd)
1422     ac_prev=libdir ;;
1423   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1424     libdir=$ac_optarg ;;
1425 
1426   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1427   | --libexe | --libex | --libe)
1428     ac_prev=libexecdir ;;
1429   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1430   | --libexe=* | --libex=* | --libe=*)
1431     libexecdir=$ac_optarg ;;
1432 
1433   -localedir | --localedir | --localedi | --localed | --locale)
1434     ac_prev=localedir ;;
1435   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1436     localedir=$ac_optarg ;;
1437 
1438   -localstatedir | --localstatedir | --localstatedi | --localstated \
1439   | --localstate | --localstat | --localsta | --localst | --locals)
1440     ac_prev=localstatedir ;;
1441   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1442   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1443     localstatedir=$ac_optarg ;;
1444 
1445   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1446     ac_prev=mandir ;;
1447   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1448     mandir=$ac_optarg ;;
1449 
1450   -nfp | --nfp | --nf)
1451     # Obsolete; use --without-fp.
1452     with_fp=no ;;
1453 
1454   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1455   | --no-cr | --no-c | -n)
1456     no_create=yes ;;
1457 
1458   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1459   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1460     no_recursion=yes ;;
1461 
1462   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1463   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1464   | --oldin | --oldi | --old | --ol | --o)
1465     ac_prev=oldincludedir ;;
1466   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1467   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1468   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1469     oldincludedir=$ac_optarg ;;
1470 
1471   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1472     ac_prev=prefix ;;
1473   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1474     prefix=$ac_optarg ;;
1475 
1476   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1477   | --program-pre | --program-pr | --program-p)
1478     ac_prev=program_prefix ;;
1479   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1480   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1481     program_prefix=$ac_optarg ;;
1482 
1483   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1484   | --program-suf | --program-su | --program-s)
1485     ac_prev=program_suffix ;;
1486   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1487   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1488     program_suffix=$ac_optarg ;;
1489 
1490   -program-transform-name | --program-transform-name \
1491   | --program-transform-nam | --program-transform-na \
1492   | --program-transform-n | --program-transform- \
1493   | --program-transform | --program-transfor \
1494   | --program-transfo | --program-transf \
1495   | --program-trans | --program-tran \
1496   | --progr-tra | --program-tr | --program-t)
1497     ac_prev=program_transform_name ;;
1498   -program-transform-name=* | --program-transform-name=* \
1499   | --program-transform-nam=* | --program-transform-na=* \
1500   | --program-transform-n=* | --program-transform-=* \
1501   | --program-transform=* | --program-transfor=* \
1502   | --program-transfo=* | --program-transf=* \
1503   | --program-trans=* | --program-tran=* \
1504   | --progr-tra=* | --program-tr=* | --program-t=*)
1505     program_transform_name=$ac_optarg ;;
1506 
1507   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1508     ac_prev=pdfdir ;;
1509   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1510     pdfdir=$ac_optarg ;;
1511 
1512   -psdir | --psdir | --psdi | --psd | --ps)
1513     ac_prev=psdir ;;
1514   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1515     psdir=$ac_optarg ;;
1516 
1517   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1518   | -silent | --silent | --silen | --sile | --sil)
1519     silent=yes ;;
1520 
1521   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1522     ac_prev=sbindir ;;
1523   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1524   | --sbi=* | --sb=*)
1525     sbindir=$ac_optarg ;;
1526 
1527   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1528   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1529   | --sharedst | --shareds | --shared | --share | --shar \
1530   | --sha | --sh)
1531     ac_prev=sharedstatedir ;;
1532   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1533   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1534   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1535   | --sha=* | --sh=*)
1536     sharedstatedir=$ac_optarg ;;
1537 
1538   -site | --site | --sit)
1539     ac_prev=site ;;
1540   -site=* | --site=* | --sit=*)
1541     site=$ac_optarg ;;
1542 
1543   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1544     ac_prev=srcdir ;;
1545   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1546     srcdir=$ac_optarg ;;
1547 
1548   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1549   | --syscon | --sysco | --sysc | --sys | --sy)
1550     ac_prev=sysconfdir ;;
1551   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1552   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1553     sysconfdir=$ac_optarg ;;
1554 
1555   -target | --target | --targe | --targ | --tar | --ta | --t)
1556     ac_prev=target_alias ;;
1557   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1558     target_alias=$ac_optarg ;;
1559 
1560   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1561     verbose=yes ;;
1562 
1563   -version | --version | --versio | --versi | --vers | -V)
1564     ac_init_version=: ;;
1565 
1566   -with-* | --with-*)
1567     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1568     # Reject names that are not valid shell variable names.
1569     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1570       as_fn_error $? "invalid package name: $ac_useropt"
1571     ac_useropt_orig=$ac_useropt
1572     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1573     case $ac_user_opts in
1574       *"
1575 "with_$ac_useropt"
1576 "*) ;;
1577       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1578          ac_unrecognized_sep=', ';;
1579     esac
1580     eval with_$ac_useropt=\$ac_optarg ;;
1581 
1582   -without-* | --without-*)
1583     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1584     # Reject names that are not valid shell variable names.
1585     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1586       as_fn_error $? "invalid package name: $ac_useropt"
1587     ac_useropt_orig=$ac_useropt
1588     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1589     case $ac_user_opts in
1590       *"
1591 "with_$ac_useropt"
1592 "*) ;;
1593       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1594          ac_unrecognized_sep=', ';;
1595     esac
1596     eval with_$ac_useropt=no ;;
1597 
1598   --x)
1599     # Obsolete; use --with-x.
1600     with_x=yes ;;
1601 
1602   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1603   | --x-incl | --x-inc | --x-in | --x-i)
1604     ac_prev=x_includes ;;
1605   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1606   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1607     x_includes=$ac_optarg ;;
1608 
1609   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1610   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1611     ac_prev=x_libraries ;;
1612   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1613   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1614     x_libraries=$ac_optarg ;;
1615 
1616   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1617 Try \`$0 --help' for more information"
1618     ;;
1619 
1620   *=*)
1621     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1622     # Reject names that are not valid shell variable names.
1623     case $ac_envvar in #(
1624       '' | [0-9]* | *[!_$as_cr_alnum]* )
1625       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1626     esac
1627     eval $ac_envvar=\$ac_optarg
1628     export $ac_envvar ;;
1629 
1630   *)
1631     # FIXME: should be removed in autoconf 3.0.
1632     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1633     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1634       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1635     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1636     ;;
1637 
1638   esac
1639 done
1640 
1641 if test -n "$ac_prev"; then
1642   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1643   as_fn_error $? "missing argument to $ac_option"
1644 fi
1645 
1646 if test -n "$ac_unrecognized_opts"; then
1647   case $enable_option_checking in
1648     no) ;;
1649     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1650     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1651   esac
1652 fi
1653 
1654 # Check all directory arguments for consistency.
1655 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1656                 datadir sysconfdir sharedstatedir localstatedir includedir \
1657                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1658                 libdir localedir mandir
1659 do
1660   eval ac_val=\$$ac_var
1661   # Remove trailing slashes.
1662   case $ac_val in
1663     */ )
1664       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1665       eval $ac_var=\$ac_val;;
1666   esac
1667   # Be sure to have absolute directory names.
1668   case $ac_val in
1669     [\\/$]* | ?:[\\/]* )  continue;;
1670     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1671   esac
1672   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1673 done
1674 
1675 # There might be people who depend on the old broken behavior: `$host'
1676 # used to hold the argument of --host etc.
1677 # FIXME: To remove some day.
1678 build=$build_alias
1679 host=$host_alias
1680 target=$target_alias
1681 
1682 # FIXME: To remove some day.
1683 if test "x$host_alias" != x; then
1684   if test "x$build_alias" = x; then
1685     cross_compiling=maybe
1686   elif test "x$build_alias" != "x$host_alias"; then
1687     cross_compiling=yes
1688   fi
1689 fi
1690 
1691 ac_tool_prefix=
1692 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1693 
1694 test "$silent" = yes && exec 6>/dev/null
1695 
1696 
1697 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1698 ac_ls_di=`ls -di .` &&
1699 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1700   as_fn_error $? "working directory cannot be determined"
1701 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1702   as_fn_error $? "pwd does not report name of working directory"
1703 
1704 
1705 # Find the source files, if location was not specified.
1706 if test -z "$srcdir"; then
1707   ac_srcdir_defaulted=yes
1708   # Try the directory containing this script, then the parent directory.
1709   ac_confdir=`$as_dirname -- "$as_myself" ||
1710 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1711          X"$as_myself" : 'X\(//\)[^/]' \| \
1712          X"$as_myself" : 'X\(//\)$' \| \
1713          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1714 $as_echo X"$as_myself" |
1715     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1716             s//\1/
1717             q
1718           }
1719           /^X\(\/\/\)[^/].*/{
1720             s//\1/
1721             q
1722           }
1723           /^X\(\/\/\)$/{
1724             s//\1/
1725             q
1726           }
1727           /^X\(\/\).*/{
1728             s//\1/
1729             q
1730           }
1731           s/.*/./; q'`
1732   srcdir=$ac_confdir
1733   if test ! -r "$srcdir/$ac_unique_file"; then
1734     srcdir=..
1735   fi
1736 else
1737   ac_srcdir_defaulted=no
1738 fi
1739 if test ! -r "$srcdir/$ac_unique_file"; then
1740   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1741   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1742 fi
1743 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1744 ac_abs_confdir=`(
1745         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1746         pwd)`
1747 # When building in place, set srcdir=.
1748 if test "$ac_abs_confdir" = "$ac_pwd"; then
1749   srcdir=.
1750 fi
1751 # Remove unnecessary trailing slashes from srcdir.
1752 # Double slashes in file names in object file debugging info
1753 # mess up M-x gdb in Emacs.
1754 case $srcdir in
1755 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1756 esac
1757 for ac_var in $ac_precious_vars; do
1758   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1759   eval ac_env_${ac_var}_value=\$${ac_var}
1760   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1761   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1762 done
1763 
1764 #
1765 # Report the --help message.
1766 #
1767 if test "$ac_init_help" = "long"; then
1768   # Omit some internal or obsolete options to make the list less imposing.
1769   # This message is too long to be a string in the A/UX 3.1 sh.
1770   cat <<_ACEOF
1771 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1772 
1773 Usage: $0 [OPTION]... [VAR=VALUE]...
1774 
1775 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1776 VAR=VALUE.  See below for descriptions of some of the useful variables.
1777 
1778 Defaults for the options are specified in brackets.
1779 
1780 Configuration:
1781   -h, --help              display this help and exit
1782       --help=short        display options specific to this package
1783       --help=recursive    display the short help of all the included packages
1784   -V, --version           display version information and exit
1785   -q, --quiet, --silent   do not print \`checking ...' messages
1786       --cache-file=FILE   cache test results in FILE [disabled]
1787   -C, --config-cache      alias for \`--cache-file=config.cache'
1788   -n, --no-create         do not create output files
1789       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1790 
1791 Installation directories:
1792   --prefix=PREFIX         install architecture-independent files in PREFIX
1793                           [$ac_default_prefix]
1794   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1795                           [PREFIX]
1796 
1797 By default, \`make install' will install all the files in
1798 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1799 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1800 for instance \`--prefix=\$HOME'.
1801 
1802 For better control, use the options below.
1803 
1804 Fine tuning of the installation directories:
1805   --bindir=DIR            user executables [EPREFIX/bin]
1806   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1807   --libexecdir=DIR        program executables [EPREFIX/libexec]
1808   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1809   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1810   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1811   --libdir=DIR            object code libraries [EPREFIX/lib]
1812   --includedir=DIR        C header files [PREFIX/include]
1813   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1814   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1815   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1816   --infodir=DIR           info documentation [DATAROOTDIR/info]
1817   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1818   --mandir=DIR            man documentation [DATAROOTDIR/man]
1819   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1820   --htmldir=DIR           html documentation [DOCDIR]
1821   --dvidir=DIR            dvi documentation [DOCDIR]
1822   --pdfdir=DIR            pdf documentation [DOCDIR]
1823   --psdir=DIR             ps documentation [DOCDIR]
1824 _ACEOF
1825 
1826   cat <<\_ACEOF
1827 
1828 X features:
1829   --x-includes=DIR    X include files are in DIR
1830   --x-libraries=DIR   X library files are in DIR
1831 
1832 System types:
1833   --build=BUILD     configure for building on BUILD [guessed]
1834   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1835   --target=TARGET   configure for building compilers for TARGET [HOST]
1836 _ACEOF
1837 fi
1838 
1839 if test -n "$ac_init_help"; then
1840   case $ac_init_help in
1841      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1842    esac
1843   cat <<\_ACEOF
1844 
1845 Optional Features:
1846   --disable-option-checking  ignore unrecognized --enable/--with options
1847   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1848   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1849   --enable-openjdk-only   suppress building custom source even if present
1850                           [disabled]
1851   --enable-debug          set the debug level to fastdebug (shorthand for
1852                           --with-debug-level=fastdebug) [disabled]
1853   --disable-headful       disable building headful support (graphical UI
1854                           support) [enabled]
1855   --enable-hotspot-test-in-build
1856                           run the Queens test after Hotspot build [disabled]
1857   --enable-unlimited-crypto
1858                           Enable unlimited crypto policy [disabled]
1859   --enable-rmiconnector-iiop
1860                           enable the JMX RMIConnector iiop transport
1861                           [disabled]
1862   --disable-debug-symbols disable generation of debug symbols [enabled]
1863   --disable-zip-debug-info
1864                           disable zipping of debug-info files [enabled]
1865   --enable-native-coverage
1866                           enable native compilation with code coverage
1867                           data[disabled]
1868   --disable-freetype-bundling
1869                           disable bundling of the freetype library with the
1870                           build result [enabled on Windows or when using
1871                           --with-freetype, disabled otherwise]
1872   --enable-sjavac         use sjavac to do fast incremental compiles
1873                           [disabled]
1874   --disable-precompiled-headers
1875                           disable using precompiled headers when compiling C++
1876                           [enabled]
1877   --enable-ccache         enable using ccache to speed up recompilations
1878                           [disabled]
1879 
1880 Optional Packages:
1881   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1882   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1883   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1884                           support it), e.g. --with-target-bits=32 [guessed]
1885   --with-custom-make-dir  Deprecated. Option is kept for backwards
1886                           compatibility and is ignored
1887   --with-jdk-variant      JDK variant to build (normal) [normal]
1888   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1889   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1890                           client, minimal1, kernel, zero, zeroshark, core)
1891                           [server]
1892   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1893                           optimized (HotSpot build only)) [release]
1894   --with-devkit           use this devkit for compilers, tools and resources
1895   --with-sys-root         alias for --with-sysroot for backwards compatability
1896   --with-sysroot          use this directory as sysroot
1897   --with-tools-dir        alias for --with-toolchain-path for backwards
1898                           compatibility
1899   --with-toolchain-path   prepend these directories when searching for
1900                           toolchain binaries (compilers etc)
1901   --with-extra-path       prepend these directories to the default path
1902   --with-sdk-name         use the platform SDK of the given name. [macosx]
1903   --with-conf-name        use this as the name of the configuration [generated
1904                           from important configuration options]
1905   --with-output-sync      set make output sync type if supported by make.
1906                           [recurse]
1907   --with-builddeps-conf   use this configuration file for the builddeps
1908   --with-builddeps-server download and use build dependencies from this server
1909                           url
1910   --with-builddeps-dir    store downloaded build dependencies here
1911                           [/localhome/builddeps]
1912   --with-builddeps-group  chgrp the downloaded build dependencies to this
1913                           group
1914   --with-cacerts-file     specify alternative cacerts file
1915   --with-milestone        Set milestone value for build [internal]
1916   --with-update-version   Set update version value for build [b00]
1917   --with-user-release-suffix
1918                           Add a custom string to the version string if build
1919                           number is not set.[username_builddateb00]
1920   --with-build-number     Set build number value for build [b00]
1921   --with-copyright-year   Set copyright year value for build [current year]
1922   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1923   --with-add-source-root  for each and every source directory, look in this
1924                           additional source root for the same directory; if it
1925                           exists and have files in it, include it in the build
1926   --with-override-source-root
1927                           for each and every source directory, look in this
1928                           override source root for the same directory; if it
1929                           exists, use that directory instead and ignore the
1930                           directory in the original source root
1931   --with-adds-and-overrides
1932                           use the subdirs 'adds' and 'overrides' in the
1933                           specified directory as add-source-root and
1934                           override-source-root
1935   --with-override-langtools
1936                           use this langtools dir for the build
1937   --with-override-corba   use this corba dir for the build
1938   --with-override-jaxp    use this jaxp dir for the build
1939   --with-override-jaxws   use this jaxws dir for the build
1940   --with-override-hotspot use this hotspot dir for the build
1941   --with-override-nashorn use this nashorn dir for the build
1942   --with-override-jdk     use this jdk dir for the build
1943   --with-import-hotspot   import hotspot binaries from this jdk image or
1944                           hotspot build dist dir instead of building from
1945                           source
1946   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1947                           to show possible values [platform dependent]
1948   --with-toolchain-version
1949                           the version of the toolchain to look for, use
1950                           '--help' to show possible values [platform
1951                           dependent]
1952   --with-jtreg            Regression Test Harness [probed]
1953   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1954   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1955   --with-extra-ldflags    extra flags to be used when linking jdk
1956   --with-x                use the X Window System
1957   --with-cups             specify prefix directory for the cups package
1958                           (expecting the headers under PATH/include)
1959   --with-cups-include     specify directory for the cups include files
1960   --with-freetype         specify prefix directory for the freetype package
1961                           (expecting the libraries under PATH/lib and the
1962                           headers under PATH/include)
1963   --with-freetype-include specify directory for the freetype include files
1964   --with-freetype-lib     specify directory for the freetype library
1965   --with-freetype-src     specify directory with freetype sources to
1966                           automatically build the library (experimental,
1967                           Windows-only)
1968   --with-alsa             specify prefix directory for the alsa package
1969                           (expecting the libraries under PATH/lib and the
1970                           headers under PATH/include)
1971   --with-alsa-include     specify directory for the alsa include files
1972   --with-alsa-lib         specify directory for the alsa library
1973   --with-libjpeg          use libjpeg from build system or OpenJDK source
1974                           (system, bundled) [bundled]
1975   --with-giflib           use giflib from build system or OpenJDK source
1976                           (system, bundled) [bundled]
1977   --with-lcms             use lcms2 from build system or OpenJDK source
1978                           (system, bundled) [bundled]
1979   --with-libpng           use libpng from build system or OpenJDK source
1980                           (system, bundled) [bundled]
1981   --with-zlib             use zlib from build system or OpenJDK source
1982                           (system, bundled) [bundled]
1983   --with-stdc++lib=<static>,<dynamic>,<default>
1984                           force linking of the C++ runtime on Linux to either
1985                           static or dynamic, default is static with dynamic as
1986                           fallback
1987   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1988                           (Windows only) [probed]
1989   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1990                           (Windows only) [probed]
1991   --with-dxsdk            Deprecated. Option is kept for backwards
1992                           compatibility and is ignored
1993   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1994                           compatibility and is ignored
1995   --with-dxsdk-include    Deprecated. Option is kept for backwards
1996                           compatibility and is ignored
1997   --with-num-cores        number of cores in the build system, e.g.
1998                           --with-num-cores=8 [probed]
1999   --with-memory-size      memory (in MB) available in the build system, e.g.
2000                           --with-memory-size=1024 [probed]
2001   --with-jobs             number of parallel jobs to let make run [calculated
2002                           based on cores and memory]
2003   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2004                           invocations of boot JDK, overriding the default
2005                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2006                           -enableassertions"
2007   --with-sjavac-server-java
2008                           use this java binary for running the sjavac
2009                           background server [Boot JDK java]
2010   --with-ccache-dir       where to store ccache files [~/.ccache]
2011 
2012 Some influential environment variables:
2013   BASENAME    Override default value for BASENAME
2014   BASH        Override default value for BASH
2015   CAT         Override default value for CAT
2016   CHMOD       Override default value for CHMOD
2017   CMP         Override default value for CMP
2018   COMM        Override default value for COMM
2019   CP          Override default value for CP
2020   CUT         Override default value for CUT
2021   DATE        Override default value for DATE
2022   DIFF        Override default value for DIFF
2023   DIRNAME     Override default value for DIRNAME
2024   ECHO        Override default value for ECHO
2025   EXPR        Override default value for EXPR
2026   FILE        Override default value for FILE
2027   FIND        Override default value for FIND
2028   HEAD        Override default value for HEAD
2029   LN          Override default value for LN
2030   LS          Override default value for LS
2031   MKDIR       Override default value for MKDIR
2032   MKTEMP      Override default value for MKTEMP
2033   MV          Override default value for MV
2034   NAWK        Override default value for NAWK
2035   PRINTF      Override default value for PRINTF
2036   RM          Override default value for RM
2037   SH          Override default value for SH
2038   SORT        Override default value for SORT
2039   TAIL        Override default value for TAIL
2040   TAR         Override default value for TAR
2041   TEE         Override default value for TEE
2042   TOUCH       Override default value for TOUCH
2043   TR          Override default value for TR
2044   UNAME       Override default value for UNAME
2045   UNIQ        Override default value for UNIQ
2046   WC          Override default value for WC
2047   WHICH       Override default value for WHICH
2048   XARGS       Override default value for XARGS
2049   AWK         Override default value for AWK
2050   GREP        Override default value for GREP
2051   EGREP       Override default value for EGREP
2052   FGREP       Override default value for FGREP
2053   SED         Override default value for SED
2054   CYGPATH     Override default value for CYGPATH
2055   READLINK    Override default value for READLINK
2056   DF          Override default value for DF
2057   SETFILE     Override default value for SETFILE
2058   CPIO        Override default value for CPIO
2059   UNZIP       Override default value for UNZIP
2060   ZIP         Override default value for ZIP
2061   LDD         Override default value for LDD
2062   OTOOL       Override default value for OTOOL
2063   READELF     Override default value for READELF
2064   HG          Override default value for HG
2065   STAT        Override default value for STAT
2066   TIME        Override default value for TIME
2067   DSYMUTIL    Override default value for DSYMUTIL
2068   XATTR       Override default value for XATTR
2069   CODESIGN    Override default value for CODESIGN
2070   PKG_CONFIG  path to pkg-config utility
2071   JAVA        Override default value for JAVA
2072   JAVAC       Override default value for JAVAC
2073   JAVAH       Override default value for JAVAH
2074   JAR         Override default value for JAR
2075   NATIVE2ASCII
2076               Override default value for NATIVE2ASCII
2077   JARSIGNER   Override default value for JARSIGNER
2078   CC          C compiler command
2079   CFLAGS      C compiler flags
2080   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2081               nonstandard directory <lib dir>
2082   LIBS        libraries to pass to the linker, e.g. -l<library>
2083   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2084               you have headers in a nonstandard directory <include dir>
2085   CXX         C++ compiler command
2086   CXXFLAGS    C++ compiler flags
2087   CPP         C preprocessor
2088   CXXCPP      C++ preprocessor
2089   AS          Override default value for AS
2090   AR          Override default value for AR
2091   LIPO        Override default value for LIPO
2092   STRIP       Override default value for STRIP
2093   NM          Override default value for NM
2094   GNM         Override default value for GNM
2095   MCS         Override default value for MCS
2096   OBJCOPY     Override default value for OBJCOPY
2097   OBJDUMP     Override default value for OBJDUMP
2098   BUILD_CC    Override default value for BUILD_CC
2099   BUILD_CXX   Override default value for BUILD_CXX
2100   BUILD_LD    Override default value for BUILD_LD
2101   JTREGEXE    Override default value for JTREGEXE
2102   XMKMF       Path to xmkmf, Makefile generator for X Window System
2103   FREETYPE_CFLAGS
2104               C compiler flags for FREETYPE, overriding pkg-config
2105   FREETYPE_LIBS
2106               linker flags for FREETYPE, overriding pkg-config
2107   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2108   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2109   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2110   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2111   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2112   PNG_LIBS    linker flags for PNG, overriding pkg-config
2113   LIBFFI_CFLAGS
2114               C compiler flags for LIBFFI, overriding pkg-config
2115   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2116   CCACHE      Override default value for CCACHE
2117 
2118 Use these variables to override the choices made by `configure' or to help
2119 it to find libraries and programs with nonstandard names/locations.
2120 
2121 Report bugs to <build-dev@openjdk.java.net>.
2122 OpenJDK home page: <http://openjdk.java.net>.
2123 _ACEOF
2124 ac_status=$?
2125 fi
2126 
2127 if test "$ac_init_help" = "recursive"; then
2128   # If there are subdirs, report their specific --help.
2129   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2130     test -d "$ac_dir" ||
2131       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2132       continue
2133     ac_builddir=.
2134 
2135 case "$ac_dir" in
2136 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137 *)
2138   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2139   # A ".." for each directory in $ac_dir_suffix.
2140   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2141   case $ac_top_builddir_sub in
2142   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2143   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2144   esac ;;
2145 esac
2146 ac_abs_top_builddir=$ac_pwd
2147 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2148 # for backward compatibility:
2149 ac_top_builddir=$ac_top_build_prefix
2150 
2151 case $srcdir in
2152   .)  # We are building in place.
2153     ac_srcdir=.
2154     ac_top_srcdir=$ac_top_builddir_sub
2155     ac_abs_top_srcdir=$ac_pwd ;;
2156   [\\/]* | ?:[\\/]* )  # Absolute name.
2157     ac_srcdir=$srcdir$ac_dir_suffix;
2158     ac_top_srcdir=$srcdir
2159     ac_abs_top_srcdir=$srcdir ;;
2160   *) # Relative name.
2161     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2162     ac_top_srcdir=$ac_top_build_prefix$srcdir
2163     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2164 esac
2165 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2166 
2167     cd "$ac_dir" || { ac_status=$?; continue; }
2168     # Check for guested configure.
2169     if test -f "$ac_srcdir/configure.gnu"; then
2170       echo &&
2171       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2172     elif test -f "$ac_srcdir/configure"; then
2173       echo &&
2174       $SHELL "$ac_srcdir/configure" --help=recursive
2175     else
2176       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2177     fi || ac_status=$?
2178     cd "$ac_pwd" || { ac_status=$?; break; }
2179   done
2180 fi
2181 
2182 test -n "$ac_init_help" && exit $ac_status
2183 if $ac_init_version; then
2184   cat <<\_ACEOF
2185 OpenJDK configure jdk9
2186 generated by GNU Autoconf 2.69
2187 
2188 Copyright (C) 2012 Free Software Foundation, Inc.
2189 This configure script is free software; the Free Software Foundation
2190 gives unlimited permission to copy, distribute and modify it.
2191 _ACEOF
2192   exit
2193 fi
2194 
2195 ## ------------------------ ##
2196 ## Autoconf initialization. ##
2197 ## ------------------------ ##
2198 
2199 # ac_fn_c_try_compile LINENO
2200 # --------------------------
2201 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2202 ac_fn_c_try_compile ()
2203 {
2204   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205   rm -f conftest.$ac_objext
2206   if { { ac_try="$ac_compile"
2207 case "(($ac_try" in
2208   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209   *) ac_try_echo=$ac_try;;
2210 esac
2211 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212 $as_echo "$ac_try_echo"; } >&5
2213   (eval "$ac_compile") 2>conftest.err
2214   ac_status=$?
2215   if test -s conftest.err; then
2216     grep -v '^ *+' conftest.err >conftest.er1
2217     cat conftest.er1 >&5
2218     mv -f conftest.er1 conftest.err
2219   fi
2220   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2221   test $ac_status = 0; } && {
2222          test -z "$ac_c_werror_flag" ||
2223          test ! -s conftest.err
2224        } && test -s conftest.$ac_objext; then :
2225   ac_retval=0
2226 else
2227   $as_echo "$as_me: failed program was:" >&5
2228 sed 's/^/| /' conftest.$ac_ext >&5
2229 
2230         ac_retval=1
2231 fi
2232   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233   as_fn_set_status $ac_retval
2234 
2235 } # ac_fn_c_try_compile
2236 
2237 # ac_fn_cxx_try_compile LINENO
2238 # ----------------------------
2239 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2240 ac_fn_cxx_try_compile ()
2241 {
2242   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243   rm -f conftest.$ac_objext
2244   if { { ac_try="$ac_compile"
2245 case "(($ac_try" in
2246   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2247   *) ac_try_echo=$ac_try;;
2248 esac
2249 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2250 $as_echo "$ac_try_echo"; } >&5
2251   (eval "$ac_compile") 2>conftest.err
2252   ac_status=$?
2253   if test -s conftest.err; then
2254     grep -v '^ *+' conftest.err >conftest.er1
2255     cat conftest.er1 >&5
2256     mv -f conftest.er1 conftest.err
2257   fi
2258   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2259   test $ac_status = 0; } && {
2260          test -z "$ac_cxx_werror_flag" ||
2261          test ! -s conftest.err
2262        } && test -s conftest.$ac_objext; then :
2263   ac_retval=0
2264 else
2265   $as_echo "$as_me: failed program was:" >&5
2266 sed 's/^/| /' conftest.$ac_ext >&5
2267 
2268         ac_retval=1
2269 fi
2270   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2271   as_fn_set_status $ac_retval
2272 
2273 } # ac_fn_cxx_try_compile
2274 
2275 # ac_fn_c_try_cpp LINENO
2276 # ----------------------
2277 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2278 ac_fn_c_try_cpp ()
2279 {
2280   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281   if { { ac_try="$ac_cpp conftest.$ac_ext"
2282 case "(($ac_try" in
2283   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2284   *) ac_try_echo=$ac_try;;
2285 esac
2286 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2287 $as_echo "$ac_try_echo"; } >&5
2288   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2289   ac_status=$?
2290   if test -s conftest.err; then
2291     grep -v '^ *+' conftest.err >conftest.er1
2292     cat conftest.er1 >&5
2293     mv -f conftest.er1 conftest.err
2294   fi
2295   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2296   test $ac_status = 0; } > conftest.i && {
2297          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2298          test ! -s conftest.err
2299        }; then :
2300   ac_retval=0
2301 else
2302   $as_echo "$as_me: failed program was:" >&5
2303 sed 's/^/| /' conftest.$ac_ext >&5
2304 
2305     ac_retval=1
2306 fi
2307   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2308   as_fn_set_status $ac_retval
2309 
2310 } # ac_fn_c_try_cpp
2311 
2312 # ac_fn_cxx_try_cpp LINENO
2313 # ------------------------
2314 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2315 ac_fn_cxx_try_cpp ()
2316 {
2317   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318   if { { ac_try="$ac_cpp conftest.$ac_ext"
2319 case "(($ac_try" in
2320   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2321   *) ac_try_echo=$ac_try;;
2322 esac
2323 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2324 $as_echo "$ac_try_echo"; } >&5
2325   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2326   ac_status=$?
2327   if test -s conftest.err; then
2328     grep -v '^ *+' conftest.err >conftest.er1
2329     cat conftest.er1 >&5
2330     mv -f conftest.er1 conftest.err
2331   fi
2332   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2333   test $ac_status = 0; } > conftest.i && {
2334          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2335          test ! -s conftest.err
2336        }; then :
2337   ac_retval=0
2338 else
2339   $as_echo "$as_me: failed program was:" >&5
2340 sed 's/^/| /' conftest.$ac_ext >&5
2341 
2342     ac_retval=1
2343 fi
2344   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2345   as_fn_set_status $ac_retval
2346 
2347 } # ac_fn_cxx_try_cpp
2348 
2349 # ac_fn_c_try_link LINENO
2350 # -----------------------
2351 # Try to link conftest.$ac_ext, and return whether this succeeded.
2352 ac_fn_c_try_link ()
2353 {
2354   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2355   rm -f conftest.$ac_objext conftest$ac_exeext
2356   if { { ac_try="$ac_link"
2357 case "(($ac_try" in
2358   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2359   *) ac_try_echo=$ac_try;;
2360 esac
2361 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2362 $as_echo "$ac_try_echo"; } >&5
2363   (eval "$ac_link") 2>conftest.err
2364   ac_status=$?
2365   if test -s conftest.err; then
2366     grep -v '^ *+' conftest.err >conftest.er1
2367     cat conftest.er1 >&5
2368     mv -f conftest.er1 conftest.err
2369   fi
2370   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2371   test $ac_status = 0; } && {
2372          test -z "$ac_c_werror_flag" ||
2373          test ! -s conftest.err
2374        } && test -s conftest$ac_exeext && {
2375          test "$cross_compiling" = yes ||
2376          test -x conftest$ac_exeext
2377        }; then :
2378   ac_retval=0
2379 else
2380   $as_echo "$as_me: failed program was:" >&5
2381 sed 's/^/| /' conftest.$ac_ext >&5
2382 
2383         ac_retval=1
2384 fi
2385   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2386   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2387   # interfere with the next link command; also delete a directory that is
2388   # left behind by Apple's compiler.  We do this before executing the actions.
2389   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2390   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2391   as_fn_set_status $ac_retval
2392 
2393 } # ac_fn_c_try_link
2394 
2395 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2396 # ---------------------------------------------------------
2397 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2398 # the include files in INCLUDES and setting the cache variable VAR
2399 # accordingly.
2400 ac_fn_cxx_check_header_mongrel ()
2401 {
2402   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403   if eval \${$3+:} false; then :
2404   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2405 $as_echo_n "checking for $2... " >&6; }
2406 if eval \${$3+:} false; then :
2407   $as_echo_n "(cached) " >&6
2408 fi
2409 eval ac_res=\$$3
2410                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411 $as_echo "$ac_res" >&6; }
2412 else
2413   # Is the header compilable?
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2415 $as_echo_n "checking $2 usability... " >&6; }
2416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417 /* end confdefs.h.  */
2418 $4
2419 #include <$2>
2420 _ACEOF
2421 if ac_fn_cxx_try_compile "$LINENO"; then :
2422   ac_header_compiler=yes
2423 else
2424   ac_header_compiler=no
2425 fi
2426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2428 $as_echo "$ac_header_compiler" >&6; }
2429 
2430 # Is the header present?
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2432 $as_echo_n "checking $2 presence... " >&6; }
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434 /* end confdefs.h.  */
2435 #include <$2>
2436 _ACEOF
2437 if ac_fn_cxx_try_cpp "$LINENO"; then :
2438   ac_header_preproc=yes
2439 else
2440   ac_header_preproc=no
2441 fi
2442 rm -f conftest.err conftest.i conftest.$ac_ext
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2444 $as_echo "$ac_header_preproc" >&6; }
2445 
2446 # So?  What about this header?
2447 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2448   yes:no: )
2449     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2450 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2451     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2452 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2453     ;;
2454   no:yes:* )
2455     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2456 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2457     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2458 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2459     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2460 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2461     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2462 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2463     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2464 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2465 ( $as_echo "## ----------------------------------------- ##
2466 ## Report this to build-dev@openjdk.java.net ##
2467 ## ----------------------------------------- ##"
2468      ) | sed "s/^/$as_me: WARNING:     /" >&2
2469     ;;
2470 esac
2471   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2472 $as_echo_n "checking for $2... " >&6; }
2473 if eval \${$3+:} false; then :
2474   $as_echo_n "(cached) " >&6
2475 else
2476   eval "$3=\$ac_header_compiler"
2477 fi
2478 eval ac_res=\$$3
2479                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2480 $as_echo "$ac_res" >&6; }
2481 fi
2482   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483 
2484 } # ac_fn_cxx_check_header_mongrel
2485 
2486 # ac_fn_cxx_try_run LINENO
2487 # ------------------------
2488 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2489 # that executables *can* be run.
2490 ac_fn_cxx_try_run ()
2491 {
2492   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493   if { { ac_try="$ac_link"
2494 case "(($ac_try" in
2495   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496   *) ac_try_echo=$ac_try;;
2497 esac
2498 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499 $as_echo "$ac_try_echo"; } >&5
2500   (eval "$ac_link") 2>&5
2501   ac_status=$?
2502   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2504   { { case "(($ac_try" in
2505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506   *) ac_try_echo=$ac_try;;
2507 esac
2508 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509 $as_echo "$ac_try_echo"; } >&5
2510   (eval "$ac_try") 2>&5
2511   ac_status=$?
2512   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2513   test $ac_status = 0; }; }; then :
2514   ac_retval=0
2515 else
2516   $as_echo "$as_me: program exited with status $ac_status" >&5
2517        $as_echo "$as_me: failed program was:" >&5
2518 sed 's/^/| /' conftest.$ac_ext >&5
2519 
2520        ac_retval=$ac_status
2521 fi
2522   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2523   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2524   as_fn_set_status $ac_retval
2525 
2526 } # ac_fn_cxx_try_run
2527 
2528 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2529 # ---------------------------------------------------------
2530 # Tests whether HEADER exists and can be compiled using the include files in
2531 # INCLUDES, setting the cache variable VAR accordingly.
2532 ac_fn_cxx_check_header_compile ()
2533 {
2534   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2536 $as_echo_n "checking for $2... " >&6; }
2537 if eval \${$3+:} false; then :
2538   $as_echo_n "(cached) " >&6
2539 else
2540   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2541 /* end confdefs.h.  */
2542 $4
2543 #include <$2>
2544 _ACEOF
2545 if ac_fn_cxx_try_compile "$LINENO"; then :
2546   eval "$3=yes"
2547 else
2548   eval "$3=no"
2549 fi
2550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2551 fi
2552 eval ac_res=\$$3
2553                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2554 $as_echo "$ac_res" >&6; }
2555   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556 
2557 } # ac_fn_cxx_check_header_compile
2558 
2559 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2560 # ----------------------------------------------
2561 # Tries to find the compile-time value of EXPR in a program that includes
2562 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2563 # computed
2564 ac_fn_cxx_compute_int ()
2565 {
2566   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567   if test "$cross_compiling" = yes; then
2568     # Depending upon the size, compute the lo and hi bounds.
2569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570 /* end confdefs.h.  */
2571 $4
2572 int
2573 main ()
2574 {
2575 static int test_array [1 - 2 * !(($2) >= 0)];
2576 test_array [0] = 0;
2577 return test_array [0];
2578 
2579   ;
2580   return 0;
2581 }
2582 _ACEOF
2583 if ac_fn_cxx_try_compile "$LINENO"; then :
2584   ac_lo=0 ac_mid=0
2585   while :; do
2586     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2587 /* end confdefs.h.  */
2588 $4
2589 int
2590 main ()
2591 {
2592 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2593 test_array [0] = 0;
2594 return test_array [0];
2595 
2596   ;
2597   return 0;
2598 }
2599 _ACEOF
2600 if ac_fn_cxx_try_compile "$LINENO"; then :
2601   ac_hi=$ac_mid; break
2602 else
2603   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2604                         if test $ac_lo -le $ac_mid; then
2605                           ac_lo= ac_hi=
2606                           break
2607                         fi
2608                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2609 fi
2610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611   done
2612 else
2613   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614 /* end confdefs.h.  */
2615 $4
2616 int
2617 main ()
2618 {
2619 static int test_array [1 - 2 * !(($2) < 0)];
2620 test_array [0] = 0;
2621 return test_array [0];
2622 
2623   ;
2624   return 0;
2625 }
2626 _ACEOF
2627 if ac_fn_cxx_try_compile "$LINENO"; then :
2628   ac_hi=-1 ac_mid=-1
2629   while :; do
2630     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631 /* end confdefs.h.  */
2632 $4
2633 int
2634 main ()
2635 {
2636 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2637 test_array [0] = 0;
2638 return test_array [0];
2639 
2640   ;
2641   return 0;
2642 }
2643 _ACEOF
2644 if ac_fn_cxx_try_compile "$LINENO"; then :
2645   ac_lo=$ac_mid; break
2646 else
2647   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2648                         if test $ac_mid -le $ac_hi; then
2649                           ac_lo= ac_hi=
2650                           break
2651                         fi
2652                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2653 fi
2654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2655   done
2656 else
2657   ac_lo= ac_hi=
2658 fi
2659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2660 fi
2661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662 # Binary search between lo and hi bounds.
2663 while test "x$ac_lo" != "x$ac_hi"; do
2664   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2666 /* end confdefs.h.  */
2667 $4
2668 int
2669 main ()
2670 {
2671 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2672 test_array [0] = 0;
2673 return test_array [0];
2674 
2675   ;
2676   return 0;
2677 }
2678 _ACEOF
2679 if ac_fn_cxx_try_compile "$LINENO"; then :
2680   ac_hi=$ac_mid
2681 else
2682   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2683 fi
2684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2685 done
2686 case $ac_lo in #((
2687 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2688 '') ac_retval=1 ;;
2689 esac
2690   else
2691     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692 /* end confdefs.h.  */
2693 $4
2694 static long int longval () { return $2; }
2695 static unsigned long int ulongval () { return $2; }
2696 #include <stdio.h>
2697 #include <stdlib.h>
2698 int
2699 main ()
2700 {
2701 
2702   FILE *f = fopen ("conftest.val", "w");
2703   if (! f)
2704     return 1;
2705   if (($2) < 0)
2706     {
2707       long int i = longval ();
2708       if (i != ($2))
2709         return 1;
2710       fprintf (f, "%ld", i);
2711     }
2712   else
2713     {
2714       unsigned long int i = ulongval ();
2715       if (i != ($2))
2716         return 1;
2717       fprintf (f, "%lu", i);
2718     }
2719   /* Do not output a trailing newline, as this causes \r\n confusion
2720      on some platforms.  */
2721   return ferror (f) || fclose (f) != 0;
2722 
2723   ;
2724   return 0;
2725 }
2726 _ACEOF
2727 if ac_fn_cxx_try_run "$LINENO"; then :
2728   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2729 else
2730   ac_retval=1
2731 fi
2732 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2733   conftest.$ac_objext conftest.beam conftest.$ac_ext
2734 rm -f conftest.val
2735 
2736   fi
2737   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738   as_fn_set_status $ac_retval
2739 
2740 } # ac_fn_cxx_compute_int
2741 
2742 # ac_fn_cxx_try_link LINENO
2743 # -------------------------
2744 # Try to link conftest.$ac_ext, and return whether this succeeded.
2745 ac_fn_cxx_try_link ()
2746 {
2747   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748   rm -f conftest.$ac_objext conftest$ac_exeext
2749   if { { ac_try="$ac_link"
2750 case "(($ac_try" in
2751   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752   *) ac_try_echo=$ac_try;;
2753 esac
2754 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2755 $as_echo "$ac_try_echo"; } >&5
2756   (eval "$ac_link") 2>conftest.err
2757   ac_status=$?
2758   if test -s conftest.err; then
2759     grep -v '^ *+' conftest.err >conftest.er1
2760     cat conftest.er1 >&5
2761     mv -f conftest.er1 conftest.err
2762   fi
2763   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2764   test $ac_status = 0; } && {
2765          test -z "$ac_cxx_werror_flag" ||
2766          test ! -s conftest.err
2767        } && test -s conftest$ac_exeext && {
2768          test "$cross_compiling" = yes ||
2769          test -x conftest$ac_exeext
2770        }; then :
2771   ac_retval=0
2772 else
2773   $as_echo "$as_me: failed program was:" >&5
2774 sed 's/^/| /' conftest.$ac_ext >&5
2775 
2776         ac_retval=1
2777 fi
2778   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2779   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2780   # interfere with the next link command; also delete a directory that is
2781   # left behind by Apple's compiler.  We do this before executing the actions.
2782   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2783   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2784   as_fn_set_status $ac_retval
2785 
2786 } # ac_fn_cxx_try_link
2787 
2788 # ac_fn_cxx_check_func LINENO FUNC VAR
2789 # ------------------------------------
2790 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2791 ac_fn_cxx_check_func ()
2792 {
2793   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2795 $as_echo_n "checking for $2... " >&6; }
2796 if eval \${$3+:} false; then :
2797   $as_echo_n "(cached) " >&6
2798 else
2799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800 /* end confdefs.h.  */
2801 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2802    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2803 #define $2 innocuous_$2
2804 
2805 /* System header to define __stub macros and hopefully few prototypes,
2806     which can conflict with char $2 (); below.
2807     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2808     <limits.h> exists even on freestanding compilers.  */
2809 
2810 #ifdef __STDC__
2811 # include <limits.h>
2812 #else
2813 # include <assert.h>
2814 #endif
2815 
2816 #undef $2
2817 
2818 /* Override any GCC internal prototype to avoid an error.
2819    Use char because int might match the return type of a GCC
2820    builtin and then its argument prototype would still apply.  */
2821 #ifdef __cplusplus
2822 extern "C"
2823 #endif
2824 char $2 ();
2825 /* The GNU C library defines this for functions which it implements
2826     to always fail with ENOSYS.  Some functions are actually named
2827     something starting with __ and the normal name is an alias.  */
2828 #if defined __stub_$2 || defined __stub___$2
2829 choke me
2830 #endif
2831 
2832 int
2833 main ()
2834 {
2835 return $2 ();
2836   ;
2837   return 0;
2838 }
2839 _ACEOF
2840 if ac_fn_cxx_try_link "$LINENO"; then :
2841   eval "$3=yes"
2842 else
2843   eval "$3=no"
2844 fi
2845 rm -f core conftest.err conftest.$ac_objext \
2846     conftest$ac_exeext conftest.$ac_ext
2847 fi
2848 eval ac_res=\$$3
2849                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2850 $as_echo "$ac_res" >&6; }
2851   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2852 
2853 } # ac_fn_cxx_check_func
2854 
2855 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2856 # -------------------------------------------------------
2857 # Tests whether HEADER exists and can be compiled using the include files in
2858 # INCLUDES, setting the cache variable VAR accordingly.
2859 ac_fn_c_check_header_compile ()
2860 {
2861   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2862   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2863 $as_echo_n "checking for $2... " >&6; }
2864 if eval \${$3+:} false; then :
2865   $as_echo_n "(cached) " >&6
2866 else
2867   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868 /* end confdefs.h.  */
2869 $4
2870 #include <$2>
2871 _ACEOF
2872 if ac_fn_c_try_compile "$LINENO"; then :
2873   eval "$3=yes"
2874 else
2875   eval "$3=no"
2876 fi
2877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2878 fi
2879 eval ac_res=\$$3
2880                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2881 $as_echo "$ac_res" >&6; }
2882   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2883 
2884 } # ac_fn_c_check_header_compile
2885 cat >config.log <<_ACEOF
2886 This file contains any messages produced by compilers while
2887 running configure, to aid debugging if configure makes a mistake.
2888 
2889 It was created by OpenJDK $as_me jdk9, which was
2890 generated by GNU Autoconf 2.69.  Invocation command line was
2891 
2892   $ $0 $@
2893 
2894 _ACEOF
2895 exec 5>>config.log
2896 {
2897 cat <<_ASUNAME
2898 ## --------- ##
2899 ## Platform. ##
2900 ## --------- ##
2901 
2902 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2903 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2904 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2905 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2906 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2907 
2908 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2909 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2910 
2911 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2912 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2913 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2914 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2915 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2916 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2917 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2918 
2919 _ASUNAME
2920 
2921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2922 for as_dir in $PATH
2923 do
2924   IFS=$as_save_IFS
2925   test -z "$as_dir" && as_dir=.
2926     $as_echo "PATH: $as_dir"
2927   done
2928 IFS=$as_save_IFS
2929 
2930 } >&5
2931 
2932 cat >&5 <<_ACEOF
2933 
2934 
2935 ## ----------- ##
2936 ## Core tests. ##
2937 ## ----------- ##
2938 
2939 _ACEOF
2940 
2941 
2942 # Keep a trace of the command line.
2943 # Strip out --no-create and --no-recursion so they do not pile up.
2944 # Strip out --silent because we don't want to record it for future runs.
2945 # Also quote any args containing shell meta-characters.
2946 # Make two passes to allow for proper duplicate-argument suppression.
2947 ac_configure_args=
2948 ac_configure_args0=
2949 ac_configure_args1=
2950 ac_must_keep_next=false
2951 for ac_pass in 1 2
2952 do
2953   for ac_arg
2954   do
2955     case $ac_arg in
2956     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2957     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2958     | -silent | --silent | --silen | --sile | --sil)
2959       continue ;;
2960     *\'*)
2961       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2962     esac
2963     case $ac_pass in
2964     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2965     2)
2966       as_fn_append ac_configure_args1 " '$ac_arg'"
2967       if test $ac_must_keep_next = true; then
2968         ac_must_keep_next=false # Got value, back to normal.
2969       else
2970         case $ac_arg in
2971           *=* | --config-cache | -C | -disable-* | --disable-* \
2972           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2973           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2974           | -with-* | --with-* | -without-* | --without-* | --x)
2975             case "$ac_configure_args0 " in
2976               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2977             esac
2978             ;;
2979           -* ) ac_must_keep_next=true ;;
2980         esac
2981       fi
2982       as_fn_append ac_configure_args " '$ac_arg'"
2983       ;;
2984     esac
2985   done
2986 done
2987 { ac_configure_args0=; unset ac_configure_args0;}
2988 { ac_configure_args1=; unset ac_configure_args1;}
2989 
2990 # When interrupted or exit'd, cleanup temporary files, and complete
2991 # config.log.  We remove comments because anyway the quotes in there
2992 # would cause problems or look ugly.
2993 # WARNING: Use '\'' to represent an apostrophe within the trap.
2994 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2995 trap 'exit_status=$?
2996   # Save into config.log some information that might help in debugging.
2997   {
2998     echo
2999 
3000     $as_echo "## ---------------- ##
3001 ## Cache variables. ##
3002 ## ---------------- ##"
3003     echo
3004     # The following way of writing the cache mishandles newlines in values,
3005 (
3006   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3007     eval ac_val=\$$ac_var
3008     case $ac_val in #(
3009     *${as_nl}*)
3010       case $ac_var in #(
3011       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3012 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3013       esac
3014       case $ac_var in #(
3015       _ | IFS | as_nl) ;; #(
3016       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3017       *) { eval $ac_var=; unset $ac_var;} ;;
3018       esac ;;
3019     esac
3020   done
3021   (set) 2>&1 |
3022     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3023     *${as_nl}ac_space=\ *)
3024       sed -n \
3025         "s/'\''/'\''\\\\'\'''\''/g;
3026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3027       ;; #(
3028     *)
3029       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3030       ;;
3031     esac |
3032     sort
3033 )
3034     echo
3035 
3036     $as_echo "## ----------------- ##
3037 ## Output variables. ##
3038 ## ----------------- ##"
3039     echo
3040     for ac_var in $ac_subst_vars
3041     do
3042       eval ac_val=\$$ac_var
3043       case $ac_val in
3044       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3045       esac
3046       $as_echo "$ac_var='\''$ac_val'\''"
3047     done | sort
3048     echo
3049 
3050     if test -n "$ac_subst_files"; then
3051       $as_echo "## ------------------- ##
3052 ## File substitutions. ##
3053 ## ------------------- ##"
3054       echo
3055       for ac_var in $ac_subst_files
3056       do
3057         eval ac_val=\$$ac_var
3058         case $ac_val in
3059         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3060         esac
3061         $as_echo "$ac_var='\''$ac_val'\''"
3062       done | sort
3063       echo
3064     fi
3065 
3066     if test -s confdefs.h; then
3067       $as_echo "## ----------- ##
3068 ## confdefs.h. ##
3069 ## ----------- ##"
3070       echo
3071       cat confdefs.h
3072       echo
3073     fi
3074     test "$ac_signal" != 0 &&
3075       $as_echo "$as_me: caught signal $ac_signal"
3076     $as_echo "$as_me: exit $exit_status"
3077   } >&5
3078   rm -f core *.core core.conftest.* &&
3079     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3080     exit $exit_status
3081 ' 0
3082 for ac_signal in 1 2 13 15; do
3083   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3084 done
3085 ac_signal=0
3086 
3087 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3088 rm -f -r conftest* confdefs.h
3089 
3090 $as_echo "/* confdefs.h */" > confdefs.h
3091 
3092 # Predefined preprocessor variables.
3093 
3094 cat >>confdefs.h <<_ACEOF
3095 #define PACKAGE_NAME "$PACKAGE_NAME"
3096 _ACEOF
3097 
3098 cat >>confdefs.h <<_ACEOF
3099 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3100 _ACEOF
3101 
3102 cat >>confdefs.h <<_ACEOF
3103 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3104 _ACEOF
3105 
3106 cat >>confdefs.h <<_ACEOF
3107 #define PACKAGE_STRING "$PACKAGE_STRING"
3108 _ACEOF
3109 
3110 cat >>confdefs.h <<_ACEOF
3111 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3112 _ACEOF
3113 
3114 cat >>confdefs.h <<_ACEOF
3115 #define PACKAGE_URL "$PACKAGE_URL"
3116 _ACEOF
3117 
3118 
3119 # Let the site file select an alternate cache file if it wants to.
3120 # Prefer an explicitly selected file to automatically selected ones.
3121 ac_site_file1=NONE
3122 ac_site_file2=NONE
3123 if test -n "$CONFIG_SITE"; then
3124   # We do not want a PATH search for config.site.
3125   case $CONFIG_SITE in #((
3126     -*)  ac_site_file1=./$CONFIG_SITE;;
3127     */*) ac_site_file1=$CONFIG_SITE;;
3128     *)   ac_site_file1=./$CONFIG_SITE;;
3129   esac
3130 elif test "x$prefix" != xNONE; then
3131   ac_site_file1=$prefix/share/config.site
3132   ac_site_file2=$prefix/etc/config.site
3133 else
3134   ac_site_file1=$ac_default_prefix/share/config.site
3135   ac_site_file2=$ac_default_prefix/etc/config.site
3136 fi
3137 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3138 do
3139   test "x$ac_site_file" = xNONE && continue
3140   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3141     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3142 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3143     sed 's/^/| /' "$ac_site_file" >&5
3144     . "$ac_site_file" \
3145       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3147 as_fn_error $? "failed to load site script $ac_site_file
3148 See \`config.log' for more details" "$LINENO" 5; }
3149   fi
3150 done
3151 
3152 if test -r "$cache_file"; then
3153   # Some versions of bash will fail to source /dev/null (special files
3154   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3155   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3156     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3157 $as_echo "$as_me: loading cache $cache_file" >&6;}
3158     case $cache_file in
3159       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3160       *)                      . "./$cache_file";;
3161     esac
3162   fi
3163 else
3164   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3165 $as_echo "$as_me: creating cache $cache_file" >&6;}
3166   >$cache_file
3167 fi
3168 
3169 # Check that the precious variables saved in the cache have kept the same
3170 # value.
3171 ac_cache_corrupted=false
3172 for ac_var in $ac_precious_vars; do
3173   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3174   eval ac_new_set=\$ac_env_${ac_var}_set
3175   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3176   eval ac_new_val=\$ac_env_${ac_var}_value
3177   case $ac_old_set,$ac_new_set in
3178     set,)
3179       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3180 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3181       ac_cache_corrupted=: ;;
3182     ,set)
3183       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3184 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3185       ac_cache_corrupted=: ;;
3186     ,);;
3187     *)
3188       if test "x$ac_old_val" != "x$ac_new_val"; then
3189         # differences in whitespace do not lead to failure.
3190         ac_old_val_w=`echo x $ac_old_val`
3191         ac_new_val_w=`echo x $ac_new_val`
3192         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3193           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3194 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3195           ac_cache_corrupted=:
3196         else
3197           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3198 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3199           eval $ac_var=\$ac_old_val
3200         fi
3201         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3202 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3203         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3204 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3205       fi;;
3206   esac
3207   # Pass precious variables to config.status.
3208   if test "$ac_new_set" = set; then
3209     case $ac_new_val in
3210     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3211     *) ac_arg=$ac_var=$ac_new_val ;;
3212     esac
3213     case " $ac_configure_args " in
3214       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3215       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3216     esac
3217   fi
3218 done
3219 if $ac_cache_corrupted; then
3220   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3222   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3223 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3224   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3225 fi
3226 ## -------------------- ##
3227 ## Main body of script. ##
3228 ## -------------------- ##
3229 
3230 ac_ext=c
3231 ac_cpp='$CPP $CPPFLAGS'
3232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3235 
3236 
3237 
3238 ac_aux_dir=
3239 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3240   if test -f "$ac_dir/install-sh"; then
3241     ac_aux_dir=$ac_dir
3242     ac_install_sh="$ac_aux_dir/install-sh -c"
3243     break
3244   elif test -f "$ac_dir/install.sh"; then
3245     ac_aux_dir=$ac_dir
3246     ac_install_sh="$ac_aux_dir/install.sh -c"
3247     break
3248   elif test -f "$ac_dir/shtool"; then
3249     ac_aux_dir=$ac_dir
3250     ac_install_sh="$ac_aux_dir/shtool install -c"
3251     break
3252   fi
3253 done
3254 if test -z "$ac_aux_dir"; then
3255   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
3256 fi
3257 
3258 # These three variables are undocumented and unsupported,
3259 # and are intended to be withdrawn in a future Autoconf release.
3260 # They can cause serious problems if a builder's source tree is in a directory
3261 # whose full name contains unusual characters.
3262 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3263 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3264 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3265 
3266 
3267 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3268 
3269 #
3270 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3271 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3272 #
3273 # This code is free software; you can redistribute it and/or modify it
3274 # under the terms of the GNU General Public License version 2 only, as
3275 # published by the Free Software Foundation.  Oracle designates this
3276 # particular file as subject to the "Classpath" exception as provided
3277 # by Oracle in the LICENSE file that accompanied this code.
3278 #
3279 # This code is distributed in the hope that it will be useful, but WITHOUT
3280 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3281 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3282 # version 2 for more details (a copy is included in the LICENSE file that
3283 # accompanied this code).
3284 #
3285 # You should have received a copy of the GNU General Public License version
3286 # 2 along with this work; if not, write to the Free Software Foundation,
3287 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3288 #
3289 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3290 # or visit www.oracle.com if you need additional information or have any
3291 # questions.
3292 #
3293 
3294 #
3295 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3296 #
3297 # This program is free software; you can redistribute it and/or modify
3298 # it under the terms of the GNU General Public License as published by
3299 # the Free Software Foundation; either version 2 of the License, or
3300 # (at your option) any later version.
3301 #
3302 # This program is distributed in the hope that it will be useful, but
3303 # WITHOUT ANY WARRANTY; without even the implied warranty of
3304 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3305 # General Public License for more details.
3306 #
3307 # You should have received a copy of the GNU General Public License
3308 # along with this program; if not, write to the Free Software
3309 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3310 #
3311 # As a special exception to the GNU General Public License, if you
3312 # distribute this file as part of a program that contains a
3313 # configuration script generated by Autoconf, you may include it under
3314 # the same distribution terms that you use for the rest of that program.
3315 
3316 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3317 # ----------------------------------
3318 # PKG_PROG_PKG_CONFIG
3319 
3320 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3321 #
3322 # Check to see whether a particular set of modules exists.  Similar
3323 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3324 #
3325 #
3326 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3327 # this or PKG_CHECK_MODULES is called, or make sure to call
3328 # PKG_CHECK_EXISTS manually
3329 # --------------------------------------------------------------
3330 
3331 
3332 
3333 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3334 # ---------------------------------------------
3335 # _PKG_CONFIG
3336 
3337 # _PKG_SHORT_ERRORS_SUPPORTED
3338 # -----------------------------
3339 # _PKG_SHORT_ERRORS_SUPPORTED
3340 
3341 
3342 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3343 # [ACTION-IF-NOT-FOUND])
3344 #
3345 #
3346 # Note that if there is a possibility the first call to
3347 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3348 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3349 #
3350 #
3351 # --------------------------------------------------------------
3352 # PKG_CHECK_MODULES
3353 
3354 
3355 # Include these first...
3356 #
3357 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3358 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3359 #
3360 # This code is free software; you can redistribute it and/or modify it
3361 # under the terms of the GNU General Public License version 2 only, as
3362 # published by the Free Software Foundation.  Oracle designates this
3363 # particular file as subject to the "Classpath" exception as provided
3364 # by Oracle in the LICENSE file that accompanied this code.
3365 #
3366 # This code is distributed in the hope that it will be useful, but WITHOUT
3367 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3368 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3369 # version 2 for more details (a copy is included in the LICENSE file that
3370 # accompanied this code).
3371 #
3372 # You should have received a copy of the GNU General Public License version
3373 # 2 along with this work; if not, write to the Free Software Foundation,
3374 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3375 #
3376 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3377 # or visit www.oracle.com if you need additional information or have any
3378 # questions.
3379 #
3380 
3381 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3382 # If so, then append $1 to $2 \
3383 # Also set JVM_ARG_OK to true/false depending on outcome.
3384 
3385 
3386 # Appends a string to a path variable, only adding the : when needed.
3387 
3388 
3389 # Prepends a string to a path variable, only adding the : when needed.
3390 
3391 
3392 # This will make sure the given variable points to a full and proper
3393 # path. This means:
3394 # 1) There will be no spaces in the path. On unix platforms,
3395 #    spaces in the path will result in an error. On Windows,
3396 #    the path will be rewritten using short-style to be space-free.
3397 # 2) The path will be absolute, and it will be in unix-style (on
3398 #     cygwin).
3399 # $1: The name of the variable to fix
3400 
3401 
3402 # This will make sure the given variable points to a executable
3403 # with a full and proper path. This means:
3404 # 1) There will be no spaces in the path. On unix platforms,
3405 #    spaces in the path will result in an error. On Windows,
3406 #    the path will be rewritten using short-style to be space-free.
3407 # 2) The path will be absolute, and it will be in unix-style (on
3408 #     cygwin).
3409 # Any arguments given to the executable is preserved.
3410 # If the input variable does not have a directory specification, then
3411 # it need to be in the PATH.
3412 # $1: The name of the variable to fix
3413 
3414 
3415 
3416 
3417 # Register a --with argument but mark it as deprecated
3418 # $1: The name of the with argument to deprecate, not including --with-
3419 
3420 
3421 # Register a --enable argument but mark it as deprecated
3422 # $1: The name of the with argument to deprecate, not including --enable-
3423 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3424 
3425 
3426 
3427 
3428 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3429 # $1: variable to check
3430 
3431 
3432 # Check that there are no unprocessed overridden variables left.
3433 # If so, they are an incorrect argument and we will exit with an error.
3434 
3435 
3436 # Setup a tool for the given variable. If correctly specified by the user,
3437 # use that value, otherwise search for the tool using the supplied code snippet.
3438 # $1: variable to set
3439 # $2: code snippet to call to look for the tool
3440 
3441 
3442 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3443 # $1: variable to set
3444 # $2: executable name (or list of names) to look for
3445 
3446 
3447 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3448 # $1: variable to set
3449 # $2: executable name (or list of names) to look for
3450 
3451 
3452 # Like BASIC_PATH_PROGS but fails if no tool was found.
3453 # $1: variable to set
3454 # $2: executable name (or list of names) to look for
3455 
3456 
3457 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3458 # $1: variable to set
3459 # $2: autoconf macro to call to look for the special tool
3460 
3461 
3462 # Setup the most fundamental tools that relies on not much else to set up,
3463 # but is used by much of the early bootstrap code.
3464 
3465 
3466 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3467 
3468 
3469 
3470 
3471 
3472 
3473 #%%% Simple tools %%%
3474 
3475 # Check if we have found a usable version of make
3476 # $1: the path to a potential make binary (or empty)
3477 # $2: the description on how we found this
3478 
3479 
3480 
3481 
3482 # Goes looking for a usable version of GNU make.
3483 
3484 
3485 
3486 
3487 
3488 
3489 # Check if build directory is on local disk. If not possible to determine,
3490 # we prefer to claim it's local.
3491 # Argument 1: directory to test
3492 # Argument 2: what to do if it is on local disk
3493 # Argument 3: what to do otherwise (remote disk or failure)
3494 
3495 
3496 # Check that source files have basic read permissions set. This might
3497 # not be the case in cygwin in certain conditions.
3498 
3499 
3500 
3501 
3502 # Check for support for specific options in bash
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 # Helper function which possibly converts a path using DOS-style short mode.
3535 # If so, the updated path is stored in $new_path.
3536 # $1: The path to check
3537 
3538 
3539 # Helper function which possibly converts a path using DOS-style short mode.
3540 # If so, the updated path is stored in $new_path.
3541 # $1: The path to check
3542 
3543 
3544 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3545 # and could probably be heavily simplified. However, all changes in this
3546 # area tend to need lot of testing in different scenarios, and in lack of
3547 # proper unit testing, cleaning this up has not been deemed worth the effort
3548 # at the moment.
3549 
3550 
3551 
3552 
3553 
3554 
3555 
3556 
3557 
3558 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3559 
3560 
3561 
3562 
3563 #
3564 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3565 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3566 #
3567 # This code is free software; you can redistribute it and/or modify it
3568 # under the terms of the GNU General Public License version 2 only, as
3569 # published by the Free Software Foundation.  Oracle designates this
3570 # particular file as subject to the "Classpath" exception as provided
3571 # by Oracle in the LICENSE file that accompanied this code.
3572 #
3573 # This code is distributed in the hope that it will be useful, but WITHOUT
3574 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3575 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3576 # version 2 for more details (a copy is included in the LICENSE file that
3577 # accompanied this code).
3578 #
3579 # You should have received a copy of the GNU General Public License version
3580 # 2 along with this work; if not, write to the Free Software Foundation,
3581 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3582 #
3583 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3584 # or visit www.oracle.com if you need additional information or have any
3585 # questions.
3586 #
3587 
3588 
3589 
3590 
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 # ... then the rest
3599 #
3600 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3601 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3602 #
3603 # This code is free software; you can redistribute it and/or modify it
3604 # under the terms of the GNU General Public License version 2 only, as
3605 # published by the Free Software Foundation.  Oracle designates this
3606 # particular file as subject to the "Classpath" exception as provided
3607 # by Oracle in the LICENSE file that accompanied this code.
3608 #
3609 # This code is distributed in the hope that it will be useful, but WITHOUT
3610 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3611 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3612 # version 2 for more details (a copy is included in the LICENSE file that
3613 # accompanied this code).
3614 #
3615 # You should have received a copy of the GNU General Public License version
3616 # 2 along with this work; if not, write to the Free Software Foundation,
3617 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3618 #
3619 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3620 # or visit www.oracle.com if you need additional information or have any
3621 # questions.
3622 #
3623 
3624 ########################################################################
3625 # This file handles detection of the Boot JDK. The Boot JDK detection
3626 # process has been developed as a response to solve a complex real-world
3627 # problem. Initially, it was simple, but it has grown as platform after
3628 # platform, idiosyncracy after idiosyncracy has been supported.
3629 #
3630 # The basic idea is this:
3631 # 1) You need an acceptable *) JDK to use as a Boot JDK
3632 # 2) There are several ways to locate a JDK, that are mostly platform
3633 #    dependent **)
3634 # 3) You can have multiple JDKs installed
3635 # 4) If possible, configure should try to dig out an acceptable JDK
3636 #    automatically, without having to resort to command-line options
3637 #
3638 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3639 #     javac) and not a JRE, etc.
3640 #
3641 # **) On Windows we typically use a well-known path.
3642 #     On MacOSX we typically use the tool java_home.
3643 #     On Linux we typically find javac in the $PATH, and then follow a
3644 #     chain of symlinks that often ends up in a real JDK.
3645 #
3646 # This leads to the code where we check in different ways to locate a
3647 # JDK, and if one is found, check if it is acceptable. If not, we print
3648 # our reasons for rejecting it (useful when debugging non-working
3649 # configure situations) and continue checking the next one.
3650 ########################################################################
3651 
3652 # Execute the check given as argument, and verify the result
3653 # If the Boot JDK was previously found, do nothing
3654 # $1 A command line (typically autoconf macro) to execute
3655 
3656 
3657 # Test: Is bootjdk explicitely set by command line arguments?
3658 
3659 
3660 # Test: Is bootjdk available from builddeps?
3661 
3662 
3663 # Test: Is $JAVA_HOME set?
3664 
3665 
3666 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3667 
3668 
3669 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3670 # $1: Argument to the java_home binary (optional)
3671 
3672 
3673 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3674 
3675 
3676 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3677 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3678 # $1 = Path to directory containing jdk installations.
3679 # $2 = String to append to the found JDK directory to get the proper JDK home
3680 
3681 
3682 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3683 # environmental variable as base for where to look.
3684 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3685 
3686 
3687 # Test: Is there a JDK installed in default, well-known locations?
3688 
3689 
3690 # Check that a command-line tool in the Boot JDK is correct
3691 # $1 = name of variable to assign
3692 # $2 = name of binary
3693 
3694 
3695 ###############################################################################
3696 #
3697 # We need a Boot JDK to bootstrap the build.
3698 #
3699 
3700 
3701 
3702 
3703 
3704 #
3705 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3706 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3707 #
3708 # This code is free software; you can redistribute it and/or modify it
3709 # under the terms of the GNU General Public License version 2 only, as
3710 # published by the Free Software Foundation.  Oracle designates this
3711 # particular file as subject to the "Classpath" exception as provided
3712 # by Oracle in the LICENSE file that accompanied this code.
3713 #
3714 # This code is distributed in the hope that it will be useful, but WITHOUT
3715 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3716 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3717 # version 2 for more details (a copy is included in the LICENSE file that
3718 # accompanied this code).
3719 #
3720 # You should have received a copy of the GNU General Public License version
3721 # 2 along with this work; if not, write to the Free Software Foundation,
3722 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3723 #
3724 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3725 # or visit www.oracle.com if you need additional information or have any
3726 # questions.
3727 #
3728 
3729 
3730 
3731 
3732 
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 
3746 
3747 
3748 #
3749 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3750 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3751 #
3752 # This code is free software; you can redistribute it and/or modify it
3753 # under the terms of the GNU General Public License version 2 only, as
3754 # published by the Free Software Foundation.  Oracle designates this
3755 # particular file as subject to the "Classpath" exception as provided
3756 # by Oracle in the LICENSE file that accompanied this code.
3757 #
3758 # This code is distributed in the hope that it will be useful, but WITHOUT
3759 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3760 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3761 # version 2 for more details (a copy is included in the LICENSE file that
3762 # accompanied this code).
3763 #
3764 # You should have received a copy of the GNU General Public License version
3765 # 2 along with this work; if not, write to the Free Software Foundation,
3766 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3767 #
3768 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3769 # or visit www.oracle.com if you need additional information or have any
3770 # questions.
3771 #
3772 
3773 
3774 
3775 
3776 
3777 # Documentation on common flags used for solstudio in HIGHEST.
3778 #
3779 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3780 #          done with care, there are some assumptions below that need to
3781 #          be understood about the use of pointers, and IEEE behavior.
3782 #
3783 # -fns: Use non-standard floating point mode (not IEEE 754)
3784 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3785 # -fsingle: Use single precision floating point with 'float'
3786 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3787 #   (Source with excessing pointer casting and data access with mixed
3788 #    pointer types are not recommended)
3789 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3790 #   (If you expect perfect errno behavior, do not use this)
3791 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3792 # -xrestrict: Pointer parameters to functions do not overlap
3793 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3794 #    If you pass in multiple pointers to the same data, do not use this)
3795 # -xlibmil: Inline some library routines
3796 #   (If you expect perfect errno behavior, do not use this)
3797 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3798 #   (If you expect perfect errno behavior, do not use this)
3799 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3800 
3801     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3802     # Bug?
3803     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3804     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3805     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3806     #fi
3807 
3808 
3809 
3810 
3811 
3812 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3813 #                                   [RUN-IF-FALSE])
3814 # ------------------------------------------------------------
3815 # Check that the c and c++ compilers support an argument
3816 
3817 
3818 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3819 #                                    [RUN-IF-FALSE])
3820 # ------------------------------------------------------------
3821 # Check that the linker support an argument
3822 
3823 
3824 
3825 
3826 #
3827 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3828 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3829 #
3830 # This code is free software; you can redistribute it and/or modify it
3831 # under the terms of the GNU General Public License version 2 only, as
3832 # published by the Free Software Foundation.  Oracle designates this
3833 # particular file as subject to the "Classpath" exception as provided
3834 # by Oracle in the LICENSE file that accompanied this code.
3835 #
3836 # This code is distributed in the hope that it will be useful, but WITHOUT
3837 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3838 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3839 # version 2 for more details (a copy is included in the LICENSE file that
3840 # accompanied this code).
3841 #
3842 # You should have received a copy of the GNU General Public License version
3843 # 2 along with this work; if not, write to the Free Software Foundation,
3844 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3845 #
3846 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3847 # or visit www.oracle.com if you need additional information or have any
3848 # questions.
3849 #
3850 
3851 
3852 
3853 
3854 
3855 cygwin_help() {
3856   case $1 in
3857     unzip)
3858       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3859       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3860       ;;
3861     zip)
3862       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3863       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3864       ;;
3865     make)
3866       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3867       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3868       ;;
3869     freetype)
3870       HELP_MSG="
3871 The freetype library can now be build during the configure process.
3872 Download the freetype sources and unpack them into an arbitrary directory:
3873 
3874 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3875 tar -xzf freetype-2.5.3.tar.gz
3876 
3877 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3878 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3879 builds or into '<freetype_src>/lib32' for 32-bit builds.
3880 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3881 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3882       ;;
3883   esac
3884 }
3885 
3886 msys_help() {
3887   PKGHANDLER_COMMAND=""
3888 }
3889 
3890 apt_help() {
3891   case $1 in
3892     devkit)
3893       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3894     openjdk)
3895       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3896     alsa)
3897       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3898     cups)
3899       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3900     freetype)
3901       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3902     pulse)
3903       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3904     x11)
3905       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3906     ccache)
3907       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3908   esac
3909 }
3910 
3911 yum_help() {
3912   case $1 in
3913     devkit)
3914       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3915     openjdk)
3916       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3917     alsa)
3918       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3919     cups)
3920       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3921     freetype)
3922       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3923     pulse)
3924       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3925     x11)
3926       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3927     ccache)
3928       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3929   esac
3930 }
3931 
3932 port_help() {
3933   PKGHANDLER_COMMAND=""
3934 }
3935 
3936 pkgutil_help() {
3937   PKGHANDLER_COMMAND=""
3938 }
3939 
3940 pkgadd_help() {
3941   PKGHANDLER_COMMAND=""
3942 }
3943 
3944 # This function will check if we're called from the "configure" wrapper while
3945 # printing --help. If so, we will print out additional information that can
3946 # only be extracted within the autoconf script, and then exit. This must be
3947 # called at the very beginning in configure.ac.
3948 
3949 
3950 
3951 
3952 
3953 
3954 #
3955 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3956 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3957 #
3958 # This code is free software; you can redistribute it and/or modify it
3959 # under the terms of the GNU General Public License version 2 only, as
3960 # published by the Free Software Foundation.  Oracle designates this
3961 # particular file as subject to the "Classpath" exception as provided
3962 # by Oracle in the LICENSE file that accompanied this code.
3963 #
3964 # This code is distributed in the hope that it will be useful, but WITHOUT
3965 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3966 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3967 # version 2 for more details (a copy is included in the LICENSE file that
3968 # accompanied this code).
3969 #
3970 # You should have received a copy of the GNU General Public License version
3971 # 2 along with this work; if not, write to the Free Software Foundation,
3972 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3973 #
3974 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3975 # or visit www.oracle.com if you need additional information or have any
3976 # questions.
3977 #
3978 
3979 
3980 
3981 
3982 
3983 
3984 
3985 
3986 
3987 
3988 ###############################################################################
3989 #
3990 # Should we build only OpenJDK even if closed sources are present?
3991 #
3992 
3993 
3994 
3995 
3996 ###############################################################################
3997 #
3998 # Setup version numbers
3999 #
4000 
4001 
4002 
4003 
4004 
4005 
4006 ################################################################################
4007 #
4008 # Gcov coverage data for hotspot
4009 #
4010 
4011 
4012 #
4013 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4014 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4015 #
4016 # This code is free software; you can redistribute it and/or modify it
4017 # under the terms of the GNU General Public License version 2 only, as
4018 # published by the Free Software Foundation.  Oracle designates this
4019 # particular file as subject to the "Classpath" exception as provided
4020 # by Oracle in the LICENSE file that accompanied this code.
4021 #
4022 # This code is distributed in the hope that it will be useful, but WITHOUT
4023 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4024 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4025 # version 2 for more details (a copy is included in the LICENSE file that
4026 # accompanied this code).
4027 #
4028 # You should have received a copy of the GNU General Public License version
4029 # 2 along with this work; if not, write to the Free Software Foundation,
4030 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4031 #
4032 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4033 # or visit www.oracle.com if you need additional information or have any
4034 # questions.
4035 #
4036 
4037 
4038 
4039 
4040 
4041 
4042 
4043 
4044 
4045 
4046 
4047 
4048 
4049 
4050 
4051 
4052 
4053 
4054 
4055 
4056 
4057 #
4058 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4059 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4060 #
4061 # This code is free software; you can redistribute it and/or modify it
4062 # under the terms of the GNU General Public License version 2 only, as
4063 # published by the Free Software Foundation.  Oracle designates this
4064 # particular file as subject to the "Classpath" exception as provided
4065 # by Oracle in the LICENSE file that accompanied this code.
4066 #
4067 # This code is distributed in the hope that it will be useful, but WITHOUT
4068 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4069 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4070 # version 2 for more details (a copy is included in the LICENSE file that
4071 # accompanied this code).
4072 #
4073 # You should have received a copy of the GNU General Public License version
4074 # 2 along with this work; if not, write to the Free Software Foundation,
4075 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4076 #
4077 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4078 # or visit www.oracle.com if you need additional information or have any
4079 # questions.
4080 #
4081 
4082 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4083 # Converts autoconf style CPU name to OpenJDK style, into
4084 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4085 
4086 
4087 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4088 # Converts autoconf style OS name to OpenJDK style, into
4089 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4090 
4091 
4092 # Expects $host_os $host_cpu $build_os and $build_cpu
4093 # and $with_target_bits to have been setup!
4094 #
4095 # Translate the standard triplet(quadruplet) definition
4096 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4097 # OPENJDK_BUILD_OS, etc.
4098 
4099 
4100 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4101 # accordingly. Must be done after setting up build and target system, but before
4102 # doing anything else with these values.
4103 
4104 
4105 # Setup the legacy variables, for controlling the old makefiles.
4106 #
4107 
4108 
4109 
4110 
4111 #%%% Build and target systems %%%
4112 
4113 
4114 
4115 
4116 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4117 # Add -mX to various FLAGS variables.
4118 
4119 
4120 
4121 
4122 
4123 
4124 #
4125 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4126 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4127 #
4128 # This code is free software; you can redistribute it and/or modify it
4129 # under the terms of the GNU General Public License version 2 only, as
4130 # published by the Free Software Foundation.  Oracle designates this
4131 # particular file as subject to the "Classpath" exception as provided
4132 # by Oracle in the LICENSE file that accompanied this code.
4133 #
4134 # This code is distributed in the hope that it will be useful, but WITHOUT
4135 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4136 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4137 # version 2 for more details (a copy is included in the LICENSE file that
4138 # accompanied this code).
4139 #
4140 # You should have received a copy of the GNU General Public License version
4141 # 2 along with this work; if not, write to the Free Software Foundation,
4142 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4143 #
4144 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4145 # or visit www.oracle.com if you need additional information or have any
4146 # questions.
4147 #
4148 
4149 
4150 
4151 
4152 
4153 
4154 
4155 
4156 #
4157 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4158 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4159 #
4160 # This code is free software; you can redistribute it and/or modify it
4161 # under the terms of the GNU General Public License version 2 only, as
4162 # published by the Free Software Foundation.  Oracle designates this
4163 # particular file as subject to the "Classpath" exception as provided
4164 # by Oracle in the LICENSE file that accompanied this code.
4165 #
4166 # This code is distributed in the hope that it will be useful, but WITHOUT
4167 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4168 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4169 # version 2 for more details (a copy is included in the LICENSE file that
4170 # accompanied this code).
4171 #
4172 # You should have received a copy of the GNU General Public License version
4173 # 2 along with this work; if not, write to the Free Software Foundation,
4174 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4175 #
4176 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4177 # or visit www.oracle.com if you need additional information or have any
4178 # questions.
4179 #
4180 
4181 ########################################################################
4182 # This file is responsible for detecting, verifying and setting up the
4183 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4184 # proper paths to the binaries, but it will not setup any flags.
4185 #
4186 # The binaries used is determined by the toolchain type, which is the family of
4187 # compilers and related tools that are used.
4188 ########################################################################
4189 
4190 
4191 # All valid toolchains, regardless of platform (used by help.m4)
4192 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4193 
4194 # These toolchains are valid on different platforms
4195 VALID_TOOLCHAINS_linux="gcc clang"
4196 VALID_TOOLCHAINS_solaris="solstudio"
4197 VALID_TOOLCHAINS_macosx="gcc clang"
4198 VALID_TOOLCHAINS_aix="xlc"
4199 VALID_TOOLCHAINS_windows="microsoft"
4200 
4201 # Toolchain descriptions
4202 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4203 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4204 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4205 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4206 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4207 
4208 # Setup a number of variables describing how native output files are
4209 # named on this platform/toolchain.
4210 
4211 
4212 # Determine which toolchain type to use, and make sure it is valid for this
4213 # platform. Setup various information about the selected toolchain.
4214 
4215 
4216 # Before we start detecting the toolchain executables, we might need some
4217 # special setup, e.g. additional paths etc.
4218 
4219 
4220 # Restore path, etc
4221 
4222 
4223 # Check if a compiler is of the toolchain type we expect, and save the version
4224 # information from it. If the compiler does not match the expected type,
4225 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4226 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4227 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4228 #
4229 # $1 = compiler to test (CC or CXX)
4230 # $2 = human readable name of compiler (C or C++)
4231 
4232 
4233 # Try to locate the given C or C++ compiler in the path, or otherwise.
4234 #
4235 # $1 = compiler to test (CC or CXX)
4236 # $2 = human readable name of compiler (C or C++)
4237 # $3 = list of compiler names to search for
4238 
4239 
4240 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4241 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4242 # archiver (AR). Verify that the compilers are correct according to the
4243 # toolchain type.
4244 
4245 
4246 # Setup additional tools that is considered a part of the toolchain, but not the
4247 # core part. Many of these are highly platform-specific and do not exist,
4248 # and/or are not needed on all platforms.
4249 
4250 
4251 # Setup the build tools (i.e, the compiler and linker used to build programs
4252 # that should be run on the build platform, not the target platform, as a build
4253 # helper). Since the non-cross-compile case uses the normal, target compilers
4254 # for this, we can only do this after these have been setup.
4255 
4256 
4257 # Setup legacy variables that are still needed as alternative ways to refer to
4258 # parts of the toolchain.
4259 
4260 
4261 # Do some additional checks on the detected tools.
4262 
4263 
4264 # Setup the JTReg Regression Test Harness.
4265 
4266 
4267 #
4268 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4269 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4270 #
4271 # This code is free software; you can redistribute it and/or modify it
4272 # under the terms of the GNU General Public License version 2 only, as
4273 # published by the Free Software Foundation.  Oracle designates this
4274 # particular file as subject to the "Classpath" exception as provided
4275 # by Oracle in the LICENSE file that accompanied this code.
4276 #
4277 # This code is distributed in the hope that it will be useful, but WITHOUT
4278 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4279 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4280 # version 2 for more details (a copy is included in the LICENSE file that
4281 # accompanied this code).
4282 #
4283 # You should have received a copy of the GNU General Public License version
4284 # 2 along with this work; if not, write to the Free Software Foundation,
4285 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4286 #
4287 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4288 # or visit www.oracle.com if you need additional information or have any
4289 # questions.
4290 #
4291 
4292 ################################################################################
4293 
4294 VALID_VS_VERSIONS="2010 2012 2013"
4295 
4296 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4297 VS_VERSION_INTERNAL_2010=100
4298 VS_MSVCR_2010=msvcr100.dll
4299 # We don't use msvcp on Visual Studio 2010
4300 #VS_MSVCP_2010=msvcp100.dll
4301 VS_ENVVAR_2010="VS100COMNTOOLS"
4302 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4303 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4304 VS_VS_PLATFORM_NAME_2010="v100"
4305 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4306 
4307 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4308 VS_VERSION_INTERNAL_2012=110
4309 VS_MSVCR_2012=msvcr110.dll
4310 VS_MSVCP_2012=msvcp110.dll
4311 VS_ENVVAR_2012="VS110COMNTOOLS"
4312 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4313 VS_SDK_INSTALLDIR_2012=
4314 VS_VS_PLATFORM_NAME_2012="v110"
4315 VS_SDK_PLATFORM_NAME_2012=
4316 
4317 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4318 VS_VERSION_INTERNAL_2013=120
4319 VS_MSVCR_2013=msvcr120.dll
4320 VS_MSVCP_2013=msvcp120.dll
4321 VS_ENVVAR_2013="VS120COMNTOOLS"
4322 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4323 VS_SDK_INSTALLDIR_2013=
4324 VS_VS_PLATFORM_NAME_2013="v120"
4325 VS_SDK_PLATFORM_NAME_2013=
4326 
4327 ################################################################################
4328 
4329 
4330 
4331 ################################################################################
4332 
4333 
4334 
4335 ################################################################################
4336 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4337 # build environment and assigns it to VS_ENV_CMD
4338 
4339 
4340 ################################################################################
4341 
4342 
4343 
4344 ################################################################################
4345 # Check if the VS env variables were setup prior to running configure.
4346 # If not, then find vcvarsall.bat and run it automatically, and integrate
4347 # the set env variables into the spec file.
4348 
4349 
4350 
4351 
4352 
4353 
4354 
4355 
4356 
4357 
4358 
4359 
4360 
4361 
4362 # This line needs to be here, verbatim, after all includes and the dummy hook
4363 # definitions. It is replaced with custom functionality when building
4364 # custom sources.
4365 #CUSTOM_AUTOCONF_INCLUDE
4366 
4367 # Do not change or remove the following line, it is needed for consistency checks:
4368 DATE_WHEN_GENERATED=1427843803
4369 
4370 ###############################################################################
4371 #
4372 # Initialization / Boot-strapping
4373 #
4374 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4375 # thus it jumps back and forth, each time gaining something needed later on.
4376 #
4377 ###############################################################################
4378 
4379 # If we are requested to print additional help, do that and then exit.
4380 # This must be the very first call.
4381 
4382   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4383     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4384     $PRINTF "Which are valid to use depends on the build platform.\n"
4385     for toolchain in $VALID_TOOLCHAINS_all; do
4386       # Use indirect variable referencing
4387       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4388       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4389       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4390     done
4391 
4392     # And now exit directly
4393     exit 0
4394   fi
4395 
4396 
4397 # Basic initialization that must happen first of all in the normal process.
4398 
4399   # Save the original command line. This is passed to us by the wrapper configure script.
4400 
4401   # Save the path variable before it gets changed
4402   ORIGINAL_PATH="$PATH"
4403 
4404   DATE_WHEN_CONFIGURED=`LANG=C date`
4405 
4406   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4407 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4408   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4409 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4410 
4411 
4412   # Start with tools that do not need have cross compilation support
4413   # and can be expected to be found in the default PATH. These tools are
4414   # used by configure. Nor are these tools expected to be found in the
4415   # devkit from the builddeps server either, since they are
4416   # needed to download the devkit.
4417 
4418   # First are all the simple required tools.
4419 
4420 
4421 
4422   # Publish this variable in the help.
4423 
4424 
4425   if test "x$BASENAME" = x; then
4426     # The variable is not set by user, try to locate tool using the code snippet
4427     for ac_prog in basename
4428 do
4429   # Extract the first word of "$ac_prog", so it can be a program name with args.
4430 set dummy $ac_prog; ac_word=$2
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432 $as_echo_n "checking for $ac_word... " >&6; }
4433 if ${ac_cv_path_BASENAME+:} false; then :
4434   $as_echo_n "(cached) " >&6
4435 else
4436   case $BASENAME in
4437   [\\/]* | ?:[\\/]*)
4438   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4439   ;;
4440   *)
4441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442 for as_dir in $PATH
4443 do
4444   IFS=$as_save_IFS
4445   test -z "$as_dir" && as_dir=.
4446     for ac_exec_ext in '' $ac_executable_extensions; do
4447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4448     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450     break 2
4451   fi
4452 done
4453   done
4454 IFS=$as_save_IFS
4455 
4456   ;;
4457 esac
4458 fi
4459 BASENAME=$ac_cv_path_BASENAME
4460 if test -n "$BASENAME"; then
4461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4462 $as_echo "$BASENAME" >&6; }
4463 else
4464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465 $as_echo "no" >&6; }
4466 fi
4467 
4468 
4469   test -n "$BASENAME" && break
4470 done
4471 
4472   else
4473     # The variable is set, but is it from the command line or the environment?
4474 
4475     # Try to remove the string !BASENAME! from our list.
4476     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4477     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4478       # If it failed, the variable was not from the command line. Ignore it,
4479       # but warn the user (except for BASH, which is always set by the calling BASH).
4480       if test "xBASENAME" != xBASH; then
4481         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4482 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4483       fi
4484       # Try to locate tool using the code snippet
4485       for ac_prog in basename
4486 do
4487   # Extract the first word of "$ac_prog", so it can be a program name with args.
4488 set dummy $ac_prog; ac_word=$2
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4490 $as_echo_n "checking for $ac_word... " >&6; }
4491 if ${ac_cv_path_BASENAME+:} false; then :
4492   $as_echo_n "(cached) " >&6
4493 else
4494   case $BASENAME in
4495   [\\/]* | ?:[\\/]*)
4496   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4497   ;;
4498   *)
4499   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500 for as_dir in $PATH
4501 do
4502   IFS=$as_save_IFS
4503   test -z "$as_dir" && as_dir=.
4504     for ac_exec_ext in '' $ac_executable_extensions; do
4505   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4506     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4507     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4508     break 2
4509   fi
4510 done
4511   done
4512 IFS=$as_save_IFS
4513 
4514   ;;
4515 esac
4516 fi
4517 BASENAME=$ac_cv_path_BASENAME
4518 if test -n "$BASENAME"; then
4519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4520 $as_echo "$BASENAME" >&6; }
4521 else
4522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4523 $as_echo "no" >&6; }
4524 fi
4525 
4526 
4527   test -n "$BASENAME" && break
4528 done
4529 
4530     else
4531       # If it succeeded, then it was overridden by the user. We will use it
4532       # for the tool.
4533 
4534       # First remove it from the list of overridden variables, so we can test
4535       # for unknown variables in the end.
4536       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4537 
4538       # Check if the provided tool contains a complete path.
4539       tool_specified="$BASENAME"
4540       tool_basename="${tool_specified##*/}"
4541       if test "x$tool_basename" = "x$tool_specified"; then
4542         # A command without a complete path is provided, search $PATH.
4543         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4544 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4545         # Extract the first word of "$tool_basename", so it can be a program name with args.
4546 set dummy $tool_basename; ac_word=$2
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548 $as_echo_n "checking for $ac_word... " >&6; }
4549 if ${ac_cv_path_BASENAME+:} false; then :
4550   $as_echo_n "(cached) " >&6
4551 else
4552   case $BASENAME in
4553   [\\/]* | ?:[\\/]*)
4554   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4555   ;;
4556   *)
4557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558 for as_dir in $PATH
4559 do
4560   IFS=$as_save_IFS
4561   test -z "$as_dir" && as_dir=.
4562     for ac_exec_ext in '' $ac_executable_extensions; do
4563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4564     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566     break 2
4567   fi
4568 done
4569   done
4570 IFS=$as_save_IFS
4571 
4572   ;;
4573 esac
4574 fi
4575 BASENAME=$ac_cv_path_BASENAME
4576 if test -n "$BASENAME"; then
4577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4578 $as_echo "$BASENAME" >&6; }
4579 else
4580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581 $as_echo "no" >&6; }
4582 fi
4583 
4584 
4585         if test "x$BASENAME" = x; then
4586           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4587         fi
4588       else
4589         # Otherwise we believe it is a complete path. Use it as it is.
4590         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4591 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4592         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4593 $as_echo_n "checking for BASENAME... " >&6; }
4594         if test ! -x "$tool_specified"; then
4595           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4596 $as_echo "not found" >&6; }
4597           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4598         fi
4599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4600 $as_echo "$tool_specified" >&6; }
4601       fi
4602     fi
4603   fi
4604 
4605 
4606 
4607   if test "x$BASENAME" = x; then
4608     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4609   fi
4610 
4611 
4612 
4613 
4614 
4615   # Publish this variable in the help.
4616 
4617 
4618   if test "x$BASH" = x; then
4619     # The variable is not set by user, try to locate tool using the code snippet
4620     for ac_prog in bash
4621 do
4622   # Extract the first word of "$ac_prog", so it can be a program name with args.
4623 set dummy $ac_prog; ac_word=$2
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625 $as_echo_n "checking for $ac_word... " >&6; }
4626 if ${ac_cv_path_BASH+:} false; then :
4627   $as_echo_n "(cached) " >&6
4628 else
4629   case $BASH in
4630   [\\/]* | ?:[\\/]*)
4631   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4632   ;;
4633   *)
4634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635 for as_dir in $PATH
4636 do
4637   IFS=$as_save_IFS
4638   test -z "$as_dir" && as_dir=.
4639     for ac_exec_ext in '' $ac_executable_extensions; do
4640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643     break 2
4644   fi
4645 done
4646   done
4647 IFS=$as_save_IFS
4648 
4649   ;;
4650 esac
4651 fi
4652 BASH=$ac_cv_path_BASH
4653 if test -n "$BASH"; then
4654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4655 $as_echo "$BASH" >&6; }
4656 else
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658 $as_echo "no" >&6; }
4659 fi
4660 
4661 
4662   test -n "$BASH" && break
4663 done
4664 
4665   else
4666     # The variable is set, but is it from the command line or the environment?
4667 
4668     # Try to remove the string !BASH! from our list.
4669     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4670     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4671       # If it failed, the variable was not from the command line. Ignore it,
4672       # but warn the user (except for BASH, which is always set by the calling BASH).
4673       if test "xBASH" != xBASH; then
4674         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4675 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4676       fi
4677       # Try to locate tool using the code snippet
4678       for ac_prog in bash
4679 do
4680   # Extract the first word of "$ac_prog", so it can be a program name with args.
4681 set dummy $ac_prog; ac_word=$2
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683 $as_echo_n "checking for $ac_word... " >&6; }
4684 if ${ac_cv_path_BASH+:} false; then :
4685   $as_echo_n "(cached) " >&6
4686 else
4687   case $BASH in
4688   [\\/]* | ?:[\\/]*)
4689   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4690   ;;
4691   *)
4692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693 for as_dir in $PATH
4694 do
4695   IFS=$as_save_IFS
4696   test -z "$as_dir" && as_dir=.
4697     for ac_exec_ext in '' $ac_executable_extensions; do
4698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701     break 2
4702   fi
4703 done
4704   done
4705 IFS=$as_save_IFS
4706 
4707   ;;
4708 esac
4709 fi
4710 BASH=$ac_cv_path_BASH
4711 if test -n "$BASH"; then
4712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4713 $as_echo "$BASH" >&6; }
4714 else
4715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716 $as_echo "no" >&6; }
4717 fi
4718 
4719 
4720   test -n "$BASH" && break
4721 done
4722 
4723     else
4724       # If it succeeded, then it was overridden by the user. We will use it
4725       # for the tool.
4726 
4727       # First remove it from the list of overridden variables, so we can test
4728       # for unknown variables in the end.
4729       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4730 
4731       # Check if the provided tool contains a complete path.
4732       tool_specified="$BASH"
4733       tool_basename="${tool_specified##*/}"
4734       if test "x$tool_basename" = "x$tool_specified"; then
4735         # A command without a complete path is provided, search $PATH.
4736         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4737 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4738         # Extract the first word of "$tool_basename", so it can be a program name with args.
4739 set dummy $tool_basename; ac_word=$2
4740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4741 $as_echo_n "checking for $ac_word... " >&6; }
4742 if ${ac_cv_path_BASH+:} false; then :
4743   $as_echo_n "(cached) " >&6
4744 else
4745   case $BASH in
4746   [\\/]* | ?:[\\/]*)
4747   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4748   ;;
4749   *)
4750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4751 for as_dir in $PATH
4752 do
4753   IFS=$as_save_IFS
4754   test -z "$as_dir" && as_dir=.
4755     for ac_exec_ext in '' $ac_executable_extensions; do
4756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4757     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4759     break 2
4760   fi
4761 done
4762   done
4763 IFS=$as_save_IFS
4764 
4765   ;;
4766 esac
4767 fi
4768 BASH=$ac_cv_path_BASH
4769 if test -n "$BASH"; then
4770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4771 $as_echo "$BASH" >&6; }
4772 else
4773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4774 $as_echo "no" >&6; }
4775 fi
4776 
4777 
4778         if test "x$BASH" = x; then
4779           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4780         fi
4781       else
4782         # Otherwise we believe it is a complete path. Use it as it is.
4783         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4784 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4785         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4786 $as_echo_n "checking for BASH... " >&6; }
4787         if test ! -x "$tool_specified"; then
4788           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4789 $as_echo "not found" >&6; }
4790           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4791         fi
4792         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4793 $as_echo "$tool_specified" >&6; }
4794       fi
4795     fi
4796   fi
4797 
4798 
4799 
4800   if test "x$BASH" = x; then
4801     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4802   fi
4803 
4804 
4805 
4806 
4807 
4808   # Publish this variable in the help.
4809 
4810 
4811   if test "x$CAT" = x; then
4812     # The variable is not set by user, try to locate tool using the code snippet
4813     for ac_prog in cat
4814 do
4815   # Extract the first word of "$ac_prog", so it can be a program name with args.
4816 set dummy $ac_prog; ac_word=$2
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4818 $as_echo_n "checking for $ac_word... " >&6; }
4819 if ${ac_cv_path_CAT+:} false; then :
4820   $as_echo_n "(cached) " >&6
4821 else
4822   case $CAT in
4823   [\\/]* | ?:[\\/]*)
4824   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4825   ;;
4826   *)
4827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4828 for as_dir in $PATH
4829 do
4830   IFS=$as_save_IFS
4831   test -z "$as_dir" && as_dir=.
4832     for ac_exec_ext in '' $ac_executable_extensions; do
4833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4834     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4836     break 2
4837   fi
4838 done
4839   done
4840 IFS=$as_save_IFS
4841 
4842   ;;
4843 esac
4844 fi
4845 CAT=$ac_cv_path_CAT
4846 if test -n "$CAT"; then
4847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4848 $as_echo "$CAT" >&6; }
4849 else
4850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4851 $as_echo "no" >&6; }
4852 fi
4853 
4854 
4855   test -n "$CAT" && break
4856 done
4857 
4858   else
4859     # The variable is set, but is it from the command line or the environment?
4860 
4861     # Try to remove the string !CAT! from our list.
4862     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4863     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4864       # If it failed, the variable was not from the command line. Ignore it,
4865       # but warn the user (except for BASH, which is always set by the calling BASH).
4866       if test "xCAT" != xBASH; then
4867         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4868 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4869       fi
4870       # Try to locate tool using the code snippet
4871       for ac_prog in cat
4872 do
4873   # Extract the first word of "$ac_prog", so it can be a program name with args.
4874 set dummy $ac_prog; ac_word=$2
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876 $as_echo_n "checking for $ac_word... " >&6; }
4877 if ${ac_cv_path_CAT+:} false; then :
4878   $as_echo_n "(cached) " >&6
4879 else
4880   case $CAT in
4881   [\\/]* | ?:[\\/]*)
4882   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4883   ;;
4884   *)
4885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886 for as_dir in $PATH
4887 do
4888   IFS=$as_save_IFS
4889   test -z "$as_dir" && as_dir=.
4890     for ac_exec_ext in '' $ac_executable_extensions; do
4891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4892     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4894     break 2
4895   fi
4896 done
4897   done
4898 IFS=$as_save_IFS
4899 
4900   ;;
4901 esac
4902 fi
4903 CAT=$ac_cv_path_CAT
4904 if test -n "$CAT"; then
4905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4906 $as_echo "$CAT" >&6; }
4907 else
4908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909 $as_echo "no" >&6; }
4910 fi
4911 
4912 
4913   test -n "$CAT" && break
4914 done
4915 
4916     else
4917       # If it succeeded, then it was overridden by the user. We will use it
4918       # for the tool.
4919 
4920       # First remove it from the list of overridden variables, so we can test
4921       # for unknown variables in the end.
4922       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4923 
4924       # Check if the provided tool contains a complete path.
4925       tool_specified="$CAT"
4926       tool_basename="${tool_specified##*/}"
4927       if test "x$tool_basename" = "x$tool_specified"; then
4928         # A command without a complete path is provided, search $PATH.
4929         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4930 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4931         # Extract the first word of "$tool_basename", so it can be a program name with args.
4932 set dummy $tool_basename; ac_word=$2
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934 $as_echo_n "checking for $ac_word... " >&6; }
4935 if ${ac_cv_path_CAT+:} false; then :
4936   $as_echo_n "(cached) " >&6
4937 else
4938   case $CAT in
4939   [\\/]* | ?:[\\/]*)
4940   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4941   ;;
4942   *)
4943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944 for as_dir in $PATH
4945 do
4946   IFS=$as_save_IFS
4947   test -z "$as_dir" && as_dir=.
4948     for ac_exec_ext in '' $ac_executable_extensions; do
4949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4950     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952     break 2
4953   fi
4954 done
4955   done
4956 IFS=$as_save_IFS
4957 
4958   ;;
4959 esac
4960 fi
4961 CAT=$ac_cv_path_CAT
4962 if test -n "$CAT"; then
4963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4964 $as_echo "$CAT" >&6; }
4965 else
4966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967 $as_echo "no" >&6; }
4968 fi
4969 
4970 
4971         if test "x$CAT" = x; then
4972           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4973         fi
4974       else
4975         # Otherwise we believe it is a complete path. Use it as it is.
4976         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4977 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4978         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4979 $as_echo_n "checking for CAT... " >&6; }
4980         if test ! -x "$tool_specified"; then
4981           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4982 $as_echo "not found" >&6; }
4983           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4984         fi
4985         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4986 $as_echo "$tool_specified" >&6; }
4987       fi
4988     fi
4989   fi
4990 
4991 
4992 
4993   if test "x$CAT" = x; then
4994     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4995   fi
4996 
4997 
4998 
4999 
5000 
5001   # Publish this variable in the help.
5002 
5003 
5004   if test "x$CHMOD" = x; then
5005     # The variable is not set by user, try to locate tool using the code snippet
5006     for ac_prog in chmod
5007 do
5008   # Extract the first word of "$ac_prog", so it can be a program name with args.
5009 set dummy $ac_prog; ac_word=$2
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5011 $as_echo_n "checking for $ac_word... " >&6; }
5012 if ${ac_cv_path_CHMOD+:} false; then :
5013   $as_echo_n "(cached) " >&6
5014 else
5015   case $CHMOD in
5016   [\\/]* | ?:[\\/]*)
5017   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5018   ;;
5019   *)
5020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021 for as_dir in $PATH
5022 do
5023   IFS=$as_save_IFS
5024   test -z "$as_dir" && as_dir=.
5025     for ac_exec_ext in '' $ac_executable_extensions; do
5026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5027     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5029     break 2
5030   fi
5031 done
5032   done
5033 IFS=$as_save_IFS
5034 
5035   ;;
5036 esac
5037 fi
5038 CHMOD=$ac_cv_path_CHMOD
5039 if test -n "$CHMOD"; then
5040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5041 $as_echo "$CHMOD" >&6; }
5042 else
5043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044 $as_echo "no" >&6; }
5045 fi
5046 
5047 
5048   test -n "$CHMOD" && break
5049 done
5050 
5051   else
5052     # The variable is set, but is it from the command line or the environment?
5053 
5054     # Try to remove the string !CHMOD! from our list.
5055     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5056     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5057       # If it failed, the variable was not from the command line. Ignore it,
5058       # but warn the user (except for BASH, which is always set by the calling BASH).
5059       if test "xCHMOD" != xBASH; then
5060         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5061 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5062       fi
5063       # Try to locate tool using the code snippet
5064       for ac_prog in chmod
5065 do
5066   # Extract the first word of "$ac_prog", so it can be a program name with args.
5067 set dummy $ac_prog; ac_word=$2
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069 $as_echo_n "checking for $ac_word... " >&6; }
5070 if ${ac_cv_path_CHMOD+:} false; then :
5071   $as_echo_n "(cached) " >&6
5072 else
5073   case $CHMOD in
5074   [\\/]* | ?:[\\/]*)
5075   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5076   ;;
5077   *)
5078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079 for as_dir in $PATH
5080 do
5081   IFS=$as_save_IFS
5082   test -z "$as_dir" && as_dir=.
5083     for ac_exec_ext in '' $ac_executable_extensions; do
5084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5085     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087     break 2
5088   fi
5089 done
5090   done
5091 IFS=$as_save_IFS
5092 
5093   ;;
5094 esac
5095 fi
5096 CHMOD=$ac_cv_path_CHMOD
5097 if test -n "$CHMOD"; then
5098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5099 $as_echo "$CHMOD" >&6; }
5100 else
5101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102 $as_echo "no" >&6; }
5103 fi
5104 
5105 
5106   test -n "$CHMOD" && break
5107 done
5108 
5109     else
5110       # If it succeeded, then it was overridden by the user. We will use it
5111       # for the tool.
5112 
5113       # First remove it from the list of overridden variables, so we can test
5114       # for unknown variables in the end.
5115       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5116 
5117       # Check if the provided tool contains a complete path.
5118       tool_specified="$CHMOD"
5119       tool_basename="${tool_specified##*/}"
5120       if test "x$tool_basename" = "x$tool_specified"; then
5121         # A command without a complete path is provided, search $PATH.
5122         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5123 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5124         # Extract the first word of "$tool_basename", so it can be a program name with args.
5125 set dummy $tool_basename; ac_word=$2
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127 $as_echo_n "checking for $ac_word... " >&6; }
5128 if ${ac_cv_path_CHMOD+:} false; then :
5129   $as_echo_n "(cached) " >&6
5130 else
5131   case $CHMOD in
5132   [\\/]* | ?:[\\/]*)
5133   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5134   ;;
5135   *)
5136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137 for as_dir in $PATH
5138 do
5139   IFS=$as_save_IFS
5140   test -z "$as_dir" && as_dir=.
5141     for ac_exec_ext in '' $ac_executable_extensions; do
5142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5143     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145     break 2
5146   fi
5147 done
5148   done
5149 IFS=$as_save_IFS
5150 
5151   ;;
5152 esac
5153 fi
5154 CHMOD=$ac_cv_path_CHMOD
5155 if test -n "$CHMOD"; then
5156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5157 $as_echo "$CHMOD" >&6; }
5158 else
5159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160 $as_echo "no" >&6; }
5161 fi
5162 
5163 
5164         if test "x$CHMOD" = x; then
5165           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5166         fi
5167       else
5168         # Otherwise we believe it is a complete path. Use it as it is.
5169         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5170 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5172 $as_echo_n "checking for CHMOD... " >&6; }
5173         if test ! -x "$tool_specified"; then
5174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5175 $as_echo "not found" >&6; }
5176           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5177         fi
5178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5179 $as_echo "$tool_specified" >&6; }
5180       fi
5181     fi
5182   fi
5183 
5184 
5185 
5186   if test "x$CHMOD" = x; then
5187     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5188   fi
5189 
5190 
5191 
5192 
5193 
5194   # Publish this variable in the help.
5195 
5196 
5197   if test "x$CMP" = x; then
5198     # The variable is not set by user, try to locate tool using the code snippet
5199     for ac_prog in cmp
5200 do
5201   # Extract the first word of "$ac_prog", so it can be a program name with args.
5202 set dummy $ac_prog; ac_word=$2
5203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5204 $as_echo_n "checking for $ac_word... " >&6; }
5205 if ${ac_cv_path_CMP+:} false; then :
5206   $as_echo_n "(cached) " >&6
5207 else
5208   case $CMP in
5209   [\\/]* | ?:[\\/]*)
5210   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5211   ;;
5212   *)
5213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214 for as_dir in $PATH
5215 do
5216   IFS=$as_save_IFS
5217   test -z "$as_dir" && as_dir=.
5218     for ac_exec_ext in '' $ac_executable_extensions; do
5219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5220     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5222     break 2
5223   fi
5224 done
5225   done
5226 IFS=$as_save_IFS
5227 
5228   ;;
5229 esac
5230 fi
5231 CMP=$ac_cv_path_CMP
5232 if test -n "$CMP"; then
5233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5234 $as_echo "$CMP" >&6; }
5235 else
5236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5237 $as_echo "no" >&6; }
5238 fi
5239 
5240 
5241   test -n "$CMP" && break
5242 done
5243 
5244   else
5245     # The variable is set, but is it from the command line or the environment?
5246 
5247     # Try to remove the string !CMP! from our list.
5248     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5249     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5250       # If it failed, the variable was not from the command line. Ignore it,
5251       # but warn the user (except for BASH, which is always set by the calling BASH).
5252       if test "xCMP" != xBASH; then
5253         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5254 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5255       fi
5256       # Try to locate tool using the code snippet
5257       for ac_prog in cmp
5258 do
5259   # Extract the first word of "$ac_prog", so it can be a program name with args.
5260 set dummy $ac_prog; ac_word=$2
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262 $as_echo_n "checking for $ac_word... " >&6; }
5263 if ${ac_cv_path_CMP+:} false; then :
5264   $as_echo_n "(cached) " >&6
5265 else
5266   case $CMP in
5267   [\\/]* | ?:[\\/]*)
5268   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5269   ;;
5270   *)
5271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272 for as_dir in $PATH
5273 do
5274   IFS=$as_save_IFS
5275   test -z "$as_dir" && as_dir=.
5276     for ac_exec_ext in '' $ac_executable_extensions; do
5277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5278     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280     break 2
5281   fi
5282 done
5283   done
5284 IFS=$as_save_IFS
5285 
5286   ;;
5287 esac
5288 fi
5289 CMP=$ac_cv_path_CMP
5290 if test -n "$CMP"; then
5291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5292 $as_echo "$CMP" >&6; }
5293 else
5294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295 $as_echo "no" >&6; }
5296 fi
5297 
5298 
5299   test -n "$CMP" && break
5300 done
5301 
5302     else
5303       # If it succeeded, then it was overridden by the user. We will use it
5304       # for the tool.
5305 
5306       # First remove it from the list of overridden variables, so we can test
5307       # for unknown variables in the end.
5308       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5309 
5310       # Check if the provided tool contains a complete path.
5311       tool_specified="$CMP"
5312       tool_basename="${tool_specified##*/}"
5313       if test "x$tool_basename" = "x$tool_specified"; then
5314         # A command without a complete path is provided, search $PATH.
5315         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5316 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5317         # Extract the first word of "$tool_basename", so it can be a program name with args.
5318 set dummy $tool_basename; ac_word=$2
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320 $as_echo_n "checking for $ac_word... " >&6; }
5321 if ${ac_cv_path_CMP+:} false; then :
5322   $as_echo_n "(cached) " >&6
5323 else
5324   case $CMP in
5325   [\\/]* | ?:[\\/]*)
5326   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5327   ;;
5328   *)
5329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330 for as_dir in $PATH
5331 do
5332   IFS=$as_save_IFS
5333   test -z "$as_dir" && as_dir=.
5334     for ac_exec_ext in '' $ac_executable_extensions; do
5335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338     break 2
5339   fi
5340 done
5341   done
5342 IFS=$as_save_IFS
5343 
5344   ;;
5345 esac
5346 fi
5347 CMP=$ac_cv_path_CMP
5348 if test -n "$CMP"; then
5349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5350 $as_echo "$CMP" >&6; }
5351 else
5352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353 $as_echo "no" >&6; }
5354 fi
5355 
5356 
5357         if test "x$CMP" = x; then
5358           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5359         fi
5360       else
5361         # Otherwise we believe it is a complete path. Use it as it is.
5362         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5363 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5364         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5365 $as_echo_n "checking for CMP... " >&6; }
5366         if test ! -x "$tool_specified"; then
5367           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5368 $as_echo "not found" >&6; }
5369           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5370         fi
5371         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5372 $as_echo "$tool_specified" >&6; }
5373       fi
5374     fi
5375   fi
5376 
5377 
5378 
5379   if test "x$CMP" = x; then
5380     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5381   fi
5382 
5383 
5384 
5385 
5386 
5387   # Publish this variable in the help.
5388 
5389 
5390   if test "x$COMM" = x; then
5391     # The variable is not set by user, try to locate tool using the code snippet
5392     for ac_prog in comm
5393 do
5394   # Extract the first word of "$ac_prog", so it can be a program name with args.
5395 set dummy $ac_prog; ac_word=$2
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5397 $as_echo_n "checking for $ac_word... " >&6; }
5398 if ${ac_cv_path_COMM+:} false; then :
5399   $as_echo_n "(cached) " >&6
5400 else
5401   case $COMM in
5402   [\\/]* | ?:[\\/]*)
5403   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5404   ;;
5405   *)
5406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5407 for as_dir in $PATH
5408 do
5409   IFS=$as_save_IFS
5410   test -z "$as_dir" && as_dir=.
5411     for ac_exec_ext in '' $ac_executable_extensions; do
5412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5413     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5415     break 2
5416   fi
5417 done
5418   done
5419 IFS=$as_save_IFS
5420 
5421   ;;
5422 esac
5423 fi
5424 COMM=$ac_cv_path_COMM
5425 if test -n "$COMM"; then
5426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5427 $as_echo "$COMM" >&6; }
5428 else
5429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430 $as_echo "no" >&6; }
5431 fi
5432 
5433 
5434   test -n "$COMM" && break
5435 done
5436 
5437   else
5438     # The variable is set, but is it from the command line or the environment?
5439 
5440     # Try to remove the string !COMM! from our list.
5441     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5442     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5443       # If it failed, the variable was not from the command line. Ignore it,
5444       # but warn the user (except for BASH, which is always set by the calling BASH).
5445       if test "xCOMM" != xBASH; then
5446         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5447 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5448       fi
5449       # Try to locate tool using the code snippet
5450       for ac_prog in comm
5451 do
5452   # Extract the first word of "$ac_prog", so it can be a program name with args.
5453 set dummy $ac_prog; ac_word=$2
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455 $as_echo_n "checking for $ac_word... " >&6; }
5456 if ${ac_cv_path_COMM+:} false; then :
5457   $as_echo_n "(cached) " >&6
5458 else
5459   case $COMM in
5460   [\\/]* | ?:[\\/]*)
5461   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5462   ;;
5463   *)
5464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465 for as_dir in $PATH
5466 do
5467   IFS=$as_save_IFS
5468   test -z "$as_dir" && as_dir=.
5469     for ac_exec_ext in '' $ac_executable_extensions; do
5470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5471     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473     break 2
5474   fi
5475 done
5476   done
5477 IFS=$as_save_IFS
5478 
5479   ;;
5480 esac
5481 fi
5482 COMM=$ac_cv_path_COMM
5483 if test -n "$COMM"; then
5484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5485 $as_echo "$COMM" >&6; }
5486 else
5487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488 $as_echo "no" >&6; }
5489 fi
5490 
5491 
5492   test -n "$COMM" && break
5493 done
5494 
5495     else
5496       # If it succeeded, then it was overridden by the user. We will use it
5497       # for the tool.
5498 
5499       # First remove it from the list of overridden variables, so we can test
5500       # for unknown variables in the end.
5501       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5502 
5503       # Check if the provided tool contains a complete path.
5504       tool_specified="$COMM"
5505       tool_basename="${tool_specified##*/}"
5506       if test "x$tool_basename" = "x$tool_specified"; then
5507         # A command without a complete path is provided, search $PATH.
5508         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5509 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5510         # Extract the first word of "$tool_basename", so it can be a program name with args.
5511 set dummy $tool_basename; ac_word=$2
5512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5513 $as_echo_n "checking for $ac_word... " >&6; }
5514 if ${ac_cv_path_COMM+:} false; then :
5515   $as_echo_n "(cached) " >&6
5516 else
5517   case $COMM in
5518   [\\/]* | ?:[\\/]*)
5519   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5520   ;;
5521   *)
5522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5523 for as_dir in $PATH
5524 do
5525   IFS=$as_save_IFS
5526   test -z "$as_dir" && as_dir=.
5527     for ac_exec_ext in '' $ac_executable_extensions; do
5528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5529     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5531     break 2
5532   fi
5533 done
5534   done
5535 IFS=$as_save_IFS
5536 
5537   ;;
5538 esac
5539 fi
5540 COMM=$ac_cv_path_COMM
5541 if test -n "$COMM"; then
5542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5543 $as_echo "$COMM" >&6; }
5544 else
5545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546 $as_echo "no" >&6; }
5547 fi
5548 
5549 
5550         if test "x$COMM" = x; then
5551           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5552         fi
5553       else
5554         # Otherwise we believe it is a complete path. Use it as it is.
5555         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5556 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5557         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5558 $as_echo_n "checking for COMM... " >&6; }
5559         if test ! -x "$tool_specified"; then
5560           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5561 $as_echo "not found" >&6; }
5562           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5563         fi
5564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5565 $as_echo "$tool_specified" >&6; }
5566       fi
5567     fi
5568   fi
5569 
5570 
5571 
5572   if test "x$COMM" = x; then
5573     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5574   fi
5575 
5576 
5577 
5578 
5579 
5580   # Publish this variable in the help.
5581 
5582 
5583   if test "x$CP" = x; then
5584     # The variable is not set by user, try to locate tool using the code snippet
5585     for ac_prog in cp
5586 do
5587   # Extract the first word of "$ac_prog", so it can be a program name with args.
5588 set dummy $ac_prog; ac_word=$2
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590 $as_echo_n "checking for $ac_word... " >&6; }
5591 if ${ac_cv_path_CP+:} false; then :
5592   $as_echo_n "(cached) " >&6
5593 else
5594   case $CP in
5595   [\\/]* | ?:[\\/]*)
5596   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5597   ;;
5598   *)
5599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600 for as_dir in $PATH
5601 do
5602   IFS=$as_save_IFS
5603   test -z "$as_dir" && as_dir=.
5604     for ac_exec_ext in '' $ac_executable_extensions; do
5605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5606     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608     break 2
5609   fi
5610 done
5611   done
5612 IFS=$as_save_IFS
5613 
5614   ;;
5615 esac
5616 fi
5617 CP=$ac_cv_path_CP
5618 if test -n "$CP"; then
5619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5620 $as_echo "$CP" >&6; }
5621 else
5622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623 $as_echo "no" >&6; }
5624 fi
5625 
5626 
5627   test -n "$CP" && break
5628 done
5629 
5630   else
5631     # The variable is set, but is it from the command line or the environment?
5632 
5633     # Try to remove the string !CP! from our list.
5634     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5635     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5636       # If it failed, the variable was not from the command line. Ignore it,
5637       # but warn the user (except for BASH, which is always set by the calling BASH).
5638       if test "xCP" != xBASH; then
5639         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5640 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5641       fi
5642       # Try to locate tool using the code snippet
5643       for ac_prog in cp
5644 do
5645   # Extract the first word of "$ac_prog", so it can be a program name with args.
5646 set dummy $ac_prog; ac_word=$2
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5648 $as_echo_n "checking for $ac_word... " >&6; }
5649 if ${ac_cv_path_CP+:} false; then :
5650   $as_echo_n "(cached) " >&6
5651 else
5652   case $CP in
5653   [\\/]* | ?:[\\/]*)
5654   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5655   ;;
5656   *)
5657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5658 for as_dir in $PATH
5659 do
5660   IFS=$as_save_IFS
5661   test -z "$as_dir" && as_dir=.
5662     for ac_exec_ext in '' $ac_executable_extensions; do
5663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5664     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5666     break 2
5667   fi
5668 done
5669   done
5670 IFS=$as_save_IFS
5671 
5672   ;;
5673 esac
5674 fi
5675 CP=$ac_cv_path_CP
5676 if test -n "$CP"; then
5677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5678 $as_echo "$CP" >&6; }
5679 else
5680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681 $as_echo "no" >&6; }
5682 fi
5683 
5684 
5685   test -n "$CP" && break
5686 done
5687 
5688     else
5689       # If it succeeded, then it was overridden by the user. We will use it
5690       # for the tool.
5691 
5692       # First remove it from the list of overridden variables, so we can test
5693       # for unknown variables in the end.
5694       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5695 
5696       # Check if the provided tool contains a complete path.
5697       tool_specified="$CP"
5698       tool_basename="${tool_specified##*/}"
5699       if test "x$tool_basename" = "x$tool_specified"; then
5700         # A command without a complete path is provided, search $PATH.
5701         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5702 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5703         # Extract the first word of "$tool_basename", so it can be a program name with args.
5704 set dummy $tool_basename; ac_word=$2
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5706 $as_echo_n "checking for $ac_word... " >&6; }
5707 if ${ac_cv_path_CP+:} false; then :
5708   $as_echo_n "(cached) " >&6
5709 else
5710   case $CP in
5711   [\\/]* | ?:[\\/]*)
5712   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5713   ;;
5714   *)
5715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716 for as_dir in $PATH
5717 do
5718   IFS=$as_save_IFS
5719   test -z "$as_dir" && as_dir=.
5720     for ac_exec_ext in '' $ac_executable_extensions; do
5721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5722     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5724     break 2
5725   fi
5726 done
5727   done
5728 IFS=$as_save_IFS
5729 
5730   ;;
5731 esac
5732 fi
5733 CP=$ac_cv_path_CP
5734 if test -n "$CP"; then
5735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5736 $as_echo "$CP" >&6; }
5737 else
5738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739 $as_echo "no" >&6; }
5740 fi
5741 
5742 
5743         if test "x$CP" = x; then
5744           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5745         fi
5746       else
5747         # Otherwise we believe it is a complete path. Use it as it is.
5748         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5749 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5751 $as_echo_n "checking for CP... " >&6; }
5752         if test ! -x "$tool_specified"; then
5753           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5754 $as_echo "not found" >&6; }
5755           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5756         fi
5757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5758 $as_echo "$tool_specified" >&6; }
5759       fi
5760     fi
5761   fi
5762 
5763 
5764 
5765   if test "x$CP" = x; then
5766     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5767   fi
5768 
5769 
5770 
5771 
5772 
5773   # Publish this variable in the help.
5774 
5775 
5776   if test "x$CUT" = x; then
5777     # The variable is not set by user, try to locate tool using the code snippet
5778     for ac_prog in cut
5779 do
5780   # Extract the first word of "$ac_prog", so it can be a program name with args.
5781 set dummy $ac_prog; ac_word=$2
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783 $as_echo_n "checking for $ac_word... " >&6; }
5784 if ${ac_cv_path_CUT+:} false; then :
5785   $as_echo_n "(cached) " >&6
5786 else
5787   case $CUT in
5788   [\\/]* | ?:[\\/]*)
5789   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5790   ;;
5791   *)
5792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793 for as_dir in $PATH
5794 do
5795   IFS=$as_save_IFS
5796   test -z "$as_dir" && as_dir=.
5797     for ac_exec_ext in '' $ac_executable_extensions; do
5798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5799     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801     break 2
5802   fi
5803 done
5804   done
5805 IFS=$as_save_IFS
5806 
5807   ;;
5808 esac
5809 fi
5810 CUT=$ac_cv_path_CUT
5811 if test -n "$CUT"; then
5812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5813 $as_echo "$CUT" >&6; }
5814 else
5815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816 $as_echo "no" >&6; }
5817 fi
5818 
5819 
5820   test -n "$CUT" && break
5821 done
5822 
5823   else
5824     # The variable is set, but is it from the command line or the environment?
5825 
5826     # Try to remove the string !CUT! from our list.
5827     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5828     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5829       # If it failed, the variable was not from the command line. Ignore it,
5830       # but warn the user (except for BASH, which is always set by the calling BASH).
5831       if test "xCUT" != xBASH; then
5832         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5833 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5834       fi
5835       # Try to locate tool using the code snippet
5836       for ac_prog in cut
5837 do
5838   # Extract the first word of "$ac_prog", so it can be a program name with args.
5839 set dummy $ac_prog; ac_word=$2
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841 $as_echo_n "checking for $ac_word... " >&6; }
5842 if ${ac_cv_path_CUT+:} false; then :
5843   $as_echo_n "(cached) " >&6
5844 else
5845   case $CUT in
5846   [\\/]* | ?:[\\/]*)
5847   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5848   ;;
5849   *)
5850   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5851 for as_dir in $PATH
5852 do
5853   IFS=$as_save_IFS
5854   test -z "$as_dir" && as_dir=.
5855     for ac_exec_ext in '' $ac_executable_extensions; do
5856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5857     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5859     break 2
5860   fi
5861 done
5862   done
5863 IFS=$as_save_IFS
5864 
5865   ;;
5866 esac
5867 fi
5868 CUT=$ac_cv_path_CUT
5869 if test -n "$CUT"; then
5870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5871 $as_echo "$CUT" >&6; }
5872 else
5873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874 $as_echo "no" >&6; }
5875 fi
5876 
5877 
5878   test -n "$CUT" && break
5879 done
5880 
5881     else
5882       # If it succeeded, then it was overridden by the user. We will use it
5883       # for the tool.
5884 
5885       # First remove it from the list of overridden variables, so we can test
5886       # for unknown variables in the end.
5887       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5888 
5889       # Check if the provided tool contains a complete path.
5890       tool_specified="$CUT"
5891       tool_basename="${tool_specified##*/}"
5892       if test "x$tool_basename" = "x$tool_specified"; then
5893         # A command without a complete path is provided, search $PATH.
5894         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5895 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5896         # Extract the first word of "$tool_basename", so it can be a program name with args.
5897 set dummy $tool_basename; ac_word=$2
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899 $as_echo_n "checking for $ac_word... " >&6; }
5900 if ${ac_cv_path_CUT+:} false; then :
5901   $as_echo_n "(cached) " >&6
5902 else
5903   case $CUT in
5904   [\\/]* | ?:[\\/]*)
5905   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5906   ;;
5907   *)
5908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909 for as_dir in $PATH
5910 do
5911   IFS=$as_save_IFS
5912   test -z "$as_dir" && as_dir=.
5913     for ac_exec_ext in '' $ac_executable_extensions; do
5914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917     break 2
5918   fi
5919 done
5920   done
5921 IFS=$as_save_IFS
5922 
5923   ;;
5924 esac
5925 fi
5926 CUT=$ac_cv_path_CUT
5927 if test -n "$CUT"; then
5928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5929 $as_echo "$CUT" >&6; }
5930 else
5931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932 $as_echo "no" >&6; }
5933 fi
5934 
5935 
5936         if test "x$CUT" = x; then
5937           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5938         fi
5939       else
5940         # Otherwise we believe it is a complete path. Use it as it is.
5941         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5942 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5943         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5944 $as_echo_n "checking for CUT... " >&6; }
5945         if test ! -x "$tool_specified"; then
5946           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5947 $as_echo "not found" >&6; }
5948           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5949         fi
5950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5951 $as_echo "$tool_specified" >&6; }
5952       fi
5953     fi
5954   fi
5955 
5956 
5957 
5958   if test "x$CUT" = x; then
5959     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5960   fi
5961 
5962 
5963 
5964 
5965 
5966   # Publish this variable in the help.
5967 
5968 
5969   if test "x$DATE" = x; then
5970     # The variable is not set by user, try to locate tool using the code snippet
5971     for ac_prog in date
5972 do
5973   # Extract the first word of "$ac_prog", so it can be a program name with args.
5974 set dummy $ac_prog; ac_word=$2
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976 $as_echo_n "checking for $ac_word... " >&6; }
5977 if ${ac_cv_path_DATE+:} false; then :
5978   $as_echo_n "(cached) " >&6
5979 else
5980   case $DATE in
5981   [\\/]* | ?:[\\/]*)
5982   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5983   ;;
5984   *)
5985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986 for as_dir in $PATH
5987 do
5988   IFS=$as_save_IFS
5989   test -z "$as_dir" && as_dir=.
5990     for ac_exec_ext in '' $ac_executable_extensions; do
5991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5992     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5994     break 2
5995   fi
5996 done
5997   done
5998 IFS=$as_save_IFS
5999 
6000   ;;
6001 esac
6002 fi
6003 DATE=$ac_cv_path_DATE
6004 if test -n "$DATE"; then
6005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6006 $as_echo "$DATE" >&6; }
6007 else
6008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009 $as_echo "no" >&6; }
6010 fi
6011 
6012 
6013   test -n "$DATE" && break
6014 done
6015 
6016   else
6017     # The variable is set, but is it from the command line or the environment?
6018 
6019     # Try to remove the string !DATE! from our list.
6020     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6021     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6022       # If it failed, the variable was not from the command line. Ignore it,
6023       # but warn the user (except for BASH, which is always set by the calling BASH).
6024       if test "xDATE" != xBASH; then
6025         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6026 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6027       fi
6028       # Try to locate tool using the code snippet
6029       for ac_prog in date
6030 do
6031   # Extract the first word of "$ac_prog", so it can be a program name with args.
6032 set dummy $ac_prog; ac_word=$2
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6034 $as_echo_n "checking for $ac_word... " >&6; }
6035 if ${ac_cv_path_DATE+:} false; then :
6036   $as_echo_n "(cached) " >&6
6037 else
6038   case $DATE in
6039   [\\/]* | ?:[\\/]*)
6040   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6041   ;;
6042   *)
6043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044 for as_dir in $PATH
6045 do
6046   IFS=$as_save_IFS
6047   test -z "$as_dir" && as_dir=.
6048     for ac_exec_ext in '' $ac_executable_extensions; do
6049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052     break 2
6053   fi
6054 done
6055   done
6056 IFS=$as_save_IFS
6057 
6058   ;;
6059 esac
6060 fi
6061 DATE=$ac_cv_path_DATE
6062 if test -n "$DATE"; then
6063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6064 $as_echo "$DATE" >&6; }
6065 else
6066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067 $as_echo "no" >&6; }
6068 fi
6069 
6070 
6071   test -n "$DATE" && break
6072 done
6073 
6074     else
6075       # If it succeeded, then it was overridden by the user. We will use it
6076       # for the tool.
6077 
6078       # First remove it from the list of overridden variables, so we can test
6079       # for unknown variables in the end.
6080       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6081 
6082       # Check if the provided tool contains a complete path.
6083       tool_specified="$DATE"
6084       tool_basename="${tool_specified##*/}"
6085       if test "x$tool_basename" = "x$tool_specified"; then
6086         # A command without a complete path is provided, search $PATH.
6087         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6088 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6089         # Extract the first word of "$tool_basename", so it can be a program name with args.
6090 set dummy $tool_basename; ac_word=$2
6091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092 $as_echo_n "checking for $ac_word... " >&6; }
6093 if ${ac_cv_path_DATE+:} false; then :
6094   $as_echo_n "(cached) " >&6
6095 else
6096   case $DATE in
6097   [\\/]* | ?:[\\/]*)
6098   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6099   ;;
6100   *)
6101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102 for as_dir in $PATH
6103 do
6104   IFS=$as_save_IFS
6105   test -z "$as_dir" && as_dir=.
6106     for ac_exec_ext in '' $ac_executable_extensions; do
6107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6108     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110     break 2
6111   fi
6112 done
6113   done
6114 IFS=$as_save_IFS
6115 
6116   ;;
6117 esac
6118 fi
6119 DATE=$ac_cv_path_DATE
6120 if test -n "$DATE"; then
6121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6122 $as_echo "$DATE" >&6; }
6123 else
6124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125 $as_echo "no" >&6; }
6126 fi
6127 
6128 
6129         if test "x$DATE" = x; then
6130           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6131         fi
6132       else
6133         # Otherwise we believe it is a complete path. Use it as it is.
6134         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6135 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6137 $as_echo_n "checking for DATE... " >&6; }
6138         if test ! -x "$tool_specified"; then
6139           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6140 $as_echo "not found" >&6; }
6141           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6142         fi
6143         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6144 $as_echo "$tool_specified" >&6; }
6145       fi
6146     fi
6147   fi
6148 
6149 
6150 
6151   if test "x$DATE" = x; then
6152     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6153   fi
6154 
6155 
6156 
6157 
6158 
6159   # Publish this variable in the help.
6160 
6161 
6162   if test "x$DIFF" = x; then
6163     # The variable is not set by user, try to locate tool using the code snippet
6164     for ac_prog in gdiff diff
6165 do
6166   # Extract the first word of "$ac_prog", so it can be a program name with args.
6167 set dummy $ac_prog; ac_word=$2
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6169 $as_echo_n "checking for $ac_word... " >&6; }
6170 if ${ac_cv_path_DIFF+:} false; then :
6171   $as_echo_n "(cached) " >&6
6172 else
6173   case $DIFF in
6174   [\\/]* | ?:[\\/]*)
6175   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6176   ;;
6177   *)
6178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6179 for as_dir in $PATH
6180 do
6181   IFS=$as_save_IFS
6182   test -z "$as_dir" && as_dir=.
6183     for ac_exec_ext in '' $ac_executable_extensions; do
6184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6185     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6187     break 2
6188   fi
6189 done
6190   done
6191 IFS=$as_save_IFS
6192 
6193   ;;
6194 esac
6195 fi
6196 DIFF=$ac_cv_path_DIFF
6197 if test -n "$DIFF"; then
6198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6199 $as_echo "$DIFF" >&6; }
6200 else
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202 $as_echo "no" >&6; }
6203 fi
6204 
6205 
6206   test -n "$DIFF" && break
6207 done
6208 
6209   else
6210     # The variable is set, but is it from the command line or the environment?
6211 
6212     # Try to remove the string !DIFF! from our list.
6213     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6214     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6215       # If it failed, the variable was not from the command line. Ignore it,
6216       # but warn the user (except for BASH, which is always set by the calling BASH).
6217       if test "xDIFF" != xBASH; then
6218         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6219 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6220       fi
6221       # Try to locate tool using the code snippet
6222       for ac_prog in gdiff diff
6223 do
6224   # Extract the first word of "$ac_prog", so it can be a program name with args.
6225 set dummy $ac_prog; ac_word=$2
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6227 $as_echo_n "checking for $ac_word... " >&6; }
6228 if ${ac_cv_path_DIFF+:} false; then :
6229   $as_echo_n "(cached) " >&6
6230 else
6231   case $DIFF in
6232   [\\/]* | ?:[\\/]*)
6233   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6234   ;;
6235   *)
6236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6237 for as_dir in $PATH
6238 do
6239   IFS=$as_save_IFS
6240   test -z "$as_dir" && as_dir=.
6241     for ac_exec_ext in '' $ac_executable_extensions; do
6242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6243     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6245     break 2
6246   fi
6247 done
6248   done
6249 IFS=$as_save_IFS
6250 
6251   ;;
6252 esac
6253 fi
6254 DIFF=$ac_cv_path_DIFF
6255 if test -n "$DIFF"; then
6256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6257 $as_echo "$DIFF" >&6; }
6258 else
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260 $as_echo "no" >&6; }
6261 fi
6262 
6263 
6264   test -n "$DIFF" && break
6265 done
6266 
6267     else
6268       # If it succeeded, then it was overridden by the user. We will use it
6269       # for the tool.
6270 
6271       # First remove it from the list of overridden variables, so we can test
6272       # for unknown variables in the end.
6273       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6274 
6275       # Check if the provided tool contains a complete path.
6276       tool_specified="$DIFF"
6277       tool_basename="${tool_specified##*/}"
6278       if test "x$tool_basename" = "x$tool_specified"; then
6279         # A command without a complete path is provided, search $PATH.
6280         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6281 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6282         # Extract the first word of "$tool_basename", so it can be a program name with args.
6283 set dummy $tool_basename; ac_word=$2
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6285 $as_echo_n "checking for $ac_word... " >&6; }
6286 if ${ac_cv_path_DIFF+:} false; then :
6287   $as_echo_n "(cached) " >&6
6288 else
6289   case $DIFF in
6290   [\\/]* | ?:[\\/]*)
6291   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6292   ;;
6293   *)
6294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6295 for as_dir in $PATH
6296 do
6297   IFS=$as_save_IFS
6298   test -z "$as_dir" && as_dir=.
6299     for ac_exec_ext in '' $ac_executable_extensions; do
6300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6301     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6303     break 2
6304   fi
6305 done
6306   done
6307 IFS=$as_save_IFS
6308 
6309   ;;
6310 esac
6311 fi
6312 DIFF=$ac_cv_path_DIFF
6313 if test -n "$DIFF"; then
6314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6315 $as_echo "$DIFF" >&6; }
6316 else
6317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318 $as_echo "no" >&6; }
6319 fi
6320 
6321 
6322         if test "x$DIFF" = x; then
6323           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6324         fi
6325       else
6326         # Otherwise we believe it is a complete path. Use it as it is.
6327         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6328 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6329         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6330 $as_echo_n "checking for DIFF... " >&6; }
6331         if test ! -x "$tool_specified"; then
6332           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6333 $as_echo "not found" >&6; }
6334           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6335         fi
6336         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6337 $as_echo "$tool_specified" >&6; }
6338       fi
6339     fi
6340   fi
6341 
6342 
6343 
6344   if test "x$DIFF" = x; then
6345     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6346   fi
6347 
6348 
6349 
6350 
6351 
6352   # Publish this variable in the help.
6353 
6354 
6355   if test "x$DIRNAME" = x; then
6356     # The variable is not set by user, try to locate tool using the code snippet
6357     for ac_prog in dirname
6358 do
6359   # Extract the first word of "$ac_prog", so it can be a program name with args.
6360 set dummy $ac_prog; ac_word=$2
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6362 $as_echo_n "checking for $ac_word... " >&6; }
6363 if ${ac_cv_path_DIRNAME+:} false; then :
6364   $as_echo_n "(cached) " >&6
6365 else
6366   case $DIRNAME in
6367   [\\/]* | ?:[\\/]*)
6368   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6369   ;;
6370   *)
6371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6372 for as_dir in $PATH
6373 do
6374   IFS=$as_save_IFS
6375   test -z "$as_dir" && as_dir=.
6376     for ac_exec_ext in '' $ac_executable_extensions; do
6377   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6378     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6379     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6380     break 2
6381   fi
6382 done
6383   done
6384 IFS=$as_save_IFS
6385 
6386   ;;
6387 esac
6388 fi
6389 DIRNAME=$ac_cv_path_DIRNAME
6390 if test -n "$DIRNAME"; then
6391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6392 $as_echo "$DIRNAME" >&6; }
6393 else
6394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395 $as_echo "no" >&6; }
6396 fi
6397 
6398 
6399   test -n "$DIRNAME" && break
6400 done
6401 
6402   else
6403     # The variable is set, but is it from the command line or the environment?
6404 
6405     # Try to remove the string !DIRNAME! from our list.
6406     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6407     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6408       # If it failed, the variable was not from the command line. Ignore it,
6409       # but warn the user (except for BASH, which is always set by the calling BASH).
6410       if test "xDIRNAME" != xBASH; then
6411         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6412 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6413       fi
6414       # Try to locate tool using the code snippet
6415       for ac_prog in dirname
6416 do
6417   # Extract the first word of "$ac_prog", so it can be a program name with args.
6418 set dummy $ac_prog; ac_word=$2
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6420 $as_echo_n "checking for $ac_word... " >&6; }
6421 if ${ac_cv_path_DIRNAME+:} false; then :
6422   $as_echo_n "(cached) " >&6
6423 else
6424   case $DIRNAME in
6425   [\\/]* | ?:[\\/]*)
6426   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6427   ;;
6428   *)
6429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430 for as_dir in $PATH
6431 do
6432   IFS=$as_save_IFS
6433   test -z "$as_dir" && as_dir=.
6434     for ac_exec_ext in '' $ac_executable_extensions; do
6435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6436     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6438     break 2
6439   fi
6440 done
6441   done
6442 IFS=$as_save_IFS
6443 
6444   ;;
6445 esac
6446 fi
6447 DIRNAME=$ac_cv_path_DIRNAME
6448 if test -n "$DIRNAME"; then
6449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6450 $as_echo "$DIRNAME" >&6; }
6451 else
6452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6453 $as_echo "no" >&6; }
6454 fi
6455 
6456 
6457   test -n "$DIRNAME" && break
6458 done
6459 
6460     else
6461       # If it succeeded, then it was overridden by the user. We will use it
6462       # for the tool.
6463 
6464       # First remove it from the list of overridden variables, so we can test
6465       # for unknown variables in the end.
6466       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6467 
6468       # Check if the provided tool contains a complete path.
6469       tool_specified="$DIRNAME"
6470       tool_basename="${tool_specified##*/}"
6471       if test "x$tool_basename" = "x$tool_specified"; then
6472         # A command without a complete path is provided, search $PATH.
6473         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6474 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6475         # Extract the first word of "$tool_basename", so it can be a program name with args.
6476 set dummy $tool_basename; ac_word=$2
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478 $as_echo_n "checking for $ac_word... " >&6; }
6479 if ${ac_cv_path_DIRNAME+:} false; then :
6480   $as_echo_n "(cached) " >&6
6481 else
6482   case $DIRNAME in
6483   [\\/]* | ?:[\\/]*)
6484   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6485   ;;
6486   *)
6487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488 for as_dir in $PATH
6489 do
6490   IFS=$as_save_IFS
6491   test -z "$as_dir" && as_dir=.
6492     for ac_exec_ext in '' $ac_executable_extensions; do
6493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496     break 2
6497   fi
6498 done
6499   done
6500 IFS=$as_save_IFS
6501 
6502   ;;
6503 esac
6504 fi
6505 DIRNAME=$ac_cv_path_DIRNAME
6506 if test -n "$DIRNAME"; then
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6508 $as_echo "$DIRNAME" >&6; }
6509 else
6510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511 $as_echo "no" >&6; }
6512 fi
6513 
6514 
6515         if test "x$DIRNAME" = x; then
6516           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6517         fi
6518       else
6519         # Otherwise we believe it is a complete path. Use it as it is.
6520         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6521 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6522         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6523 $as_echo_n "checking for DIRNAME... " >&6; }
6524         if test ! -x "$tool_specified"; then
6525           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6526 $as_echo "not found" >&6; }
6527           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6528         fi
6529         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6530 $as_echo "$tool_specified" >&6; }
6531       fi
6532     fi
6533   fi
6534 
6535 
6536 
6537   if test "x$DIRNAME" = x; then
6538     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6539   fi
6540 
6541 
6542 
6543 
6544 
6545   # Publish this variable in the help.
6546 
6547 
6548   if test "x$ECHO" = x; then
6549     # The variable is not set by user, try to locate tool using the code snippet
6550     for ac_prog in echo
6551 do
6552   # Extract the first word of "$ac_prog", so it can be a program name with args.
6553 set dummy $ac_prog; ac_word=$2
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6555 $as_echo_n "checking for $ac_word... " >&6; }
6556 if ${ac_cv_path_ECHO+:} false; then :
6557   $as_echo_n "(cached) " >&6
6558 else
6559   case $ECHO in
6560   [\\/]* | ?:[\\/]*)
6561   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6562   ;;
6563   *)
6564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565 for as_dir in $PATH
6566 do
6567   IFS=$as_save_IFS
6568   test -z "$as_dir" && as_dir=.
6569     for ac_exec_ext in '' $ac_executable_extensions; do
6570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6571     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6573     break 2
6574   fi
6575 done
6576   done
6577 IFS=$as_save_IFS
6578 
6579   ;;
6580 esac
6581 fi
6582 ECHO=$ac_cv_path_ECHO
6583 if test -n "$ECHO"; then
6584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6585 $as_echo "$ECHO" >&6; }
6586 else
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588 $as_echo "no" >&6; }
6589 fi
6590 
6591 
6592   test -n "$ECHO" && break
6593 done
6594 
6595   else
6596     # The variable is set, but is it from the command line or the environment?
6597 
6598     # Try to remove the string !ECHO! from our list.
6599     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6600     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6601       # If it failed, the variable was not from the command line. Ignore it,
6602       # but warn the user (except for BASH, which is always set by the calling BASH).
6603       if test "xECHO" != xBASH; then
6604         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6605 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6606       fi
6607       # Try to locate tool using the code snippet
6608       for ac_prog in echo
6609 do
6610   # Extract the first word of "$ac_prog", so it can be a program name with args.
6611 set dummy $ac_prog; ac_word=$2
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613 $as_echo_n "checking for $ac_word... " >&6; }
6614 if ${ac_cv_path_ECHO+:} false; then :
6615   $as_echo_n "(cached) " >&6
6616 else
6617   case $ECHO in
6618   [\\/]* | ?:[\\/]*)
6619   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6620   ;;
6621   *)
6622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6623 for as_dir in $PATH
6624 do
6625   IFS=$as_save_IFS
6626   test -z "$as_dir" && as_dir=.
6627     for ac_exec_ext in '' $ac_executable_extensions; do
6628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6629     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6631     break 2
6632   fi
6633 done
6634   done
6635 IFS=$as_save_IFS
6636 
6637   ;;
6638 esac
6639 fi
6640 ECHO=$ac_cv_path_ECHO
6641 if test -n "$ECHO"; then
6642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6643 $as_echo "$ECHO" >&6; }
6644 else
6645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6646 $as_echo "no" >&6; }
6647 fi
6648 
6649 
6650   test -n "$ECHO" && break
6651 done
6652 
6653     else
6654       # If it succeeded, then it was overridden by the user. We will use it
6655       # for the tool.
6656 
6657       # First remove it from the list of overridden variables, so we can test
6658       # for unknown variables in the end.
6659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6660 
6661       # Check if the provided tool contains a complete path.
6662       tool_specified="$ECHO"
6663       tool_basename="${tool_specified##*/}"
6664       if test "x$tool_basename" = "x$tool_specified"; then
6665         # A command without a complete path is provided, search $PATH.
6666         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6667 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6668         # Extract the first word of "$tool_basename", so it can be a program name with args.
6669 set dummy $tool_basename; ac_word=$2
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671 $as_echo_n "checking for $ac_word... " >&6; }
6672 if ${ac_cv_path_ECHO+:} false; then :
6673   $as_echo_n "(cached) " >&6
6674 else
6675   case $ECHO in
6676   [\\/]* | ?:[\\/]*)
6677   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6678   ;;
6679   *)
6680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681 for as_dir in $PATH
6682 do
6683   IFS=$as_save_IFS
6684   test -z "$as_dir" && as_dir=.
6685     for ac_exec_ext in '' $ac_executable_extensions; do
6686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6687     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6689     break 2
6690   fi
6691 done
6692   done
6693 IFS=$as_save_IFS
6694 
6695   ;;
6696 esac
6697 fi
6698 ECHO=$ac_cv_path_ECHO
6699 if test -n "$ECHO"; then
6700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6701 $as_echo "$ECHO" >&6; }
6702 else
6703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6704 $as_echo "no" >&6; }
6705 fi
6706 
6707 
6708         if test "x$ECHO" = x; then
6709           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6710         fi
6711       else
6712         # Otherwise we believe it is a complete path. Use it as it is.
6713         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6714 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6715         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6716 $as_echo_n "checking for ECHO... " >&6; }
6717         if test ! -x "$tool_specified"; then
6718           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6719 $as_echo "not found" >&6; }
6720           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6721         fi
6722         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6723 $as_echo "$tool_specified" >&6; }
6724       fi
6725     fi
6726   fi
6727 
6728 
6729 
6730   if test "x$ECHO" = x; then
6731     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6732   fi
6733 
6734 
6735 
6736 
6737 
6738   # Publish this variable in the help.
6739 
6740 
6741   if test "x$EXPR" = x; then
6742     # The variable is not set by user, try to locate tool using the code snippet
6743     for ac_prog in expr
6744 do
6745   # Extract the first word of "$ac_prog", so it can be a program name with args.
6746 set dummy $ac_prog; ac_word=$2
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6748 $as_echo_n "checking for $ac_word... " >&6; }
6749 if ${ac_cv_path_EXPR+:} false; then :
6750   $as_echo_n "(cached) " >&6
6751 else
6752   case $EXPR in
6753   [\\/]* | ?:[\\/]*)
6754   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6755   ;;
6756   *)
6757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6758 for as_dir in $PATH
6759 do
6760   IFS=$as_save_IFS
6761   test -z "$as_dir" && as_dir=.
6762     for ac_exec_ext in '' $ac_executable_extensions; do
6763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6764     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6766     break 2
6767   fi
6768 done
6769   done
6770 IFS=$as_save_IFS
6771 
6772   ;;
6773 esac
6774 fi
6775 EXPR=$ac_cv_path_EXPR
6776 if test -n "$EXPR"; then
6777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6778 $as_echo "$EXPR" >&6; }
6779 else
6780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6781 $as_echo "no" >&6; }
6782 fi
6783 
6784 
6785   test -n "$EXPR" && break
6786 done
6787 
6788   else
6789     # The variable is set, but is it from the command line or the environment?
6790 
6791     # Try to remove the string !EXPR! from our list.
6792     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6793     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6794       # If it failed, the variable was not from the command line. Ignore it,
6795       # but warn the user (except for BASH, which is always set by the calling BASH).
6796       if test "xEXPR" != xBASH; then
6797         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6798 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6799       fi
6800       # Try to locate tool using the code snippet
6801       for ac_prog in expr
6802 do
6803   # Extract the first word of "$ac_prog", so it can be a program name with args.
6804 set dummy $ac_prog; ac_word=$2
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806 $as_echo_n "checking for $ac_word... " >&6; }
6807 if ${ac_cv_path_EXPR+:} false; then :
6808   $as_echo_n "(cached) " >&6
6809 else
6810   case $EXPR in
6811   [\\/]* | ?:[\\/]*)
6812   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6813   ;;
6814   *)
6815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816 for as_dir in $PATH
6817 do
6818   IFS=$as_save_IFS
6819   test -z "$as_dir" && as_dir=.
6820     for ac_exec_ext in '' $ac_executable_extensions; do
6821   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824     break 2
6825   fi
6826 done
6827   done
6828 IFS=$as_save_IFS
6829 
6830   ;;
6831 esac
6832 fi
6833 EXPR=$ac_cv_path_EXPR
6834 if test -n "$EXPR"; then
6835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6836 $as_echo "$EXPR" >&6; }
6837 else
6838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839 $as_echo "no" >&6; }
6840 fi
6841 
6842 
6843   test -n "$EXPR" && break
6844 done
6845 
6846     else
6847       # If it succeeded, then it was overridden by the user. We will use it
6848       # for the tool.
6849 
6850       # First remove it from the list of overridden variables, so we can test
6851       # for unknown variables in the end.
6852       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6853 
6854       # Check if the provided tool contains a complete path.
6855       tool_specified="$EXPR"
6856       tool_basename="${tool_specified##*/}"
6857       if test "x$tool_basename" = "x$tool_specified"; then
6858         # A command without a complete path is provided, search $PATH.
6859         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6860 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6861         # Extract the first word of "$tool_basename", so it can be a program name with args.
6862 set dummy $tool_basename; ac_word=$2
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6864 $as_echo_n "checking for $ac_word... " >&6; }
6865 if ${ac_cv_path_EXPR+:} false; then :
6866   $as_echo_n "(cached) " >&6
6867 else
6868   case $EXPR in
6869   [\\/]* | ?:[\\/]*)
6870   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6871   ;;
6872   *)
6873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6874 for as_dir in $PATH
6875 do
6876   IFS=$as_save_IFS
6877   test -z "$as_dir" && as_dir=.
6878     for ac_exec_ext in '' $ac_executable_extensions; do
6879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6880     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6882     break 2
6883   fi
6884 done
6885   done
6886 IFS=$as_save_IFS
6887 
6888   ;;
6889 esac
6890 fi
6891 EXPR=$ac_cv_path_EXPR
6892 if test -n "$EXPR"; then
6893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6894 $as_echo "$EXPR" >&6; }
6895 else
6896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897 $as_echo "no" >&6; }
6898 fi
6899 
6900 
6901         if test "x$EXPR" = x; then
6902           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6903         fi
6904       else
6905         # Otherwise we believe it is a complete path. Use it as it is.
6906         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6907 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6909 $as_echo_n "checking for EXPR... " >&6; }
6910         if test ! -x "$tool_specified"; then
6911           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6912 $as_echo "not found" >&6; }
6913           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6914         fi
6915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6916 $as_echo "$tool_specified" >&6; }
6917       fi
6918     fi
6919   fi
6920 
6921 
6922 
6923   if test "x$EXPR" = x; then
6924     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6925   fi
6926 
6927 
6928 
6929 
6930 
6931   # Publish this variable in the help.
6932 
6933 
6934   if test "x$FILE" = x; then
6935     # The variable is not set by user, try to locate tool using the code snippet
6936     for ac_prog in file
6937 do
6938   # Extract the first word of "$ac_prog", so it can be a program name with args.
6939 set dummy $ac_prog; ac_word=$2
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6941 $as_echo_n "checking for $ac_word... " >&6; }
6942 if ${ac_cv_path_FILE+:} false; then :
6943   $as_echo_n "(cached) " >&6
6944 else
6945   case $FILE in
6946   [\\/]* | ?:[\\/]*)
6947   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6948   ;;
6949   *)
6950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6951 for as_dir in $PATH
6952 do
6953   IFS=$as_save_IFS
6954   test -z "$as_dir" && as_dir=.
6955     for ac_exec_ext in '' $ac_executable_extensions; do
6956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6957     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6959     break 2
6960   fi
6961 done
6962   done
6963 IFS=$as_save_IFS
6964 
6965   ;;
6966 esac
6967 fi
6968 FILE=$ac_cv_path_FILE
6969 if test -n "$FILE"; then
6970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6971 $as_echo "$FILE" >&6; }
6972 else
6973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974 $as_echo "no" >&6; }
6975 fi
6976 
6977 
6978   test -n "$FILE" && break
6979 done
6980 
6981   else
6982     # The variable is set, but is it from the command line or the environment?
6983 
6984     # Try to remove the string !FILE! from our list.
6985     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6986     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6987       # If it failed, the variable was not from the command line. Ignore it,
6988       # but warn the user (except for BASH, which is always set by the calling BASH).
6989       if test "xFILE" != xBASH; then
6990         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6991 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6992       fi
6993       # Try to locate tool using the code snippet
6994       for ac_prog in file
6995 do
6996   # Extract the first word of "$ac_prog", so it can be a program name with args.
6997 set dummy $ac_prog; ac_word=$2
6998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999 $as_echo_n "checking for $ac_word... " >&6; }
7000 if ${ac_cv_path_FILE+:} false; then :
7001   $as_echo_n "(cached) " >&6
7002 else
7003   case $FILE in
7004   [\\/]* | ?:[\\/]*)
7005   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7006   ;;
7007   *)
7008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009 for as_dir in $PATH
7010 do
7011   IFS=$as_save_IFS
7012   test -z "$as_dir" && as_dir=.
7013     for ac_exec_ext in '' $ac_executable_extensions; do
7014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017     break 2
7018   fi
7019 done
7020   done
7021 IFS=$as_save_IFS
7022 
7023   ;;
7024 esac
7025 fi
7026 FILE=$ac_cv_path_FILE
7027 if test -n "$FILE"; then
7028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7029 $as_echo "$FILE" >&6; }
7030 else
7031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032 $as_echo "no" >&6; }
7033 fi
7034 
7035 
7036   test -n "$FILE" && break
7037 done
7038 
7039     else
7040       # If it succeeded, then it was overridden by the user. We will use it
7041       # for the tool.
7042 
7043       # First remove it from the list of overridden variables, so we can test
7044       # for unknown variables in the end.
7045       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7046 
7047       # Check if the provided tool contains a complete path.
7048       tool_specified="$FILE"
7049       tool_basename="${tool_specified##*/}"
7050       if test "x$tool_basename" = "x$tool_specified"; then
7051         # A command without a complete path is provided, search $PATH.
7052         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7053 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7054         # Extract the first word of "$tool_basename", so it can be a program name with args.
7055 set dummy $tool_basename; ac_word=$2
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7057 $as_echo_n "checking for $ac_word... " >&6; }
7058 if ${ac_cv_path_FILE+:} false; then :
7059   $as_echo_n "(cached) " >&6
7060 else
7061   case $FILE in
7062   [\\/]* | ?:[\\/]*)
7063   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7064   ;;
7065   *)
7066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067 for as_dir in $PATH
7068 do
7069   IFS=$as_save_IFS
7070   test -z "$as_dir" && as_dir=.
7071     for ac_exec_ext in '' $ac_executable_extensions; do
7072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7073     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7075     break 2
7076   fi
7077 done
7078   done
7079 IFS=$as_save_IFS
7080 
7081   ;;
7082 esac
7083 fi
7084 FILE=$ac_cv_path_FILE
7085 if test -n "$FILE"; then
7086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7087 $as_echo "$FILE" >&6; }
7088 else
7089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7090 $as_echo "no" >&6; }
7091 fi
7092 
7093 
7094         if test "x$FILE" = x; then
7095           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7096         fi
7097       else
7098         # Otherwise we believe it is a complete path. Use it as it is.
7099         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7100 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7101         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7102 $as_echo_n "checking for FILE... " >&6; }
7103         if test ! -x "$tool_specified"; then
7104           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7105 $as_echo "not found" >&6; }
7106           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7107         fi
7108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7109 $as_echo "$tool_specified" >&6; }
7110       fi
7111     fi
7112   fi
7113 
7114 
7115 
7116   if test "x$FILE" = x; then
7117     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7118   fi
7119 
7120 
7121 
7122 
7123 
7124   # Publish this variable in the help.
7125 
7126 
7127   if test "x$FIND" = x; then
7128     # The variable is not set by user, try to locate tool using the code snippet
7129     for ac_prog in find
7130 do
7131   # Extract the first word of "$ac_prog", so it can be a program name with args.
7132 set dummy $ac_prog; ac_word=$2
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7134 $as_echo_n "checking for $ac_word... " >&6; }
7135 if ${ac_cv_path_FIND+:} false; then :
7136   $as_echo_n "(cached) " >&6
7137 else
7138   case $FIND in
7139   [\\/]* | ?:[\\/]*)
7140   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7141   ;;
7142   *)
7143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7144 for as_dir in $PATH
7145 do
7146   IFS=$as_save_IFS
7147   test -z "$as_dir" && as_dir=.
7148     for ac_exec_ext in '' $ac_executable_extensions; do
7149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7150     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7152     break 2
7153   fi
7154 done
7155   done
7156 IFS=$as_save_IFS
7157 
7158   ;;
7159 esac
7160 fi
7161 FIND=$ac_cv_path_FIND
7162 if test -n "$FIND"; then
7163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7164 $as_echo "$FIND" >&6; }
7165 else
7166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7167 $as_echo "no" >&6; }
7168 fi
7169 
7170 
7171   test -n "$FIND" && break
7172 done
7173 
7174   else
7175     # The variable is set, but is it from the command line or the environment?
7176 
7177     # Try to remove the string !FIND! from our list.
7178     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7179     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7180       # If it failed, the variable was not from the command line. Ignore it,
7181       # but warn the user (except for BASH, which is always set by the calling BASH).
7182       if test "xFIND" != xBASH; then
7183         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7184 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7185       fi
7186       # Try to locate tool using the code snippet
7187       for ac_prog in find
7188 do
7189   # Extract the first word of "$ac_prog", so it can be a program name with args.
7190 set dummy $ac_prog; ac_word=$2
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192 $as_echo_n "checking for $ac_word... " >&6; }
7193 if ${ac_cv_path_FIND+:} false; then :
7194   $as_echo_n "(cached) " >&6
7195 else
7196   case $FIND in
7197   [\\/]* | ?:[\\/]*)
7198   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7199   ;;
7200   *)
7201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202 for as_dir in $PATH
7203 do
7204   IFS=$as_save_IFS
7205   test -z "$as_dir" && as_dir=.
7206     for ac_exec_ext in '' $ac_executable_extensions; do
7207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210     break 2
7211   fi
7212 done
7213   done
7214 IFS=$as_save_IFS
7215 
7216   ;;
7217 esac
7218 fi
7219 FIND=$ac_cv_path_FIND
7220 if test -n "$FIND"; then
7221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7222 $as_echo "$FIND" >&6; }
7223 else
7224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225 $as_echo "no" >&6; }
7226 fi
7227 
7228 
7229   test -n "$FIND" && break
7230 done
7231 
7232     else
7233       # If it succeeded, then it was overridden by the user. We will use it
7234       # for the tool.
7235 
7236       # First remove it from the list of overridden variables, so we can test
7237       # for unknown variables in the end.
7238       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7239 
7240       # Check if the provided tool contains a complete path.
7241       tool_specified="$FIND"
7242       tool_basename="${tool_specified##*/}"
7243       if test "x$tool_basename" = "x$tool_specified"; then
7244         # A command without a complete path is provided, search $PATH.
7245         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7246 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7247         # Extract the first word of "$tool_basename", so it can be a program name with args.
7248 set dummy $tool_basename; ac_word=$2
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250 $as_echo_n "checking for $ac_word... " >&6; }
7251 if ${ac_cv_path_FIND+:} false; then :
7252   $as_echo_n "(cached) " >&6
7253 else
7254   case $FIND in
7255   [\\/]* | ?:[\\/]*)
7256   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7257   ;;
7258   *)
7259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260 for as_dir in $PATH
7261 do
7262   IFS=$as_save_IFS
7263   test -z "$as_dir" && as_dir=.
7264     for ac_exec_ext in '' $ac_executable_extensions; do
7265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268     break 2
7269   fi
7270 done
7271   done
7272 IFS=$as_save_IFS
7273 
7274   ;;
7275 esac
7276 fi
7277 FIND=$ac_cv_path_FIND
7278 if test -n "$FIND"; then
7279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7280 $as_echo "$FIND" >&6; }
7281 else
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283 $as_echo "no" >&6; }
7284 fi
7285 
7286 
7287         if test "x$FIND" = x; then
7288           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7289         fi
7290       else
7291         # Otherwise we believe it is a complete path. Use it as it is.
7292         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7293 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7294         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7295 $as_echo_n "checking for FIND... " >&6; }
7296         if test ! -x "$tool_specified"; then
7297           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7298 $as_echo "not found" >&6; }
7299           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7300         fi
7301         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7302 $as_echo "$tool_specified" >&6; }
7303       fi
7304     fi
7305   fi
7306 
7307 
7308 
7309   if test "x$FIND" = x; then
7310     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7311   fi
7312 
7313 
7314 
7315 
7316 
7317   # Publish this variable in the help.
7318 
7319 
7320   if test "x$HEAD" = x; then
7321     # The variable is not set by user, try to locate tool using the code snippet
7322     for ac_prog in head
7323 do
7324   # Extract the first word of "$ac_prog", so it can be a program name with args.
7325 set dummy $ac_prog; ac_word=$2
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7327 $as_echo_n "checking for $ac_word... " >&6; }
7328 if ${ac_cv_path_HEAD+:} false; then :
7329   $as_echo_n "(cached) " >&6
7330 else
7331   case $HEAD in
7332   [\\/]* | ?:[\\/]*)
7333   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7334   ;;
7335   *)
7336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7337 for as_dir in $PATH
7338 do
7339   IFS=$as_save_IFS
7340   test -z "$as_dir" && as_dir=.
7341     for ac_exec_ext in '' $ac_executable_extensions; do
7342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7343     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7345     break 2
7346   fi
7347 done
7348   done
7349 IFS=$as_save_IFS
7350 
7351   ;;
7352 esac
7353 fi
7354 HEAD=$ac_cv_path_HEAD
7355 if test -n "$HEAD"; then
7356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7357 $as_echo "$HEAD" >&6; }
7358 else
7359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7360 $as_echo "no" >&6; }
7361 fi
7362 
7363 
7364   test -n "$HEAD" && break
7365 done
7366 
7367   else
7368     # The variable is set, but is it from the command line or the environment?
7369 
7370     # Try to remove the string !HEAD! from our list.
7371     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7372     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7373       # If it failed, the variable was not from the command line. Ignore it,
7374       # but warn the user (except for BASH, which is always set by the calling BASH).
7375       if test "xHEAD" != xBASH; then
7376         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7377 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7378       fi
7379       # Try to locate tool using the code snippet
7380       for ac_prog in head
7381 do
7382   # Extract the first word of "$ac_prog", so it can be a program name with args.
7383 set dummy $ac_prog; ac_word=$2
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7385 $as_echo_n "checking for $ac_word... " >&6; }
7386 if ${ac_cv_path_HEAD+:} false; then :
7387   $as_echo_n "(cached) " >&6
7388 else
7389   case $HEAD in
7390   [\\/]* | ?:[\\/]*)
7391   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7392   ;;
7393   *)
7394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395 for as_dir in $PATH
7396 do
7397   IFS=$as_save_IFS
7398   test -z "$as_dir" && as_dir=.
7399     for ac_exec_ext in '' $ac_executable_extensions; do
7400   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403     break 2
7404   fi
7405 done
7406   done
7407 IFS=$as_save_IFS
7408 
7409   ;;
7410 esac
7411 fi
7412 HEAD=$ac_cv_path_HEAD
7413 if test -n "$HEAD"; then
7414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7415 $as_echo "$HEAD" >&6; }
7416 else
7417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7418 $as_echo "no" >&6; }
7419 fi
7420 
7421 
7422   test -n "$HEAD" && break
7423 done
7424 
7425     else
7426       # If it succeeded, then it was overridden by the user. We will use it
7427       # for the tool.
7428 
7429       # First remove it from the list of overridden variables, so we can test
7430       # for unknown variables in the end.
7431       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7432 
7433       # Check if the provided tool contains a complete path.
7434       tool_specified="$HEAD"
7435       tool_basename="${tool_specified##*/}"
7436       if test "x$tool_basename" = "x$tool_specified"; then
7437         # A command without a complete path is provided, search $PATH.
7438         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7439 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7440         # Extract the first word of "$tool_basename", so it can be a program name with args.
7441 set dummy $tool_basename; ac_word=$2
7442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7443 $as_echo_n "checking for $ac_word... " >&6; }
7444 if ${ac_cv_path_HEAD+:} false; then :
7445   $as_echo_n "(cached) " >&6
7446 else
7447   case $HEAD in
7448   [\\/]* | ?:[\\/]*)
7449   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7450   ;;
7451   *)
7452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7453 for as_dir in $PATH
7454 do
7455   IFS=$as_save_IFS
7456   test -z "$as_dir" && as_dir=.
7457     for ac_exec_ext in '' $ac_executable_extensions; do
7458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7459     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7461     break 2
7462   fi
7463 done
7464   done
7465 IFS=$as_save_IFS
7466 
7467   ;;
7468 esac
7469 fi
7470 HEAD=$ac_cv_path_HEAD
7471 if test -n "$HEAD"; then
7472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7473 $as_echo "$HEAD" >&6; }
7474 else
7475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7476 $as_echo "no" >&6; }
7477 fi
7478 
7479 
7480         if test "x$HEAD" = x; then
7481           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7482         fi
7483       else
7484         # Otherwise we believe it is a complete path. Use it as it is.
7485         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7486 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7487         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7488 $as_echo_n "checking for HEAD... " >&6; }
7489         if test ! -x "$tool_specified"; then
7490           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7491 $as_echo "not found" >&6; }
7492           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7493         fi
7494         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7495 $as_echo "$tool_specified" >&6; }
7496       fi
7497     fi
7498   fi
7499 
7500 
7501 
7502   if test "x$HEAD" = x; then
7503     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7504   fi
7505 
7506 
7507 
7508 
7509 
7510   # Publish this variable in the help.
7511 
7512 
7513   if test "x$LN" = x; then
7514     # The variable is not set by user, try to locate tool using the code snippet
7515     for ac_prog in ln
7516 do
7517   # Extract the first word of "$ac_prog", so it can be a program name with args.
7518 set dummy $ac_prog; ac_word=$2
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7520 $as_echo_n "checking for $ac_word... " >&6; }
7521 if ${ac_cv_path_LN+:} false; then :
7522   $as_echo_n "(cached) " >&6
7523 else
7524   case $LN in
7525   [\\/]* | ?:[\\/]*)
7526   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7527   ;;
7528   *)
7529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7530 for as_dir in $PATH
7531 do
7532   IFS=$as_save_IFS
7533   test -z "$as_dir" && as_dir=.
7534     for ac_exec_ext in '' $ac_executable_extensions; do
7535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7536     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7538     break 2
7539   fi
7540 done
7541   done
7542 IFS=$as_save_IFS
7543 
7544   ;;
7545 esac
7546 fi
7547 LN=$ac_cv_path_LN
7548 if test -n "$LN"; then
7549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7550 $as_echo "$LN" >&6; }
7551 else
7552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7553 $as_echo "no" >&6; }
7554 fi
7555 
7556 
7557   test -n "$LN" && break
7558 done
7559 
7560   else
7561     # The variable is set, but is it from the command line or the environment?
7562 
7563     # Try to remove the string !LN! from our list.
7564     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7565     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7566       # If it failed, the variable was not from the command line. Ignore it,
7567       # but warn the user (except for BASH, which is always set by the calling BASH).
7568       if test "xLN" != xBASH; then
7569         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7570 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7571       fi
7572       # Try to locate tool using the code snippet
7573       for ac_prog in ln
7574 do
7575   # Extract the first word of "$ac_prog", so it can be a program name with args.
7576 set dummy $ac_prog; ac_word=$2
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578 $as_echo_n "checking for $ac_word... " >&6; }
7579 if ${ac_cv_path_LN+:} false; then :
7580   $as_echo_n "(cached) " >&6
7581 else
7582   case $LN in
7583   [\\/]* | ?:[\\/]*)
7584   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7585   ;;
7586   *)
7587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588 for as_dir in $PATH
7589 do
7590   IFS=$as_save_IFS
7591   test -z "$as_dir" && as_dir=.
7592     for ac_exec_ext in '' $ac_executable_extensions; do
7593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596     break 2
7597   fi
7598 done
7599   done
7600 IFS=$as_save_IFS
7601 
7602   ;;
7603 esac
7604 fi
7605 LN=$ac_cv_path_LN
7606 if test -n "$LN"; then
7607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7608 $as_echo "$LN" >&6; }
7609 else
7610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611 $as_echo "no" >&6; }
7612 fi
7613 
7614 
7615   test -n "$LN" && break
7616 done
7617 
7618     else
7619       # If it succeeded, then it was overridden by the user. We will use it
7620       # for the tool.
7621 
7622       # First remove it from the list of overridden variables, so we can test
7623       # for unknown variables in the end.
7624       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7625 
7626       # Check if the provided tool contains a complete path.
7627       tool_specified="$LN"
7628       tool_basename="${tool_specified##*/}"
7629       if test "x$tool_basename" = "x$tool_specified"; then
7630         # A command without a complete path is provided, search $PATH.
7631         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7632 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7633         # Extract the first word of "$tool_basename", so it can be a program name with args.
7634 set dummy $tool_basename; ac_word=$2
7635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7636 $as_echo_n "checking for $ac_word... " >&6; }
7637 if ${ac_cv_path_LN+:} false; then :
7638   $as_echo_n "(cached) " >&6
7639 else
7640   case $LN in
7641   [\\/]* | ?:[\\/]*)
7642   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7643   ;;
7644   *)
7645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7646 for as_dir in $PATH
7647 do
7648   IFS=$as_save_IFS
7649   test -z "$as_dir" && as_dir=.
7650     for ac_exec_ext in '' $ac_executable_extensions; do
7651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7652     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7654     break 2
7655   fi
7656 done
7657   done
7658 IFS=$as_save_IFS
7659 
7660   ;;
7661 esac
7662 fi
7663 LN=$ac_cv_path_LN
7664 if test -n "$LN"; then
7665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7666 $as_echo "$LN" >&6; }
7667 else
7668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669 $as_echo "no" >&6; }
7670 fi
7671 
7672 
7673         if test "x$LN" = x; then
7674           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7675         fi
7676       else
7677         # Otherwise we believe it is a complete path. Use it as it is.
7678         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7679 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7680         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7681 $as_echo_n "checking for LN... " >&6; }
7682         if test ! -x "$tool_specified"; then
7683           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7684 $as_echo "not found" >&6; }
7685           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7686         fi
7687         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7688 $as_echo "$tool_specified" >&6; }
7689       fi
7690     fi
7691   fi
7692 
7693 
7694 
7695   if test "x$LN" = x; then
7696     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7697   fi
7698 
7699 
7700 
7701 
7702 
7703   # Publish this variable in the help.
7704 
7705 
7706   if test "x$LS" = x; then
7707     # The variable is not set by user, try to locate tool using the code snippet
7708     for ac_prog in ls
7709 do
7710   # Extract the first word of "$ac_prog", so it can be a program name with args.
7711 set dummy $ac_prog; ac_word=$2
7712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7713 $as_echo_n "checking for $ac_word... " >&6; }
7714 if ${ac_cv_path_LS+:} false; then :
7715   $as_echo_n "(cached) " >&6
7716 else
7717   case $LS in
7718   [\\/]* | ?:[\\/]*)
7719   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7720   ;;
7721   *)
7722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7723 for as_dir in $PATH
7724 do
7725   IFS=$as_save_IFS
7726   test -z "$as_dir" && as_dir=.
7727     for ac_exec_ext in '' $ac_executable_extensions; do
7728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7729     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7731     break 2
7732   fi
7733 done
7734   done
7735 IFS=$as_save_IFS
7736 
7737   ;;
7738 esac
7739 fi
7740 LS=$ac_cv_path_LS
7741 if test -n "$LS"; then
7742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7743 $as_echo "$LS" >&6; }
7744 else
7745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7746 $as_echo "no" >&6; }
7747 fi
7748 
7749 
7750   test -n "$LS" && break
7751 done
7752 
7753   else
7754     # The variable is set, but is it from the command line or the environment?
7755 
7756     # Try to remove the string !LS! from our list.
7757     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7758     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7759       # If it failed, the variable was not from the command line. Ignore it,
7760       # but warn the user (except for BASH, which is always set by the calling BASH).
7761       if test "xLS" != xBASH; then
7762         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7763 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7764       fi
7765       # Try to locate tool using the code snippet
7766       for ac_prog in ls
7767 do
7768   # Extract the first word of "$ac_prog", so it can be a program name with args.
7769 set dummy $ac_prog; ac_word=$2
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7771 $as_echo_n "checking for $ac_word... " >&6; }
7772 if ${ac_cv_path_LS+:} false; then :
7773   $as_echo_n "(cached) " >&6
7774 else
7775   case $LS in
7776   [\\/]* | ?:[\\/]*)
7777   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7778   ;;
7779   *)
7780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781 for as_dir in $PATH
7782 do
7783   IFS=$as_save_IFS
7784   test -z "$as_dir" && as_dir=.
7785     for ac_exec_ext in '' $ac_executable_extensions; do
7786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7787     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7789     break 2
7790   fi
7791 done
7792   done
7793 IFS=$as_save_IFS
7794 
7795   ;;
7796 esac
7797 fi
7798 LS=$ac_cv_path_LS
7799 if test -n "$LS"; then
7800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7801 $as_echo "$LS" >&6; }
7802 else
7803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804 $as_echo "no" >&6; }
7805 fi
7806 
7807 
7808   test -n "$LS" && break
7809 done
7810 
7811     else
7812       # If it succeeded, then it was overridden by the user. We will use it
7813       # for the tool.
7814 
7815       # First remove it from the list of overridden variables, so we can test
7816       # for unknown variables in the end.
7817       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7818 
7819       # Check if the provided tool contains a complete path.
7820       tool_specified="$LS"
7821       tool_basename="${tool_specified##*/}"
7822       if test "x$tool_basename" = "x$tool_specified"; then
7823         # A command without a complete path is provided, search $PATH.
7824         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7825 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7826         # Extract the first word of "$tool_basename", so it can be a program name with args.
7827 set dummy $tool_basename; ac_word=$2
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7829 $as_echo_n "checking for $ac_word... " >&6; }
7830 if ${ac_cv_path_LS+:} false; then :
7831   $as_echo_n "(cached) " >&6
7832 else
7833   case $LS in
7834   [\\/]* | ?:[\\/]*)
7835   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7836   ;;
7837   *)
7838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7839 for as_dir in $PATH
7840 do
7841   IFS=$as_save_IFS
7842   test -z "$as_dir" && as_dir=.
7843     for ac_exec_ext in '' $ac_executable_extensions; do
7844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7845     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7847     break 2
7848   fi
7849 done
7850   done
7851 IFS=$as_save_IFS
7852 
7853   ;;
7854 esac
7855 fi
7856 LS=$ac_cv_path_LS
7857 if test -n "$LS"; then
7858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7859 $as_echo "$LS" >&6; }
7860 else
7861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862 $as_echo "no" >&6; }
7863 fi
7864 
7865 
7866         if test "x$LS" = x; then
7867           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7868         fi
7869       else
7870         # Otherwise we believe it is a complete path. Use it as it is.
7871         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7872 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7874 $as_echo_n "checking for LS... " >&6; }
7875         if test ! -x "$tool_specified"; then
7876           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7877 $as_echo "not found" >&6; }
7878           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7879         fi
7880         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7881 $as_echo "$tool_specified" >&6; }
7882       fi
7883     fi
7884   fi
7885 
7886 
7887 
7888   if test "x$LS" = x; then
7889     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7890   fi
7891 
7892 
7893 
7894 
7895 
7896   # Publish this variable in the help.
7897 
7898 
7899   if test "x$MKDIR" = x; then
7900     # The variable is not set by user, try to locate tool using the code snippet
7901     for ac_prog in mkdir
7902 do
7903   # Extract the first word of "$ac_prog", so it can be a program name with args.
7904 set dummy $ac_prog; ac_word=$2
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906 $as_echo_n "checking for $ac_word... " >&6; }
7907 if ${ac_cv_path_MKDIR+:} false; then :
7908   $as_echo_n "(cached) " >&6
7909 else
7910   case $MKDIR in
7911   [\\/]* | ?:[\\/]*)
7912   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7913   ;;
7914   *)
7915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916 for as_dir in $PATH
7917 do
7918   IFS=$as_save_IFS
7919   test -z "$as_dir" && as_dir=.
7920     for ac_exec_ext in '' $ac_executable_extensions; do
7921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924     break 2
7925   fi
7926 done
7927   done
7928 IFS=$as_save_IFS
7929 
7930   ;;
7931 esac
7932 fi
7933 MKDIR=$ac_cv_path_MKDIR
7934 if test -n "$MKDIR"; then
7935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7936 $as_echo "$MKDIR" >&6; }
7937 else
7938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939 $as_echo "no" >&6; }
7940 fi
7941 
7942 
7943   test -n "$MKDIR" && break
7944 done
7945 
7946   else
7947     # The variable is set, but is it from the command line or the environment?
7948 
7949     # Try to remove the string !MKDIR! from our list.
7950     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7951     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7952       # If it failed, the variable was not from the command line. Ignore it,
7953       # but warn the user (except for BASH, which is always set by the calling BASH).
7954       if test "xMKDIR" != xBASH; then
7955         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7956 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7957       fi
7958       # Try to locate tool using the code snippet
7959       for ac_prog in mkdir
7960 do
7961   # Extract the first word of "$ac_prog", so it can be a program name with args.
7962 set dummy $ac_prog; ac_word=$2
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964 $as_echo_n "checking for $ac_word... " >&6; }
7965 if ${ac_cv_path_MKDIR+:} false; then :
7966   $as_echo_n "(cached) " >&6
7967 else
7968   case $MKDIR in
7969   [\\/]* | ?:[\\/]*)
7970   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7971   ;;
7972   *)
7973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974 for as_dir in $PATH
7975 do
7976   IFS=$as_save_IFS
7977   test -z "$as_dir" && as_dir=.
7978     for ac_exec_ext in '' $ac_executable_extensions; do
7979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982     break 2
7983   fi
7984 done
7985   done
7986 IFS=$as_save_IFS
7987 
7988   ;;
7989 esac
7990 fi
7991 MKDIR=$ac_cv_path_MKDIR
7992 if test -n "$MKDIR"; then
7993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7994 $as_echo "$MKDIR" >&6; }
7995 else
7996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997 $as_echo "no" >&6; }
7998 fi
7999 
8000 
8001   test -n "$MKDIR" && break
8002 done
8003 
8004     else
8005       # If it succeeded, then it was overridden by the user. We will use it
8006       # for the tool.
8007 
8008       # First remove it from the list of overridden variables, so we can test
8009       # for unknown variables in the end.
8010       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8011 
8012       # Check if the provided tool contains a complete path.
8013       tool_specified="$MKDIR"
8014       tool_basename="${tool_specified##*/}"
8015       if test "x$tool_basename" = "x$tool_specified"; then
8016         # A command without a complete path is provided, search $PATH.
8017         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8018 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8019         # Extract the first word of "$tool_basename", so it can be a program name with args.
8020 set dummy $tool_basename; ac_word=$2
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8022 $as_echo_n "checking for $ac_word... " >&6; }
8023 if ${ac_cv_path_MKDIR+:} false; then :
8024   $as_echo_n "(cached) " >&6
8025 else
8026   case $MKDIR in
8027   [\\/]* | ?:[\\/]*)
8028   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8029   ;;
8030   *)
8031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8032 for as_dir in $PATH
8033 do
8034   IFS=$as_save_IFS
8035   test -z "$as_dir" && as_dir=.
8036     for ac_exec_ext in '' $ac_executable_extensions; do
8037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8038     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8040     break 2
8041   fi
8042 done
8043   done
8044 IFS=$as_save_IFS
8045 
8046   ;;
8047 esac
8048 fi
8049 MKDIR=$ac_cv_path_MKDIR
8050 if test -n "$MKDIR"; then
8051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8052 $as_echo "$MKDIR" >&6; }
8053 else
8054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055 $as_echo "no" >&6; }
8056 fi
8057 
8058 
8059         if test "x$MKDIR" = x; then
8060           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8061         fi
8062       else
8063         # Otherwise we believe it is a complete path. Use it as it is.
8064         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8065 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8066         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8067 $as_echo_n "checking for MKDIR... " >&6; }
8068         if test ! -x "$tool_specified"; then
8069           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8070 $as_echo "not found" >&6; }
8071           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8072         fi
8073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8074 $as_echo "$tool_specified" >&6; }
8075       fi
8076     fi
8077   fi
8078 
8079 
8080 
8081   if test "x$MKDIR" = x; then
8082     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8083   fi
8084 
8085 
8086 
8087 
8088 
8089   # Publish this variable in the help.
8090 
8091 
8092   if test "x$MKTEMP" = x; then
8093     # The variable is not set by user, try to locate tool using the code snippet
8094     for ac_prog in mktemp
8095 do
8096   # Extract the first word of "$ac_prog", so it can be a program name with args.
8097 set dummy $ac_prog; ac_word=$2
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8099 $as_echo_n "checking for $ac_word... " >&6; }
8100 if ${ac_cv_path_MKTEMP+:} false; then :
8101   $as_echo_n "(cached) " >&6
8102 else
8103   case $MKTEMP in
8104   [\\/]* | ?:[\\/]*)
8105   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8106   ;;
8107   *)
8108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8109 for as_dir in $PATH
8110 do
8111   IFS=$as_save_IFS
8112   test -z "$as_dir" && as_dir=.
8113     for ac_exec_ext in '' $ac_executable_extensions; do
8114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8115     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8117     break 2
8118   fi
8119 done
8120   done
8121 IFS=$as_save_IFS
8122 
8123   ;;
8124 esac
8125 fi
8126 MKTEMP=$ac_cv_path_MKTEMP
8127 if test -n "$MKTEMP"; then
8128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8129 $as_echo "$MKTEMP" >&6; }
8130 else
8131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132 $as_echo "no" >&6; }
8133 fi
8134 
8135 
8136   test -n "$MKTEMP" && break
8137 done
8138 
8139   else
8140     # The variable is set, but is it from the command line or the environment?
8141 
8142     # Try to remove the string !MKTEMP! from our list.
8143     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8144     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8145       # If it failed, the variable was not from the command line. Ignore it,
8146       # but warn the user (except for BASH, which is always set by the calling BASH).
8147       if test "xMKTEMP" != xBASH; then
8148         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8149 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8150       fi
8151       # Try to locate tool using the code snippet
8152       for ac_prog in mktemp
8153 do
8154   # Extract the first word of "$ac_prog", so it can be a program name with args.
8155 set dummy $ac_prog; ac_word=$2
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157 $as_echo_n "checking for $ac_word... " >&6; }
8158 if ${ac_cv_path_MKTEMP+:} false; then :
8159   $as_echo_n "(cached) " >&6
8160 else
8161   case $MKTEMP in
8162   [\\/]* | ?:[\\/]*)
8163   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8164   ;;
8165   *)
8166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167 for as_dir in $PATH
8168 do
8169   IFS=$as_save_IFS
8170   test -z "$as_dir" && as_dir=.
8171     for ac_exec_ext in '' $ac_executable_extensions; do
8172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8173     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8175     break 2
8176   fi
8177 done
8178   done
8179 IFS=$as_save_IFS
8180 
8181   ;;
8182 esac
8183 fi
8184 MKTEMP=$ac_cv_path_MKTEMP
8185 if test -n "$MKTEMP"; then
8186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8187 $as_echo "$MKTEMP" >&6; }
8188 else
8189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190 $as_echo "no" >&6; }
8191 fi
8192 
8193 
8194   test -n "$MKTEMP" && break
8195 done
8196 
8197     else
8198       # If it succeeded, then it was overridden by the user. We will use it
8199       # for the tool.
8200 
8201       # First remove it from the list of overridden variables, so we can test
8202       # for unknown variables in the end.
8203       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8204 
8205       # Check if the provided tool contains a complete path.
8206       tool_specified="$MKTEMP"
8207       tool_basename="${tool_specified##*/}"
8208       if test "x$tool_basename" = "x$tool_specified"; then
8209         # A command without a complete path is provided, search $PATH.
8210         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8211 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8212         # Extract the first word of "$tool_basename", so it can be a program name with args.
8213 set dummy $tool_basename; ac_word=$2
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8215 $as_echo_n "checking for $ac_word... " >&6; }
8216 if ${ac_cv_path_MKTEMP+:} false; then :
8217   $as_echo_n "(cached) " >&6
8218 else
8219   case $MKTEMP in
8220   [\\/]* | ?:[\\/]*)
8221   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8222   ;;
8223   *)
8224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8225 for as_dir in $PATH
8226 do
8227   IFS=$as_save_IFS
8228   test -z "$as_dir" && as_dir=.
8229     for ac_exec_ext in '' $ac_executable_extensions; do
8230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8231     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8233     break 2
8234   fi
8235 done
8236   done
8237 IFS=$as_save_IFS
8238 
8239   ;;
8240 esac
8241 fi
8242 MKTEMP=$ac_cv_path_MKTEMP
8243 if test -n "$MKTEMP"; then
8244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8245 $as_echo "$MKTEMP" >&6; }
8246 else
8247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248 $as_echo "no" >&6; }
8249 fi
8250 
8251 
8252         if test "x$MKTEMP" = x; then
8253           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8254         fi
8255       else
8256         # Otherwise we believe it is a complete path. Use it as it is.
8257         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8258 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8259         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8260 $as_echo_n "checking for MKTEMP... " >&6; }
8261         if test ! -x "$tool_specified"; then
8262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8263 $as_echo "not found" >&6; }
8264           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8265         fi
8266         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8267 $as_echo "$tool_specified" >&6; }
8268       fi
8269     fi
8270   fi
8271 
8272 
8273 
8274   if test "x$MKTEMP" = x; then
8275     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8276   fi
8277 
8278 
8279 
8280 
8281 
8282   # Publish this variable in the help.
8283 
8284 
8285   if test "x$MV" = x; then
8286     # The variable is not set by user, try to locate tool using the code snippet
8287     for ac_prog in mv
8288 do
8289   # Extract the first word of "$ac_prog", so it can be a program name with args.
8290 set dummy $ac_prog; ac_word=$2
8291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8292 $as_echo_n "checking for $ac_word... " >&6; }
8293 if ${ac_cv_path_MV+:} false; then :
8294   $as_echo_n "(cached) " >&6
8295 else
8296   case $MV in
8297   [\\/]* | ?:[\\/]*)
8298   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8299   ;;
8300   *)
8301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8302 for as_dir in $PATH
8303 do
8304   IFS=$as_save_IFS
8305   test -z "$as_dir" && as_dir=.
8306     for ac_exec_ext in '' $ac_executable_extensions; do
8307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8308     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8310     break 2
8311   fi
8312 done
8313   done
8314 IFS=$as_save_IFS
8315 
8316   ;;
8317 esac
8318 fi
8319 MV=$ac_cv_path_MV
8320 if test -n "$MV"; then
8321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8322 $as_echo "$MV" >&6; }
8323 else
8324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8325 $as_echo "no" >&6; }
8326 fi
8327 
8328 
8329   test -n "$MV" && break
8330 done
8331 
8332   else
8333     # The variable is set, but is it from the command line or the environment?
8334 
8335     # Try to remove the string !MV! from our list.
8336     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8337     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8338       # If it failed, the variable was not from the command line. Ignore it,
8339       # but warn the user (except for BASH, which is always set by the calling BASH).
8340       if test "xMV" != xBASH; then
8341         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8342 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8343       fi
8344       # Try to locate tool using the code snippet
8345       for ac_prog in mv
8346 do
8347   # Extract the first word of "$ac_prog", so it can be a program name with args.
8348 set dummy $ac_prog; ac_word=$2
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350 $as_echo_n "checking for $ac_word... " >&6; }
8351 if ${ac_cv_path_MV+:} false; then :
8352   $as_echo_n "(cached) " >&6
8353 else
8354   case $MV in
8355   [\\/]* | ?:[\\/]*)
8356   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8357   ;;
8358   *)
8359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8360 for as_dir in $PATH
8361 do
8362   IFS=$as_save_IFS
8363   test -z "$as_dir" && as_dir=.
8364     for ac_exec_ext in '' $ac_executable_extensions; do
8365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8366     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8368     break 2
8369   fi
8370 done
8371   done
8372 IFS=$as_save_IFS
8373 
8374   ;;
8375 esac
8376 fi
8377 MV=$ac_cv_path_MV
8378 if test -n "$MV"; then
8379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8380 $as_echo "$MV" >&6; }
8381 else
8382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383 $as_echo "no" >&6; }
8384 fi
8385 
8386 
8387   test -n "$MV" && break
8388 done
8389 
8390     else
8391       # If it succeeded, then it was overridden by the user. We will use it
8392       # for the tool.
8393 
8394       # First remove it from the list of overridden variables, so we can test
8395       # for unknown variables in the end.
8396       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8397 
8398       # Check if the provided tool contains a complete path.
8399       tool_specified="$MV"
8400       tool_basename="${tool_specified##*/}"
8401       if test "x$tool_basename" = "x$tool_specified"; then
8402         # A command without a complete path is provided, search $PATH.
8403         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8404 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8405         # Extract the first word of "$tool_basename", so it can be a program name with args.
8406 set dummy $tool_basename; ac_word=$2
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408 $as_echo_n "checking for $ac_word... " >&6; }
8409 if ${ac_cv_path_MV+:} false; then :
8410   $as_echo_n "(cached) " >&6
8411 else
8412   case $MV in
8413   [\\/]* | ?:[\\/]*)
8414   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8415   ;;
8416   *)
8417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418 for as_dir in $PATH
8419 do
8420   IFS=$as_save_IFS
8421   test -z "$as_dir" && as_dir=.
8422     for ac_exec_ext in '' $ac_executable_extensions; do
8423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8424     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8426     break 2
8427   fi
8428 done
8429   done
8430 IFS=$as_save_IFS
8431 
8432   ;;
8433 esac
8434 fi
8435 MV=$ac_cv_path_MV
8436 if test -n "$MV"; then
8437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8438 $as_echo "$MV" >&6; }
8439 else
8440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441 $as_echo "no" >&6; }
8442 fi
8443 
8444 
8445         if test "x$MV" = x; then
8446           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8447         fi
8448       else
8449         # Otherwise we believe it is a complete path. Use it as it is.
8450         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8451 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8452         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8453 $as_echo_n "checking for MV... " >&6; }
8454         if test ! -x "$tool_specified"; then
8455           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8456 $as_echo "not found" >&6; }
8457           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8458         fi
8459         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8460 $as_echo "$tool_specified" >&6; }
8461       fi
8462     fi
8463   fi
8464 
8465 
8466 
8467   if test "x$MV" = x; then
8468     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8469   fi
8470 
8471 
8472 
8473 
8474 
8475   # Publish this variable in the help.
8476 
8477 
8478   if test "x$NAWK" = x; then
8479     # The variable is not set by user, try to locate tool using the code snippet
8480     for ac_prog in nawk gawk awk
8481 do
8482   # Extract the first word of "$ac_prog", so it can be a program name with args.
8483 set dummy $ac_prog; ac_word=$2
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8485 $as_echo_n "checking for $ac_word... " >&6; }
8486 if ${ac_cv_path_NAWK+:} false; then :
8487   $as_echo_n "(cached) " >&6
8488 else
8489   case $NAWK in
8490   [\\/]* | ?:[\\/]*)
8491   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8492   ;;
8493   *)
8494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495 for as_dir in $PATH
8496 do
8497   IFS=$as_save_IFS
8498   test -z "$as_dir" && as_dir=.
8499     for ac_exec_ext in '' $ac_executable_extensions; do
8500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8501     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8503     break 2
8504   fi
8505 done
8506   done
8507 IFS=$as_save_IFS
8508 
8509   ;;
8510 esac
8511 fi
8512 NAWK=$ac_cv_path_NAWK
8513 if test -n "$NAWK"; then
8514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8515 $as_echo "$NAWK" >&6; }
8516 else
8517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8518 $as_echo "no" >&6; }
8519 fi
8520 
8521 
8522   test -n "$NAWK" && break
8523 done
8524 
8525   else
8526     # The variable is set, but is it from the command line or the environment?
8527 
8528     # Try to remove the string !NAWK! from our list.
8529     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8530     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8531       # If it failed, the variable was not from the command line. Ignore it,
8532       # but warn the user (except for BASH, which is always set by the calling BASH).
8533       if test "xNAWK" != xBASH; then
8534         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8535 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8536       fi
8537       # Try to locate tool using the code snippet
8538       for ac_prog in nawk gawk awk
8539 do
8540   # Extract the first word of "$ac_prog", so it can be a program name with args.
8541 set dummy $ac_prog; ac_word=$2
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8543 $as_echo_n "checking for $ac_word... " >&6; }
8544 if ${ac_cv_path_NAWK+:} false; then :
8545   $as_echo_n "(cached) " >&6
8546 else
8547   case $NAWK in
8548   [\\/]* | ?:[\\/]*)
8549   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8550   ;;
8551   *)
8552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553 for as_dir in $PATH
8554 do
8555   IFS=$as_save_IFS
8556   test -z "$as_dir" && as_dir=.
8557     for ac_exec_ext in '' $ac_executable_extensions; do
8558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8559     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8561     break 2
8562   fi
8563 done
8564   done
8565 IFS=$as_save_IFS
8566 
8567   ;;
8568 esac
8569 fi
8570 NAWK=$ac_cv_path_NAWK
8571 if test -n "$NAWK"; then
8572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8573 $as_echo "$NAWK" >&6; }
8574 else
8575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8576 $as_echo "no" >&6; }
8577 fi
8578 
8579 
8580   test -n "$NAWK" && break
8581 done
8582 
8583     else
8584       # If it succeeded, then it was overridden by the user. We will use it
8585       # for the tool.
8586 
8587       # First remove it from the list of overridden variables, so we can test
8588       # for unknown variables in the end.
8589       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8590 
8591       # Check if the provided tool contains a complete path.
8592       tool_specified="$NAWK"
8593       tool_basename="${tool_specified##*/}"
8594       if test "x$tool_basename" = "x$tool_specified"; then
8595         # A command without a complete path is provided, search $PATH.
8596         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8597 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8598         # Extract the first word of "$tool_basename", so it can be a program name with args.
8599 set dummy $tool_basename; ac_word=$2
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601 $as_echo_n "checking for $ac_word... " >&6; }
8602 if ${ac_cv_path_NAWK+:} false; then :
8603   $as_echo_n "(cached) " >&6
8604 else
8605   case $NAWK in
8606   [\\/]* | ?:[\\/]*)
8607   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8608   ;;
8609   *)
8610   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611 for as_dir in $PATH
8612 do
8613   IFS=$as_save_IFS
8614   test -z "$as_dir" && as_dir=.
8615     for ac_exec_ext in '' $ac_executable_extensions; do
8616   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8617     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619     break 2
8620   fi
8621 done
8622   done
8623 IFS=$as_save_IFS
8624 
8625   ;;
8626 esac
8627 fi
8628 NAWK=$ac_cv_path_NAWK
8629 if test -n "$NAWK"; then
8630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8631 $as_echo "$NAWK" >&6; }
8632 else
8633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634 $as_echo "no" >&6; }
8635 fi
8636 
8637 
8638         if test "x$NAWK" = x; then
8639           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8640         fi
8641       else
8642         # Otherwise we believe it is a complete path. Use it as it is.
8643         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8644 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8646 $as_echo_n "checking for NAWK... " >&6; }
8647         if test ! -x "$tool_specified"; then
8648           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8649 $as_echo "not found" >&6; }
8650           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8651         fi
8652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8653 $as_echo "$tool_specified" >&6; }
8654       fi
8655     fi
8656   fi
8657 
8658 
8659 
8660   if test "x$NAWK" = x; then
8661     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8662   fi
8663 
8664 
8665 
8666 
8667 
8668   # Publish this variable in the help.
8669 
8670 
8671   if test "x$PRINTF" = x; then
8672     # The variable is not set by user, try to locate tool using the code snippet
8673     for ac_prog in printf
8674 do
8675   # Extract the first word of "$ac_prog", so it can be a program name with args.
8676 set dummy $ac_prog; ac_word=$2
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678 $as_echo_n "checking for $ac_word... " >&6; }
8679 if ${ac_cv_path_PRINTF+:} false; then :
8680   $as_echo_n "(cached) " >&6
8681 else
8682   case $PRINTF in
8683   [\\/]* | ?:[\\/]*)
8684   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8685   ;;
8686   *)
8687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688 for as_dir in $PATH
8689 do
8690   IFS=$as_save_IFS
8691   test -z "$as_dir" && as_dir=.
8692     for ac_exec_ext in '' $ac_executable_extensions; do
8693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696     break 2
8697   fi
8698 done
8699   done
8700 IFS=$as_save_IFS
8701 
8702   ;;
8703 esac
8704 fi
8705 PRINTF=$ac_cv_path_PRINTF
8706 if test -n "$PRINTF"; then
8707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8708 $as_echo "$PRINTF" >&6; }
8709 else
8710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711 $as_echo "no" >&6; }
8712 fi
8713 
8714 
8715   test -n "$PRINTF" && break
8716 done
8717 
8718   else
8719     # The variable is set, but is it from the command line or the environment?
8720 
8721     # Try to remove the string !PRINTF! from our list.
8722     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8723     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8724       # If it failed, the variable was not from the command line. Ignore it,
8725       # but warn the user (except for BASH, which is always set by the calling BASH).
8726       if test "xPRINTF" != xBASH; then
8727         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8728 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8729       fi
8730       # Try to locate tool using the code snippet
8731       for ac_prog in printf
8732 do
8733   # Extract the first word of "$ac_prog", so it can be a program name with args.
8734 set dummy $ac_prog; ac_word=$2
8735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8736 $as_echo_n "checking for $ac_word... " >&6; }
8737 if ${ac_cv_path_PRINTF+:} false; then :
8738   $as_echo_n "(cached) " >&6
8739 else
8740   case $PRINTF in
8741   [\\/]* | ?:[\\/]*)
8742   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8743   ;;
8744   *)
8745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8746 for as_dir in $PATH
8747 do
8748   IFS=$as_save_IFS
8749   test -z "$as_dir" && as_dir=.
8750     for ac_exec_ext in '' $ac_executable_extensions; do
8751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8752     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8754     break 2
8755   fi
8756 done
8757   done
8758 IFS=$as_save_IFS
8759 
8760   ;;
8761 esac
8762 fi
8763 PRINTF=$ac_cv_path_PRINTF
8764 if test -n "$PRINTF"; then
8765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8766 $as_echo "$PRINTF" >&6; }
8767 else
8768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8769 $as_echo "no" >&6; }
8770 fi
8771 
8772 
8773   test -n "$PRINTF" && break
8774 done
8775 
8776     else
8777       # If it succeeded, then it was overridden by the user. We will use it
8778       # for the tool.
8779 
8780       # First remove it from the list of overridden variables, so we can test
8781       # for unknown variables in the end.
8782       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8783 
8784       # Check if the provided tool contains a complete path.
8785       tool_specified="$PRINTF"
8786       tool_basename="${tool_specified##*/}"
8787       if test "x$tool_basename" = "x$tool_specified"; then
8788         # A command without a complete path is provided, search $PATH.
8789         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8790 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8791         # Extract the first word of "$tool_basename", so it can be a program name with args.
8792 set dummy $tool_basename; ac_word=$2
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8794 $as_echo_n "checking for $ac_word... " >&6; }
8795 if ${ac_cv_path_PRINTF+:} false; then :
8796   $as_echo_n "(cached) " >&6
8797 else
8798   case $PRINTF in
8799   [\\/]* | ?:[\\/]*)
8800   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8801   ;;
8802   *)
8803   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8804 for as_dir in $PATH
8805 do
8806   IFS=$as_save_IFS
8807   test -z "$as_dir" && as_dir=.
8808     for ac_exec_ext in '' $ac_executable_extensions; do
8809   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8810     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8811     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8812     break 2
8813   fi
8814 done
8815   done
8816 IFS=$as_save_IFS
8817 
8818   ;;
8819 esac
8820 fi
8821 PRINTF=$ac_cv_path_PRINTF
8822 if test -n "$PRINTF"; then
8823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8824 $as_echo "$PRINTF" >&6; }
8825 else
8826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827 $as_echo "no" >&6; }
8828 fi
8829 
8830 
8831         if test "x$PRINTF" = x; then
8832           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8833         fi
8834       else
8835         # Otherwise we believe it is a complete path. Use it as it is.
8836         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8837 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8838         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8839 $as_echo_n "checking for PRINTF... " >&6; }
8840         if test ! -x "$tool_specified"; then
8841           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8842 $as_echo "not found" >&6; }
8843           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8844         fi
8845         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8846 $as_echo "$tool_specified" >&6; }
8847       fi
8848     fi
8849   fi
8850 
8851 
8852 
8853   if test "x$PRINTF" = x; then
8854     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8855   fi
8856 
8857 
8858 
8859 
8860 
8861   # Publish this variable in the help.
8862 
8863 
8864   if test "x$RM" = x; then
8865     # The variable is not set by user, try to locate tool using the code snippet
8866     for ac_prog in rm
8867 do
8868   # Extract the first word of "$ac_prog", so it can be a program name with args.
8869 set dummy $ac_prog; ac_word=$2
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8871 $as_echo_n "checking for $ac_word... " >&6; }
8872 if ${ac_cv_path_RM+:} false; then :
8873   $as_echo_n "(cached) " >&6
8874 else
8875   case $RM in
8876   [\\/]* | ?:[\\/]*)
8877   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8878   ;;
8879   *)
8880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8881 for as_dir in $PATH
8882 do
8883   IFS=$as_save_IFS
8884   test -z "$as_dir" && as_dir=.
8885     for ac_exec_ext in '' $ac_executable_extensions; do
8886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8887     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8889     break 2
8890   fi
8891 done
8892   done
8893 IFS=$as_save_IFS
8894 
8895   ;;
8896 esac
8897 fi
8898 RM=$ac_cv_path_RM
8899 if test -n "$RM"; then
8900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8901 $as_echo "$RM" >&6; }
8902 else
8903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8904 $as_echo "no" >&6; }
8905 fi
8906 
8907 
8908   test -n "$RM" && break
8909 done
8910 
8911   else
8912     # The variable is set, but is it from the command line or the environment?
8913 
8914     # Try to remove the string !RM! from our list.
8915     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8916     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8917       # If it failed, the variable was not from the command line. Ignore it,
8918       # but warn the user (except for BASH, which is always set by the calling BASH).
8919       if test "xRM" != xBASH; then
8920         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8921 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8922       fi
8923       # Try to locate tool using the code snippet
8924       for ac_prog in rm
8925 do
8926   # Extract the first word of "$ac_prog", so it can be a program name with args.
8927 set dummy $ac_prog; ac_word=$2
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8929 $as_echo_n "checking for $ac_word... " >&6; }
8930 if ${ac_cv_path_RM+:} false; then :
8931   $as_echo_n "(cached) " >&6
8932 else
8933   case $RM in
8934   [\\/]* | ?:[\\/]*)
8935   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8936   ;;
8937   *)
8938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8939 for as_dir in $PATH
8940 do
8941   IFS=$as_save_IFS
8942   test -z "$as_dir" && as_dir=.
8943     for ac_exec_ext in '' $ac_executable_extensions; do
8944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8945     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8947     break 2
8948   fi
8949 done
8950   done
8951 IFS=$as_save_IFS
8952 
8953   ;;
8954 esac
8955 fi
8956 RM=$ac_cv_path_RM
8957 if test -n "$RM"; then
8958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8959 $as_echo "$RM" >&6; }
8960 else
8961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962 $as_echo "no" >&6; }
8963 fi
8964 
8965 
8966   test -n "$RM" && break
8967 done
8968 
8969     else
8970       # If it succeeded, then it was overridden by the user. We will use it
8971       # for the tool.
8972 
8973       # First remove it from the list of overridden variables, so we can test
8974       # for unknown variables in the end.
8975       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8976 
8977       # Check if the provided tool contains a complete path.
8978       tool_specified="$RM"
8979       tool_basename="${tool_specified##*/}"
8980       if test "x$tool_basename" = "x$tool_specified"; then
8981         # A command without a complete path is provided, search $PATH.
8982         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8983 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8984         # Extract the first word of "$tool_basename", so it can be a program name with args.
8985 set dummy $tool_basename; ac_word=$2
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987 $as_echo_n "checking for $ac_word... " >&6; }
8988 if ${ac_cv_path_RM+:} false; then :
8989   $as_echo_n "(cached) " >&6
8990 else
8991   case $RM in
8992   [\\/]* | ?:[\\/]*)
8993   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8994   ;;
8995   *)
8996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8997 for as_dir in $PATH
8998 do
8999   IFS=$as_save_IFS
9000   test -z "$as_dir" && as_dir=.
9001     for ac_exec_ext in '' $ac_executable_extensions; do
9002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9003     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9005     break 2
9006   fi
9007 done
9008   done
9009 IFS=$as_save_IFS
9010 
9011   ;;
9012 esac
9013 fi
9014 RM=$ac_cv_path_RM
9015 if test -n "$RM"; then
9016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9017 $as_echo "$RM" >&6; }
9018 else
9019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9020 $as_echo "no" >&6; }
9021 fi
9022 
9023 
9024         if test "x$RM" = x; then
9025           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9026         fi
9027       else
9028         # Otherwise we believe it is a complete path. Use it as it is.
9029         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9030 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9032 $as_echo_n "checking for RM... " >&6; }
9033         if test ! -x "$tool_specified"; then
9034           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9035 $as_echo "not found" >&6; }
9036           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9037         fi
9038         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9039 $as_echo "$tool_specified" >&6; }
9040       fi
9041     fi
9042   fi
9043 
9044 
9045 
9046   if test "x$RM" = x; then
9047     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9048   fi
9049 
9050 
9051 
9052 
9053 
9054   # Publish this variable in the help.
9055 
9056 
9057   if test "x$SH" = x; then
9058     # The variable is not set by user, try to locate tool using the code snippet
9059     for ac_prog in sh
9060 do
9061   # Extract the first word of "$ac_prog", so it can be a program name with args.
9062 set dummy $ac_prog; ac_word=$2
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064 $as_echo_n "checking for $ac_word... " >&6; }
9065 if ${ac_cv_path_SH+:} false; then :
9066   $as_echo_n "(cached) " >&6
9067 else
9068   case $SH in
9069   [\\/]* | ?:[\\/]*)
9070   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9071   ;;
9072   *)
9073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074 for as_dir in $PATH
9075 do
9076   IFS=$as_save_IFS
9077   test -z "$as_dir" && as_dir=.
9078     for ac_exec_ext in '' $ac_executable_extensions; do
9079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9080     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9082     break 2
9083   fi
9084 done
9085   done
9086 IFS=$as_save_IFS
9087 
9088   ;;
9089 esac
9090 fi
9091 SH=$ac_cv_path_SH
9092 if test -n "$SH"; then
9093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9094 $as_echo "$SH" >&6; }
9095 else
9096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097 $as_echo "no" >&6; }
9098 fi
9099 
9100 
9101   test -n "$SH" && break
9102 done
9103 
9104   else
9105     # The variable is set, but is it from the command line or the environment?
9106 
9107     # Try to remove the string !SH! from our list.
9108     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9109     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9110       # If it failed, the variable was not from the command line. Ignore it,
9111       # but warn the user (except for BASH, which is always set by the calling BASH).
9112       if test "xSH" != xBASH; then
9113         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9114 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9115       fi
9116       # Try to locate tool using the code snippet
9117       for ac_prog in sh
9118 do
9119   # Extract the first word of "$ac_prog", so it can be a program name with args.
9120 set dummy $ac_prog; ac_word=$2
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9122 $as_echo_n "checking for $ac_word... " >&6; }
9123 if ${ac_cv_path_SH+:} false; then :
9124   $as_echo_n "(cached) " >&6
9125 else
9126   case $SH in
9127   [\\/]* | ?:[\\/]*)
9128   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9129   ;;
9130   *)
9131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9132 for as_dir in $PATH
9133 do
9134   IFS=$as_save_IFS
9135   test -z "$as_dir" && as_dir=.
9136     for ac_exec_ext in '' $ac_executable_extensions; do
9137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9138     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9140     break 2
9141   fi
9142 done
9143   done
9144 IFS=$as_save_IFS
9145 
9146   ;;
9147 esac
9148 fi
9149 SH=$ac_cv_path_SH
9150 if test -n "$SH"; then
9151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9152 $as_echo "$SH" >&6; }
9153 else
9154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155 $as_echo "no" >&6; }
9156 fi
9157 
9158 
9159   test -n "$SH" && break
9160 done
9161 
9162     else
9163       # If it succeeded, then it was overridden by the user. We will use it
9164       # for the tool.
9165 
9166       # First remove it from the list of overridden variables, so we can test
9167       # for unknown variables in the end.
9168       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9169 
9170       # Check if the provided tool contains a complete path.
9171       tool_specified="$SH"
9172       tool_basename="${tool_specified##*/}"
9173       if test "x$tool_basename" = "x$tool_specified"; then
9174         # A command without a complete path is provided, search $PATH.
9175         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9176 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9177         # Extract the first word of "$tool_basename", so it can be a program name with args.
9178 set dummy $tool_basename; ac_word=$2
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9180 $as_echo_n "checking for $ac_word... " >&6; }
9181 if ${ac_cv_path_SH+:} false; then :
9182   $as_echo_n "(cached) " >&6
9183 else
9184   case $SH in
9185   [\\/]* | ?:[\\/]*)
9186   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9187   ;;
9188   *)
9189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9190 for as_dir in $PATH
9191 do
9192   IFS=$as_save_IFS
9193   test -z "$as_dir" && as_dir=.
9194     for ac_exec_ext in '' $ac_executable_extensions; do
9195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9196     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9198     break 2
9199   fi
9200 done
9201   done
9202 IFS=$as_save_IFS
9203 
9204   ;;
9205 esac
9206 fi
9207 SH=$ac_cv_path_SH
9208 if test -n "$SH"; then
9209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9210 $as_echo "$SH" >&6; }
9211 else
9212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9213 $as_echo "no" >&6; }
9214 fi
9215 
9216 
9217         if test "x$SH" = x; then
9218           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9219         fi
9220       else
9221         # Otherwise we believe it is a complete path. Use it as it is.
9222         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9223 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9225 $as_echo_n "checking for SH... " >&6; }
9226         if test ! -x "$tool_specified"; then
9227           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9228 $as_echo "not found" >&6; }
9229           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9230         fi
9231         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9232 $as_echo "$tool_specified" >&6; }
9233       fi
9234     fi
9235   fi
9236 
9237 
9238 
9239   if test "x$SH" = x; then
9240     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9241   fi
9242 
9243 
9244 
9245 
9246 
9247   # Publish this variable in the help.
9248 
9249 
9250   if test "x$SORT" = x; then
9251     # The variable is not set by user, try to locate tool using the code snippet
9252     for ac_prog in sort
9253 do
9254   # Extract the first word of "$ac_prog", so it can be a program name with args.
9255 set dummy $ac_prog; ac_word=$2
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9257 $as_echo_n "checking for $ac_word... " >&6; }
9258 if ${ac_cv_path_SORT+:} false; then :
9259   $as_echo_n "(cached) " >&6
9260 else
9261   case $SORT in
9262   [\\/]* | ?:[\\/]*)
9263   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9264   ;;
9265   *)
9266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9267 for as_dir in $PATH
9268 do
9269   IFS=$as_save_IFS
9270   test -z "$as_dir" && as_dir=.
9271     for ac_exec_ext in '' $ac_executable_extensions; do
9272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9273     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9275     break 2
9276   fi
9277 done
9278   done
9279 IFS=$as_save_IFS
9280 
9281   ;;
9282 esac
9283 fi
9284 SORT=$ac_cv_path_SORT
9285 if test -n "$SORT"; then
9286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9287 $as_echo "$SORT" >&6; }
9288 else
9289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9290 $as_echo "no" >&6; }
9291 fi
9292 
9293 
9294   test -n "$SORT" && break
9295 done
9296 
9297   else
9298     # The variable is set, but is it from the command line or the environment?
9299 
9300     # Try to remove the string !SORT! from our list.
9301     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9302     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9303       # If it failed, the variable was not from the command line. Ignore it,
9304       # but warn the user (except for BASH, which is always set by the calling BASH).
9305       if test "xSORT" != xBASH; then
9306         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9307 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9308       fi
9309       # Try to locate tool using the code snippet
9310       for ac_prog in sort
9311 do
9312   # Extract the first word of "$ac_prog", so it can be a program name with args.
9313 set dummy $ac_prog; ac_word=$2
9314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315 $as_echo_n "checking for $ac_word... " >&6; }
9316 if ${ac_cv_path_SORT+:} false; then :
9317   $as_echo_n "(cached) " >&6
9318 else
9319   case $SORT in
9320   [\\/]* | ?:[\\/]*)
9321   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9322   ;;
9323   *)
9324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325 for as_dir in $PATH
9326 do
9327   IFS=$as_save_IFS
9328   test -z "$as_dir" && as_dir=.
9329     for ac_exec_ext in '' $ac_executable_extensions; do
9330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333     break 2
9334   fi
9335 done
9336   done
9337 IFS=$as_save_IFS
9338 
9339   ;;
9340 esac
9341 fi
9342 SORT=$ac_cv_path_SORT
9343 if test -n "$SORT"; then
9344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9345 $as_echo "$SORT" >&6; }
9346 else
9347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348 $as_echo "no" >&6; }
9349 fi
9350 
9351 
9352   test -n "$SORT" && break
9353 done
9354 
9355     else
9356       # If it succeeded, then it was overridden by the user. We will use it
9357       # for the tool.
9358 
9359       # First remove it from the list of overridden variables, so we can test
9360       # for unknown variables in the end.
9361       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9362 
9363       # Check if the provided tool contains a complete path.
9364       tool_specified="$SORT"
9365       tool_basename="${tool_specified##*/}"
9366       if test "x$tool_basename" = "x$tool_specified"; then
9367         # A command without a complete path is provided, search $PATH.
9368         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9369 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9370         # Extract the first word of "$tool_basename", so it can be a program name with args.
9371 set dummy $tool_basename; ac_word=$2
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373 $as_echo_n "checking for $ac_word... " >&6; }
9374 if ${ac_cv_path_SORT+:} false; then :
9375   $as_echo_n "(cached) " >&6
9376 else
9377   case $SORT in
9378   [\\/]* | ?:[\\/]*)
9379   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9380   ;;
9381   *)
9382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383 for as_dir in $PATH
9384 do
9385   IFS=$as_save_IFS
9386   test -z "$as_dir" && as_dir=.
9387     for ac_exec_ext in '' $ac_executable_extensions; do
9388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391     break 2
9392   fi
9393 done
9394   done
9395 IFS=$as_save_IFS
9396 
9397   ;;
9398 esac
9399 fi
9400 SORT=$ac_cv_path_SORT
9401 if test -n "$SORT"; then
9402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9403 $as_echo "$SORT" >&6; }
9404 else
9405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406 $as_echo "no" >&6; }
9407 fi
9408 
9409 
9410         if test "x$SORT" = x; then
9411           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9412         fi
9413       else
9414         # Otherwise we believe it is a complete path. Use it as it is.
9415         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9416 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9418 $as_echo_n "checking for SORT... " >&6; }
9419         if test ! -x "$tool_specified"; then
9420           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9421 $as_echo "not found" >&6; }
9422           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9423         fi
9424         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9425 $as_echo "$tool_specified" >&6; }
9426       fi
9427     fi
9428   fi
9429 
9430 
9431 
9432   if test "x$SORT" = x; then
9433     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9434   fi
9435 
9436 
9437 
9438 
9439 
9440   # Publish this variable in the help.
9441 
9442 
9443   if test "x$TAIL" = x; then
9444     # The variable is not set by user, try to locate tool using the code snippet
9445     for ac_prog in tail
9446 do
9447   # Extract the first word of "$ac_prog", so it can be a program name with args.
9448 set dummy $ac_prog; ac_word=$2
9449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450 $as_echo_n "checking for $ac_word... " >&6; }
9451 if ${ac_cv_path_TAIL+:} false; then :
9452   $as_echo_n "(cached) " >&6
9453 else
9454   case $TAIL in
9455   [\\/]* | ?:[\\/]*)
9456   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9457   ;;
9458   *)
9459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460 for as_dir in $PATH
9461 do
9462   IFS=$as_save_IFS
9463   test -z "$as_dir" && as_dir=.
9464     for ac_exec_ext in '' $ac_executable_extensions; do
9465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468     break 2
9469   fi
9470 done
9471   done
9472 IFS=$as_save_IFS
9473 
9474   ;;
9475 esac
9476 fi
9477 TAIL=$ac_cv_path_TAIL
9478 if test -n "$TAIL"; then
9479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9480 $as_echo "$TAIL" >&6; }
9481 else
9482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9483 $as_echo "no" >&6; }
9484 fi
9485 
9486 
9487   test -n "$TAIL" && break
9488 done
9489 
9490   else
9491     # The variable is set, but is it from the command line or the environment?
9492 
9493     # Try to remove the string !TAIL! from our list.
9494     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9495     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9496       # If it failed, the variable was not from the command line. Ignore it,
9497       # but warn the user (except for BASH, which is always set by the calling BASH).
9498       if test "xTAIL" != xBASH; then
9499         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9500 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9501       fi
9502       # Try to locate tool using the code snippet
9503       for ac_prog in tail
9504 do
9505   # Extract the first word of "$ac_prog", so it can be a program name with args.
9506 set dummy $ac_prog; ac_word=$2
9507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9508 $as_echo_n "checking for $ac_word... " >&6; }
9509 if ${ac_cv_path_TAIL+:} false; then :
9510   $as_echo_n "(cached) " >&6
9511 else
9512   case $TAIL in
9513   [\\/]* | ?:[\\/]*)
9514   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9515   ;;
9516   *)
9517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9518 for as_dir in $PATH
9519 do
9520   IFS=$as_save_IFS
9521   test -z "$as_dir" && as_dir=.
9522     for ac_exec_ext in '' $ac_executable_extensions; do
9523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9524     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9526     break 2
9527   fi
9528 done
9529   done
9530 IFS=$as_save_IFS
9531 
9532   ;;
9533 esac
9534 fi
9535 TAIL=$ac_cv_path_TAIL
9536 if test -n "$TAIL"; then
9537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9538 $as_echo "$TAIL" >&6; }
9539 else
9540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541 $as_echo "no" >&6; }
9542 fi
9543 
9544 
9545   test -n "$TAIL" && break
9546 done
9547 
9548     else
9549       # If it succeeded, then it was overridden by the user. We will use it
9550       # for the tool.
9551 
9552       # First remove it from the list of overridden variables, so we can test
9553       # for unknown variables in the end.
9554       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9555 
9556       # Check if the provided tool contains a complete path.
9557       tool_specified="$TAIL"
9558       tool_basename="${tool_specified##*/}"
9559       if test "x$tool_basename" = "x$tool_specified"; then
9560         # A command without a complete path is provided, search $PATH.
9561         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9562 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9563         # Extract the first word of "$tool_basename", so it can be a program name with args.
9564 set dummy $tool_basename; ac_word=$2
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9566 $as_echo_n "checking for $ac_word... " >&6; }
9567 if ${ac_cv_path_TAIL+:} false; then :
9568   $as_echo_n "(cached) " >&6
9569 else
9570   case $TAIL in
9571   [\\/]* | ?:[\\/]*)
9572   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9573   ;;
9574   *)
9575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9576 for as_dir in $PATH
9577 do
9578   IFS=$as_save_IFS
9579   test -z "$as_dir" && as_dir=.
9580     for ac_exec_ext in '' $ac_executable_extensions; do
9581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9582     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9584     break 2
9585   fi
9586 done
9587   done
9588 IFS=$as_save_IFS
9589 
9590   ;;
9591 esac
9592 fi
9593 TAIL=$ac_cv_path_TAIL
9594 if test -n "$TAIL"; then
9595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9596 $as_echo "$TAIL" >&6; }
9597 else
9598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9599 $as_echo "no" >&6; }
9600 fi
9601 
9602 
9603         if test "x$TAIL" = x; then
9604           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9605         fi
9606       else
9607         # Otherwise we believe it is a complete path. Use it as it is.
9608         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9609 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9610         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9611 $as_echo_n "checking for TAIL... " >&6; }
9612         if test ! -x "$tool_specified"; then
9613           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9614 $as_echo "not found" >&6; }
9615           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9616         fi
9617         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9618 $as_echo "$tool_specified" >&6; }
9619       fi
9620     fi
9621   fi
9622 
9623 
9624 
9625   if test "x$TAIL" = x; then
9626     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9627   fi
9628 
9629 
9630 
9631 
9632 
9633   # Publish this variable in the help.
9634 
9635 
9636   if test "x$TAR" = x; then
9637     # The variable is not set by user, try to locate tool using the code snippet
9638     for ac_prog in tar
9639 do
9640   # Extract the first word of "$ac_prog", so it can be a program name with args.
9641 set dummy $ac_prog; ac_word=$2
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9643 $as_echo_n "checking for $ac_word... " >&6; }
9644 if ${ac_cv_path_TAR+:} false; then :
9645   $as_echo_n "(cached) " >&6
9646 else
9647   case $TAR in
9648   [\\/]* | ?:[\\/]*)
9649   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9650   ;;
9651   *)
9652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9653 for as_dir in $PATH
9654 do
9655   IFS=$as_save_IFS
9656   test -z "$as_dir" && as_dir=.
9657     for ac_exec_ext in '' $ac_executable_extensions; do
9658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9659     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9661     break 2
9662   fi
9663 done
9664   done
9665 IFS=$as_save_IFS
9666 
9667   ;;
9668 esac
9669 fi
9670 TAR=$ac_cv_path_TAR
9671 if test -n "$TAR"; then
9672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9673 $as_echo "$TAR" >&6; }
9674 else
9675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676 $as_echo "no" >&6; }
9677 fi
9678 
9679 
9680   test -n "$TAR" && break
9681 done
9682 
9683   else
9684     # The variable is set, but is it from the command line or the environment?
9685 
9686     # Try to remove the string !TAR! from our list.
9687     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9688     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9689       # If it failed, the variable was not from the command line. Ignore it,
9690       # but warn the user (except for BASH, which is always set by the calling BASH).
9691       if test "xTAR" != xBASH; then
9692         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9693 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9694       fi
9695       # Try to locate tool using the code snippet
9696       for ac_prog in tar
9697 do
9698   # Extract the first word of "$ac_prog", so it can be a program name with args.
9699 set dummy $ac_prog; ac_word=$2
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9701 $as_echo_n "checking for $ac_word... " >&6; }
9702 if ${ac_cv_path_TAR+:} false; then :
9703   $as_echo_n "(cached) " >&6
9704 else
9705   case $TAR in
9706   [\\/]* | ?:[\\/]*)
9707   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9708   ;;
9709   *)
9710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711 for as_dir in $PATH
9712 do
9713   IFS=$as_save_IFS
9714   test -z "$as_dir" && as_dir=.
9715     for ac_exec_ext in '' $ac_executable_extensions; do
9716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9717     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9719     break 2
9720   fi
9721 done
9722   done
9723 IFS=$as_save_IFS
9724 
9725   ;;
9726 esac
9727 fi
9728 TAR=$ac_cv_path_TAR
9729 if test -n "$TAR"; then
9730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9731 $as_echo "$TAR" >&6; }
9732 else
9733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734 $as_echo "no" >&6; }
9735 fi
9736 
9737 
9738   test -n "$TAR" && break
9739 done
9740 
9741     else
9742       # If it succeeded, then it was overridden by the user. We will use it
9743       # for the tool.
9744 
9745       # First remove it from the list of overridden variables, so we can test
9746       # for unknown variables in the end.
9747       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9748 
9749       # Check if the provided tool contains a complete path.
9750       tool_specified="$TAR"
9751       tool_basename="${tool_specified##*/}"
9752       if test "x$tool_basename" = "x$tool_specified"; then
9753         # A command without a complete path is provided, search $PATH.
9754         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9755 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9756         # Extract the first word of "$tool_basename", so it can be a program name with args.
9757 set dummy $tool_basename; ac_word=$2
9758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9759 $as_echo_n "checking for $ac_word... " >&6; }
9760 if ${ac_cv_path_TAR+:} false; then :
9761   $as_echo_n "(cached) " >&6
9762 else
9763   case $TAR in
9764   [\\/]* | ?:[\\/]*)
9765   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9766   ;;
9767   *)
9768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9769 for as_dir in $PATH
9770 do
9771   IFS=$as_save_IFS
9772   test -z "$as_dir" && as_dir=.
9773     for ac_exec_ext in '' $ac_executable_extensions; do
9774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9775     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9777     break 2
9778   fi
9779 done
9780   done
9781 IFS=$as_save_IFS
9782 
9783   ;;
9784 esac
9785 fi
9786 TAR=$ac_cv_path_TAR
9787 if test -n "$TAR"; then
9788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9789 $as_echo "$TAR" >&6; }
9790 else
9791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9792 $as_echo "no" >&6; }
9793 fi
9794 
9795 
9796         if test "x$TAR" = x; then
9797           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9798         fi
9799       else
9800         # Otherwise we believe it is a complete path. Use it as it is.
9801         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9802 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9803         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9804 $as_echo_n "checking for TAR... " >&6; }
9805         if test ! -x "$tool_specified"; then
9806           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9807 $as_echo "not found" >&6; }
9808           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9809         fi
9810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9811 $as_echo "$tool_specified" >&6; }
9812       fi
9813     fi
9814   fi
9815 
9816 
9817 
9818   if test "x$TAR" = x; then
9819     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9820   fi
9821 
9822 
9823 
9824 
9825 
9826   # Publish this variable in the help.
9827 
9828 
9829   if test "x$TEE" = x; then
9830     # The variable is not set by user, try to locate tool using the code snippet
9831     for ac_prog in tee
9832 do
9833   # Extract the first word of "$ac_prog", so it can be a program name with args.
9834 set dummy $ac_prog; ac_word=$2
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836 $as_echo_n "checking for $ac_word... " >&6; }
9837 if ${ac_cv_path_TEE+:} false; then :
9838   $as_echo_n "(cached) " >&6
9839 else
9840   case $TEE in
9841   [\\/]* | ?:[\\/]*)
9842   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9843   ;;
9844   *)
9845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846 for as_dir in $PATH
9847 do
9848   IFS=$as_save_IFS
9849   test -z "$as_dir" && as_dir=.
9850     for ac_exec_ext in '' $ac_executable_extensions; do
9851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854     break 2
9855   fi
9856 done
9857   done
9858 IFS=$as_save_IFS
9859 
9860   ;;
9861 esac
9862 fi
9863 TEE=$ac_cv_path_TEE
9864 if test -n "$TEE"; then
9865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9866 $as_echo "$TEE" >&6; }
9867 else
9868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869 $as_echo "no" >&6; }
9870 fi
9871 
9872 
9873   test -n "$TEE" && break
9874 done
9875 
9876   else
9877     # The variable is set, but is it from the command line or the environment?
9878 
9879     # Try to remove the string !TEE! from our list.
9880     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9881     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9882       # If it failed, the variable was not from the command line. Ignore it,
9883       # but warn the user (except for BASH, which is always set by the calling BASH).
9884       if test "xTEE" != xBASH; then
9885         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9886 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9887       fi
9888       # Try to locate tool using the code snippet
9889       for ac_prog in tee
9890 do
9891   # Extract the first word of "$ac_prog", so it can be a program name with args.
9892 set dummy $ac_prog; ac_word=$2
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894 $as_echo_n "checking for $ac_word... " >&6; }
9895 if ${ac_cv_path_TEE+:} false; then :
9896   $as_echo_n "(cached) " >&6
9897 else
9898   case $TEE in
9899   [\\/]* | ?:[\\/]*)
9900   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9901   ;;
9902   *)
9903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904 for as_dir in $PATH
9905 do
9906   IFS=$as_save_IFS
9907   test -z "$as_dir" && as_dir=.
9908     for ac_exec_ext in '' $ac_executable_extensions; do
9909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912     break 2
9913   fi
9914 done
9915   done
9916 IFS=$as_save_IFS
9917 
9918   ;;
9919 esac
9920 fi
9921 TEE=$ac_cv_path_TEE
9922 if test -n "$TEE"; then
9923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9924 $as_echo "$TEE" >&6; }
9925 else
9926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927 $as_echo "no" >&6; }
9928 fi
9929 
9930 
9931   test -n "$TEE" && break
9932 done
9933 
9934     else
9935       # If it succeeded, then it was overridden by the user. We will use it
9936       # for the tool.
9937 
9938       # First remove it from the list of overridden variables, so we can test
9939       # for unknown variables in the end.
9940       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9941 
9942       # Check if the provided tool contains a complete path.
9943       tool_specified="$TEE"
9944       tool_basename="${tool_specified##*/}"
9945       if test "x$tool_basename" = "x$tool_specified"; then
9946         # A command without a complete path is provided, search $PATH.
9947         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9948 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9949         # Extract the first word of "$tool_basename", so it can be a program name with args.
9950 set dummy $tool_basename; ac_word=$2
9951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952 $as_echo_n "checking for $ac_word... " >&6; }
9953 if ${ac_cv_path_TEE+:} false; then :
9954   $as_echo_n "(cached) " >&6
9955 else
9956   case $TEE in
9957   [\\/]* | ?:[\\/]*)
9958   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9959   ;;
9960   *)
9961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962 for as_dir in $PATH
9963 do
9964   IFS=$as_save_IFS
9965   test -z "$as_dir" && as_dir=.
9966     for ac_exec_ext in '' $ac_executable_extensions; do
9967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970     break 2
9971   fi
9972 done
9973   done
9974 IFS=$as_save_IFS
9975 
9976   ;;
9977 esac
9978 fi
9979 TEE=$ac_cv_path_TEE
9980 if test -n "$TEE"; then
9981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9982 $as_echo "$TEE" >&6; }
9983 else
9984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985 $as_echo "no" >&6; }
9986 fi
9987 
9988 
9989         if test "x$TEE" = x; then
9990           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9991         fi
9992       else
9993         # Otherwise we believe it is a complete path. Use it as it is.
9994         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9995 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9997 $as_echo_n "checking for TEE... " >&6; }
9998         if test ! -x "$tool_specified"; then
9999           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10000 $as_echo "not found" >&6; }
10001           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10002         fi
10003         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10004 $as_echo "$tool_specified" >&6; }
10005       fi
10006     fi
10007   fi
10008 
10009 
10010 
10011   if test "x$TEE" = x; then
10012     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10013   fi
10014 
10015 
10016 
10017 
10018 
10019   # Publish this variable in the help.
10020 
10021 
10022   if test "x$TOUCH" = x; then
10023     # The variable is not set by user, try to locate tool using the code snippet
10024     for ac_prog in touch
10025 do
10026   # Extract the first word of "$ac_prog", so it can be a program name with args.
10027 set dummy $ac_prog; ac_word=$2
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10029 $as_echo_n "checking for $ac_word... " >&6; }
10030 if ${ac_cv_path_TOUCH+:} false; then :
10031   $as_echo_n "(cached) " >&6
10032 else
10033   case $TOUCH in
10034   [\\/]* | ?:[\\/]*)
10035   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10036   ;;
10037   *)
10038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10039 for as_dir in $PATH
10040 do
10041   IFS=$as_save_IFS
10042   test -z "$as_dir" && as_dir=.
10043     for ac_exec_ext in '' $ac_executable_extensions; do
10044   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10045     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10047     break 2
10048   fi
10049 done
10050   done
10051 IFS=$as_save_IFS
10052 
10053   ;;
10054 esac
10055 fi
10056 TOUCH=$ac_cv_path_TOUCH
10057 if test -n "$TOUCH"; then
10058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10059 $as_echo "$TOUCH" >&6; }
10060 else
10061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10062 $as_echo "no" >&6; }
10063 fi
10064 
10065 
10066   test -n "$TOUCH" && break
10067 done
10068 
10069   else
10070     # The variable is set, but is it from the command line or the environment?
10071 
10072     # Try to remove the string !TOUCH! from our list.
10073     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10074     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10075       # If it failed, the variable was not from the command line. Ignore it,
10076       # but warn the user (except for BASH, which is always set by the calling BASH).
10077       if test "xTOUCH" != xBASH; then
10078         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10079 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10080       fi
10081       # Try to locate tool using the code snippet
10082       for ac_prog in touch
10083 do
10084   # Extract the first word of "$ac_prog", so it can be a program name with args.
10085 set dummy $ac_prog; ac_word=$2
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087 $as_echo_n "checking for $ac_word... " >&6; }
10088 if ${ac_cv_path_TOUCH+:} false; then :
10089   $as_echo_n "(cached) " >&6
10090 else
10091   case $TOUCH in
10092   [\\/]* | ?:[\\/]*)
10093   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10094   ;;
10095   *)
10096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097 for as_dir in $PATH
10098 do
10099   IFS=$as_save_IFS
10100   test -z "$as_dir" && as_dir=.
10101     for ac_exec_ext in '' $ac_executable_extensions; do
10102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10103     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105     break 2
10106   fi
10107 done
10108   done
10109 IFS=$as_save_IFS
10110 
10111   ;;
10112 esac
10113 fi
10114 TOUCH=$ac_cv_path_TOUCH
10115 if test -n "$TOUCH"; then
10116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10117 $as_echo "$TOUCH" >&6; }
10118 else
10119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120 $as_echo "no" >&6; }
10121 fi
10122 
10123 
10124   test -n "$TOUCH" && break
10125 done
10126 
10127     else
10128       # If it succeeded, then it was overridden by the user. We will use it
10129       # for the tool.
10130 
10131       # First remove it from the list of overridden variables, so we can test
10132       # for unknown variables in the end.
10133       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10134 
10135       # Check if the provided tool contains a complete path.
10136       tool_specified="$TOUCH"
10137       tool_basename="${tool_specified##*/}"
10138       if test "x$tool_basename" = "x$tool_specified"; then
10139         # A command without a complete path is provided, search $PATH.
10140         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10141 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10142         # Extract the first word of "$tool_basename", so it can be a program name with args.
10143 set dummy $tool_basename; ac_word=$2
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145 $as_echo_n "checking for $ac_word... " >&6; }
10146 if ${ac_cv_path_TOUCH+:} false; then :
10147   $as_echo_n "(cached) " >&6
10148 else
10149   case $TOUCH in
10150   [\\/]* | ?:[\\/]*)
10151   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10152   ;;
10153   *)
10154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155 for as_dir in $PATH
10156 do
10157   IFS=$as_save_IFS
10158   test -z "$as_dir" && as_dir=.
10159     for ac_exec_ext in '' $ac_executable_extensions; do
10160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163     break 2
10164   fi
10165 done
10166   done
10167 IFS=$as_save_IFS
10168 
10169   ;;
10170 esac
10171 fi
10172 TOUCH=$ac_cv_path_TOUCH
10173 if test -n "$TOUCH"; then
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10175 $as_echo "$TOUCH" >&6; }
10176 else
10177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178 $as_echo "no" >&6; }
10179 fi
10180 
10181 
10182         if test "x$TOUCH" = x; then
10183           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10184         fi
10185       else
10186         # Otherwise we believe it is a complete path. Use it as it is.
10187         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10188 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10189         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10190 $as_echo_n "checking for TOUCH... " >&6; }
10191         if test ! -x "$tool_specified"; then
10192           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10193 $as_echo "not found" >&6; }
10194           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10195         fi
10196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10197 $as_echo "$tool_specified" >&6; }
10198       fi
10199     fi
10200   fi
10201 
10202 
10203 
10204   if test "x$TOUCH" = x; then
10205     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10206   fi
10207 
10208 
10209 
10210 
10211 
10212   # Publish this variable in the help.
10213 
10214 
10215   if test "x$TR" = x; then
10216     # The variable is not set by user, try to locate tool using the code snippet
10217     for ac_prog in tr
10218 do
10219   # Extract the first word of "$ac_prog", so it can be a program name with args.
10220 set dummy $ac_prog; ac_word=$2
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10222 $as_echo_n "checking for $ac_word... " >&6; }
10223 if ${ac_cv_path_TR+:} false; then :
10224   $as_echo_n "(cached) " >&6
10225 else
10226   case $TR in
10227   [\\/]* | ?:[\\/]*)
10228   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10229   ;;
10230   *)
10231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10232 for as_dir in $PATH
10233 do
10234   IFS=$as_save_IFS
10235   test -z "$as_dir" && as_dir=.
10236     for ac_exec_ext in '' $ac_executable_extensions; do
10237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10238     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10240     break 2
10241   fi
10242 done
10243   done
10244 IFS=$as_save_IFS
10245 
10246   ;;
10247 esac
10248 fi
10249 TR=$ac_cv_path_TR
10250 if test -n "$TR"; then
10251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10252 $as_echo "$TR" >&6; }
10253 else
10254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255 $as_echo "no" >&6; }
10256 fi
10257 
10258 
10259   test -n "$TR" && break
10260 done
10261 
10262   else
10263     # The variable is set, but is it from the command line or the environment?
10264 
10265     # Try to remove the string !TR! from our list.
10266     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10267     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10268       # If it failed, the variable was not from the command line. Ignore it,
10269       # but warn the user (except for BASH, which is always set by the calling BASH).
10270       if test "xTR" != xBASH; then
10271         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10272 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10273       fi
10274       # Try to locate tool using the code snippet
10275       for ac_prog in tr
10276 do
10277   # Extract the first word of "$ac_prog", so it can be a program name with args.
10278 set dummy $ac_prog; ac_word=$2
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280 $as_echo_n "checking for $ac_word... " >&6; }
10281 if ${ac_cv_path_TR+:} false; then :
10282   $as_echo_n "(cached) " >&6
10283 else
10284   case $TR in
10285   [\\/]* | ?:[\\/]*)
10286   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10287   ;;
10288   *)
10289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290 for as_dir in $PATH
10291 do
10292   IFS=$as_save_IFS
10293   test -z "$as_dir" && as_dir=.
10294     for ac_exec_ext in '' $ac_executable_extensions; do
10295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10296     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298     break 2
10299   fi
10300 done
10301   done
10302 IFS=$as_save_IFS
10303 
10304   ;;
10305 esac
10306 fi
10307 TR=$ac_cv_path_TR
10308 if test -n "$TR"; then
10309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10310 $as_echo "$TR" >&6; }
10311 else
10312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313 $as_echo "no" >&6; }
10314 fi
10315 
10316 
10317   test -n "$TR" && break
10318 done
10319 
10320     else
10321       # If it succeeded, then it was overridden by the user. We will use it
10322       # for the tool.
10323 
10324       # First remove it from the list of overridden variables, so we can test
10325       # for unknown variables in the end.
10326       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10327 
10328       # Check if the provided tool contains a complete path.
10329       tool_specified="$TR"
10330       tool_basename="${tool_specified##*/}"
10331       if test "x$tool_basename" = "x$tool_specified"; then
10332         # A command without a complete path is provided, search $PATH.
10333         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10334 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10335         # Extract the first word of "$tool_basename", so it can be a program name with args.
10336 set dummy $tool_basename; ac_word=$2
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10338 $as_echo_n "checking for $ac_word... " >&6; }
10339 if ${ac_cv_path_TR+:} false; then :
10340   $as_echo_n "(cached) " >&6
10341 else
10342   case $TR in
10343   [\\/]* | ?:[\\/]*)
10344   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10345   ;;
10346   *)
10347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10348 for as_dir in $PATH
10349 do
10350   IFS=$as_save_IFS
10351   test -z "$as_dir" && as_dir=.
10352     for ac_exec_ext in '' $ac_executable_extensions; do
10353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10354     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10356     break 2
10357   fi
10358 done
10359   done
10360 IFS=$as_save_IFS
10361 
10362   ;;
10363 esac
10364 fi
10365 TR=$ac_cv_path_TR
10366 if test -n "$TR"; then
10367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10368 $as_echo "$TR" >&6; }
10369 else
10370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371 $as_echo "no" >&6; }
10372 fi
10373 
10374 
10375         if test "x$TR" = x; then
10376           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10377         fi
10378       else
10379         # Otherwise we believe it is a complete path. Use it as it is.
10380         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10381 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10382         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10383 $as_echo_n "checking for TR... " >&6; }
10384         if test ! -x "$tool_specified"; then
10385           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10386 $as_echo "not found" >&6; }
10387           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10388         fi
10389         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10390 $as_echo "$tool_specified" >&6; }
10391       fi
10392     fi
10393   fi
10394 
10395 
10396 
10397   if test "x$TR" = x; then
10398     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10399   fi
10400 
10401 
10402 
10403 
10404 
10405   # Publish this variable in the help.
10406 
10407 
10408   if test "x$UNAME" = x; then
10409     # The variable is not set by user, try to locate tool using the code snippet
10410     for ac_prog in uname
10411 do
10412   # Extract the first word of "$ac_prog", so it can be a program name with args.
10413 set dummy $ac_prog; ac_word=$2
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415 $as_echo_n "checking for $ac_word... " >&6; }
10416 if ${ac_cv_path_UNAME+:} false; then :
10417   $as_echo_n "(cached) " >&6
10418 else
10419   case $UNAME in
10420   [\\/]* | ?:[\\/]*)
10421   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10422   ;;
10423   *)
10424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425 for as_dir in $PATH
10426 do
10427   IFS=$as_save_IFS
10428   test -z "$as_dir" && as_dir=.
10429     for ac_exec_ext in '' $ac_executable_extensions; do
10430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433     break 2
10434   fi
10435 done
10436   done
10437 IFS=$as_save_IFS
10438 
10439   ;;
10440 esac
10441 fi
10442 UNAME=$ac_cv_path_UNAME
10443 if test -n "$UNAME"; then
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10445 $as_echo "$UNAME" >&6; }
10446 else
10447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448 $as_echo "no" >&6; }
10449 fi
10450 
10451 
10452   test -n "$UNAME" && break
10453 done
10454 
10455   else
10456     # The variable is set, but is it from the command line or the environment?
10457 
10458     # Try to remove the string !UNAME! from our list.
10459     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10460     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10461       # If it failed, the variable was not from the command line. Ignore it,
10462       # but warn the user (except for BASH, which is always set by the calling BASH).
10463       if test "xUNAME" != xBASH; then
10464         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10465 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10466       fi
10467       # Try to locate tool using the code snippet
10468       for ac_prog in uname
10469 do
10470   # Extract the first word of "$ac_prog", so it can be a program name with args.
10471 set dummy $ac_prog; ac_word=$2
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473 $as_echo_n "checking for $ac_word... " >&6; }
10474 if ${ac_cv_path_UNAME+:} false; then :
10475   $as_echo_n "(cached) " >&6
10476 else
10477   case $UNAME in
10478   [\\/]* | ?:[\\/]*)
10479   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10480   ;;
10481   *)
10482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483 for as_dir in $PATH
10484 do
10485   IFS=$as_save_IFS
10486   test -z "$as_dir" && as_dir=.
10487     for ac_exec_ext in '' $ac_executable_extensions; do
10488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491     break 2
10492   fi
10493 done
10494   done
10495 IFS=$as_save_IFS
10496 
10497   ;;
10498 esac
10499 fi
10500 UNAME=$ac_cv_path_UNAME
10501 if test -n "$UNAME"; then
10502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10503 $as_echo "$UNAME" >&6; }
10504 else
10505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506 $as_echo "no" >&6; }
10507 fi
10508 
10509 
10510   test -n "$UNAME" && break
10511 done
10512 
10513     else
10514       # If it succeeded, then it was overridden by the user. We will use it
10515       # for the tool.
10516 
10517       # First remove it from the list of overridden variables, so we can test
10518       # for unknown variables in the end.
10519       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10520 
10521       # Check if the provided tool contains a complete path.
10522       tool_specified="$UNAME"
10523       tool_basename="${tool_specified##*/}"
10524       if test "x$tool_basename" = "x$tool_specified"; then
10525         # A command without a complete path is provided, search $PATH.
10526         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10527 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10528         # Extract the first word of "$tool_basename", so it can be a program name with args.
10529 set dummy $tool_basename; ac_word=$2
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531 $as_echo_n "checking for $ac_word... " >&6; }
10532 if ${ac_cv_path_UNAME+:} false; then :
10533   $as_echo_n "(cached) " >&6
10534 else
10535   case $UNAME in
10536   [\\/]* | ?:[\\/]*)
10537   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10538   ;;
10539   *)
10540   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541 for as_dir in $PATH
10542 do
10543   IFS=$as_save_IFS
10544   test -z "$as_dir" && as_dir=.
10545     for ac_exec_ext in '' $ac_executable_extensions; do
10546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549     break 2
10550   fi
10551 done
10552   done
10553 IFS=$as_save_IFS
10554 
10555   ;;
10556 esac
10557 fi
10558 UNAME=$ac_cv_path_UNAME
10559 if test -n "$UNAME"; then
10560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10561 $as_echo "$UNAME" >&6; }
10562 else
10563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564 $as_echo "no" >&6; }
10565 fi
10566 
10567 
10568         if test "x$UNAME" = x; then
10569           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10570         fi
10571       else
10572         # Otherwise we believe it is a complete path. Use it as it is.
10573         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10574 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10575         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10576 $as_echo_n "checking for UNAME... " >&6; }
10577         if test ! -x "$tool_specified"; then
10578           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10579 $as_echo "not found" >&6; }
10580           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10581         fi
10582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10583 $as_echo "$tool_specified" >&6; }
10584       fi
10585     fi
10586   fi
10587 
10588 
10589 
10590   if test "x$UNAME" = x; then
10591     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10592   fi
10593 
10594 
10595 
10596 
10597 
10598   # Publish this variable in the help.
10599 
10600 
10601   if test "x$UNIQ" = x; then
10602     # The variable is not set by user, try to locate tool using the code snippet
10603     for ac_prog in uniq
10604 do
10605   # Extract the first word of "$ac_prog", so it can be a program name with args.
10606 set dummy $ac_prog; ac_word=$2
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10608 $as_echo_n "checking for $ac_word... " >&6; }
10609 if ${ac_cv_path_UNIQ+:} false; then :
10610   $as_echo_n "(cached) " >&6
10611 else
10612   case $UNIQ in
10613   [\\/]* | ?:[\\/]*)
10614   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10615   ;;
10616   *)
10617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10618 for as_dir in $PATH
10619 do
10620   IFS=$as_save_IFS
10621   test -z "$as_dir" && as_dir=.
10622     for ac_exec_ext in '' $ac_executable_extensions; do
10623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10624     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10626     break 2
10627   fi
10628 done
10629   done
10630 IFS=$as_save_IFS
10631 
10632   ;;
10633 esac
10634 fi
10635 UNIQ=$ac_cv_path_UNIQ
10636 if test -n "$UNIQ"; then
10637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10638 $as_echo "$UNIQ" >&6; }
10639 else
10640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641 $as_echo "no" >&6; }
10642 fi
10643 
10644 
10645   test -n "$UNIQ" && break
10646 done
10647 
10648   else
10649     # The variable is set, but is it from the command line or the environment?
10650 
10651     # Try to remove the string !UNIQ! from our list.
10652     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10653     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10654       # If it failed, the variable was not from the command line. Ignore it,
10655       # but warn the user (except for BASH, which is always set by the calling BASH).
10656       if test "xUNIQ" != xBASH; then
10657         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10658 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10659       fi
10660       # Try to locate tool using the code snippet
10661       for ac_prog in uniq
10662 do
10663   # Extract the first word of "$ac_prog", so it can be a program name with args.
10664 set dummy $ac_prog; ac_word=$2
10665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10666 $as_echo_n "checking for $ac_word... " >&6; }
10667 if ${ac_cv_path_UNIQ+:} false; then :
10668   $as_echo_n "(cached) " >&6
10669 else
10670   case $UNIQ in
10671   [\\/]* | ?:[\\/]*)
10672   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10673   ;;
10674   *)
10675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10676 for as_dir in $PATH
10677 do
10678   IFS=$as_save_IFS
10679   test -z "$as_dir" && as_dir=.
10680     for ac_exec_ext in '' $ac_executable_extensions; do
10681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10682     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10684     break 2
10685   fi
10686 done
10687   done
10688 IFS=$as_save_IFS
10689 
10690   ;;
10691 esac
10692 fi
10693 UNIQ=$ac_cv_path_UNIQ
10694 if test -n "$UNIQ"; then
10695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10696 $as_echo "$UNIQ" >&6; }
10697 else
10698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699 $as_echo "no" >&6; }
10700 fi
10701 
10702 
10703   test -n "$UNIQ" && break
10704 done
10705 
10706     else
10707       # If it succeeded, then it was overridden by the user. We will use it
10708       # for the tool.
10709 
10710       # First remove it from the list of overridden variables, so we can test
10711       # for unknown variables in the end.
10712       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10713 
10714       # Check if the provided tool contains a complete path.
10715       tool_specified="$UNIQ"
10716       tool_basename="${tool_specified##*/}"
10717       if test "x$tool_basename" = "x$tool_specified"; then
10718         # A command without a complete path is provided, search $PATH.
10719         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10720 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10721         # Extract the first word of "$tool_basename", so it can be a program name with args.
10722 set dummy $tool_basename; ac_word=$2
10723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10724 $as_echo_n "checking for $ac_word... " >&6; }
10725 if ${ac_cv_path_UNIQ+:} false; then :
10726   $as_echo_n "(cached) " >&6
10727 else
10728   case $UNIQ in
10729   [\\/]* | ?:[\\/]*)
10730   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10731   ;;
10732   *)
10733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734 for as_dir in $PATH
10735 do
10736   IFS=$as_save_IFS
10737   test -z "$as_dir" && as_dir=.
10738     for ac_exec_ext in '' $ac_executable_extensions; do
10739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10740     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10742     break 2
10743   fi
10744 done
10745   done
10746 IFS=$as_save_IFS
10747 
10748   ;;
10749 esac
10750 fi
10751 UNIQ=$ac_cv_path_UNIQ
10752 if test -n "$UNIQ"; then
10753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10754 $as_echo "$UNIQ" >&6; }
10755 else
10756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757 $as_echo "no" >&6; }
10758 fi
10759 
10760 
10761         if test "x$UNIQ" = x; then
10762           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10763         fi
10764       else
10765         # Otherwise we believe it is a complete path. Use it as it is.
10766         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10767 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10769 $as_echo_n "checking for UNIQ... " >&6; }
10770         if test ! -x "$tool_specified"; then
10771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10772 $as_echo "not found" >&6; }
10773           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10774         fi
10775         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10776 $as_echo "$tool_specified" >&6; }
10777       fi
10778     fi
10779   fi
10780 
10781 
10782 
10783   if test "x$UNIQ" = x; then
10784     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10785   fi
10786 
10787 
10788 
10789 
10790 
10791   # Publish this variable in the help.
10792 
10793 
10794   if test "x$WC" = x; then
10795     # The variable is not set by user, try to locate tool using the code snippet
10796     for ac_prog in wc
10797 do
10798   # Extract the first word of "$ac_prog", so it can be a program name with args.
10799 set dummy $ac_prog; ac_word=$2
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801 $as_echo_n "checking for $ac_word... " >&6; }
10802 if ${ac_cv_path_WC+:} false; then :
10803   $as_echo_n "(cached) " >&6
10804 else
10805   case $WC in
10806   [\\/]* | ?:[\\/]*)
10807   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10808   ;;
10809   *)
10810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811 for as_dir in $PATH
10812 do
10813   IFS=$as_save_IFS
10814   test -z "$as_dir" && as_dir=.
10815     for ac_exec_ext in '' $ac_executable_extensions; do
10816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819     break 2
10820   fi
10821 done
10822   done
10823 IFS=$as_save_IFS
10824 
10825   ;;
10826 esac
10827 fi
10828 WC=$ac_cv_path_WC
10829 if test -n "$WC"; then
10830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10831 $as_echo "$WC" >&6; }
10832 else
10833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834 $as_echo "no" >&6; }
10835 fi
10836 
10837 
10838   test -n "$WC" && break
10839 done
10840 
10841   else
10842     # The variable is set, but is it from the command line or the environment?
10843 
10844     # Try to remove the string !WC! from our list.
10845     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10846     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10847       # If it failed, the variable was not from the command line. Ignore it,
10848       # but warn the user (except for BASH, which is always set by the calling BASH).
10849       if test "xWC" != xBASH; then
10850         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10851 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10852       fi
10853       # Try to locate tool using the code snippet
10854       for ac_prog in wc
10855 do
10856   # Extract the first word of "$ac_prog", so it can be a program name with args.
10857 set dummy $ac_prog; ac_word=$2
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10859 $as_echo_n "checking for $ac_word... " >&6; }
10860 if ${ac_cv_path_WC+:} false; then :
10861   $as_echo_n "(cached) " >&6
10862 else
10863   case $WC in
10864   [\\/]* | ?:[\\/]*)
10865   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10866   ;;
10867   *)
10868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10869 for as_dir in $PATH
10870 do
10871   IFS=$as_save_IFS
10872   test -z "$as_dir" && as_dir=.
10873     for ac_exec_ext in '' $ac_executable_extensions; do
10874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10875     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10877     break 2
10878   fi
10879 done
10880   done
10881 IFS=$as_save_IFS
10882 
10883   ;;
10884 esac
10885 fi
10886 WC=$ac_cv_path_WC
10887 if test -n "$WC"; then
10888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10889 $as_echo "$WC" >&6; }
10890 else
10891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892 $as_echo "no" >&6; }
10893 fi
10894 
10895 
10896   test -n "$WC" && break
10897 done
10898 
10899     else
10900       # If it succeeded, then it was overridden by the user. We will use it
10901       # for the tool.
10902 
10903       # First remove it from the list of overridden variables, so we can test
10904       # for unknown variables in the end.
10905       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10906 
10907       # Check if the provided tool contains a complete path.
10908       tool_specified="$WC"
10909       tool_basename="${tool_specified##*/}"
10910       if test "x$tool_basename" = "x$tool_specified"; then
10911         # A command without a complete path is provided, search $PATH.
10912         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10913 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10914         # Extract the first word of "$tool_basename", so it can be a program name with args.
10915 set dummy $tool_basename; ac_word=$2
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10917 $as_echo_n "checking for $ac_word... " >&6; }
10918 if ${ac_cv_path_WC+:} false; then :
10919   $as_echo_n "(cached) " >&6
10920 else
10921   case $WC in
10922   [\\/]* | ?:[\\/]*)
10923   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10924   ;;
10925   *)
10926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10927 for as_dir in $PATH
10928 do
10929   IFS=$as_save_IFS
10930   test -z "$as_dir" && as_dir=.
10931     for ac_exec_ext in '' $ac_executable_extensions; do
10932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10933     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10935     break 2
10936   fi
10937 done
10938   done
10939 IFS=$as_save_IFS
10940 
10941   ;;
10942 esac
10943 fi
10944 WC=$ac_cv_path_WC
10945 if test -n "$WC"; then
10946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10947 $as_echo "$WC" >&6; }
10948 else
10949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950 $as_echo "no" >&6; }
10951 fi
10952 
10953 
10954         if test "x$WC" = x; then
10955           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10956         fi
10957       else
10958         # Otherwise we believe it is a complete path. Use it as it is.
10959         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10960 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10961         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10962 $as_echo_n "checking for WC... " >&6; }
10963         if test ! -x "$tool_specified"; then
10964           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10965 $as_echo "not found" >&6; }
10966           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10967         fi
10968         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10969 $as_echo "$tool_specified" >&6; }
10970       fi
10971     fi
10972   fi
10973 
10974 
10975 
10976   if test "x$WC" = x; then
10977     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10978   fi
10979 
10980 
10981 
10982 
10983 
10984   # Publish this variable in the help.
10985 
10986 
10987   if test "x$WHICH" = x; then
10988     # The variable is not set by user, try to locate tool using the code snippet
10989     for ac_prog in which
10990 do
10991   # Extract the first word of "$ac_prog", so it can be a program name with args.
10992 set dummy $ac_prog; ac_word=$2
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10994 $as_echo_n "checking for $ac_word... " >&6; }
10995 if ${ac_cv_path_WHICH+:} false; then :
10996   $as_echo_n "(cached) " >&6
10997 else
10998   case $WHICH in
10999   [\\/]* | ?:[\\/]*)
11000   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11001   ;;
11002   *)
11003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11004 for as_dir in $PATH
11005 do
11006   IFS=$as_save_IFS
11007   test -z "$as_dir" && as_dir=.
11008     for ac_exec_ext in '' $ac_executable_extensions; do
11009   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11010     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11012     break 2
11013   fi
11014 done
11015   done
11016 IFS=$as_save_IFS
11017 
11018   ;;
11019 esac
11020 fi
11021 WHICH=$ac_cv_path_WHICH
11022 if test -n "$WHICH"; then
11023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11024 $as_echo "$WHICH" >&6; }
11025 else
11026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027 $as_echo "no" >&6; }
11028 fi
11029 
11030 
11031   test -n "$WHICH" && break
11032 done
11033 
11034   else
11035     # The variable is set, but is it from the command line or the environment?
11036 
11037     # Try to remove the string !WHICH! from our list.
11038     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11039     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11040       # If it failed, the variable was not from the command line. Ignore it,
11041       # but warn the user (except for BASH, which is always set by the calling BASH).
11042       if test "xWHICH" != xBASH; then
11043         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11044 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11045       fi
11046       # Try to locate tool using the code snippet
11047       for ac_prog in which
11048 do
11049   # Extract the first word of "$ac_prog", so it can be a program name with args.
11050 set dummy $ac_prog; ac_word=$2
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11052 $as_echo_n "checking for $ac_word... " >&6; }
11053 if ${ac_cv_path_WHICH+:} false; then :
11054   $as_echo_n "(cached) " >&6
11055 else
11056   case $WHICH in
11057   [\\/]* | ?:[\\/]*)
11058   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11059   ;;
11060   *)
11061   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11062 for as_dir in $PATH
11063 do
11064   IFS=$as_save_IFS
11065   test -z "$as_dir" && as_dir=.
11066     for ac_exec_ext in '' $ac_executable_extensions; do
11067   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11068     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11069     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11070     break 2
11071   fi
11072 done
11073   done
11074 IFS=$as_save_IFS
11075 
11076   ;;
11077 esac
11078 fi
11079 WHICH=$ac_cv_path_WHICH
11080 if test -n "$WHICH"; then
11081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11082 $as_echo "$WHICH" >&6; }
11083 else
11084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11085 $as_echo "no" >&6; }
11086 fi
11087 
11088 
11089   test -n "$WHICH" && break
11090 done
11091 
11092     else
11093       # If it succeeded, then it was overridden by the user. We will use it
11094       # for the tool.
11095 
11096       # First remove it from the list of overridden variables, so we can test
11097       # for unknown variables in the end.
11098       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11099 
11100       # Check if the provided tool contains a complete path.
11101       tool_specified="$WHICH"
11102       tool_basename="${tool_specified##*/}"
11103       if test "x$tool_basename" = "x$tool_specified"; then
11104         # A command without a complete path is provided, search $PATH.
11105         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11106 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11107         # Extract the first word of "$tool_basename", so it can be a program name with args.
11108 set dummy $tool_basename; ac_word=$2
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11110 $as_echo_n "checking for $ac_word... " >&6; }
11111 if ${ac_cv_path_WHICH+:} false; then :
11112   $as_echo_n "(cached) " >&6
11113 else
11114   case $WHICH in
11115   [\\/]* | ?:[\\/]*)
11116   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11117   ;;
11118   *)
11119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11120 for as_dir in $PATH
11121 do
11122   IFS=$as_save_IFS
11123   test -z "$as_dir" && as_dir=.
11124     for ac_exec_ext in '' $ac_executable_extensions; do
11125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11126     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11128     break 2
11129   fi
11130 done
11131   done
11132 IFS=$as_save_IFS
11133 
11134   ;;
11135 esac
11136 fi
11137 WHICH=$ac_cv_path_WHICH
11138 if test -n "$WHICH"; then
11139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11140 $as_echo "$WHICH" >&6; }
11141 else
11142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11143 $as_echo "no" >&6; }
11144 fi
11145 
11146 
11147         if test "x$WHICH" = x; then
11148           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11149         fi
11150       else
11151         # Otherwise we believe it is a complete path. Use it as it is.
11152         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11153 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11154         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11155 $as_echo_n "checking for WHICH... " >&6; }
11156         if test ! -x "$tool_specified"; then
11157           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11158 $as_echo "not found" >&6; }
11159           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11160         fi
11161         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11162 $as_echo "$tool_specified" >&6; }
11163       fi
11164     fi
11165   fi
11166 
11167 
11168 
11169   if test "x$WHICH" = x; then
11170     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11171   fi
11172 
11173 
11174 
11175 
11176 
11177   # Publish this variable in the help.
11178 
11179 
11180   if test "x$XARGS" = x; then
11181     # The variable is not set by user, try to locate tool using the code snippet
11182     for ac_prog in xargs
11183 do
11184   # Extract the first word of "$ac_prog", so it can be a program name with args.
11185 set dummy $ac_prog; ac_word=$2
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11187 $as_echo_n "checking for $ac_word... " >&6; }
11188 if ${ac_cv_path_XARGS+:} false; then :
11189   $as_echo_n "(cached) " >&6
11190 else
11191   case $XARGS in
11192   [\\/]* | ?:[\\/]*)
11193   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11194   ;;
11195   *)
11196   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11197 for as_dir in $PATH
11198 do
11199   IFS=$as_save_IFS
11200   test -z "$as_dir" && as_dir=.
11201     for ac_exec_ext in '' $ac_executable_extensions; do
11202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11203     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11205     break 2
11206   fi
11207 done
11208   done
11209 IFS=$as_save_IFS
11210 
11211   ;;
11212 esac
11213 fi
11214 XARGS=$ac_cv_path_XARGS
11215 if test -n "$XARGS"; then
11216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11217 $as_echo "$XARGS" >&6; }
11218 else
11219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220 $as_echo "no" >&6; }
11221 fi
11222 
11223 
11224   test -n "$XARGS" && break
11225 done
11226 
11227   else
11228     # The variable is set, but is it from the command line or the environment?
11229 
11230     # Try to remove the string !XARGS! from our list.
11231     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11232     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11233       # If it failed, the variable was not from the command line. Ignore it,
11234       # but warn the user (except for BASH, which is always set by the calling BASH).
11235       if test "xXARGS" != xBASH; then
11236         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11237 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11238       fi
11239       # Try to locate tool using the code snippet
11240       for ac_prog in xargs
11241 do
11242   # Extract the first word of "$ac_prog", so it can be a program name with args.
11243 set dummy $ac_prog; ac_word=$2
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11245 $as_echo_n "checking for $ac_word... " >&6; }
11246 if ${ac_cv_path_XARGS+:} false; then :
11247   $as_echo_n "(cached) " >&6
11248 else
11249   case $XARGS in
11250   [\\/]* | ?:[\\/]*)
11251   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11252   ;;
11253   *)
11254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11255 for as_dir in $PATH
11256 do
11257   IFS=$as_save_IFS
11258   test -z "$as_dir" && as_dir=.
11259     for ac_exec_ext in '' $ac_executable_extensions; do
11260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11261     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11263     break 2
11264   fi
11265 done
11266   done
11267 IFS=$as_save_IFS
11268 
11269   ;;
11270 esac
11271 fi
11272 XARGS=$ac_cv_path_XARGS
11273 if test -n "$XARGS"; then
11274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11275 $as_echo "$XARGS" >&6; }
11276 else
11277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11278 $as_echo "no" >&6; }
11279 fi
11280 
11281 
11282   test -n "$XARGS" && break
11283 done
11284 
11285     else
11286       # If it succeeded, then it was overridden by the user. We will use it
11287       # for the tool.
11288 
11289       # First remove it from the list of overridden variables, so we can test
11290       # for unknown variables in the end.
11291       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11292 
11293       # Check if the provided tool contains a complete path.
11294       tool_specified="$XARGS"
11295       tool_basename="${tool_specified##*/}"
11296       if test "x$tool_basename" = "x$tool_specified"; then
11297         # A command without a complete path is provided, search $PATH.
11298         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11299 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11300         # Extract the first word of "$tool_basename", so it can be a program name with args.
11301 set dummy $tool_basename; ac_word=$2
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11303 $as_echo_n "checking for $ac_word... " >&6; }
11304 if ${ac_cv_path_XARGS+:} false; then :
11305   $as_echo_n "(cached) " >&6
11306 else
11307   case $XARGS in
11308   [\\/]* | ?:[\\/]*)
11309   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11310   ;;
11311   *)
11312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11313 for as_dir in $PATH
11314 do
11315   IFS=$as_save_IFS
11316   test -z "$as_dir" && as_dir=.
11317     for ac_exec_ext in '' $ac_executable_extensions; do
11318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11319     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11321     break 2
11322   fi
11323 done
11324   done
11325 IFS=$as_save_IFS
11326 
11327   ;;
11328 esac
11329 fi
11330 XARGS=$ac_cv_path_XARGS
11331 if test -n "$XARGS"; then
11332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11333 $as_echo "$XARGS" >&6; }
11334 else
11335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11336 $as_echo "no" >&6; }
11337 fi
11338 
11339 
11340         if test "x$XARGS" = x; then
11341           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11342         fi
11343       else
11344         # Otherwise we believe it is a complete path. Use it as it is.
11345         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11346 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11347         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11348 $as_echo_n "checking for XARGS... " >&6; }
11349         if test ! -x "$tool_specified"; then
11350           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11351 $as_echo "not found" >&6; }
11352           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11353         fi
11354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11355 $as_echo "$tool_specified" >&6; }
11356       fi
11357     fi
11358   fi
11359 
11360 
11361 
11362   if test "x$XARGS" = x; then
11363     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11364   fi
11365 
11366 
11367 
11368   # Then required tools that require some special treatment.
11369 
11370 
11371   # Publish this variable in the help.
11372 
11373 
11374   if test "x$AWK" = x; then
11375     # The variable is not set by user, try to locate tool using the code snippet
11376     for ac_prog in gawk mawk nawk awk
11377 do
11378   # Extract the first word of "$ac_prog", so it can be a program name with args.
11379 set dummy $ac_prog; ac_word=$2
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11381 $as_echo_n "checking for $ac_word... " >&6; }
11382 if ${ac_cv_prog_AWK+:} false; then :
11383   $as_echo_n "(cached) " >&6
11384 else
11385   if test -n "$AWK"; then
11386   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11387 else
11388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11389 for as_dir in $PATH
11390 do
11391   IFS=$as_save_IFS
11392   test -z "$as_dir" && as_dir=.
11393     for ac_exec_ext in '' $ac_executable_extensions; do
11394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11395     ac_cv_prog_AWK="$ac_prog"
11396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11397     break 2
11398   fi
11399 done
11400   done
11401 IFS=$as_save_IFS
11402 
11403 fi
11404 fi
11405 AWK=$ac_cv_prog_AWK
11406 if test -n "$AWK"; then
11407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11408 $as_echo "$AWK" >&6; }
11409 else
11410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411 $as_echo "no" >&6; }
11412 fi
11413 
11414 
11415   test -n "$AWK" && break
11416 done
11417 
11418   else
11419     # The variable is set, but is it from the command line or the environment?
11420 
11421     # Try to remove the string !AWK! from our list.
11422     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11423     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11424       # If it failed, the variable was not from the command line. Ignore it,
11425       # but warn the user (except for BASH, which is always set by the calling BASH).
11426       if test "xAWK" != xBASH; then
11427         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11428 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11429       fi
11430       # Try to locate tool using the code snippet
11431       for ac_prog in gawk mawk nawk awk
11432 do
11433   # Extract the first word of "$ac_prog", so it can be a program name with args.
11434 set dummy $ac_prog; ac_word=$2
11435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436 $as_echo_n "checking for $ac_word... " >&6; }
11437 if ${ac_cv_prog_AWK+:} false; then :
11438   $as_echo_n "(cached) " >&6
11439 else
11440   if test -n "$AWK"; then
11441   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11442 else
11443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11444 for as_dir in $PATH
11445 do
11446   IFS=$as_save_IFS
11447   test -z "$as_dir" && as_dir=.
11448     for ac_exec_ext in '' $ac_executable_extensions; do
11449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11450     ac_cv_prog_AWK="$ac_prog"
11451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11452     break 2
11453   fi
11454 done
11455   done
11456 IFS=$as_save_IFS
11457 
11458 fi
11459 fi
11460 AWK=$ac_cv_prog_AWK
11461 if test -n "$AWK"; then
11462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11463 $as_echo "$AWK" >&6; }
11464 else
11465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466 $as_echo "no" >&6; }
11467 fi
11468 
11469 
11470   test -n "$AWK" && break
11471 done
11472 
11473     else
11474       # If it succeeded, then it was overridden by the user. We will use it
11475       # for the tool.
11476 
11477       # First remove it from the list of overridden variables, so we can test
11478       # for unknown variables in the end.
11479       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11480 
11481       # Check if the provided tool contains a complete path.
11482       tool_specified="$AWK"
11483       tool_basename="${tool_specified##*/}"
11484       if test "x$tool_basename" = "x$tool_specified"; then
11485         # A command without a complete path is provided, search $PATH.
11486         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11487 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11488         # Extract the first word of "$tool_basename", so it can be a program name with args.
11489 set dummy $tool_basename; ac_word=$2
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491 $as_echo_n "checking for $ac_word... " >&6; }
11492 if ${ac_cv_path_AWK+:} false; then :
11493   $as_echo_n "(cached) " >&6
11494 else
11495   case $AWK in
11496   [\\/]* | ?:[\\/]*)
11497   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11498   ;;
11499   *)
11500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501 for as_dir in $PATH
11502 do
11503   IFS=$as_save_IFS
11504   test -z "$as_dir" && as_dir=.
11505     for ac_exec_ext in '' $ac_executable_extensions; do
11506   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11508     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509     break 2
11510   fi
11511 done
11512   done
11513 IFS=$as_save_IFS
11514 
11515   ;;
11516 esac
11517 fi
11518 AWK=$ac_cv_path_AWK
11519 if test -n "$AWK"; then
11520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11521 $as_echo "$AWK" >&6; }
11522 else
11523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524 $as_echo "no" >&6; }
11525 fi
11526 
11527 
11528         if test "x$AWK" = x; then
11529           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11530         fi
11531       else
11532         # Otherwise we believe it is a complete path. Use it as it is.
11533         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11534 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11536 $as_echo_n "checking for AWK... " >&6; }
11537         if test ! -x "$tool_specified"; then
11538           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11539 $as_echo "not found" >&6; }
11540           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11541         fi
11542         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11543 $as_echo "$tool_specified" >&6; }
11544       fi
11545     fi
11546   fi
11547 
11548 
11549   if test "x$AWK" = x; then
11550     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11551   fi
11552 
11553 
11554 
11555 
11556   # Publish this variable in the help.
11557 
11558 
11559   if test "x$GREP" = x; then
11560     # The variable is not set by user, try to locate tool using the code snippet
11561     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11562 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11563 if ${ac_cv_path_GREP+:} false; then :
11564   $as_echo_n "(cached) " >&6
11565 else
11566   if test -z "$GREP"; then
11567   ac_path_GREP_found=false
11568   # Loop through the user's path and test for each of PROGNAME-LIST
11569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11570 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11571 do
11572   IFS=$as_save_IFS
11573   test -z "$as_dir" && as_dir=.
11574     for ac_prog in grep ggrep; do
11575     for ac_exec_ext in '' $ac_executable_extensions; do
11576       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11577       as_fn_executable_p "$ac_path_GREP" || continue
11578 # Check for GNU ac_path_GREP and select it if it is found.
11579   # Check for GNU $ac_path_GREP
11580 case `"$ac_path_GREP" --version 2>&1` in
11581 *GNU*)
11582   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11583 *)
11584   ac_count=0
11585   $as_echo_n 0123456789 >"conftest.in"
11586   while :
11587   do
11588     cat "conftest.in" "conftest.in" >"conftest.tmp"
11589     mv "conftest.tmp" "conftest.in"
11590     cp "conftest.in" "conftest.nl"
11591     $as_echo 'GREP' >> "conftest.nl"
11592     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11593     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11594     as_fn_arith $ac_count + 1 && ac_count=$as_val
11595     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11596       # Best one so far, save it but keep looking for a better one
11597       ac_cv_path_GREP="$ac_path_GREP"
11598       ac_path_GREP_max=$ac_count
11599     fi
11600     # 10*(2^10) chars as input seems more than enough
11601     test $ac_count -gt 10 && break
11602   done
11603   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11604 esac
11605 
11606       $ac_path_GREP_found && break 3
11607     done
11608   done
11609   done
11610 IFS=$as_save_IFS
11611   if test -z "$ac_cv_path_GREP"; then
11612     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11613   fi
11614 else
11615   ac_cv_path_GREP=$GREP
11616 fi
11617 
11618 fi
11619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11620 $as_echo "$ac_cv_path_GREP" >&6; }
11621  GREP="$ac_cv_path_GREP"
11622 
11623 
11624   else
11625     # The variable is set, but is it from the command line or the environment?
11626 
11627     # Try to remove the string !GREP! from our list.
11628     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11629     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11630       # If it failed, the variable was not from the command line. Ignore it,
11631       # but warn the user (except for BASH, which is always set by the calling BASH).
11632       if test "xGREP" != xBASH; then
11633         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11634 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11635       fi
11636       # Try to locate tool using the code snippet
11637       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11638 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11639 if ${ac_cv_path_GREP+:} false; then :
11640   $as_echo_n "(cached) " >&6
11641 else
11642   if test -z "$GREP"; then
11643   ac_path_GREP_found=false
11644   # Loop through the user's path and test for each of PROGNAME-LIST
11645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11647 do
11648   IFS=$as_save_IFS
11649   test -z "$as_dir" && as_dir=.
11650     for ac_prog in grep ggrep; do
11651     for ac_exec_ext in '' $ac_executable_extensions; do
11652       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11653       as_fn_executable_p "$ac_path_GREP" || continue
11654 # Check for GNU ac_path_GREP and select it if it is found.
11655   # Check for GNU $ac_path_GREP
11656 case `"$ac_path_GREP" --version 2>&1` in
11657 *GNU*)
11658   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11659 *)
11660   ac_count=0
11661   $as_echo_n 0123456789 >"conftest.in"
11662   while :
11663   do
11664     cat "conftest.in" "conftest.in" >"conftest.tmp"
11665     mv "conftest.tmp" "conftest.in"
11666     cp "conftest.in" "conftest.nl"
11667     $as_echo 'GREP' >> "conftest.nl"
11668     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11669     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11670     as_fn_arith $ac_count + 1 && ac_count=$as_val
11671     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11672       # Best one so far, save it but keep looking for a better one
11673       ac_cv_path_GREP="$ac_path_GREP"
11674       ac_path_GREP_max=$ac_count
11675     fi
11676     # 10*(2^10) chars as input seems more than enough
11677     test $ac_count -gt 10 && break
11678   done
11679   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11680 esac
11681 
11682       $ac_path_GREP_found && break 3
11683     done
11684   done
11685   done
11686 IFS=$as_save_IFS
11687   if test -z "$ac_cv_path_GREP"; then
11688     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11689   fi
11690 else
11691   ac_cv_path_GREP=$GREP
11692 fi
11693 
11694 fi
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11696 $as_echo "$ac_cv_path_GREP" >&6; }
11697  GREP="$ac_cv_path_GREP"
11698 
11699 
11700     else
11701       # If it succeeded, then it was overridden by the user. We will use it
11702       # for the tool.
11703 
11704       # First remove it from the list of overridden variables, so we can test
11705       # for unknown variables in the end.
11706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11707 
11708       # Check if the provided tool contains a complete path.
11709       tool_specified="$GREP"
11710       tool_basename="${tool_specified##*/}"
11711       if test "x$tool_basename" = "x$tool_specified"; then
11712         # A command without a complete path is provided, search $PATH.
11713         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11714 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11715         # Extract the first word of "$tool_basename", so it can be a program name with args.
11716 set dummy $tool_basename; ac_word=$2
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11718 $as_echo_n "checking for $ac_word... " >&6; }
11719 if ${ac_cv_path_GREP+:} false; then :
11720   $as_echo_n "(cached) " >&6
11721 else
11722   case $GREP in
11723   [\\/]* | ?:[\\/]*)
11724   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11725   ;;
11726   *)
11727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11728 for as_dir in $PATH
11729 do
11730   IFS=$as_save_IFS
11731   test -z "$as_dir" && as_dir=.
11732     for ac_exec_ext in '' $ac_executable_extensions; do
11733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11734     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11736     break 2
11737   fi
11738 done
11739   done
11740 IFS=$as_save_IFS
11741 
11742   ;;
11743 esac
11744 fi
11745 GREP=$ac_cv_path_GREP
11746 if test -n "$GREP"; then
11747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11748 $as_echo "$GREP" >&6; }
11749 else
11750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751 $as_echo "no" >&6; }
11752 fi
11753 
11754 
11755         if test "x$GREP" = x; then
11756           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11757         fi
11758       else
11759         # Otherwise we believe it is a complete path. Use it as it is.
11760         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11761 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11763 $as_echo_n "checking for GREP... " >&6; }
11764         if test ! -x "$tool_specified"; then
11765           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11766 $as_echo "not found" >&6; }
11767           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11768         fi
11769         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11770 $as_echo "$tool_specified" >&6; }
11771       fi
11772     fi
11773   fi
11774 
11775 
11776   if test "x$GREP" = x; then
11777     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11778   fi
11779 
11780 
11781 
11782 
11783   # Publish this variable in the help.
11784 
11785 
11786   if test "x$EGREP" = x; then
11787     # The variable is not set by user, try to locate tool using the code snippet
11788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11789 $as_echo_n "checking for egrep... " >&6; }
11790 if ${ac_cv_path_EGREP+:} false; then :
11791   $as_echo_n "(cached) " >&6
11792 else
11793   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11794    then ac_cv_path_EGREP="$GREP -E"
11795    else
11796      if test -z "$EGREP"; then
11797   ac_path_EGREP_found=false
11798   # Loop through the user's path and test for each of PROGNAME-LIST
11799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11800 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11801 do
11802   IFS=$as_save_IFS
11803   test -z "$as_dir" && as_dir=.
11804     for ac_prog in egrep; do
11805     for ac_exec_ext in '' $ac_executable_extensions; do
11806       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11807       as_fn_executable_p "$ac_path_EGREP" || continue
11808 # Check for GNU ac_path_EGREP and select it if it is found.
11809   # Check for GNU $ac_path_EGREP
11810 case `"$ac_path_EGREP" --version 2>&1` in
11811 *GNU*)
11812   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11813 *)
11814   ac_count=0
11815   $as_echo_n 0123456789 >"conftest.in"
11816   while :
11817   do
11818     cat "conftest.in" "conftest.in" >"conftest.tmp"
11819     mv "conftest.tmp" "conftest.in"
11820     cp "conftest.in" "conftest.nl"
11821     $as_echo 'EGREP' >> "conftest.nl"
11822     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11823     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11824     as_fn_arith $ac_count + 1 && ac_count=$as_val
11825     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11826       # Best one so far, save it but keep looking for a better one
11827       ac_cv_path_EGREP="$ac_path_EGREP"
11828       ac_path_EGREP_max=$ac_count
11829     fi
11830     # 10*(2^10) chars as input seems more than enough
11831     test $ac_count -gt 10 && break
11832   done
11833   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11834 esac
11835 
11836       $ac_path_EGREP_found && break 3
11837     done
11838   done
11839   done
11840 IFS=$as_save_IFS
11841   if test -z "$ac_cv_path_EGREP"; then
11842     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11843   fi
11844 else
11845   ac_cv_path_EGREP=$EGREP
11846 fi
11847 
11848    fi
11849 fi
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11851 $as_echo "$ac_cv_path_EGREP" >&6; }
11852  EGREP="$ac_cv_path_EGREP"
11853 
11854 
11855   else
11856     # The variable is set, but is it from the command line or the environment?
11857 
11858     # Try to remove the string !EGREP! from our list.
11859     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11860     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11861       # If it failed, the variable was not from the command line. Ignore it,
11862       # but warn the user (except for BASH, which is always set by the calling BASH).
11863       if test "xEGREP" != xBASH; then
11864         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11865 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11866       fi
11867       # Try to locate tool using the code snippet
11868       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11869 $as_echo_n "checking for egrep... " >&6; }
11870 if ${ac_cv_path_EGREP+:} false; then :
11871   $as_echo_n "(cached) " >&6
11872 else
11873   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11874    then ac_cv_path_EGREP="$GREP -E"
11875    else
11876      if test -z "$EGREP"; then
11877   ac_path_EGREP_found=false
11878   # Loop through the user's path and test for each of PROGNAME-LIST
11879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11880 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11881 do
11882   IFS=$as_save_IFS
11883   test -z "$as_dir" && as_dir=.
11884     for ac_prog in egrep; do
11885     for ac_exec_ext in '' $ac_executable_extensions; do
11886       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11887       as_fn_executable_p "$ac_path_EGREP" || continue
11888 # Check for GNU ac_path_EGREP and select it if it is found.
11889   # Check for GNU $ac_path_EGREP
11890 case `"$ac_path_EGREP" --version 2>&1` in
11891 *GNU*)
11892   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11893 *)
11894   ac_count=0
11895   $as_echo_n 0123456789 >"conftest.in"
11896   while :
11897   do
11898     cat "conftest.in" "conftest.in" >"conftest.tmp"
11899     mv "conftest.tmp" "conftest.in"
11900     cp "conftest.in" "conftest.nl"
11901     $as_echo 'EGREP' >> "conftest.nl"
11902     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11903     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11904     as_fn_arith $ac_count + 1 && ac_count=$as_val
11905     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11906       # Best one so far, save it but keep looking for a better one
11907       ac_cv_path_EGREP="$ac_path_EGREP"
11908       ac_path_EGREP_max=$ac_count
11909     fi
11910     # 10*(2^10) chars as input seems more than enough
11911     test $ac_count -gt 10 && break
11912   done
11913   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11914 esac
11915 
11916       $ac_path_EGREP_found && break 3
11917     done
11918   done
11919   done
11920 IFS=$as_save_IFS
11921   if test -z "$ac_cv_path_EGREP"; then
11922     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11923   fi
11924 else
11925   ac_cv_path_EGREP=$EGREP
11926 fi
11927 
11928    fi
11929 fi
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11931 $as_echo "$ac_cv_path_EGREP" >&6; }
11932  EGREP="$ac_cv_path_EGREP"
11933 
11934 
11935     else
11936       # If it succeeded, then it was overridden by the user. We will use it
11937       # for the tool.
11938 
11939       # First remove it from the list of overridden variables, so we can test
11940       # for unknown variables in the end.
11941       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11942 
11943       # Check if the provided tool contains a complete path.
11944       tool_specified="$EGREP"
11945       tool_basename="${tool_specified##*/}"
11946       if test "x$tool_basename" = "x$tool_specified"; then
11947         # A command without a complete path is provided, search $PATH.
11948         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11949 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11950         # Extract the first word of "$tool_basename", so it can be a program name with args.
11951 set dummy $tool_basename; ac_word=$2
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11953 $as_echo_n "checking for $ac_word... " >&6; }
11954 if ${ac_cv_path_EGREP+:} false; then :
11955   $as_echo_n "(cached) " >&6
11956 else
11957   case $EGREP in
11958   [\\/]* | ?:[\\/]*)
11959   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11960   ;;
11961   *)
11962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11963 for as_dir in $PATH
11964 do
11965   IFS=$as_save_IFS
11966   test -z "$as_dir" && as_dir=.
11967     for ac_exec_ext in '' $ac_executable_extensions; do
11968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11969     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11971     break 2
11972   fi
11973 done
11974   done
11975 IFS=$as_save_IFS
11976 
11977   ;;
11978 esac
11979 fi
11980 EGREP=$ac_cv_path_EGREP
11981 if test -n "$EGREP"; then
11982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11983 $as_echo "$EGREP" >&6; }
11984 else
11985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986 $as_echo "no" >&6; }
11987 fi
11988 
11989 
11990         if test "x$EGREP" = x; then
11991           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11992         fi
11993       else
11994         # Otherwise we believe it is a complete path. Use it as it is.
11995         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11996 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11997         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11998 $as_echo_n "checking for EGREP... " >&6; }
11999         if test ! -x "$tool_specified"; then
12000           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12001 $as_echo "not found" >&6; }
12002           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12003         fi
12004         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12005 $as_echo "$tool_specified" >&6; }
12006       fi
12007     fi
12008   fi
12009 
12010 
12011   if test "x$EGREP" = x; then
12012     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12013   fi
12014 
12015 
12016 
12017 
12018   # Publish this variable in the help.
12019 
12020 
12021   if test "x$FGREP" = x; then
12022     # The variable is not set by user, try to locate tool using the code snippet
12023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12024 $as_echo_n "checking for fgrep... " >&6; }
12025 if ${ac_cv_path_FGREP+:} false; then :
12026   $as_echo_n "(cached) " >&6
12027 else
12028   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12029    then ac_cv_path_FGREP="$GREP -F"
12030    else
12031      if test -z "$FGREP"; then
12032   ac_path_FGREP_found=false
12033   # Loop through the user's path and test for each of PROGNAME-LIST
12034   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12036 do
12037   IFS=$as_save_IFS
12038   test -z "$as_dir" && as_dir=.
12039     for ac_prog in fgrep; do
12040     for ac_exec_ext in '' $ac_executable_extensions; do
12041       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12042       as_fn_executable_p "$ac_path_FGREP" || continue
12043 # Check for GNU ac_path_FGREP and select it if it is found.
12044   # Check for GNU $ac_path_FGREP
12045 case `"$ac_path_FGREP" --version 2>&1` in
12046 *GNU*)
12047   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12048 *)
12049   ac_count=0
12050   $as_echo_n 0123456789 >"conftest.in"
12051   while :
12052   do
12053     cat "conftest.in" "conftest.in" >"conftest.tmp"
12054     mv "conftest.tmp" "conftest.in"
12055     cp "conftest.in" "conftest.nl"
12056     $as_echo 'FGREP' >> "conftest.nl"
12057     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12058     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12059     as_fn_arith $ac_count + 1 && ac_count=$as_val
12060     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12061       # Best one so far, save it but keep looking for a better one
12062       ac_cv_path_FGREP="$ac_path_FGREP"
12063       ac_path_FGREP_max=$ac_count
12064     fi
12065     # 10*(2^10) chars as input seems more than enough
12066     test $ac_count -gt 10 && break
12067   done
12068   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12069 esac
12070 
12071       $ac_path_FGREP_found && break 3
12072     done
12073   done
12074   done
12075 IFS=$as_save_IFS
12076   if test -z "$ac_cv_path_FGREP"; then
12077     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12078   fi
12079 else
12080   ac_cv_path_FGREP=$FGREP
12081 fi
12082 
12083    fi
12084 fi
12085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12086 $as_echo "$ac_cv_path_FGREP" >&6; }
12087  FGREP="$ac_cv_path_FGREP"
12088 
12089 
12090   else
12091     # The variable is set, but is it from the command line or the environment?
12092 
12093     # Try to remove the string !FGREP! from our list.
12094     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12095     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12096       # If it failed, the variable was not from the command line. Ignore it,
12097       # but warn the user (except for BASH, which is always set by the calling BASH).
12098       if test "xFGREP" != xBASH; then
12099         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12100 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12101       fi
12102       # Try to locate tool using the code snippet
12103       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12104 $as_echo_n "checking for fgrep... " >&6; }
12105 if ${ac_cv_path_FGREP+:} false; then :
12106   $as_echo_n "(cached) " >&6
12107 else
12108   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12109    then ac_cv_path_FGREP="$GREP -F"
12110    else
12111      if test -z "$FGREP"; then
12112   ac_path_FGREP_found=false
12113   # Loop through the user's path and test for each of PROGNAME-LIST
12114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12115 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12116 do
12117   IFS=$as_save_IFS
12118   test -z "$as_dir" && as_dir=.
12119     for ac_prog in fgrep; do
12120     for ac_exec_ext in '' $ac_executable_extensions; do
12121       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12122       as_fn_executable_p "$ac_path_FGREP" || continue
12123 # Check for GNU ac_path_FGREP and select it if it is found.
12124   # Check for GNU $ac_path_FGREP
12125 case `"$ac_path_FGREP" --version 2>&1` in
12126 *GNU*)
12127   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12128 *)
12129   ac_count=0
12130   $as_echo_n 0123456789 >"conftest.in"
12131   while :
12132   do
12133     cat "conftest.in" "conftest.in" >"conftest.tmp"
12134     mv "conftest.tmp" "conftest.in"
12135     cp "conftest.in" "conftest.nl"
12136     $as_echo 'FGREP' >> "conftest.nl"
12137     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12138     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12139     as_fn_arith $ac_count + 1 && ac_count=$as_val
12140     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12141       # Best one so far, save it but keep looking for a better one
12142       ac_cv_path_FGREP="$ac_path_FGREP"
12143       ac_path_FGREP_max=$ac_count
12144     fi
12145     # 10*(2^10) chars as input seems more than enough
12146     test $ac_count -gt 10 && break
12147   done
12148   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12149 esac
12150 
12151       $ac_path_FGREP_found && break 3
12152     done
12153   done
12154   done
12155 IFS=$as_save_IFS
12156   if test -z "$ac_cv_path_FGREP"; then
12157     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12158   fi
12159 else
12160   ac_cv_path_FGREP=$FGREP
12161 fi
12162 
12163    fi
12164 fi
12165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12166 $as_echo "$ac_cv_path_FGREP" >&6; }
12167  FGREP="$ac_cv_path_FGREP"
12168 
12169 
12170     else
12171       # If it succeeded, then it was overridden by the user. We will use it
12172       # for the tool.
12173 
12174       # First remove it from the list of overridden variables, so we can test
12175       # for unknown variables in the end.
12176       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12177 
12178       # Check if the provided tool contains a complete path.
12179       tool_specified="$FGREP"
12180       tool_basename="${tool_specified##*/}"
12181       if test "x$tool_basename" = "x$tool_specified"; then
12182         # A command without a complete path is provided, search $PATH.
12183         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12184 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12185         # Extract the first word of "$tool_basename", so it can be a program name with args.
12186 set dummy $tool_basename; ac_word=$2
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12188 $as_echo_n "checking for $ac_word... " >&6; }
12189 if ${ac_cv_path_FGREP+:} false; then :
12190   $as_echo_n "(cached) " >&6
12191 else
12192   case $FGREP in
12193   [\\/]* | ?:[\\/]*)
12194   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12195   ;;
12196   *)
12197   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12198 for as_dir in $PATH
12199 do
12200   IFS=$as_save_IFS
12201   test -z "$as_dir" && as_dir=.
12202     for ac_exec_ext in '' $ac_executable_extensions; do
12203   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12204     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12205     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12206     break 2
12207   fi
12208 done
12209   done
12210 IFS=$as_save_IFS
12211 
12212   ;;
12213 esac
12214 fi
12215 FGREP=$ac_cv_path_FGREP
12216 if test -n "$FGREP"; then
12217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12218 $as_echo "$FGREP" >&6; }
12219 else
12220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12221 $as_echo "no" >&6; }
12222 fi
12223 
12224 
12225         if test "x$FGREP" = x; then
12226           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12227         fi
12228       else
12229         # Otherwise we believe it is a complete path. Use it as it is.
12230         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12231 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12233 $as_echo_n "checking for FGREP... " >&6; }
12234         if test ! -x "$tool_specified"; then
12235           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12236 $as_echo "not found" >&6; }
12237           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12238         fi
12239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12240 $as_echo "$tool_specified" >&6; }
12241       fi
12242     fi
12243   fi
12244 
12245 
12246   if test "x$FGREP" = x; then
12247     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12248   fi
12249 
12250 
12251 
12252 
12253   # Publish this variable in the help.
12254 
12255 
12256   if test "x$SED" = x; then
12257     # The variable is not set by user, try to locate tool using the code snippet
12258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12259 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12260 if ${ac_cv_path_SED+:} false; then :
12261   $as_echo_n "(cached) " >&6
12262 else
12263             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12264      for ac_i in 1 2 3 4 5 6 7; do
12265        ac_script="$ac_script$as_nl$ac_script"
12266      done
12267      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12268      { ac_script=; unset ac_script;}
12269      if test -z "$SED"; then
12270   ac_path_SED_found=false
12271   # Loop through the user's path and test for each of PROGNAME-LIST
12272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12273 for as_dir in $PATH
12274 do
12275   IFS=$as_save_IFS
12276   test -z "$as_dir" && as_dir=.
12277     for ac_prog in sed gsed; do
12278     for ac_exec_ext in '' $ac_executable_extensions; do
12279       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12280       as_fn_executable_p "$ac_path_SED" || continue
12281 # Check for GNU ac_path_SED and select it if it is found.
12282   # Check for GNU $ac_path_SED
12283 case `"$ac_path_SED" --version 2>&1` in
12284 *GNU*)
12285   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12286 *)
12287   ac_count=0
12288   $as_echo_n 0123456789 >"conftest.in"
12289   while :
12290   do
12291     cat "conftest.in" "conftest.in" >"conftest.tmp"
12292     mv "conftest.tmp" "conftest.in"
12293     cp "conftest.in" "conftest.nl"
12294     $as_echo '' >> "conftest.nl"
12295     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12296     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12297     as_fn_arith $ac_count + 1 && ac_count=$as_val
12298     if test $ac_count -gt ${ac_path_SED_max-0}; then
12299       # Best one so far, save it but keep looking for a better one
12300       ac_cv_path_SED="$ac_path_SED"
12301       ac_path_SED_max=$ac_count
12302     fi
12303     # 10*(2^10) chars as input seems more than enough
12304     test $ac_count -gt 10 && break
12305   done
12306   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12307 esac
12308 
12309       $ac_path_SED_found && break 3
12310     done
12311   done
12312   done
12313 IFS=$as_save_IFS
12314   if test -z "$ac_cv_path_SED"; then
12315     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12316   fi
12317 else
12318   ac_cv_path_SED=$SED
12319 fi
12320 
12321 fi
12322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12323 $as_echo "$ac_cv_path_SED" >&6; }
12324  SED="$ac_cv_path_SED"
12325   rm -f conftest.sed
12326 
12327   else
12328     # The variable is set, but is it from the command line or the environment?
12329 
12330     # Try to remove the string !SED! from our list.
12331     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12332     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12333       # If it failed, the variable was not from the command line. Ignore it,
12334       # but warn the user (except for BASH, which is always set by the calling BASH).
12335       if test "xSED" != xBASH; then
12336         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12337 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12338       fi
12339       # Try to locate tool using the code snippet
12340       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12341 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12342 if ${ac_cv_path_SED+:} false; then :
12343   $as_echo_n "(cached) " >&6
12344 else
12345             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12346      for ac_i in 1 2 3 4 5 6 7; do
12347        ac_script="$ac_script$as_nl$ac_script"
12348      done
12349      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12350      { ac_script=; unset ac_script;}
12351      if test -z "$SED"; then
12352   ac_path_SED_found=false
12353   # Loop through the user's path and test for each of PROGNAME-LIST
12354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12355 for as_dir in $PATH
12356 do
12357   IFS=$as_save_IFS
12358   test -z "$as_dir" && as_dir=.
12359     for ac_prog in sed gsed; do
12360     for ac_exec_ext in '' $ac_executable_extensions; do
12361       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12362       as_fn_executable_p "$ac_path_SED" || continue
12363 # Check for GNU ac_path_SED and select it if it is found.
12364   # Check for GNU $ac_path_SED
12365 case `"$ac_path_SED" --version 2>&1` in
12366 *GNU*)
12367   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12368 *)
12369   ac_count=0
12370   $as_echo_n 0123456789 >"conftest.in"
12371   while :
12372   do
12373     cat "conftest.in" "conftest.in" >"conftest.tmp"
12374     mv "conftest.tmp" "conftest.in"
12375     cp "conftest.in" "conftest.nl"
12376     $as_echo '' >> "conftest.nl"
12377     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12378     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12379     as_fn_arith $ac_count + 1 && ac_count=$as_val
12380     if test $ac_count -gt ${ac_path_SED_max-0}; then
12381       # Best one so far, save it but keep looking for a better one
12382       ac_cv_path_SED="$ac_path_SED"
12383       ac_path_SED_max=$ac_count
12384     fi
12385     # 10*(2^10) chars as input seems more than enough
12386     test $ac_count -gt 10 && break
12387   done
12388   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12389 esac
12390 
12391       $ac_path_SED_found && break 3
12392     done
12393   done
12394   done
12395 IFS=$as_save_IFS
12396   if test -z "$ac_cv_path_SED"; then
12397     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12398   fi
12399 else
12400   ac_cv_path_SED=$SED
12401 fi
12402 
12403 fi
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12405 $as_echo "$ac_cv_path_SED" >&6; }
12406  SED="$ac_cv_path_SED"
12407   rm -f conftest.sed
12408 
12409     else
12410       # If it succeeded, then it was overridden by the user. We will use it
12411       # for the tool.
12412 
12413       # First remove it from the list of overridden variables, so we can test
12414       # for unknown variables in the end.
12415       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12416 
12417       # Check if the provided tool contains a complete path.
12418       tool_specified="$SED"
12419       tool_basename="${tool_specified##*/}"
12420       if test "x$tool_basename" = "x$tool_specified"; then
12421         # A command without a complete path is provided, search $PATH.
12422         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12423 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12424         # Extract the first word of "$tool_basename", so it can be a program name with args.
12425 set dummy $tool_basename; ac_word=$2
12426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12427 $as_echo_n "checking for $ac_word... " >&6; }
12428 if ${ac_cv_path_SED+:} false; then :
12429   $as_echo_n "(cached) " >&6
12430 else
12431   case $SED in
12432   [\\/]* | ?:[\\/]*)
12433   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12434   ;;
12435   *)
12436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12437 for as_dir in $PATH
12438 do
12439   IFS=$as_save_IFS
12440   test -z "$as_dir" && as_dir=.
12441     for ac_exec_ext in '' $ac_executable_extensions; do
12442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12443     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12445     break 2
12446   fi
12447 done
12448   done
12449 IFS=$as_save_IFS
12450 
12451   ;;
12452 esac
12453 fi
12454 SED=$ac_cv_path_SED
12455 if test -n "$SED"; then
12456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12457 $as_echo "$SED" >&6; }
12458 else
12459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12460 $as_echo "no" >&6; }
12461 fi
12462 
12463 
12464         if test "x$SED" = x; then
12465           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12466         fi
12467       else
12468         # Otherwise we believe it is a complete path. Use it as it is.
12469         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12470 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12472 $as_echo_n "checking for SED... " >&6; }
12473         if test ! -x "$tool_specified"; then
12474           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12475 $as_echo "not found" >&6; }
12476           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12477         fi
12478         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12479 $as_echo "$tool_specified" >&6; }
12480       fi
12481     fi
12482   fi
12483 
12484 
12485   if test "x$SED" = x; then
12486     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12487   fi
12488 
12489 
12490 
12491   # Always force rm.
12492   RM="$RM -f"
12493 
12494   # pwd behaves differently on various platforms and some don't support the -L flag.
12495   # Always use the bash builtin pwd to get uniform behavior.
12496   THEPWDCMD=pwd
12497 
12498   # These are not required on all platforms
12499 
12500 
12501   # Publish this variable in the help.
12502 
12503 
12504   if test "x$CYGPATH" = x; then
12505     # The variable is not set by user, try to locate tool using the code snippet
12506     for ac_prog in cygpath
12507 do
12508   # Extract the first word of "$ac_prog", so it can be a program name with args.
12509 set dummy $ac_prog; ac_word=$2
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511 $as_echo_n "checking for $ac_word... " >&6; }
12512 if ${ac_cv_path_CYGPATH+:} false; then :
12513   $as_echo_n "(cached) " >&6
12514 else
12515   case $CYGPATH in
12516   [\\/]* | ?:[\\/]*)
12517   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12518   ;;
12519   *)
12520   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521 for as_dir in $PATH
12522 do
12523   IFS=$as_save_IFS
12524   test -z "$as_dir" && as_dir=.
12525     for ac_exec_ext in '' $ac_executable_extensions; do
12526   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12528     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529     break 2
12530   fi
12531 done
12532   done
12533 IFS=$as_save_IFS
12534 
12535   ;;
12536 esac
12537 fi
12538 CYGPATH=$ac_cv_path_CYGPATH
12539 if test -n "$CYGPATH"; then
12540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12541 $as_echo "$CYGPATH" >&6; }
12542 else
12543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544 $as_echo "no" >&6; }
12545 fi
12546 
12547 
12548   test -n "$CYGPATH" && break
12549 done
12550 
12551   else
12552     # The variable is set, but is it from the command line or the environment?
12553 
12554     # Try to remove the string !CYGPATH! from our list.
12555     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12556     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557       # If it failed, the variable was not from the command line. Ignore it,
12558       # but warn the user (except for BASH, which is always set by the calling BASH).
12559       if test "xCYGPATH" != xBASH; then
12560         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12561 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12562       fi
12563       # Try to locate tool using the code snippet
12564       for ac_prog in cygpath
12565 do
12566   # Extract the first word of "$ac_prog", so it can be a program name with args.
12567 set dummy $ac_prog; ac_word=$2
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569 $as_echo_n "checking for $ac_word... " >&6; }
12570 if ${ac_cv_path_CYGPATH+:} false; then :
12571   $as_echo_n "(cached) " >&6
12572 else
12573   case $CYGPATH in
12574   [\\/]* | ?:[\\/]*)
12575   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12576   ;;
12577   *)
12578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579 for as_dir in $PATH
12580 do
12581   IFS=$as_save_IFS
12582   test -z "$as_dir" && as_dir=.
12583     for ac_exec_ext in '' $ac_executable_extensions; do
12584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587     break 2
12588   fi
12589 done
12590   done
12591 IFS=$as_save_IFS
12592 
12593   ;;
12594 esac
12595 fi
12596 CYGPATH=$ac_cv_path_CYGPATH
12597 if test -n "$CYGPATH"; then
12598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12599 $as_echo "$CYGPATH" >&6; }
12600 else
12601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602 $as_echo "no" >&6; }
12603 fi
12604 
12605 
12606   test -n "$CYGPATH" && break
12607 done
12608 
12609     else
12610       # If it succeeded, then it was overridden by the user. We will use it
12611       # for the tool.
12612 
12613       # First remove it from the list of overridden variables, so we can test
12614       # for unknown variables in the end.
12615       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616 
12617       # Check if the provided tool contains a complete path.
12618       tool_specified="$CYGPATH"
12619       tool_basename="${tool_specified##*/}"
12620       if test "x$tool_basename" = "x$tool_specified"; then
12621         # A command without a complete path is provided, search $PATH.
12622         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12623 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12624         # Extract the first word of "$tool_basename", so it can be a program name with args.
12625 set dummy $tool_basename; ac_word=$2
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627 $as_echo_n "checking for $ac_word... " >&6; }
12628 if ${ac_cv_path_CYGPATH+:} false; then :
12629   $as_echo_n "(cached) " >&6
12630 else
12631   case $CYGPATH in
12632   [\\/]* | ?:[\\/]*)
12633   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12634   ;;
12635   *)
12636   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637 for as_dir in $PATH
12638 do
12639   IFS=$as_save_IFS
12640   test -z "$as_dir" && as_dir=.
12641     for ac_exec_ext in '' $ac_executable_extensions; do
12642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645     break 2
12646   fi
12647 done
12648   done
12649 IFS=$as_save_IFS
12650 
12651   ;;
12652 esac
12653 fi
12654 CYGPATH=$ac_cv_path_CYGPATH
12655 if test -n "$CYGPATH"; then
12656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12657 $as_echo "$CYGPATH" >&6; }
12658 else
12659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660 $as_echo "no" >&6; }
12661 fi
12662 
12663 
12664         if test "x$CYGPATH" = x; then
12665           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12666         fi
12667       else
12668         # Otherwise we believe it is a complete path. Use it as it is.
12669         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12670 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12671         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12672 $as_echo_n "checking for CYGPATH... " >&6; }
12673         if test ! -x "$tool_specified"; then
12674           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12675 $as_echo "not found" >&6; }
12676           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12677         fi
12678         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12679 $as_echo "$tool_specified" >&6; }
12680       fi
12681     fi
12682   fi
12683 
12684 
12685 
12686 
12687   # Publish this variable in the help.
12688 
12689 
12690   if test "x$READLINK" = x; then
12691     # The variable is not set by user, try to locate tool using the code snippet
12692     for ac_prog in greadlink readlink
12693 do
12694   # Extract the first word of "$ac_prog", so it can be a program name with args.
12695 set dummy $ac_prog; ac_word=$2
12696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12697 $as_echo_n "checking for $ac_word... " >&6; }
12698 if ${ac_cv_path_READLINK+:} false; then :
12699   $as_echo_n "(cached) " >&6
12700 else
12701   case $READLINK in
12702   [\\/]* | ?:[\\/]*)
12703   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12704   ;;
12705   *)
12706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12707 for as_dir in $PATH
12708 do
12709   IFS=$as_save_IFS
12710   test -z "$as_dir" && as_dir=.
12711     for ac_exec_ext in '' $ac_executable_extensions; do
12712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12713     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12715     break 2
12716   fi
12717 done
12718   done
12719 IFS=$as_save_IFS
12720 
12721   ;;
12722 esac
12723 fi
12724 READLINK=$ac_cv_path_READLINK
12725 if test -n "$READLINK"; then
12726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12727 $as_echo "$READLINK" >&6; }
12728 else
12729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12730 $as_echo "no" >&6; }
12731 fi
12732 
12733 
12734   test -n "$READLINK" && break
12735 done
12736 
12737   else
12738     # The variable is set, but is it from the command line or the environment?
12739 
12740     # Try to remove the string !READLINK! from our list.
12741     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12742     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12743       # If it failed, the variable was not from the command line. Ignore it,
12744       # but warn the user (except for BASH, which is always set by the calling BASH).
12745       if test "xREADLINK" != xBASH; then
12746         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12747 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12748       fi
12749       # Try to locate tool using the code snippet
12750       for ac_prog in greadlink readlink
12751 do
12752   # Extract the first word of "$ac_prog", so it can be a program name with args.
12753 set dummy $ac_prog; ac_word=$2
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12755 $as_echo_n "checking for $ac_word... " >&6; }
12756 if ${ac_cv_path_READLINK+:} false; then :
12757   $as_echo_n "(cached) " >&6
12758 else
12759   case $READLINK in
12760   [\\/]* | ?:[\\/]*)
12761   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12762   ;;
12763   *)
12764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12765 for as_dir in $PATH
12766 do
12767   IFS=$as_save_IFS
12768   test -z "$as_dir" && as_dir=.
12769     for ac_exec_ext in '' $ac_executable_extensions; do
12770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12771     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12773     break 2
12774   fi
12775 done
12776   done
12777 IFS=$as_save_IFS
12778 
12779   ;;
12780 esac
12781 fi
12782 READLINK=$ac_cv_path_READLINK
12783 if test -n "$READLINK"; then
12784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12785 $as_echo "$READLINK" >&6; }
12786 else
12787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12788 $as_echo "no" >&6; }
12789 fi
12790 
12791 
12792   test -n "$READLINK" && break
12793 done
12794 
12795     else
12796       # If it succeeded, then it was overridden by the user. We will use it
12797       # for the tool.
12798 
12799       # First remove it from the list of overridden variables, so we can test
12800       # for unknown variables in the end.
12801       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12802 
12803       # Check if the provided tool contains a complete path.
12804       tool_specified="$READLINK"
12805       tool_basename="${tool_specified##*/}"
12806       if test "x$tool_basename" = "x$tool_specified"; then
12807         # A command without a complete path is provided, search $PATH.
12808         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12809 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12810         # Extract the first word of "$tool_basename", so it can be a program name with args.
12811 set dummy $tool_basename; ac_word=$2
12812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12813 $as_echo_n "checking for $ac_word... " >&6; }
12814 if ${ac_cv_path_READLINK+:} false; then :
12815   $as_echo_n "(cached) " >&6
12816 else
12817   case $READLINK in
12818   [\\/]* | ?:[\\/]*)
12819   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12820   ;;
12821   *)
12822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12823 for as_dir in $PATH
12824 do
12825   IFS=$as_save_IFS
12826   test -z "$as_dir" && as_dir=.
12827     for ac_exec_ext in '' $ac_executable_extensions; do
12828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12829     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12831     break 2
12832   fi
12833 done
12834   done
12835 IFS=$as_save_IFS
12836 
12837   ;;
12838 esac
12839 fi
12840 READLINK=$ac_cv_path_READLINK
12841 if test -n "$READLINK"; then
12842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12843 $as_echo "$READLINK" >&6; }
12844 else
12845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846 $as_echo "no" >&6; }
12847 fi
12848 
12849 
12850         if test "x$READLINK" = x; then
12851           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12852         fi
12853       else
12854         # Otherwise we believe it is a complete path. Use it as it is.
12855         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12856 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12857         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12858 $as_echo_n "checking for READLINK... " >&6; }
12859         if test ! -x "$tool_specified"; then
12860           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12861 $as_echo "not found" >&6; }
12862           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12863         fi
12864         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12865 $as_echo "$tool_specified" >&6; }
12866       fi
12867     fi
12868   fi
12869 
12870 
12871 
12872 
12873   # Publish this variable in the help.
12874 
12875 
12876   if test "x$DF" = x; then
12877     # The variable is not set by user, try to locate tool using the code snippet
12878     for ac_prog in df
12879 do
12880   # Extract the first word of "$ac_prog", so it can be a program name with args.
12881 set dummy $ac_prog; ac_word=$2
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12883 $as_echo_n "checking for $ac_word... " >&6; }
12884 if ${ac_cv_path_DF+:} false; then :
12885   $as_echo_n "(cached) " >&6
12886 else
12887   case $DF in
12888   [\\/]* | ?:[\\/]*)
12889   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12890   ;;
12891   *)
12892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12893 for as_dir in $PATH
12894 do
12895   IFS=$as_save_IFS
12896   test -z "$as_dir" && as_dir=.
12897     for ac_exec_ext in '' $ac_executable_extensions; do
12898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12899     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12901     break 2
12902   fi
12903 done
12904   done
12905 IFS=$as_save_IFS
12906 
12907   ;;
12908 esac
12909 fi
12910 DF=$ac_cv_path_DF
12911 if test -n "$DF"; then
12912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12913 $as_echo "$DF" >&6; }
12914 else
12915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12916 $as_echo "no" >&6; }
12917 fi
12918 
12919 
12920   test -n "$DF" && break
12921 done
12922 
12923   else
12924     # The variable is set, but is it from the command line or the environment?
12925 
12926     # Try to remove the string !DF! from our list.
12927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12929       # If it failed, the variable was not from the command line. Ignore it,
12930       # but warn the user (except for BASH, which is always set by the calling BASH).
12931       if test "xDF" != xBASH; then
12932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12933 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12934       fi
12935       # Try to locate tool using the code snippet
12936       for ac_prog in df
12937 do
12938   # Extract the first word of "$ac_prog", so it can be a program name with args.
12939 set dummy $ac_prog; ac_word=$2
12940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12941 $as_echo_n "checking for $ac_word... " >&6; }
12942 if ${ac_cv_path_DF+:} false; then :
12943   $as_echo_n "(cached) " >&6
12944 else
12945   case $DF in
12946   [\\/]* | ?:[\\/]*)
12947   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12948   ;;
12949   *)
12950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12951 for as_dir in $PATH
12952 do
12953   IFS=$as_save_IFS
12954   test -z "$as_dir" && as_dir=.
12955     for ac_exec_ext in '' $ac_executable_extensions; do
12956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12957     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12959     break 2
12960   fi
12961 done
12962   done
12963 IFS=$as_save_IFS
12964 
12965   ;;
12966 esac
12967 fi
12968 DF=$ac_cv_path_DF
12969 if test -n "$DF"; then
12970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12971 $as_echo "$DF" >&6; }
12972 else
12973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12974 $as_echo "no" >&6; }
12975 fi
12976 
12977 
12978   test -n "$DF" && break
12979 done
12980 
12981     else
12982       # If it succeeded, then it was overridden by the user. We will use it
12983       # for the tool.
12984 
12985       # First remove it from the list of overridden variables, so we can test
12986       # for unknown variables in the end.
12987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12988 
12989       # Check if the provided tool contains a complete path.
12990       tool_specified="$DF"
12991       tool_basename="${tool_specified##*/}"
12992       if test "x$tool_basename" = "x$tool_specified"; then
12993         # A command without a complete path is provided, search $PATH.
12994         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12995 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12996         # Extract the first word of "$tool_basename", so it can be a program name with args.
12997 set dummy $tool_basename; ac_word=$2
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12999 $as_echo_n "checking for $ac_word... " >&6; }
13000 if ${ac_cv_path_DF+:} false; then :
13001   $as_echo_n "(cached) " >&6
13002 else
13003   case $DF in
13004   [\\/]* | ?:[\\/]*)
13005   ac_cv_path_DF="$DF" # Let the user override the test with a path.
13006   ;;
13007   *)
13008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13009 for as_dir in $PATH
13010 do
13011   IFS=$as_save_IFS
13012   test -z "$as_dir" && as_dir=.
13013     for ac_exec_ext in '' $ac_executable_extensions; do
13014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13015     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13017     break 2
13018   fi
13019 done
13020   done
13021 IFS=$as_save_IFS
13022 
13023   ;;
13024 esac
13025 fi
13026 DF=$ac_cv_path_DF
13027 if test -n "$DF"; then
13028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13029 $as_echo "$DF" >&6; }
13030 else
13031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13032 $as_echo "no" >&6; }
13033 fi
13034 
13035 
13036         if test "x$DF" = x; then
13037           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13038         fi
13039       else
13040         # Otherwise we believe it is a complete path. Use it as it is.
13041         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13042 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13044 $as_echo_n "checking for DF... " >&6; }
13045         if test ! -x "$tool_specified"; then
13046           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13047 $as_echo "not found" >&6; }
13048           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13049         fi
13050         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13051 $as_echo "$tool_specified" >&6; }
13052       fi
13053     fi
13054   fi
13055 
13056 
13057 
13058 
13059   # Publish this variable in the help.
13060 
13061 
13062   if test "x$SETFILE" = x; then
13063     # The variable is not set by user, try to locate tool using the code snippet
13064     for ac_prog in SetFile
13065 do
13066   # Extract the first word of "$ac_prog", so it can be a program name with args.
13067 set dummy $ac_prog; ac_word=$2
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13069 $as_echo_n "checking for $ac_word... " >&6; }
13070 if ${ac_cv_path_SETFILE+:} false; then :
13071   $as_echo_n "(cached) " >&6
13072 else
13073   case $SETFILE in
13074   [\\/]* | ?:[\\/]*)
13075   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13076   ;;
13077   *)
13078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13079 for as_dir in $PATH
13080 do
13081   IFS=$as_save_IFS
13082   test -z "$as_dir" && as_dir=.
13083     for ac_exec_ext in '' $ac_executable_extensions; do
13084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13085     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13087     break 2
13088   fi
13089 done
13090   done
13091 IFS=$as_save_IFS
13092 
13093   ;;
13094 esac
13095 fi
13096 SETFILE=$ac_cv_path_SETFILE
13097 if test -n "$SETFILE"; then
13098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13099 $as_echo "$SETFILE" >&6; }
13100 else
13101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13102 $as_echo "no" >&6; }
13103 fi
13104 
13105 
13106   test -n "$SETFILE" && break
13107 done
13108 
13109   else
13110     # The variable is set, but is it from the command line or the environment?
13111 
13112     # Try to remove the string !SETFILE! from our list.
13113     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13114     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13115       # If it failed, the variable was not from the command line. Ignore it,
13116       # but warn the user (except for BASH, which is always set by the calling BASH).
13117       if test "xSETFILE" != xBASH; then
13118         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13119 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13120       fi
13121       # Try to locate tool using the code snippet
13122       for ac_prog in SetFile
13123 do
13124   # Extract the first word of "$ac_prog", so it can be a program name with args.
13125 set dummy $ac_prog; ac_word=$2
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13127 $as_echo_n "checking for $ac_word... " >&6; }
13128 if ${ac_cv_path_SETFILE+:} false; then :
13129   $as_echo_n "(cached) " >&6
13130 else
13131   case $SETFILE in
13132   [\\/]* | ?:[\\/]*)
13133   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13134   ;;
13135   *)
13136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137 for as_dir in $PATH
13138 do
13139   IFS=$as_save_IFS
13140   test -z "$as_dir" && as_dir=.
13141     for ac_exec_ext in '' $ac_executable_extensions; do
13142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13143     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13145     break 2
13146   fi
13147 done
13148   done
13149 IFS=$as_save_IFS
13150 
13151   ;;
13152 esac
13153 fi
13154 SETFILE=$ac_cv_path_SETFILE
13155 if test -n "$SETFILE"; then
13156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13157 $as_echo "$SETFILE" >&6; }
13158 else
13159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13160 $as_echo "no" >&6; }
13161 fi
13162 
13163 
13164   test -n "$SETFILE" && break
13165 done
13166 
13167     else
13168       # If it succeeded, then it was overridden by the user. We will use it
13169       # for the tool.
13170 
13171       # First remove it from the list of overridden variables, so we can test
13172       # for unknown variables in the end.
13173       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13174 
13175       # Check if the provided tool contains a complete path.
13176       tool_specified="$SETFILE"
13177       tool_basename="${tool_specified##*/}"
13178       if test "x$tool_basename" = "x$tool_specified"; then
13179         # A command without a complete path is provided, search $PATH.
13180         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13181 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13182         # Extract the first word of "$tool_basename", so it can be a program name with args.
13183 set dummy $tool_basename; ac_word=$2
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13185 $as_echo_n "checking for $ac_word... " >&6; }
13186 if ${ac_cv_path_SETFILE+:} false; then :
13187   $as_echo_n "(cached) " >&6
13188 else
13189   case $SETFILE in
13190   [\\/]* | ?:[\\/]*)
13191   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13192   ;;
13193   *)
13194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13195 for as_dir in $PATH
13196 do
13197   IFS=$as_save_IFS
13198   test -z "$as_dir" && as_dir=.
13199     for ac_exec_ext in '' $ac_executable_extensions; do
13200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13201     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13203     break 2
13204   fi
13205 done
13206   done
13207 IFS=$as_save_IFS
13208 
13209   ;;
13210 esac
13211 fi
13212 SETFILE=$ac_cv_path_SETFILE
13213 if test -n "$SETFILE"; then
13214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13215 $as_echo "$SETFILE" >&6; }
13216 else
13217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13218 $as_echo "no" >&6; }
13219 fi
13220 
13221 
13222         if test "x$SETFILE" = x; then
13223           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13224         fi
13225       else
13226         # Otherwise we believe it is a complete path. Use it as it is.
13227         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13228 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13229         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13230 $as_echo_n "checking for SETFILE... " >&6; }
13231         if test ! -x "$tool_specified"; then
13232           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13233 $as_echo "not found" >&6; }
13234           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13235         fi
13236         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13237 $as_echo "$tool_specified" >&6; }
13238       fi
13239     fi
13240   fi
13241 
13242 
13243 
13244 
13245   # Publish this variable in the help.
13246 
13247 
13248   if test "x$CPIO" = x; then
13249     # The variable is not set by user, try to locate tool using the code snippet
13250     for ac_prog in cpio bsdcpio
13251 do
13252   # Extract the first word of "$ac_prog", so it can be a program name with args.
13253 set dummy $ac_prog; ac_word=$2
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13255 $as_echo_n "checking for $ac_word... " >&6; }
13256 if ${ac_cv_path_CPIO+:} false; then :
13257   $as_echo_n "(cached) " >&6
13258 else
13259   case $CPIO in
13260   [\\/]* | ?:[\\/]*)
13261   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13262   ;;
13263   *)
13264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13265 for as_dir in $PATH
13266 do
13267   IFS=$as_save_IFS
13268   test -z "$as_dir" && as_dir=.
13269     for ac_exec_ext in '' $ac_executable_extensions; do
13270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13271     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13273     break 2
13274   fi
13275 done
13276   done
13277 IFS=$as_save_IFS
13278 
13279   ;;
13280 esac
13281 fi
13282 CPIO=$ac_cv_path_CPIO
13283 if test -n "$CPIO"; then
13284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13285 $as_echo "$CPIO" >&6; }
13286 else
13287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13288 $as_echo "no" >&6; }
13289 fi
13290 
13291 
13292   test -n "$CPIO" && break
13293 done
13294 
13295   else
13296     # The variable is set, but is it from the command line or the environment?
13297 
13298     # Try to remove the string !CPIO! from our list.
13299     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13300     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13301       # If it failed, the variable was not from the command line. Ignore it,
13302       # but warn the user (except for BASH, which is always set by the calling BASH).
13303       if test "xCPIO" != xBASH; then
13304         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13305 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13306       fi
13307       # Try to locate tool using the code snippet
13308       for ac_prog in cpio bsdcpio
13309 do
13310   # Extract the first word of "$ac_prog", so it can be a program name with args.
13311 set dummy $ac_prog; ac_word=$2
13312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13313 $as_echo_n "checking for $ac_word... " >&6; }
13314 if ${ac_cv_path_CPIO+:} false; then :
13315   $as_echo_n "(cached) " >&6
13316 else
13317   case $CPIO in
13318   [\\/]* | ?:[\\/]*)
13319   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13320   ;;
13321   *)
13322   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13323 for as_dir in $PATH
13324 do
13325   IFS=$as_save_IFS
13326   test -z "$as_dir" && as_dir=.
13327     for ac_exec_ext in '' $ac_executable_extensions; do
13328   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13329     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13330     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13331     break 2
13332   fi
13333 done
13334   done
13335 IFS=$as_save_IFS
13336 
13337   ;;
13338 esac
13339 fi
13340 CPIO=$ac_cv_path_CPIO
13341 if test -n "$CPIO"; then
13342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13343 $as_echo "$CPIO" >&6; }
13344 else
13345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13346 $as_echo "no" >&6; }
13347 fi
13348 
13349 
13350   test -n "$CPIO" && break
13351 done
13352 
13353     else
13354       # If it succeeded, then it was overridden by the user. We will use it
13355       # for the tool.
13356 
13357       # First remove it from the list of overridden variables, so we can test
13358       # for unknown variables in the end.
13359       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13360 
13361       # Check if the provided tool contains a complete path.
13362       tool_specified="$CPIO"
13363       tool_basename="${tool_specified##*/}"
13364       if test "x$tool_basename" = "x$tool_specified"; then
13365         # A command without a complete path is provided, search $PATH.
13366         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13367 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13368         # Extract the first word of "$tool_basename", so it can be a program name with args.
13369 set dummy $tool_basename; ac_word=$2
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13371 $as_echo_n "checking for $ac_word... " >&6; }
13372 if ${ac_cv_path_CPIO+:} false; then :
13373   $as_echo_n "(cached) " >&6
13374 else
13375   case $CPIO in
13376   [\\/]* | ?:[\\/]*)
13377   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13378   ;;
13379   *)
13380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13381 for as_dir in $PATH
13382 do
13383   IFS=$as_save_IFS
13384   test -z "$as_dir" && as_dir=.
13385     for ac_exec_ext in '' $ac_executable_extensions; do
13386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13387     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13389     break 2
13390   fi
13391 done
13392   done
13393 IFS=$as_save_IFS
13394 
13395   ;;
13396 esac
13397 fi
13398 CPIO=$ac_cv_path_CPIO
13399 if test -n "$CPIO"; then
13400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13401 $as_echo "$CPIO" >&6; }
13402 else
13403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13404 $as_echo "no" >&6; }
13405 fi
13406 
13407 
13408         if test "x$CPIO" = x; then
13409           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13410         fi
13411       else
13412         # Otherwise we believe it is a complete path. Use it as it is.
13413         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13414 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13416 $as_echo_n "checking for CPIO... " >&6; }
13417         if test ! -x "$tool_specified"; then
13418           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13419 $as_echo "not found" >&6; }
13420           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13421         fi
13422         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13423 $as_echo "$tool_specified" >&6; }
13424       fi
13425     fi
13426   fi
13427 
13428 
13429 
13430 
13431 # Now we can determine OpenJDK build and target platforms. This is required to
13432 # have early on.
13433 # Make sure we can run config.sub.
13434 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13435   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13436 
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13438 $as_echo_n "checking build system type... " >&6; }
13439 if ${ac_cv_build+:} false; then :
13440   $as_echo_n "(cached) " >&6
13441 else
13442   ac_build_alias=$build_alias
13443 test "x$ac_build_alias" = x &&
13444   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13445 test "x$ac_build_alias" = x &&
13446   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13447 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13448   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13449 
13450 fi
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13452 $as_echo "$ac_cv_build" >&6; }
13453 case $ac_cv_build in
13454 *-*-*) ;;
13455 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13456 esac
13457 build=$ac_cv_build
13458 ac_save_IFS=$IFS; IFS='-'
13459 set x $ac_cv_build
13460 shift
13461 build_cpu=$1
13462 build_vendor=$2
13463 shift; shift
13464 # Remember, the first character of IFS is used to create $*,
13465 # except with old shells:
13466 build_os=$*
13467 IFS=$ac_save_IFS
13468 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13469 
13470 
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13472 $as_echo_n "checking host system type... " >&6; }
13473 if ${ac_cv_host+:} false; then :
13474   $as_echo_n "(cached) " >&6
13475 else
13476   if test "x$host_alias" = x; then
13477   ac_cv_host=$ac_cv_build
13478 else
13479   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13480     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13481 fi
13482 
13483 fi
13484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13485 $as_echo "$ac_cv_host" >&6; }
13486 case $ac_cv_host in
13487 *-*-*) ;;
13488 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13489 esac
13490 host=$ac_cv_host
13491 ac_save_IFS=$IFS; IFS='-'
13492 set x $ac_cv_host
13493 shift
13494 host_cpu=$1
13495 host_vendor=$2
13496 shift; shift
13497 # Remember, the first character of IFS is used to create $*,
13498 # except with old shells:
13499 host_os=$*
13500 IFS=$ac_save_IFS
13501 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13502 
13503 
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13505 $as_echo_n "checking target system type... " >&6; }
13506 if ${ac_cv_target+:} false; then :
13507   $as_echo_n "(cached) " >&6
13508 else
13509   if test "x$target_alias" = x; then
13510   ac_cv_target=$ac_cv_host
13511 else
13512   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13513     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13514 fi
13515 
13516 fi
13517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13518 $as_echo "$ac_cv_target" >&6; }
13519 case $ac_cv_target in
13520 *-*-*) ;;
13521 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13522 esac
13523 target=$ac_cv_target
13524 ac_save_IFS=$IFS; IFS='-'
13525 set x $ac_cv_target
13526 shift
13527 target_cpu=$1
13528 target_vendor=$2
13529 shift; shift
13530 # Remember, the first character of IFS is used to create $*,
13531 # except with old shells:
13532 target_os=$*
13533 IFS=$ac_save_IFS
13534 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13535 
13536 
13537 # The aliases save the names the user supplied, while $host etc.
13538 # will get canonicalized.
13539 test -n "$target_alias" &&
13540   test "$program_prefix$program_suffix$program_transform_name" = \
13541     NONENONEs,x,x, &&
13542   program_prefix=${target_alias}-
13543 
13544   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13545   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13546   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13547   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13548   # to use the configure naming style.
13549 
13550 
13551 
13552 
13553 
13554   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13555   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13556   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13557   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13558   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13559   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13560 
13561 
13562 
13563   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13564 
13565   case "$build_os" in
13566     *linux*)
13567       VAR_OS=linux
13568       VAR_OS_TYPE=unix
13569       ;;
13570     *solaris*)
13571       VAR_OS=solaris
13572       VAR_OS_TYPE=unix
13573       ;;
13574     *darwin*)
13575       VAR_OS=macosx
13576       VAR_OS_TYPE=unix
13577       ;;
13578     *bsd*)
13579       VAR_OS=bsd
13580       VAR_OS_TYPE=unix
13581       ;;
13582     *cygwin*)
13583       VAR_OS=windows
13584       VAR_OS_ENV=windows.cygwin
13585       ;;
13586     *mingw*)
13587       VAR_OS=windows
13588       VAR_OS_ENV=windows.msys
13589       ;;
13590     *aix*)
13591       VAR_OS=aix
13592       VAR_OS_TYPE=unix
13593       ;;
13594     *)
13595       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13596       ;;
13597   esac
13598 
13599 
13600   # First argument is the cpu name from the trip/quad
13601   case "$build_cpu" in
13602     x86_64)
13603       VAR_CPU=x86_64
13604       VAR_CPU_ARCH=x86
13605       VAR_CPU_BITS=64
13606       VAR_CPU_ENDIAN=little
13607       ;;
13608     i?86)
13609       VAR_CPU=x86
13610       VAR_CPU_ARCH=x86
13611       VAR_CPU_BITS=32
13612       VAR_CPU_ENDIAN=little
13613       ;;
13614     arm*)
13615       VAR_CPU=arm
13616       VAR_CPU_ARCH=arm
13617       VAR_CPU_BITS=32
13618       VAR_CPU_ENDIAN=little
13619       ;;
13620     aarch64)
13621       VAR_CPU=aarch64
13622       VAR_CPU_ARCH=aarch64
13623       VAR_CPU_BITS=64
13624       VAR_CPU_ENDIAN=little
13625       ;;
13626     powerpc)
13627       VAR_CPU=ppc
13628       VAR_CPU_ARCH=ppc
13629       VAR_CPU_BITS=32
13630       VAR_CPU_ENDIAN=big
13631       ;;
13632     powerpc64)
13633       VAR_CPU=ppc64
13634       VAR_CPU_ARCH=ppc
13635       VAR_CPU_BITS=64
13636       VAR_CPU_ENDIAN=big
13637       ;;
13638     powerpc64le)
13639       VAR_CPU=ppc64
13640       VAR_CPU_ARCH=ppc
13641       VAR_CPU_BITS=64
13642       VAR_CPU_ENDIAN=little
13643       ;;
13644     s390)
13645       VAR_CPU=s390
13646       VAR_CPU_ARCH=s390
13647       VAR_CPU_BITS=32
13648       VAR_CPU_ENDIAN=big
13649       ;;
13650     s390x)
13651       VAR_CPU=s390x
13652       VAR_CPU_ARCH=s390
13653       VAR_CPU_BITS=64
13654       VAR_CPU_ENDIAN=big
13655       ;;
13656     sparc)
13657       VAR_CPU=sparc
13658       VAR_CPU_ARCH=sparc
13659       VAR_CPU_BITS=32
13660       VAR_CPU_ENDIAN=big
13661       ;;
13662     sparcv9|sparc64)
13663       VAR_CPU=sparcv9
13664       VAR_CPU_ARCH=sparc
13665       VAR_CPU_BITS=64
13666       VAR_CPU_ENDIAN=big
13667       ;;
13668     *)
13669       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13670       ;;
13671   esac
13672 
13673   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13674   OPENJDK_BUILD_OS="$VAR_OS"
13675   if test "x$VAR_OS_TYPE" != x; then
13676     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13677   else
13678     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13679   fi
13680   if test "x$VAR_OS_ENV" != x; then
13681     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13682   else
13683     OPENJDK_BUILD_OS_ENV="$VAR_OS"
13684   fi
13685   OPENJDK_BUILD_CPU="$VAR_CPU"
13686   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13687   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13688   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13689 
13690 
13691 
13692 
13693 
13694 
13695 
13696 
13697   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13698 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13700 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13701 
13702   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13703 
13704   case "$host_os" in
13705     *linux*)
13706       VAR_OS=linux
13707       VAR_OS_TYPE=unix
13708       ;;
13709     *solaris*)
13710       VAR_OS=solaris
13711       VAR_OS_TYPE=unix
13712       ;;
13713     *darwin*)
13714       VAR_OS=macosx
13715       VAR_OS_TYPE=unix
13716       ;;
13717     *bsd*)
13718       VAR_OS=bsd
13719       VAR_OS_TYPE=unix
13720       ;;
13721     *cygwin*)
13722       VAR_OS=windows
13723       VAR_OS_ENV=windows.cygwin
13724       ;;
13725     *mingw*)
13726       VAR_OS=windows
13727       VAR_OS_ENV=windows.msys
13728       ;;
13729     *aix*)
13730       VAR_OS=aix
13731       VAR_OS_TYPE=unix
13732       ;;
13733     *)
13734       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13735       ;;
13736   esac
13737 
13738 
13739   # First argument is the cpu name from the trip/quad
13740   case "$host_cpu" in
13741     x86_64)
13742       VAR_CPU=x86_64
13743       VAR_CPU_ARCH=x86
13744       VAR_CPU_BITS=64
13745       VAR_CPU_ENDIAN=little
13746       ;;
13747     i?86)
13748       VAR_CPU=x86
13749       VAR_CPU_ARCH=x86
13750       VAR_CPU_BITS=32
13751       VAR_CPU_ENDIAN=little
13752       ;;
13753     arm*)
13754       VAR_CPU=arm
13755       VAR_CPU_ARCH=arm
13756       VAR_CPU_BITS=32
13757       VAR_CPU_ENDIAN=little
13758       ;;
13759     aarch64)
13760       VAR_CPU=aarch64
13761       VAR_CPU_ARCH=aarch64
13762       VAR_CPU_BITS=64
13763       VAR_CPU_ENDIAN=little
13764       ;;
13765     powerpc)
13766       VAR_CPU=ppc
13767       VAR_CPU_ARCH=ppc
13768       VAR_CPU_BITS=32
13769       VAR_CPU_ENDIAN=big
13770       ;;
13771     powerpc64)
13772       VAR_CPU=ppc64
13773       VAR_CPU_ARCH=ppc
13774       VAR_CPU_BITS=64
13775       VAR_CPU_ENDIAN=big
13776       ;;
13777     powerpc64le)
13778       VAR_CPU=ppc64
13779       VAR_CPU_ARCH=ppc
13780       VAR_CPU_BITS=64
13781       VAR_CPU_ENDIAN=little
13782       ;;
13783     s390)
13784       VAR_CPU=s390
13785       VAR_CPU_ARCH=s390
13786       VAR_CPU_BITS=32
13787       VAR_CPU_ENDIAN=big
13788       ;;
13789     s390x)
13790       VAR_CPU=s390x
13791       VAR_CPU_ARCH=s390
13792       VAR_CPU_BITS=64
13793       VAR_CPU_ENDIAN=big
13794       ;;
13795     sparc)
13796       VAR_CPU=sparc
13797       VAR_CPU_ARCH=sparc
13798       VAR_CPU_BITS=32
13799       VAR_CPU_ENDIAN=big
13800       ;;
13801     sparcv9|sparc64)
13802       VAR_CPU=sparcv9
13803       VAR_CPU_ARCH=sparc
13804       VAR_CPU_BITS=64
13805       VAR_CPU_ENDIAN=big
13806       ;;
13807     *)
13808       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13809       ;;
13810   esac
13811 
13812   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13813   OPENJDK_TARGET_OS="$VAR_OS"
13814   if test "x$VAR_OS_TYPE" != x; then
13815     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13816   else
13817     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13818   fi
13819   if test "x$VAR_OS_ENV" != x; then
13820     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13821   else
13822     OPENJDK_TARGET_OS_ENV="$VAR_OS"
13823   fi
13824   OPENJDK_TARGET_CPU="$VAR_CPU"
13825   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13826   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13827   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13828 
13829 
13830 
13831 
13832 
13833 
13834 
13835 
13836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13837 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13839 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13840 
13841 
13842 
13843 # Check whether --with-target-bits was given.
13844 if test "${with_target_bits+set}" = set; then :
13845   withval=$with_target_bits;
13846 fi
13847 
13848 
13849   # We have three types of compiles:
13850   # native  == normal compilation, target system == build system
13851   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13852   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13853   #
13854   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13855     # We're doing a proper cross-compilation
13856     COMPILE_TYPE="cross"
13857   else
13858     COMPILE_TYPE="native"
13859   fi
13860 
13861   if test "x$with_target_bits" != x; then
13862     if test "x$COMPILE_TYPE" = "xcross"; then
13863       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13864     fi
13865 
13866     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13867       # A reduced build is requested
13868       COMPILE_TYPE="reduced"
13869       OPENJDK_TARGET_CPU_BITS=32
13870       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13871         OPENJDK_TARGET_CPU=x86
13872       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13873         OPENJDK_TARGET_CPU=sparc
13874       else
13875         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13876       fi
13877     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13878       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
13879     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13880       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13881 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13882     else
13883       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13884     fi
13885   fi
13886 
13887 
13888   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13889 $as_echo_n "checking compilation type... " >&6; }
13890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13891 $as_echo "$COMPILE_TYPE" >&6; }
13892 
13893 
13894   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13895     REQUIRED_OS_NAME=SunOS
13896     REQUIRED_OS_VERSION=5.10
13897   fi
13898   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13899     REQUIRED_OS_NAME=Linux
13900     REQUIRED_OS_VERSION=2.6
13901   fi
13902   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13903     REQUIRED_OS_NAME=Windows
13904     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13905       REQUIRED_OS_VERSION=5.2
13906     else
13907       REQUIRED_OS_VERSION=5.1
13908     fi
13909   fi
13910   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13911     REQUIRED_OS_NAME=Darwin
13912     REQUIRED_OS_VERSION=11.2
13913   fi
13914 
13915 
13916 
13917 
13918 
13919   # Also store the legacy naming of the cpu.
13920   # Ie i586 and amd64 instead of x86 and x86_64
13921   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13922   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13923     OPENJDK_TARGET_CPU_LEGACY="i586"
13924   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13925     # On all platforms except MacOSX replace x86_64 with amd64.
13926     OPENJDK_TARGET_CPU_LEGACY="amd64"
13927   fi
13928 
13929 
13930   # And the second legacy naming of the cpu.
13931   # Ie i386 and amd64 instead of x86 and x86_64.
13932   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13933   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13934     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13935   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13936     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13937   fi
13938 
13939 
13940   # This is the name of the cpu (but using i386 and amd64 instead of
13941   # x86 and x86_64, respectively), preceeded by a /, to be used when
13942   # locating libraries. On macosx, it's empty, though.
13943   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13944   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13945     OPENJDK_TARGET_CPU_LIBDIR=""
13946   fi
13947 
13948 
13949   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13950   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13951   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13952   OPENJDK_TARGET_CPU_ISADIR=""
13953   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13954     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13955       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13956     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13957       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13958     fi
13959   fi
13960 
13961 
13962   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13963   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13964   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13965     # On linux only, we replace x86 with i386.
13966     OPENJDK_TARGET_CPU_OSARCH="i386"
13967   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13968     # On all platforms except macosx, we replace x86_64 with amd64.
13969     OPENJDK_TARGET_CPU_OSARCH="amd64"
13970   fi
13971 
13972 
13973   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13974   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13975     OPENJDK_TARGET_CPU_JLI="i386"
13976   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13977     # On all platforms except macosx, we replace x86_64 with amd64.
13978     OPENJDK_TARGET_CPU_JLI="amd64"
13979   fi
13980   # Now setup the -D flags for building libjli.
13981   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13982   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13983     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13984       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13985     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13986       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13987     fi
13988   fi
13989 
13990 
13991   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13992       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13993   else
13994       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13995   fi
13996 
13997 
13998   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13999     A_LP64="LP64:="
14000     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14001     # unpack200.exe
14002     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14003       ADD_LP64="-D_LP64=1"
14004     fi
14005   fi
14006   LP64=$A_LP64
14007 
14008 
14009   if test "x$COMPILE_TYPE" = "xcross"; then
14010     # FIXME: ... or should this include reduced builds..?
14011     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14012   else
14013     DEFINE_CROSS_COMPILE_ARCH=""
14014   fi
14015 
14016 
14017   # ZERO_ARCHDEF is used to enable architecture-specific code
14018   case "${OPENJDK_TARGET_CPU}" in
14019     ppc)     ZERO_ARCHDEF=PPC32 ;;
14020     ppc64)   ZERO_ARCHDEF=PPC64 ;;
14021     s390*)   ZERO_ARCHDEF=S390  ;;
14022     sparc*)  ZERO_ARCHDEF=SPARC ;;
14023     x86_64*) ZERO_ARCHDEF=AMD64 ;;
14024     x86)     ZERO_ARCHDEF=IA32  ;;
14025     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14026   esac
14027 
14028 
14029 
14030 
14031 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14032 
14033   # Save the current directory this script was started from
14034   CURDIR="$PWD"
14035 
14036   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14037     PATH_SEP=";"
14038 
14039   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14040   if test $SRC_ROOT_LENGTH -gt 100; then
14041     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14042   fi
14043 
14044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14045     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14046 $as_echo_n "checking cygwin release... " >&6; }
14047     CYGWIN_VERSION=`$UNAME -r`
14048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14049 $as_echo "$CYGWIN_VERSION" >&6; }
14050     WINDOWS_ENV_VENDOR='cygwin'
14051     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14052 
14053     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14054     if test "x$CYGWIN_VERSION_OK" = x; then
14055       { $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
14056 $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;}
14057       as_fn_error $? "Cannot continue" "$LINENO" 5
14058     fi
14059     if test "x$CYGPATH" = x; then
14060       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14061     fi
14062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14063 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14064     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14065     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14066     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14067     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14068     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14069 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14070     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14071     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14072     if test "x$test_cygdrive_prefix" = x; then
14073       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14074     fi
14075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14076     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14077 $as_echo_n "checking msys release... " >&6; }
14078     MSYS_VERSION=`$UNAME -r`
14079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14080 $as_echo "$MSYS_VERSION" >&6; }
14081 
14082     WINDOWS_ENV_VENDOR='msys'
14083     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14084 
14085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14086 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14087     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14088     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14089 
14090   windows_path="$MSYS_ROOT_PATH"
14091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14092     unix_path=`$CYGPATH -u "$windows_path"`
14093     MSYS_ROOT_PATH="$unix_path"
14094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14096     MSYS_ROOT_PATH="$unix_path"
14097   fi
14098 
14099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14100 $as_echo "$MSYS_ROOT_PATH" >&6; }
14101     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14102   else
14103     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14104   fi
14105 
14106   # Test if windows or unix (cygwin/msys) find is first in path.
14107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14108 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14109   FIND_BINARY_OUTPUT=`find --version 2>&1`
14110   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14112 $as_echo "unix style" >&6; }
14113   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14115 $as_echo "Windows" >&6; }
14116     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14117 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14118     { $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
14119 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14120     as_fn_error $? "Cannot continue" "$LINENO" 5
14121   else
14122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14123 $as_echo "unknown" >&6; }
14124     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14125 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14126   fi
14127 
14128   else
14129     PATH_SEP=":"
14130   fi
14131 
14132 
14133   # We get the top-level directory from the supporting wrappers.
14134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14135 $as_echo_n "checking for top-level directory... " >&6; }
14136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14137 $as_echo "$TOPDIR" >&6; }
14138 
14139 
14140   # Save the original version of TOPDIR for string comparisons
14141   ORIGINAL_TOPDIR="$TOPDIR"
14142 
14143 
14144   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14145 
14146   # Only process if variable expands to non-empty
14147 
14148   if test "x$CURDIR" != x; then
14149     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150 
14151   # Input might be given as Windows format, start by converting to
14152   # unix format.
14153   path="$CURDIR"
14154   new_path=`$CYGPATH -u "$path"`
14155 
14156   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14157   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14158   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14159   # "foo.exe" is OK but "foo" is an error.
14160   #
14161   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14162   # It is also a way to make sure we got the proper file name for the real test later on.
14163   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14164   if test "x$test_shortpath" = x; then
14165     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14166 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14167     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14168   fi
14169 
14170   # Call helper function which possibly converts this using DOS-style short mode.
14171   # If so, the updated path is stored in $new_path.
14172 
14173   input_path="$new_path"
14174   # Check if we need to convert this using DOS-style short mode. If the path
14175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14176   # take no chances and rewrite it.
14177   # Note: m4 eats our [], so we need to use [ and ] instead.
14178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14179   if test "x$has_forbidden_chars" != x; then
14180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14184       # Going to short mode and back again did indeed matter. Since short mode is
14185       # case insensitive, let's make it lowercase to improve readability.
14186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14187       # Now convert it back to Unix-stile (cygpath)
14188       input_path=`$CYGPATH -u "$shortmode_path"`
14189       new_path="$input_path"
14190     fi
14191   fi
14192 
14193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14194   if test "x$test_cygdrive_prefix" = x; then
14195     # As a simple fix, exclude /usr/bin since it's not a real path.
14196     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14198       # a path prefixed by /cygdrive for fixpath to work.
14199       new_path="$CYGWIN_ROOT_PATH$input_path"
14200     fi
14201   fi
14202 
14203 
14204   if test "x$path" != "x$new_path"; then
14205     CURDIR="$new_path"
14206     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14207 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14208   fi
14209 
14210     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14211 
14212   path="$CURDIR"
14213   has_colon=`$ECHO $path | $GREP ^.:`
14214   new_path="$path"
14215   if test "x$has_colon" = x; then
14216     # Not in mixed or Windows style, start by that.
14217     new_path=`cmd //c echo $path`
14218   fi
14219 
14220 
14221   input_path="$new_path"
14222   # Check if we need to convert this using DOS-style short mode. If the path
14223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14224   # take no chances and rewrite it.
14225   # Note: m4 eats our [], so we need to use [ and ] instead.
14226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14227   if test "x$has_forbidden_chars" != x; then
14228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14229     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230   fi
14231 
14232 
14233   windows_path="$new_path"
14234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14235     unix_path=`$CYGPATH -u "$windows_path"`
14236     new_path="$unix_path"
14237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14239     new_path="$unix_path"
14240   fi
14241 
14242   if test "x$path" != "x$new_path"; then
14243     CURDIR="$new_path"
14244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14245 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14246   fi
14247 
14248   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14249   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14250 
14251     else
14252       # We're on a unix platform. Hooray! :)
14253       path="$CURDIR"
14254       has_space=`$ECHO "$path" | $GREP " "`
14255       if test "x$has_space" != x; then
14256         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14257 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14258         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14259       fi
14260 
14261       # Use eval to expand a potential ~
14262       eval path="$path"
14263       if test ! -f "$path" && test ! -d "$path"; then
14264         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14265       fi
14266 
14267       CURDIR="`cd "$path"; $THEPWDCMD -L`"
14268     fi
14269   fi
14270 
14271 
14272   # Only process if variable expands to non-empty
14273 
14274   if test "x$TOPDIR" != x; then
14275     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14276 
14277   # Input might be given as Windows format, start by converting to
14278   # unix format.
14279   path="$TOPDIR"
14280   new_path=`$CYGPATH -u "$path"`
14281 
14282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14285   # "foo.exe" is OK but "foo" is an error.
14286   #
14287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14288   # It is also a way to make sure we got the proper file name for the real test later on.
14289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14290   if test "x$test_shortpath" = x; then
14291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14292 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14293     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14294   fi
14295 
14296   # Call helper function which possibly converts this using DOS-style short mode.
14297   # If so, the updated path is stored in $new_path.
14298 
14299   input_path="$new_path"
14300   # Check if we need to convert this using DOS-style short mode. If the path
14301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14302   # take no chances and rewrite it.
14303   # Note: m4 eats our [], so we need to use [ and ] instead.
14304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14305   if test "x$has_forbidden_chars" != x; then
14306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14310       # Going to short mode and back again did indeed matter. Since short mode is
14311       # case insensitive, let's make it lowercase to improve readability.
14312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313       # Now convert it back to Unix-stile (cygpath)
14314       input_path=`$CYGPATH -u "$shortmode_path"`
14315       new_path="$input_path"
14316     fi
14317   fi
14318 
14319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14320   if test "x$test_cygdrive_prefix" = x; then
14321     # As a simple fix, exclude /usr/bin since it's not a real path.
14322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14324       # a path prefixed by /cygdrive for fixpath to work.
14325       new_path="$CYGWIN_ROOT_PATH$input_path"
14326     fi
14327   fi
14328 
14329 
14330   if test "x$path" != "x$new_path"; then
14331     TOPDIR="$new_path"
14332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14333 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14334   fi
14335 
14336     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14337 
14338   path="$TOPDIR"
14339   has_colon=`$ECHO $path | $GREP ^.:`
14340   new_path="$path"
14341   if test "x$has_colon" = x; then
14342     # Not in mixed or Windows style, start by that.
14343     new_path=`cmd //c echo $path`
14344   fi
14345 
14346 
14347   input_path="$new_path"
14348   # Check if we need to convert this using DOS-style short mode. If the path
14349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350   # take no chances and rewrite it.
14351   # Note: m4 eats our [], so we need to use [ and ] instead.
14352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14353   if test "x$has_forbidden_chars" != x; then
14354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14356   fi
14357 
14358 
14359   windows_path="$new_path"
14360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14361     unix_path=`$CYGPATH -u "$windows_path"`
14362     new_path="$unix_path"
14363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14365     new_path="$unix_path"
14366   fi
14367 
14368   if test "x$path" != "x$new_path"; then
14369     TOPDIR="$new_path"
14370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14371 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14372   fi
14373 
14374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14376 
14377     else
14378       # We're on a unix platform. Hooray! :)
14379       path="$TOPDIR"
14380       has_space=`$ECHO "$path" | $GREP " "`
14381       if test "x$has_space" != x; then
14382         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14383 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14384         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385       fi
14386 
14387       # Use eval to expand a potential ~
14388       eval path="$path"
14389       if test ! -f "$path" && test ! -d "$path"; then
14390         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14391       fi
14392 
14393       TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14394     fi
14395   fi
14396 
14397   # SRC_ROOT is a traditional alias for TOPDIR.
14398   SRC_ROOT=$TOPDIR
14399 
14400   # Calculate a canonical version of TOPDIR for string comparisons
14401   CANONICAL_TOPDIR=$TOPDIR
14402 
14403   if test "x$OPENJDK_BUILD_OS" != xwindows; then
14404     # Follow a chain of symbolic links. Use readlink
14405     # where it exists, else fall back to horribly
14406     # complicated shell code.
14407     if test "x$READLINK_TESTED" != yes; then
14408       # On MacOSX there is a readlink tool with a different
14409       # purpose than the GNU readlink tool. Check the found readlink.
14410       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14411       if test "x$ISGNU" = x; then
14412         # A readlink that we do not know how to use.
14413         # Are there other non-GNU readlinks out there?
14414         READLINK_TESTED=yes
14415         READLINK=
14416       fi
14417     fi
14418 
14419     if test "x$READLINK" != x; then
14420       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14421     else
14422       # Save the current directory for restoring afterwards
14423       STARTDIR=$PWD
14424       COUNTER=0
14425       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14426       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14427       cd $sym_link_dir
14428       # Use -P flag to resolve symlinks in directories.
14429       cd `$THEPWDCMD -P`
14430       sym_link_dir=`$THEPWDCMD -P`
14431       # Resolve file symlinks
14432       while test $COUNTER -lt 20; do
14433         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14434         if test "x$ISLINK" == x; then
14435           # This is not a symbolic link! We are done!
14436           break
14437         fi
14438         # Again resolve directory symlinks since the target of the just found
14439         # link could be in a different directory
14440         cd `$DIRNAME $ISLINK`
14441         sym_link_dir=`$THEPWDCMD -P`
14442         sym_link_file=`$BASENAME $ISLINK`
14443         let COUNTER=COUNTER+1
14444       done
14445       cd $STARTDIR
14446       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14447     fi
14448   fi
14449 
14450 
14451 
14452   # Locate the directory of this script.
14453   AUTOCONF_DIR=$TOPDIR/common/autoconf
14454 
14455 
14456 # Check if it's a pure open build or if custom sources are to be used.
14457 
14458   # Check whether --enable-openjdk-only was given.
14459 if test "${enable_openjdk_only+set}" = set; then :
14460   enableval=$enable_openjdk_only;
14461 else
14462   enable_openjdk_only="no"
14463 fi
14464 
14465 
14466   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14467 $as_echo_n "checking for presence of closed sources... " >&6; }
14468   if test -d "$SRC_ROOT/jdk/src/closed"; then
14469     CLOSED_SOURCE_PRESENT=yes
14470   else
14471     CLOSED_SOURCE_PRESENT=no
14472   fi
14473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14474 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14475 
14476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14477 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14478   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14480 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14481 
14482   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14483     OPENJDK=true
14484     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14485       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14486 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14487     fi
14488   else
14489     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14490       OPENJDK=true
14491     else
14492       OPENJDK=false
14493     fi
14494   fi
14495 
14496   if test "x$OPENJDK" = "xtrue"; then
14497     SET_OPENJDK="OPENJDK=true"
14498   fi
14499 
14500 
14501 
14502   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14503   # the IncludeCustomExtension macro.
14504 
14505 
14506 # Check whether --with-custom-make-dir was given.
14507 if test "${with_custom_make_dir+set}" = set; then :
14508   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
14509 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14510 fi
14511 
14512 
14513 
14514 
14515 # These are needed to be able to create a configuration name (and thus the output directory)
14516 
14517   ###############################################################################
14518   #
14519   # Check which variant of the JDK that we want to build.
14520   # Currently we have:
14521   #    normal:   standard edition
14522   # but the custom make system may add other variants
14523   #
14524   # Effectively the JDK variant gives a name to a specific set of
14525   # modules to compile into the JDK. In the future, these modules
14526   # might even be Jigsaw modules.
14527   #
14528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14529 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14530 
14531 # Check whether --with-jdk-variant was given.
14532 if test "${with_jdk_variant+set}" = set; then :
14533   withval=$with_jdk_variant;
14534 fi
14535 
14536 
14537   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14538     JDK_VARIANT="normal"
14539   else
14540     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14541   fi
14542 
14543 
14544 
14545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14546 $as_echo "$JDK_VARIANT" >&6; }
14547 
14548 
14549 ###############################################################################
14550 #
14551 # Check which interpreter of the JVM we want to build.
14552 # Currently we have:
14553 #    template: Template interpreter (the default)
14554 #    cpp     : C++ interpreter
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14556 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14557 
14558 # Check whether --with-jvm-interpreter was given.
14559 if test "${with_jvm_interpreter+set}" = set; then :
14560   withval=$with_jvm_interpreter;
14561 fi
14562 
14563 
14564 if test "x$with_jvm_interpreter" = x; then
14565      with_jvm_interpreter="template"
14566 fi
14567 
14568 JVM_INTERPRETER="$with_jvm_interpreter"
14569 
14570 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14571    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14572 fi
14573 
14574 
14575 
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14577 $as_echo "$with_jvm_interpreter" >&6; }
14578 
14579 
14580 
14581   ###############################################################################
14582   #
14583   # Check which variants of the JVM that we want to build.
14584   # Currently we have:
14585   #    server: normal interpreter and a tiered C1/C2 compiler
14586   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14587   #    minimal1: reduced form of client with optional VM services and features stripped out
14588   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14589   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14590   #    zero: no machine code interpreter, no compiler
14591   #    zeroshark: zero interpreter and shark/llvm compiler backend
14592 #    core: interpreter only, no compiler (only works on some platforms)
14593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14594 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14595 
14596 # Check whether --with-jvm-variants was given.
14597 if test "${with_jvm_variants+set}" = set; then :
14598   withval=$with_jvm_variants;
14599 fi
14600 
14601 
14602   if test "x$with_jvm_variants" = x; then
14603     with_jvm_variants="server"
14604   fi
14605 
14606   JVM_VARIANTS=",$with_jvm_variants,"
14607   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,//'`
14608 
14609   if test "x$TEST_VARIANTS" != "x,"; then
14610      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14611   fi
14612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14613 $as_echo "$with_jvm_variants" >&6; }
14614 
14615   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14616   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14617   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14618   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14619   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14620   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14621   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14622 
14623   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14624     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14625       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14626     fi
14627   fi
14628   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14629     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14630       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14631     fi
14632   fi
14633   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14634     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14635       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14636     fi
14637   fi
14638 
14639   # Replace the commas with AND for use in the build directory name.
14640   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14641   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/'`
14642   if test "x$COUNT_VARIANTS" != "x,1"; then
14643     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14644   else
14645     BUILDING_MULTIPLE_JVM_VARIANTS=no
14646   fi
14647 
14648 
14649 
14650 
14651 
14652 
14653 
14654 
14655 
14656 
14657   INCLUDE_SA=true
14658   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14659     INCLUDE_SA=false
14660   fi
14661   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14662     INCLUDE_SA=false
14663   fi
14664   if test "x$OPENJDK_TARGET_OS" = xaix ; then
14665     INCLUDE_SA=false
14666   fi
14667   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14668     INCLUDE_SA=false
14669   fi
14670 
14671 
14672   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14673     MACOSX_UNIVERSAL="true"
14674   fi
14675 
14676 
14677 
14678 
14679   ###############################################################################
14680   #
14681   # Set the debug level
14682   #    release: no debug information, all optimizations, no asserts.
14683   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14684   #    fastdebug: debug information (-g), all optimizations, all asserts
14685   #    slowdebug: debug information (-g), no optimizations, all asserts
14686   #
14687   DEBUG_LEVEL="release"
14688   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14689 $as_echo_n "checking which debug level to use... " >&6; }
14690   # Check whether --enable-debug was given.
14691 if test "${enable_debug+set}" = set; then :
14692   enableval=$enable_debug;
14693         ENABLE_DEBUG="${enableval}"
14694         DEBUG_LEVEL="fastdebug"
14695 
14696 else
14697   ENABLE_DEBUG="no"
14698 fi
14699 
14700 
14701 
14702 # Check whether --with-debug-level was given.
14703 if test "${with_debug_level+set}" = set; then :
14704   withval=$with_debug_level;
14705         DEBUG_LEVEL="${withval}"
14706         if test "x$ENABLE_DEBUG" = xyes; then
14707           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14708         fi
14709 
14710 fi
14711 
14712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14713 $as_echo "$DEBUG_LEVEL" >&6; }
14714 
14715   if test "x$DEBUG_LEVEL" != xrelease && \
14716       test "x$DEBUG_LEVEL" != xoptimized && \
14717       test "x$DEBUG_LEVEL" != xfastdebug && \
14718       test "x$DEBUG_LEVEL" != xslowdebug; then
14719     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14720   fi
14721 
14722 
14723   ###############################################################################
14724   #
14725   # Setup legacy vars/targets and new vars to deal with different debug levels.
14726   #
14727 
14728   case $DEBUG_LEVEL in
14729     release )
14730       VARIANT="OPT"
14731       FASTDEBUG="false"
14732       DEBUG_CLASSFILES="false"
14733       BUILD_VARIANT_RELEASE=""
14734       HOTSPOT_DEBUG_LEVEL="product"
14735       HOTSPOT_EXPORT="product"
14736       ;;
14737     fastdebug )
14738       VARIANT="DBG"
14739       FASTDEBUG="true"
14740       DEBUG_CLASSFILES="true"
14741       BUILD_VARIANT_RELEASE="-fastdebug"
14742       HOTSPOT_DEBUG_LEVEL="fastdebug"
14743       HOTSPOT_EXPORT="fastdebug"
14744       ;;
14745     slowdebug )
14746       VARIANT="DBG"
14747       FASTDEBUG="false"
14748       DEBUG_CLASSFILES="true"
14749       BUILD_VARIANT_RELEASE="-debug"
14750       HOTSPOT_DEBUG_LEVEL="debug"
14751       HOTSPOT_EXPORT="debug"
14752       ;;
14753     optimized )
14754       VARIANT="OPT"
14755       FASTDEBUG="false"
14756       DEBUG_CLASSFILES="false"
14757       BUILD_VARIANT_RELEASE="-optimized"
14758       HOTSPOT_DEBUG_LEVEL="optimized"
14759       HOTSPOT_EXPORT="optimized"
14760       ;;
14761   esac
14762 
14763   # The debug level 'optimized' is a little special because it is currently only
14764   # applicable to the HotSpot build where it means to build a completely
14765   # optimized version of the VM without any debugging code (like for the
14766   # 'release' debug level which is called 'product' in the HotSpot build) but
14767   # with the exception that it can contain additional code which is otherwise
14768   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14769   # test new and/or experimental features which are not intended for customer
14770   # shipment. Because these new features need to be tested and benchmarked in
14771   # real world scenarios, we want to build the containing JDK at the 'release'
14772   # debug level.
14773   if test "x$DEBUG_LEVEL" = xoptimized; then
14774     DEBUG_LEVEL="release"
14775   fi
14776 
14777   #####
14778   # Generate the legacy makefile targets for hotspot.
14779   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14780   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14781   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14782   # But until then ...
14783   HOTSPOT_TARGET=""
14784 
14785   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14786     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14787   fi
14788 
14789   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14790     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14791   fi
14792 
14793   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14794     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14795   fi
14796 
14797   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14798     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14799   fi
14800 
14801   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14802     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14803   fi
14804 
14805   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14806     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14807   fi
14808 
14809   if test "x$JVM_VARIANT_CORE" = xtrue; then
14810     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14811   fi
14812 
14813   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14814 
14815   # On Macosx universal binaries are produced, but they only contain
14816   # 64 bit intel. This invalidates control of which jvms are built
14817   # from configure, but only server is valid anyway. Fix this
14818   # when hotspot makefiles are rewritten.
14819   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14820     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14821   fi
14822 
14823   #####
14824 
14825 
14826 
14827 
14828 
14829 
14830 
14831 
14832 # With basic setup done, call the custom early hook.
14833 
14834 
14835 # Check if we have devkits, extra paths or sysroot set.
14836 
14837 
14838 # Check whether --with-devkit was given.
14839 if test "${with_devkit+set}" = set; then :
14840   withval=$with_devkit;
14841 
14842   # Only process if variable expands to non-empty
14843 
14844   if test "x$with_devkit" != x; then
14845     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14846 
14847   # Input might be given as Windows format, start by converting to
14848   # unix format.
14849   path="$with_devkit"
14850   new_path=`$CYGPATH -u "$path"`
14851 
14852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14855   # "foo.exe" is OK but "foo" is an error.
14856   #
14857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14858   # It is also a way to make sure we got the proper file name for the real test later on.
14859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14860   if test "x$test_shortpath" = x; then
14861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14862 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14863     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14864   fi
14865 
14866   # Call helper function which possibly converts this using DOS-style short mode.
14867   # If so, the updated path is stored in $new_path.
14868 
14869   input_path="$new_path"
14870   # Check if we need to convert this using DOS-style short mode. If the path
14871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14872   # take no chances and rewrite it.
14873   # Note: m4 eats our [], so we need to use [ and ] instead.
14874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14875   if test "x$has_forbidden_chars" != x; then
14876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14880       # Going to short mode and back again did indeed matter. Since short mode is
14881       # case insensitive, let's make it lowercase to improve readability.
14882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14883       # Now convert it back to Unix-stile (cygpath)
14884       input_path=`$CYGPATH -u "$shortmode_path"`
14885       new_path="$input_path"
14886     fi
14887   fi
14888 
14889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14890   if test "x$test_cygdrive_prefix" = x; then
14891     # As a simple fix, exclude /usr/bin since it's not a real path.
14892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14894       # a path prefixed by /cygdrive for fixpath to work.
14895       new_path="$CYGWIN_ROOT_PATH$input_path"
14896     fi
14897   fi
14898 
14899 
14900   if test "x$path" != "x$new_path"; then
14901     with_devkit="$new_path"
14902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14903 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14904   fi
14905 
14906     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14907 
14908   path="$with_devkit"
14909   has_colon=`$ECHO $path | $GREP ^.:`
14910   new_path="$path"
14911   if test "x$has_colon" = x; then
14912     # Not in mixed or Windows style, start by that.
14913     new_path=`cmd //c echo $path`
14914   fi
14915 
14916 
14917   input_path="$new_path"
14918   # Check if we need to convert this using DOS-style short mode. If the path
14919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14920   # take no chances and rewrite it.
14921   # Note: m4 eats our [], so we need to use [ and ] instead.
14922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14923   if test "x$has_forbidden_chars" != x; then
14924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14926   fi
14927 
14928 
14929   windows_path="$new_path"
14930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14931     unix_path=`$CYGPATH -u "$windows_path"`
14932     new_path="$unix_path"
14933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14935     new_path="$unix_path"
14936   fi
14937 
14938   if test "x$path" != "x$new_path"; then
14939     with_devkit="$new_path"
14940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14941 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14942   fi
14943 
14944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14946 
14947     else
14948       # We're on a unix platform. Hooray! :)
14949       path="$with_devkit"
14950       has_space=`$ECHO "$path" | $GREP " "`
14951       if test "x$has_space" != x; then
14952         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14953 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14954         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14955       fi
14956 
14957       # Use eval to expand a potential ~
14958       eval path="$path"
14959       if test ! -f "$path" && test ! -d "$path"; then
14960         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14961       fi
14962 
14963       with_devkit="`cd "$path"; $THEPWDCMD -L`"
14964     fi
14965   fi
14966 
14967         DEVKIT_ROOT="$with_devkit"
14968         # Check for a meta data info file in the root of the devkit
14969         if test -f "$DEVKIT_ROOT/devkit.info"; then
14970           # This potentially sets the following:
14971           # DEVKIT_NAME: A descriptive name of the devkit
14972           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14973           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14974           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14975           . $DEVKIT_ROOT/devkit.info
14976         fi
14977 
14978         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14979 $as_echo_n "checking for devkit... " >&6; }
14980         if test "x$DEVKIT_NAME" != x; then
14981           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14982 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14983         else
14984           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14985 $as_echo "$DEVKIT_ROOT" >&6; }
14986         fi
14987 
14988         if test "x$DEVKIT_EXTRA_PATH" != x; then
14989 
14990   if test "x$DEVKIT_EXTRA_PATH" != x; then
14991     if test "x$EXTRA_PATH" = x; then
14992       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14993     else
14994       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14995     fi
14996   fi
14997 
14998         fi
14999 
15000         # Fallback default of just /bin if DEVKIT_PATH is not defined
15001         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15002           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15003         fi
15004 
15005   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15006     if test "x$TOOLCHAIN_PATH" = x; then
15007       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15008     else
15009       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15010     fi
15011   fi
15012 
15013 
15014         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15015         # places for backwards compatiblity.
15016         if test "x$DEVKIT_SYSROOT" != x; then
15017           SYSROOT="$DEVKIT_SYSROOT"
15018         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15019           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15020         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15021           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15022         fi
15023 
15024 
15025 fi
15026 
15027 
15028   # You can force the sysroot if the sysroot encoded into the compiler tools
15029   # is not correct.
15030 
15031 # Check whether --with-sys-root was given.
15032 if test "${with_sys_root+set}" = set; then :
15033   withval=$with_sys_root; SYSROOT=$with_sys_root
15034 
15035 fi
15036 
15037 
15038 
15039 # Check whether --with-sysroot was given.
15040 if test "${with_sysroot+set}" = set; then :
15041   withval=$with_sysroot; SYSROOT=$with_sysroot
15042 
15043 fi
15044 
15045 
15046 
15047 # Check whether --with-tools-dir was given.
15048 if test "${with_tools_dir+set}" = set; then :
15049   withval=$with_tools_dir;
15050   if test "x$with_tools_dir" != x; then
15051     if test "x$TOOLCHAIN_PATH" = x; then
15052       TOOLCHAIN_PATH="$with_tools_dir"
15053     else
15054       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15055     fi
15056   fi
15057 
15058 
15059 fi
15060 
15061 
15062 
15063 # Check whether --with-toolchain-path was given.
15064 if test "${with_toolchain_path+set}" = set; then :
15065   withval=$with_toolchain_path;
15066   if test "x$with_toolchain_path" != x; then
15067     if test "x$TOOLCHAIN_PATH" = x; then
15068       TOOLCHAIN_PATH="$with_toolchain_path"
15069     else
15070       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15071     fi
15072   fi
15073 
15074 
15075 fi
15076 
15077 
15078 
15079 # Check whether --with-extra-path was given.
15080 if test "${with_extra_path+set}" = set; then :
15081   withval=$with_extra_path;
15082   if test "x$with_extra_path" != x; then
15083     if test "x$EXTRA_PATH" = x; then
15084       EXTRA_PATH="$with_extra_path"
15085     else
15086       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15087     fi
15088   fi
15089 
15090 
15091 fi
15092 
15093 
15094   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15095     # detect if Xcode is installed by running xcodebuild -version
15096     # if no Xcode installed, xcodebuild exits with 1
15097     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15098     if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15099       # We need to use xcodebuild in the toolchain dir provided by the user, this will
15100       # fall back on the stub binary in /usr/bin/xcodebuild
15101       # Extract the first word of "xcodebuild", so it can be a program name with args.
15102 set dummy xcodebuild; ac_word=$2
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15104 $as_echo_n "checking for $ac_word... " >&6; }
15105 if ${ac_cv_path_XCODEBUILD+:} false; then :
15106   $as_echo_n "(cached) " >&6
15107 else
15108   case $XCODEBUILD in
15109   [\\/]* | ?:[\\/]*)
15110   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15111   ;;
15112   *)
15113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15114 for as_dir in $TOOLCHAIN_PATH
15115 do
15116   IFS=$as_save_IFS
15117   test -z "$as_dir" && as_dir=.
15118     for ac_exec_ext in '' $ac_executable_extensions; do
15119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15120     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15122     break 2
15123   fi
15124 done
15125   done
15126 IFS=$as_save_IFS
15127 
15128   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15129   ;;
15130 esac
15131 fi
15132 XCODEBUILD=$ac_cv_path_XCODEBUILD
15133 if test -n "$XCODEBUILD"; then
15134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15135 $as_echo "$XCODEBUILD" >&6; }
15136 else
15137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15138 $as_echo "no" >&6; }
15139 fi
15140 
15141 
15142     else
15143       # this should result in SYSROOT being empty, unless --with-sysroot is provided
15144       # when only the command line tools are installed there are no SDKs, so headers
15145       # are copied into the system frameworks
15146       XCODEBUILD=
15147 
15148     fi
15149 
15150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15151 $as_echo_n "checking for sdk name... " >&6; }
15152 
15153 # Check whether --with-sdk-name was given.
15154 if test "${with_sdk_name+set}" = set; then :
15155   withval=$with_sdk_name; SDKNAME=$with_sdk_name
15156 
15157 fi
15158 
15159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15160 $as_echo "$SDKNAME" >&6; }
15161 
15162     # if toolchain path is specified then don't rely on system headers, they may not compile
15163     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15164     test -z "$TOOLCHAIN_PATH" && \
15165       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15166 
15167     if test -z "$SYSROOT"; then
15168       if test -n "$XCODEBUILD"; then
15169         # if we don't have system headers, use default SDK name (last resort)
15170         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15171           SDKNAME=${SDKNAME:-macosx}
15172         fi
15173 
15174         if test -n "$SDKNAME"; then
15175           # Call xcodebuild to determine SYSROOT
15176           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15177         fi
15178       else
15179         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15180           as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15181         fi
15182       fi
15183     else
15184       # warn user if --with-sdk-name was also set
15185       if test -n "$with_sdk_name"; then
15186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15187 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15188       fi
15189     fi
15190 
15191     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15192       # If no system framework headers, then SYSROOT must be set, or we won't build
15193       as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15194     fi
15195 
15196     # Perform a basic sanity test
15197     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15198       if test -z "$SYSROOT"; then
15199         as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15200       else
15201         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15202       fi
15203     fi
15204 
15205     # set SDKROOT too, Xcode tools will pick it up
15206     SDKROOT=$SYSROOT
15207 
15208   fi
15209 
15210   # Prepend the extra path to the global path
15211 
15212   if test "x$EXTRA_PATH" != x; then
15213     if test "x$PATH" = x; then
15214       PATH="$EXTRA_PATH"
15215     else
15216       PATH="$EXTRA_PATH:$PATH"
15217     fi
15218   fi
15219 
15220 
15221   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15222     # Add extra search paths on solaris for utilities like ar and as etc...
15223     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15224   fi
15225 
15226   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15227 $as_echo_n "checking for sysroot... " >&6; }
15228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15229 $as_echo "$SYSROOT" >&6; }
15230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15231 $as_echo_n "checking for toolchain path... " >&6; }
15232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15233 $as_echo "$TOOLCHAIN_PATH" >&6; }
15234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15235 $as_echo_n "checking for extra path... " >&6; }
15236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15237 $as_echo "$EXTRA_PATH" >&6; }
15238 
15239 
15240 # To properly create a configuration name, we need to have the OpenJDK target
15241 # and options (variants and debug level) parsed.
15242 
15243 
15244 
15245 # Check whether --with-conf-name was given.
15246 if test "${with_conf_name+set}" = set; then :
15247   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15248 fi
15249 
15250 
15251   # Test from where we are running configure, in or outside of src root.
15252   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15253 $as_echo_n "checking where to store configuration... " >&6; }
15254   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15255       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15256       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15257     # We are running configure from the src root.
15258     # Create a default ./build/target-variant-debuglevel output root.
15259     if test "x${CONF_NAME}" = x; then
15260       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15261 $as_echo "in default location" >&6; }
15262       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15263     else
15264       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15265 $as_echo "in build directory with custom name" >&6; }
15266     fi
15267     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15268     $MKDIR -p "$OUTPUT_ROOT"
15269     if test ! -d "$OUTPUT_ROOT"; then
15270       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15271     fi
15272   else
15273     # We are running configure from outside of the src dir.
15274     # Then use the current directory as output dir!
15275     # If configuration is situated in normal build directory, just use the build
15276     # directory name as configuration name, otherwise use the complete path.
15277     if test "x${CONF_NAME}" = x; then
15278       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15279     fi
15280     OUTPUT_ROOT="$CURDIR"
15281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15282 $as_echo "in current directory" >&6; }
15283 
15284     # WARNING: This might be a bad thing to do. You need to be sure you want to
15285     # have a configuration in this directory. Do some sanity checks!
15286 
15287     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15288       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15289       # other files
15290       files_present=`$LS $OUTPUT_ROOT`
15291       # Configure has already touched config.log and confdefs.h in the current dir when this check
15292       # is performed.
15293       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15294       | $TR -d '\n'`
15295       if test "x$filtered_files" != x; then
15296         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15297 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15298         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15299 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15300         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15301 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15302         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15303 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15304         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15305 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15306         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15307 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15308         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15309 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15310         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15311       fi
15312     fi
15313   fi
15314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15315 $as_echo_n "checking what configuration name to use... " >&6; }
15316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15317 $as_echo "$CONF_NAME" >&6; }
15318 
15319 
15320   # Only process if variable expands to non-empty
15321 
15322   if test "x$OUTPUT_ROOT" != x; then
15323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15324 
15325   # Input might be given as Windows format, start by converting to
15326   # unix format.
15327   path="$OUTPUT_ROOT"
15328   new_path=`$CYGPATH -u "$path"`
15329 
15330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15333   # "foo.exe" is OK but "foo" is an error.
15334   #
15335   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15336   # It is also a way to make sure we got the proper file name for the real test later on.
15337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15338   if test "x$test_shortpath" = x; then
15339     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15340 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15341     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15342   fi
15343 
15344   # Call helper function which possibly converts this using DOS-style short mode.
15345   # If so, the updated path is stored in $new_path.
15346 
15347   input_path="$new_path"
15348   # Check if we need to convert this using DOS-style short mode. If the path
15349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15350   # take no chances and rewrite it.
15351   # Note: m4 eats our [], so we need to use [ and ] instead.
15352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15353   if test "x$has_forbidden_chars" != x; then
15354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15355     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15356     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15357     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15358       # Going to short mode and back again did indeed matter. Since short mode is
15359       # case insensitive, let's make it lowercase to improve readability.
15360       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15361       # Now convert it back to Unix-stile (cygpath)
15362       input_path=`$CYGPATH -u "$shortmode_path"`
15363       new_path="$input_path"
15364     fi
15365   fi
15366 
15367   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15368   if test "x$test_cygdrive_prefix" = x; then
15369     # As a simple fix, exclude /usr/bin since it's not a real path.
15370     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15371       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15372       # a path prefixed by /cygdrive for fixpath to work.
15373       new_path="$CYGWIN_ROOT_PATH$input_path"
15374     fi
15375   fi
15376 
15377 
15378   if test "x$path" != "x$new_path"; then
15379     OUTPUT_ROOT="$new_path"
15380     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15381 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15382   fi
15383 
15384     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15385 
15386   path="$OUTPUT_ROOT"
15387   has_colon=`$ECHO $path | $GREP ^.:`
15388   new_path="$path"
15389   if test "x$has_colon" = x; then
15390     # Not in mixed or Windows style, start by that.
15391     new_path=`cmd //c echo $path`
15392   fi
15393 
15394 
15395   input_path="$new_path"
15396   # Check if we need to convert this using DOS-style short mode. If the path
15397   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15398   # take no chances and rewrite it.
15399   # Note: m4 eats our [], so we need to use [ and ] instead.
15400   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15401   if test "x$has_forbidden_chars" != x; then
15402     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15403     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15404   fi
15405 
15406 
15407   windows_path="$new_path"
15408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15409     unix_path=`$CYGPATH -u "$windows_path"`
15410     new_path="$unix_path"
15411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15413     new_path="$unix_path"
15414   fi
15415 
15416   if test "x$path" != "x$new_path"; then
15417     OUTPUT_ROOT="$new_path"
15418     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15419 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15420   fi
15421 
15422   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15423   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15424 
15425     else
15426       # We're on a unix platform. Hooray! :)
15427       path="$OUTPUT_ROOT"
15428       has_space=`$ECHO "$path" | $GREP " "`
15429       if test "x$has_space" != x; then
15430         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15431 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15432         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15433       fi
15434 
15435       # Use eval to expand a potential ~
15436       eval path="$path"
15437       if test ! -f "$path" && test ! -d "$path"; then
15438         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15439       fi
15440 
15441       OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15442     fi
15443   fi
15444 
15445 
15446   SPEC=$OUTPUT_ROOT/spec.gmk
15447 
15448   CONF_NAME=$CONF_NAME
15449 
15450   OUTPUT_ROOT=$OUTPUT_ROOT
15451 
15452 
15453   # The spec.gmk file contains all variables for the make system.
15454   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15455 
15456   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15457   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15458 
15459   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15460   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15461 
15462   # The compare.sh is used to compare the build output to other builds.
15463   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15464 
15465   # The generated Makefile knows where the spec.gmk is and where the source is.
15466   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15467   # which will look for generated configurations
15468   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15469 
15470 
15471 
15472 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15473 
15474   for ac_prog in apt-get yum port pkgutil pkgadd
15475 do
15476   # Extract the first word of "$ac_prog", so it can be a program name with args.
15477 set dummy $ac_prog; ac_word=$2
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15479 $as_echo_n "checking for $ac_word... " >&6; }
15480 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15481   $as_echo_n "(cached) " >&6
15482 else
15483   if test -n "$PKGHANDLER"; then
15484   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15485 else
15486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15487 for as_dir in $PATH
15488 do
15489   IFS=$as_save_IFS
15490   test -z "$as_dir" && as_dir=.
15491     for ac_exec_ext in '' $ac_executable_extensions; do
15492   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15493     ac_cv_prog_PKGHANDLER="$ac_prog"
15494     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15495     break 2
15496   fi
15497 done
15498   done
15499 IFS=$as_save_IFS
15500 
15501 fi
15502 fi
15503 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15504 if test -n "$PKGHANDLER"; then
15505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15506 $as_echo "$PKGHANDLER" >&6; }
15507 else
15508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15509 $as_echo "no" >&6; }
15510 fi
15511 
15512 
15513   test -n "$PKGHANDLER" && break
15514 done
15515 
15516 
15517 
15518 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15519 
15520 
15521   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15522   if test "x$MAKE" != x; then
15523     # User has supplied a make, test it.
15524     if test ! -f "$MAKE"; then
15525       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15526     fi
15527 
15528   MAKE_CANDIDATE=""$MAKE""
15529   DESCRIPTION="user supplied MAKE=$MAKE"
15530   if test "x$MAKE_CANDIDATE" != x; then
15531     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15532 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15533     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15534     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15535     if test "x$IS_GNU_MAKE" = x; then
15536       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15537 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15538     else
15539       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15540       if test "x$IS_MODERN_MAKE" = x; then
15541         { $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
15542 $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;}
15543       else
15544         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15545           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15546             MAKE_EXPECTED_ENV='cygwin'
15547           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15548             MAKE_EXPECTED_ENV='msys'
15549           else
15550             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15551           fi
15552           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15553           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15554         else
15555           # Not relevant for non-Windows
15556           IS_MAKE_CORRECT_ENV=true
15557         fi
15558         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15559           { $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
15560 $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;}
15561         else
15562           FOUND_MAKE=$MAKE_CANDIDATE
15563 
15564   # Only process if variable expands to non-empty
15565 
15566   if test "x$FOUND_MAKE" != x; then
15567     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15568 
15569   # First separate the path from the arguments. This will split at the first
15570   # space.
15571   complete="$FOUND_MAKE"
15572   path="${complete%% *}"
15573   tmp="$complete EOL"
15574   arguments="${tmp#* }"
15575 
15576   # Input might be given as Windows format, start by converting to
15577   # unix format.
15578   new_path=`$CYGPATH -u "$path"`
15579 
15580   # Now try to locate executable using which
15581   new_path=`$WHICH "$new_path" 2> /dev/null`
15582   # bat and cmd files are not always considered executable in cygwin causing which
15583   # to not find them
15584   if test "x$new_path" = x \
15585       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15586       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15587     new_path=`$CYGPATH -u "$path"`
15588   fi
15589   if test "x$new_path" = x; then
15590     # Oops. Which didn't find the executable.
15591     # The splitting of arguments from the executable at a space might have been incorrect,
15592     # since paths with space are more likely in Windows. Give it another try with the whole
15593     # argument.
15594     path="$complete"
15595     arguments="EOL"
15596     new_path=`$CYGPATH -u "$path"`
15597     new_path=`$WHICH "$new_path" 2> /dev/null`
15598     # bat and cmd files are not always considered executable in cygwin causing which
15599     # to not find them
15600     if test "x$new_path" = x \
15601         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15602         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15603       new_path=`$CYGPATH -u "$path"`
15604     fi
15605     if test "x$new_path" = x; then
15606       # It's still not found. Now this is an unrecoverable error.
15607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15608 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15609       has_space=`$ECHO "$complete" | $GREP " "`
15610       if test "x$has_space" != x; then
15611         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15612 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15613       fi
15614       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15615     fi
15616   fi
15617 
15618   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15619   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15620   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15621   # "foo.exe" is OK but "foo" is an error.
15622   #
15623   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15624   # It is also a way to make sure we got the proper file name for the real test later on.
15625   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15626   if test "x$test_shortpath" = x; then
15627     # Short path failed, file does not exist as specified.
15628     # Try adding .exe or .cmd
15629     if test -f "${new_path}.exe"; then
15630       input_to_shortpath="${new_path}.exe"
15631     elif test -f "${new_path}.cmd"; then
15632       input_to_shortpath="${new_path}.cmd"
15633     else
15634       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15635 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15636       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15637 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15638       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15639     fi
15640   else
15641     input_to_shortpath="$new_path"
15642   fi
15643 
15644   # Call helper function which possibly converts this using DOS-style short mode.
15645   # If so, the updated path is stored in $new_path.
15646   new_path="$input_to_shortpath"
15647 
15648   input_path="$input_to_shortpath"
15649   # Check if we need to convert this using DOS-style short mode. If the path
15650   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15651   # take no chances and rewrite it.
15652   # Note: m4 eats our [], so we need to use [ and ] instead.
15653   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15654   if test "x$has_forbidden_chars" != x; then
15655     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15656     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15657     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15658     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15659       # Going to short mode and back again did indeed matter. Since short mode is
15660       # case insensitive, let's make it lowercase to improve readability.
15661       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15662       # Now convert it back to Unix-stile (cygpath)
15663       input_path=`$CYGPATH -u "$shortmode_path"`
15664       new_path="$input_path"
15665     fi
15666   fi
15667 
15668   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15669   if test "x$test_cygdrive_prefix" = x; then
15670     # As a simple fix, exclude /usr/bin since it's not a real path.
15671     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15672       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15673       # a path prefixed by /cygdrive for fixpath to work.
15674       new_path="$CYGWIN_ROOT_PATH$input_path"
15675     fi
15676   fi
15677 
15678   # remove trailing .exe if any
15679   new_path="${new_path/%.exe/}"
15680 
15681     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15682 
15683   # First separate the path from the arguments. This will split at the first
15684   # space.
15685   complete="$FOUND_MAKE"
15686   path="${complete%% *}"
15687   tmp="$complete EOL"
15688   arguments="${tmp#* }"
15689 
15690   # Input might be given as Windows format, start by converting to
15691   # unix format.
15692   new_path="$path"
15693 
15694   windows_path="$new_path"
15695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15696     unix_path=`$CYGPATH -u "$windows_path"`
15697     new_path="$unix_path"
15698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15700     new_path="$unix_path"
15701   fi
15702 
15703 
15704   # Now try to locate executable using which
15705   new_path=`$WHICH "$new_path" 2> /dev/null`
15706 
15707   if test "x$new_path" = x; then
15708     # Oops. Which didn't find the executable.
15709     # The splitting of arguments from the executable at a space might have been incorrect,
15710     # since paths with space are more likely in Windows. Give it another try with the whole
15711     # argument.
15712     path="$complete"
15713     arguments="EOL"
15714     new_path="$path"
15715 
15716   windows_path="$new_path"
15717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15718     unix_path=`$CYGPATH -u "$windows_path"`
15719     new_path="$unix_path"
15720   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15721     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15722     new_path="$unix_path"
15723   fi
15724 
15725 
15726     new_path=`$WHICH "$new_path" 2> /dev/null`
15727     # bat and cmd files are not always considered executable in MSYS causing which
15728     # to not find them
15729     if test "x$new_path" = x \
15730         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15731         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15732       new_path="$path"
15733 
15734   windows_path="$new_path"
15735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15736     unix_path=`$CYGPATH -u "$windows_path"`
15737     new_path="$unix_path"
15738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15740     new_path="$unix_path"
15741   fi
15742 
15743     fi
15744 
15745     if test "x$new_path" = x; then
15746       # It's still not found. Now this is an unrecoverable error.
15747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15748 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15749       has_space=`$ECHO "$complete" | $GREP " "`
15750       if test "x$has_space" != x; then
15751         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15752 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15753       fi
15754       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15755     fi
15756   fi
15757 
15758   # Now new_path has a complete unix path to the binary
15759   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15760     # Keep paths in /bin as-is, but remove trailing .exe if any
15761     new_path="${new_path/%.exe/}"
15762     # Do not save /bin paths to all_fixpath_prefixes!
15763   else
15764     # Not in mixed or Windows style, start by that.
15765     new_path=`cmd //c echo $new_path`
15766 
15767   input_path="$new_path"
15768   # Check if we need to convert this using DOS-style short mode. If the path
15769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15770   # take no chances and rewrite it.
15771   # Note: m4 eats our [], so we need to use [ and ] instead.
15772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15773   if test "x$has_forbidden_chars" != x; then
15774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15775     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15776   fi
15777 
15778     # Output is in $new_path
15779 
15780   windows_path="$new_path"
15781   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15782     unix_path=`$CYGPATH -u "$windows_path"`
15783     new_path="$unix_path"
15784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15785     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15786     new_path="$unix_path"
15787   fi
15788 
15789     # remove trailing .exe if any
15790     new_path="${new_path/%.exe/}"
15791 
15792     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15793     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15794   fi
15795 
15796     else
15797       # We're on a unix platform. Hooray! :)
15798       # First separate the path from the arguments. This will split at the first
15799       # space.
15800       complete="$FOUND_MAKE"
15801       path="${complete%% *}"
15802       tmp="$complete EOL"
15803       arguments="${tmp#* }"
15804 
15805       # Cannot rely on the command "which" here since it doesn't always work.
15806       is_absolute_path=`$ECHO "$path" | $GREP ^/`
15807       if test -z "$is_absolute_path"; then
15808         # Path to executable is not absolute. Find it.
15809         IFS_save="$IFS"
15810         IFS=:
15811         for p in $PATH; do
15812           if test -f "$p/$path" && test -x "$p/$path"; then
15813             new_path="$p/$path"
15814             break
15815           fi
15816         done
15817         IFS="$IFS_save"
15818       else
15819         # This is an absolute path, we can use it without further modifications.
15820         new_path="$path"
15821       fi
15822 
15823       if test "x$new_path" = x; then
15824         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15825 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15826         has_space=`$ECHO "$complete" | $GREP " "`
15827         if test "x$has_space" != x; then
15828           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15829 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15830         fi
15831         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15832       fi
15833     fi
15834 
15835     # Now join together the path and the arguments once again
15836     if test "x$arguments" != xEOL; then
15837       new_complete="$new_path ${arguments% *}"
15838     else
15839       new_complete="$new_path"
15840     fi
15841 
15842     if test "x$complete" != "x$new_complete"; then
15843       FOUND_MAKE="$new_complete"
15844       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15845 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15846     fi
15847   fi
15848 
15849         fi
15850       fi
15851     fi
15852   fi
15853 
15854     if test "x$FOUND_MAKE" = x; then
15855       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15856     fi
15857   else
15858     # Try our hardest to locate a correct version of GNU make
15859     for ac_prog in gmake
15860 do
15861   # Extract the first word of "$ac_prog", so it can be a program name with args.
15862 set dummy $ac_prog; ac_word=$2
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15864 $as_echo_n "checking for $ac_word... " >&6; }
15865 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15866   $as_echo_n "(cached) " >&6
15867 else
15868   case $CHECK_GMAKE in
15869   [\\/]* | ?:[\\/]*)
15870   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15871   ;;
15872   *)
15873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15874 for as_dir in $PATH
15875 do
15876   IFS=$as_save_IFS
15877   test -z "$as_dir" && as_dir=.
15878     for ac_exec_ext in '' $ac_executable_extensions; do
15879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15880     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15882     break 2
15883   fi
15884 done
15885   done
15886 IFS=$as_save_IFS
15887 
15888   ;;
15889 esac
15890 fi
15891 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15892 if test -n "$CHECK_GMAKE"; then
15893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15894 $as_echo "$CHECK_GMAKE" >&6; }
15895 else
15896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15897 $as_echo "no" >&6; }
15898 fi
15899 
15900 
15901   test -n "$CHECK_GMAKE" && break
15902 done
15903 
15904 
15905   MAKE_CANDIDATE=""$CHECK_GMAKE""
15906   DESCRIPTION="gmake in PATH"
15907   if test "x$MAKE_CANDIDATE" != x; then
15908     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15909 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15910     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15911     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15912     if test "x$IS_GNU_MAKE" = x; then
15913       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15914 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15915     else
15916       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15917       if test "x$IS_MODERN_MAKE" = x; then
15918         { $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
15919 $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;}
15920       else
15921         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15922           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15923             MAKE_EXPECTED_ENV='cygwin'
15924           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15925             MAKE_EXPECTED_ENV='msys'
15926           else
15927             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15928           fi
15929           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15930           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15931         else
15932           # Not relevant for non-Windows
15933           IS_MAKE_CORRECT_ENV=true
15934         fi
15935         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15936           { $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
15937 $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;}
15938         else
15939           FOUND_MAKE=$MAKE_CANDIDATE
15940 
15941   # Only process if variable expands to non-empty
15942 
15943   if test "x$FOUND_MAKE" != x; then
15944     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15945 
15946   # First separate the path from the arguments. This will split at the first
15947   # space.
15948   complete="$FOUND_MAKE"
15949   path="${complete%% *}"
15950   tmp="$complete EOL"
15951   arguments="${tmp#* }"
15952 
15953   # Input might be given as Windows format, start by converting to
15954   # unix format.
15955   new_path=`$CYGPATH -u "$path"`
15956 
15957   # Now try to locate executable using which
15958   new_path=`$WHICH "$new_path" 2> /dev/null`
15959   # bat and cmd files are not always considered executable in cygwin causing which
15960   # to not find them
15961   if test "x$new_path" = x \
15962       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15963       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15964     new_path=`$CYGPATH -u "$path"`
15965   fi
15966   if test "x$new_path" = x; then
15967     # Oops. Which didn't find the executable.
15968     # The splitting of arguments from the executable at a space might have been incorrect,
15969     # since paths with space are more likely in Windows. Give it another try with the whole
15970     # argument.
15971     path="$complete"
15972     arguments="EOL"
15973     new_path=`$CYGPATH -u "$path"`
15974     new_path=`$WHICH "$new_path" 2> /dev/null`
15975     # bat and cmd files are not always considered executable in cygwin causing which
15976     # to not find them
15977     if test "x$new_path" = x \
15978         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15979         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15980       new_path=`$CYGPATH -u "$path"`
15981     fi
15982     if test "x$new_path" = x; then
15983       # It's still not found. Now this is an unrecoverable error.
15984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15985 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15986       has_space=`$ECHO "$complete" | $GREP " "`
15987       if test "x$has_space" != x; then
15988         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15989 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15990       fi
15991       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15992     fi
15993   fi
15994 
15995   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15996   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15997   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15998   # "foo.exe" is OK but "foo" is an error.
15999   #
16000   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16001   # It is also a way to make sure we got the proper file name for the real test later on.
16002   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16003   if test "x$test_shortpath" = x; then
16004     # Short path failed, file does not exist as specified.
16005     # Try adding .exe or .cmd
16006     if test -f "${new_path}.exe"; then
16007       input_to_shortpath="${new_path}.exe"
16008     elif test -f "${new_path}.cmd"; then
16009       input_to_shortpath="${new_path}.cmd"
16010     else
16011       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16012 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16013       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16014 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16015       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16016     fi
16017   else
16018     input_to_shortpath="$new_path"
16019   fi
16020 
16021   # Call helper function which possibly converts this using DOS-style short mode.
16022   # If so, the updated path is stored in $new_path.
16023   new_path="$input_to_shortpath"
16024 
16025   input_path="$input_to_shortpath"
16026   # Check if we need to convert this using DOS-style short mode. If the path
16027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16028   # take no chances and rewrite it.
16029   # Note: m4 eats our [], so we need to use [ and ] instead.
16030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16031   if test "x$has_forbidden_chars" != x; then
16032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16033     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16034     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16035     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16036       # Going to short mode and back again did indeed matter. Since short mode is
16037       # case insensitive, let's make it lowercase to improve readability.
16038       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16039       # Now convert it back to Unix-stile (cygpath)
16040       input_path=`$CYGPATH -u "$shortmode_path"`
16041       new_path="$input_path"
16042     fi
16043   fi
16044 
16045   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16046   if test "x$test_cygdrive_prefix" = x; then
16047     # As a simple fix, exclude /usr/bin since it's not a real path.
16048     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16049       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16050       # a path prefixed by /cygdrive for fixpath to work.
16051       new_path="$CYGWIN_ROOT_PATH$input_path"
16052     fi
16053   fi
16054 
16055   # remove trailing .exe if any
16056   new_path="${new_path/%.exe/}"
16057 
16058     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16059 
16060   # First separate the path from the arguments. This will split at the first
16061   # space.
16062   complete="$FOUND_MAKE"
16063   path="${complete%% *}"
16064   tmp="$complete EOL"
16065   arguments="${tmp#* }"
16066 
16067   # Input might be given as Windows format, start by converting to
16068   # unix format.
16069   new_path="$path"
16070 
16071   windows_path="$new_path"
16072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16073     unix_path=`$CYGPATH -u "$windows_path"`
16074     new_path="$unix_path"
16075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16076     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16077     new_path="$unix_path"
16078   fi
16079 
16080 
16081   # Now try to locate executable using which
16082   new_path=`$WHICH "$new_path" 2> /dev/null`
16083 
16084   if test "x$new_path" = x; then
16085     # Oops. Which didn't find the executable.
16086     # The splitting of arguments from the executable at a space might have been incorrect,
16087     # since paths with space are more likely in Windows. Give it another try with the whole
16088     # argument.
16089     path="$complete"
16090     arguments="EOL"
16091     new_path="$path"
16092 
16093   windows_path="$new_path"
16094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16095     unix_path=`$CYGPATH -u "$windows_path"`
16096     new_path="$unix_path"
16097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16098     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16099     new_path="$unix_path"
16100   fi
16101 
16102 
16103     new_path=`$WHICH "$new_path" 2> /dev/null`
16104     # bat and cmd files are not always considered executable in MSYS causing which
16105     # to not find them
16106     if test "x$new_path" = x \
16107         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16108         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16109       new_path="$path"
16110 
16111   windows_path="$new_path"
16112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16113     unix_path=`$CYGPATH -u "$windows_path"`
16114     new_path="$unix_path"
16115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16116     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16117     new_path="$unix_path"
16118   fi
16119 
16120     fi
16121 
16122     if test "x$new_path" = x; then
16123       # It's still not found. Now this is an unrecoverable error.
16124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16125 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16126       has_space=`$ECHO "$complete" | $GREP " "`
16127       if test "x$has_space" != x; then
16128         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16129 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16130       fi
16131       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16132     fi
16133   fi
16134 
16135   # Now new_path has a complete unix path to the binary
16136   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16137     # Keep paths in /bin as-is, but remove trailing .exe if any
16138     new_path="${new_path/%.exe/}"
16139     # Do not save /bin paths to all_fixpath_prefixes!
16140   else
16141     # Not in mixed or Windows style, start by that.
16142     new_path=`cmd //c echo $new_path`
16143 
16144   input_path="$new_path"
16145   # Check if we need to convert this using DOS-style short mode. If the path
16146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16147   # take no chances and rewrite it.
16148   # Note: m4 eats our [], so we need to use [ and ] instead.
16149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16150   if test "x$has_forbidden_chars" != x; then
16151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16152     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16153   fi
16154 
16155     # Output is in $new_path
16156 
16157   windows_path="$new_path"
16158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159     unix_path=`$CYGPATH -u "$windows_path"`
16160     new_path="$unix_path"
16161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16163     new_path="$unix_path"
16164   fi
16165 
16166     # remove trailing .exe if any
16167     new_path="${new_path/%.exe/}"
16168 
16169     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16170     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16171   fi
16172 
16173     else
16174       # We're on a unix platform. Hooray! :)
16175       # First separate the path from the arguments. This will split at the first
16176       # space.
16177       complete="$FOUND_MAKE"
16178       path="${complete%% *}"
16179       tmp="$complete EOL"
16180       arguments="${tmp#* }"
16181 
16182       # Cannot rely on the command "which" here since it doesn't always work.
16183       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16184       if test -z "$is_absolute_path"; then
16185         # Path to executable is not absolute. Find it.
16186         IFS_save="$IFS"
16187         IFS=:
16188         for p in $PATH; do
16189           if test -f "$p/$path" && test -x "$p/$path"; then
16190             new_path="$p/$path"
16191             break
16192           fi
16193         done
16194         IFS="$IFS_save"
16195       else
16196         # This is an absolute path, we can use it without further modifications.
16197         new_path="$path"
16198       fi
16199 
16200       if test "x$new_path" = x; then
16201         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16202 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16203         has_space=`$ECHO "$complete" | $GREP " "`
16204         if test "x$has_space" != x; then
16205           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16206 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16207         fi
16208         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16209       fi
16210     fi
16211 
16212     # Now join together the path and the arguments once again
16213     if test "x$arguments" != xEOL; then
16214       new_complete="$new_path ${arguments% *}"
16215     else
16216       new_complete="$new_path"
16217     fi
16218 
16219     if test "x$complete" != "x$new_complete"; then
16220       FOUND_MAKE="$new_complete"
16221       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16222 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16223     fi
16224   fi
16225 
16226         fi
16227       fi
16228     fi
16229   fi
16230 
16231 
16232     if test "x$FOUND_MAKE" = x; then
16233       for ac_prog in make
16234 do
16235   # Extract the first word of "$ac_prog", so it can be a program name with args.
16236 set dummy $ac_prog; ac_word=$2
16237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16238 $as_echo_n "checking for $ac_word... " >&6; }
16239 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16240   $as_echo_n "(cached) " >&6
16241 else
16242   case $CHECK_MAKE in
16243   [\\/]* | ?:[\\/]*)
16244   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16245   ;;
16246   *)
16247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16248 for as_dir in $PATH
16249 do
16250   IFS=$as_save_IFS
16251   test -z "$as_dir" && as_dir=.
16252     for ac_exec_ext in '' $ac_executable_extensions; do
16253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16254     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16256     break 2
16257   fi
16258 done
16259   done
16260 IFS=$as_save_IFS
16261 
16262   ;;
16263 esac
16264 fi
16265 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16266 if test -n "$CHECK_MAKE"; then
16267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16268 $as_echo "$CHECK_MAKE" >&6; }
16269 else
16270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271 $as_echo "no" >&6; }
16272 fi
16273 
16274 
16275   test -n "$CHECK_MAKE" && break
16276 done
16277 
16278 
16279   MAKE_CANDIDATE=""$CHECK_MAKE""
16280   DESCRIPTION="make in PATH"
16281   if test "x$MAKE_CANDIDATE" != x; then
16282     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16283 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16284     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16285     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16286     if test "x$IS_GNU_MAKE" = x; then
16287       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16288 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16289     else
16290       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16291       if test "x$IS_MODERN_MAKE" = x; then
16292         { $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
16293 $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;}
16294       else
16295         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16296           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16297             MAKE_EXPECTED_ENV='cygwin'
16298           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16299             MAKE_EXPECTED_ENV='msys'
16300           else
16301             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16302           fi
16303           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16304           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16305         else
16306           # Not relevant for non-Windows
16307           IS_MAKE_CORRECT_ENV=true
16308         fi
16309         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16310           { $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
16311 $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;}
16312         else
16313           FOUND_MAKE=$MAKE_CANDIDATE
16314 
16315   # Only process if variable expands to non-empty
16316 
16317   if test "x$FOUND_MAKE" != x; then
16318     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16319 
16320   # First separate the path from the arguments. This will split at the first
16321   # space.
16322   complete="$FOUND_MAKE"
16323   path="${complete%% *}"
16324   tmp="$complete EOL"
16325   arguments="${tmp#* }"
16326 
16327   # Input might be given as Windows format, start by converting to
16328   # unix format.
16329   new_path=`$CYGPATH -u "$path"`
16330 
16331   # Now try to locate executable using which
16332   new_path=`$WHICH "$new_path" 2> /dev/null`
16333   # bat and cmd files are not always considered executable in cygwin causing which
16334   # to not find them
16335   if test "x$new_path" = x \
16336       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16337       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16338     new_path=`$CYGPATH -u "$path"`
16339   fi
16340   if test "x$new_path" = x; then
16341     # Oops. Which didn't find the executable.
16342     # The splitting of arguments from the executable at a space might have been incorrect,
16343     # since paths with space are more likely in Windows. Give it another try with the whole
16344     # argument.
16345     path="$complete"
16346     arguments="EOL"
16347     new_path=`$CYGPATH -u "$path"`
16348     new_path=`$WHICH "$new_path" 2> /dev/null`
16349     # bat and cmd files are not always considered executable in cygwin causing which
16350     # to not find them
16351     if test "x$new_path" = x \
16352         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16353         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16354       new_path=`$CYGPATH -u "$path"`
16355     fi
16356     if test "x$new_path" = x; then
16357       # It's still not found. Now this is an unrecoverable error.
16358       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16359 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16360       has_space=`$ECHO "$complete" | $GREP " "`
16361       if test "x$has_space" != x; then
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16363 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16364       fi
16365       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16366     fi
16367   fi
16368 
16369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16372   # "foo.exe" is OK but "foo" is an error.
16373   #
16374   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16375   # It is also a way to make sure we got the proper file name for the real test later on.
16376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16377   if test "x$test_shortpath" = x; then
16378     # Short path failed, file does not exist as specified.
16379     # Try adding .exe or .cmd
16380     if test -f "${new_path}.exe"; then
16381       input_to_shortpath="${new_path}.exe"
16382     elif test -f "${new_path}.cmd"; then
16383       input_to_shortpath="${new_path}.cmd"
16384     else
16385       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16386 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16387       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16388 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16389       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16390     fi
16391   else
16392     input_to_shortpath="$new_path"
16393   fi
16394 
16395   # Call helper function which possibly converts this using DOS-style short mode.
16396   # If so, the updated path is stored in $new_path.
16397   new_path="$input_to_shortpath"
16398 
16399   input_path="$input_to_shortpath"
16400   # Check if we need to convert this using DOS-style short mode. If the path
16401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16402   # take no chances and rewrite it.
16403   # Note: m4 eats our [], so we need to use [ and ] instead.
16404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16405   if test "x$has_forbidden_chars" != x; then
16406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16407     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16408     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16409     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16410       # Going to short mode and back again did indeed matter. Since short mode is
16411       # case insensitive, let's make it lowercase to improve readability.
16412       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16413       # Now convert it back to Unix-stile (cygpath)
16414       input_path=`$CYGPATH -u "$shortmode_path"`
16415       new_path="$input_path"
16416     fi
16417   fi
16418 
16419   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16420   if test "x$test_cygdrive_prefix" = x; then
16421     # As a simple fix, exclude /usr/bin since it's not a real path.
16422     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16423       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16424       # a path prefixed by /cygdrive for fixpath to work.
16425       new_path="$CYGWIN_ROOT_PATH$input_path"
16426     fi
16427   fi
16428 
16429   # remove trailing .exe if any
16430   new_path="${new_path/%.exe/}"
16431 
16432     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16433 
16434   # First separate the path from the arguments. This will split at the first
16435   # space.
16436   complete="$FOUND_MAKE"
16437   path="${complete%% *}"
16438   tmp="$complete EOL"
16439   arguments="${tmp#* }"
16440 
16441   # Input might be given as Windows format, start by converting to
16442   # unix format.
16443   new_path="$path"
16444 
16445   windows_path="$new_path"
16446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16447     unix_path=`$CYGPATH -u "$windows_path"`
16448     new_path="$unix_path"
16449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16451     new_path="$unix_path"
16452   fi
16453 
16454 
16455   # Now try to locate executable using which
16456   new_path=`$WHICH "$new_path" 2> /dev/null`
16457 
16458   if test "x$new_path" = x; then
16459     # Oops. Which didn't find the executable.
16460     # The splitting of arguments from the executable at a space might have been incorrect,
16461     # since paths with space are more likely in Windows. Give it another try with the whole
16462     # argument.
16463     path="$complete"
16464     arguments="EOL"
16465     new_path="$path"
16466 
16467   windows_path="$new_path"
16468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16469     unix_path=`$CYGPATH -u "$windows_path"`
16470     new_path="$unix_path"
16471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16473     new_path="$unix_path"
16474   fi
16475 
16476 
16477     new_path=`$WHICH "$new_path" 2> /dev/null`
16478     # bat and cmd files are not always considered executable in MSYS causing which
16479     # to not find them
16480     if test "x$new_path" = x \
16481         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16482         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16483       new_path="$path"
16484 
16485   windows_path="$new_path"
16486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16487     unix_path=`$CYGPATH -u "$windows_path"`
16488     new_path="$unix_path"
16489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16491     new_path="$unix_path"
16492   fi
16493 
16494     fi
16495 
16496     if test "x$new_path" = x; then
16497       # It's still not found. Now this is an unrecoverable error.
16498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16499 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16500       has_space=`$ECHO "$complete" | $GREP " "`
16501       if test "x$has_space" != x; then
16502         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16503 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16504       fi
16505       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16506     fi
16507   fi
16508 
16509   # Now new_path has a complete unix path to the binary
16510   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16511     # Keep paths in /bin as-is, but remove trailing .exe if any
16512     new_path="${new_path/%.exe/}"
16513     # Do not save /bin paths to all_fixpath_prefixes!
16514   else
16515     # Not in mixed or Windows style, start by that.
16516     new_path=`cmd //c echo $new_path`
16517 
16518   input_path="$new_path"
16519   # Check if we need to convert this using DOS-style short mode. If the path
16520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16521   # take no chances and rewrite it.
16522   # Note: m4 eats our [], so we need to use [ and ] instead.
16523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16524   if test "x$has_forbidden_chars" != x; then
16525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16527   fi
16528 
16529     # Output is in $new_path
16530 
16531   windows_path="$new_path"
16532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16533     unix_path=`$CYGPATH -u "$windows_path"`
16534     new_path="$unix_path"
16535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16537     new_path="$unix_path"
16538   fi
16539 
16540     # remove trailing .exe if any
16541     new_path="${new_path/%.exe/}"
16542 
16543     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16544     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16545   fi
16546 
16547     else
16548       # We're on a unix platform. Hooray! :)
16549       # First separate the path from the arguments. This will split at the first
16550       # space.
16551       complete="$FOUND_MAKE"
16552       path="${complete%% *}"
16553       tmp="$complete EOL"
16554       arguments="${tmp#* }"
16555 
16556       # Cannot rely on the command "which" here since it doesn't always work.
16557       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16558       if test -z "$is_absolute_path"; then
16559         # Path to executable is not absolute. Find it.
16560         IFS_save="$IFS"
16561         IFS=:
16562         for p in $PATH; do
16563           if test -f "$p/$path" && test -x "$p/$path"; then
16564             new_path="$p/$path"
16565             break
16566           fi
16567         done
16568         IFS="$IFS_save"
16569       else
16570         # This is an absolute path, we can use it without further modifications.
16571         new_path="$path"
16572       fi
16573 
16574       if test "x$new_path" = x; then
16575         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16576 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16577         has_space=`$ECHO "$complete" | $GREP " "`
16578         if test "x$has_space" != x; then
16579           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16580 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16581         fi
16582         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16583       fi
16584     fi
16585 
16586     # Now join together the path and the arguments once again
16587     if test "x$arguments" != xEOL; then
16588       new_complete="$new_path ${arguments% *}"
16589     else
16590       new_complete="$new_path"
16591     fi
16592 
16593     if test "x$complete" != "x$new_complete"; then
16594       FOUND_MAKE="$new_complete"
16595       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16596 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16597     fi
16598   fi
16599 
16600         fi
16601       fi
16602     fi
16603   fi
16604 
16605     fi
16606 
16607     if test "x$FOUND_MAKE" = x; then
16608       if test "x$TOOLCHAIN_PATH" != x; then
16609         # We have a toolchain path, check that as well before giving up.
16610         OLD_PATH=$PATH
16611         PATH=$TOOLCHAIN_PATH:$PATH
16612         for ac_prog in gmake
16613 do
16614   # Extract the first word of "$ac_prog", so it can be a program name with args.
16615 set dummy $ac_prog; ac_word=$2
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16617 $as_echo_n "checking for $ac_word... " >&6; }
16618 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16619   $as_echo_n "(cached) " >&6
16620 else
16621   case $CHECK_TOOLSDIR_GMAKE in
16622   [\\/]* | ?:[\\/]*)
16623   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16624   ;;
16625   *)
16626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16627 for as_dir in $PATH
16628 do
16629   IFS=$as_save_IFS
16630   test -z "$as_dir" && as_dir=.
16631     for ac_exec_ext in '' $ac_executable_extensions; do
16632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16633     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16635     break 2
16636   fi
16637 done
16638   done
16639 IFS=$as_save_IFS
16640 
16641   ;;
16642 esac
16643 fi
16644 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16645 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16647 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16648 else
16649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16650 $as_echo "no" >&6; }
16651 fi
16652 
16653 
16654   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16655 done
16656 
16657 
16658   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16659   DESCRIPTION="gmake in tools-dir"
16660   if test "x$MAKE_CANDIDATE" != x; then
16661     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16662 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16663     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16664     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16665     if test "x$IS_GNU_MAKE" = x; then
16666       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16667 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16668     else
16669       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16670       if test "x$IS_MODERN_MAKE" = x; then
16671         { $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
16672 $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;}
16673       else
16674         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16675           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16676             MAKE_EXPECTED_ENV='cygwin'
16677           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16678             MAKE_EXPECTED_ENV='msys'
16679           else
16680             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16681           fi
16682           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16683           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16684         else
16685           # Not relevant for non-Windows
16686           IS_MAKE_CORRECT_ENV=true
16687         fi
16688         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16689           { $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
16690 $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;}
16691         else
16692           FOUND_MAKE=$MAKE_CANDIDATE
16693 
16694   # Only process if variable expands to non-empty
16695 
16696   if test "x$FOUND_MAKE" != x; then
16697     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16698 
16699   # First separate the path from the arguments. This will split at the first
16700   # space.
16701   complete="$FOUND_MAKE"
16702   path="${complete%% *}"
16703   tmp="$complete EOL"
16704   arguments="${tmp#* }"
16705 
16706   # Input might be given as Windows format, start by converting to
16707   # unix format.
16708   new_path=`$CYGPATH -u "$path"`
16709 
16710   # Now try to locate executable using which
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     # Oops. Which didn't find the executable.
16721     # The splitting of arguments from the executable at a space might have been incorrect,
16722     # since paths with space are more likely in Windows. Give it another try with the whole
16723     # argument.
16724     path="$complete"
16725     arguments="EOL"
16726     new_path=`$CYGPATH -u "$path"`
16727     new_path=`$WHICH "$new_path" 2> /dev/null`
16728     # bat and cmd files are not always considered executable in cygwin causing which
16729     # to not find them
16730     if test "x$new_path" = x \
16731         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16732         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16733       new_path=`$CYGPATH -u "$path"`
16734     fi
16735     if test "x$new_path" = x; then
16736       # It's still not found. Now this is an unrecoverable error.
16737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16738 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16739       has_space=`$ECHO "$complete" | $GREP " "`
16740       if test "x$has_space" != x; then
16741         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16742 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16743       fi
16744       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16745     fi
16746   fi
16747 
16748   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16749   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16750   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16751   # "foo.exe" is OK but "foo" is an error.
16752   #
16753   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16754   # It is also a way to make sure we got the proper file name for the real test later on.
16755   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16756   if test "x$test_shortpath" = x; then
16757     # Short path failed, file does not exist as specified.
16758     # Try adding .exe or .cmd
16759     if test -f "${new_path}.exe"; then
16760       input_to_shortpath="${new_path}.exe"
16761     elif test -f "${new_path}.cmd"; then
16762       input_to_shortpath="${new_path}.cmd"
16763     else
16764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16765 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16766       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16767 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16768       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16769     fi
16770   else
16771     input_to_shortpath="$new_path"
16772   fi
16773 
16774   # Call helper function which possibly converts this using DOS-style short mode.
16775   # If so, the updated path is stored in $new_path.
16776   new_path="$input_to_shortpath"
16777 
16778   input_path="$input_to_shortpath"
16779   # Check if we need to convert this using DOS-style short mode. If the path
16780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16781   # take no chances and rewrite it.
16782   # Note: m4 eats our [], so we need to use [ and ] instead.
16783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16784   if test "x$has_forbidden_chars" != x; then
16785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16789       # Going to short mode and back again did indeed matter. Since short mode is
16790       # case insensitive, let's make it lowercase to improve readability.
16791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16792       # Now convert it back to Unix-stile (cygpath)
16793       input_path=`$CYGPATH -u "$shortmode_path"`
16794       new_path="$input_path"
16795     fi
16796   fi
16797 
16798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16799   if test "x$test_cygdrive_prefix" = x; then
16800     # As a simple fix, exclude /usr/bin since it's not a real path.
16801     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16803       # a path prefixed by /cygdrive for fixpath to work.
16804       new_path="$CYGWIN_ROOT_PATH$input_path"
16805     fi
16806   fi
16807 
16808   # remove trailing .exe if any
16809   new_path="${new_path/%.exe/}"
16810 
16811     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16812 
16813   # First separate the path from the arguments. This will split at the first
16814   # space.
16815   complete="$FOUND_MAKE"
16816   path="${complete%% *}"
16817   tmp="$complete EOL"
16818   arguments="${tmp#* }"
16819 
16820   # Input might be given as Windows format, start by converting to
16821   # unix format.
16822   new_path="$path"
16823 
16824   windows_path="$new_path"
16825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16826     unix_path=`$CYGPATH -u "$windows_path"`
16827     new_path="$unix_path"
16828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16830     new_path="$unix_path"
16831   fi
16832 
16833 
16834   # Now try to locate executable using which
16835   new_path=`$WHICH "$new_path" 2> /dev/null`
16836 
16837   if test "x$new_path" = x; then
16838     # Oops. Which didn't find the executable.
16839     # The splitting of arguments from the executable at a space might have been incorrect,
16840     # since paths with space are more likely in Windows. Give it another try with the whole
16841     # argument.
16842     path="$complete"
16843     arguments="EOL"
16844     new_path="$path"
16845 
16846   windows_path="$new_path"
16847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848     unix_path=`$CYGPATH -u "$windows_path"`
16849     new_path="$unix_path"
16850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16852     new_path="$unix_path"
16853   fi
16854 
16855 
16856     new_path=`$WHICH "$new_path" 2> /dev/null`
16857     # bat and cmd files are not always considered executable in MSYS causing which
16858     # to not find them
16859     if test "x$new_path" = x \
16860         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16861         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16862       new_path="$path"
16863 
16864   windows_path="$new_path"
16865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866     unix_path=`$CYGPATH -u "$windows_path"`
16867     new_path="$unix_path"
16868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16870     new_path="$unix_path"
16871   fi
16872 
16873     fi
16874 
16875     if test "x$new_path" = x; then
16876       # It's still not found. Now this is an unrecoverable error.
16877       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16878 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16879       has_space=`$ECHO "$complete" | $GREP " "`
16880       if test "x$has_space" != x; then
16881         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16882 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16883       fi
16884       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16885     fi
16886   fi
16887 
16888   # Now new_path has a complete unix path to the binary
16889   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16890     # Keep paths in /bin as-is, but remove trailing .exe if any
16891     new_path="${new_path/%.exe/}"
16892     # Do not save /bin paths to all_fixpath_prefixes!
16893   else
16894     # Not in mixed or Windows style, start by that.
16895     new_path=`cmd //c echo $new_path`
16896 
16897   input_path="$new_path"
16898   # Check if we need to convert this using DOS-style short mode. If the path
16899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16900   # take no chances and rewrite it.
16901   # Note: m4 eats our [], so we need to use [ and ] instead.
16902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16903   if test "x$has_forbidden_chars" != x; then
16904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16906   fi
16907 
16908     # Output is in $new_path
16909 
16910   windows_path="$new_path"
16911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16912     unix_path=`$CYGPATH -u "$windows_path"`
16913     new_path="$unix_path"
16914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16916     new_path="$unix_path"
16917   fi
16918 
16919     # remove trailing .exe if any
16920     new_path="${new_path/%.exe/}"
16921 
16922     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16923     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16924   fi
16925 
16926     else
16927       # We're on a unix platform. Hooray! :)
16928       # First separate the path from the arguments. This will split at the first
16929       # space.
16930       complete="$FOUND_MAKE"
16931       path="${complete%% *}"
16932       tmp="$complete EOL"
16933       arguments="${tmp#* }"
16934 
16935       # Cannot rely on the command "which" here since it doesn't always work.
16936       is_absolute_path=`$ECHO "$path" | $GREP ^/`
16937       if test -z "$is_absolute_path"; then
16938         # Path to executable is not absolute. Find it.
16939         IFS_save="$IFS"
16940         IFS=:
16941         for p in $PATH; do
16942           if test -f "$p/$path" && test -x "$p/$path"; then
16943             new_path="$p/$path"
16944             break
16945           fi
16946         done
16947         IFS="$IFS_save"
16948       else
16949         # This is an absolute path, we can use it without further modifications.
16950         new_path="$path"
16951       fi
16952 
16953       if test "x$new_path" = x; then
16954         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16955 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16956         has_space=`$ECHO "$complete" | $GREP " "`
16957         if test "x$has_space" != x; then
16958           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16959 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16960         fi
16961         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16962       fi
16963     fi
16964 
16965     # Now join together the path and the arguments once again
16966     if test "x$arguments" != xEOL; then
16967       new_complete="$new_path ${arguments% *}"
16968     else
16969       new_complete="$new_path"
16970     fi
16971 
16972     if test "x$complete" != "x$new_complete"; then
16973       FOUND_MAKE="$new_complete"
16974       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16975 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16976     fi
16977   fi
16978 
16979         fi
16980       fi
16981     fi
16982   fi
16983 
16984         if test "x$FOUND_MAKE" = x; then
16985           for ac_prog in make
16986 do
16987   # Extract the first word of "$ac_prog", so it can be a program name with args.
16988 set dummy $ac_prog; ac_word=$2
16989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16990 $as_echo_n "checking for $ac_word... " >&6; }
16991 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16992   $as_echo_n "(cached) " >&6
16993 else
16994   case $CHECK_TOOLSDIR_MAKE in
16995   [\\/]* | ?:[\\/]*)
16996   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16997   ;;
16998   *)
16999   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17000 for as_dir in $PATH
17001 do
17002   IFS=$as_save_IFS
17003   test -z "$as_dir" && as_dir=.
17004     for ac_exec_ext in '' $ac_executable_extensions; do
17005   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17006     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17007     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17008     break 2
17009   fi
17010 done
17011   done
17012 IFS=$as_save_IFS
17013 
17014   ;;
17015 esac
17016 fi
17017 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17018 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17020 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17021 else
17022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17023 $as_echo "no" >&6; }
17024 fi
17025 
17026 
17027   test -n "$CHECK_TOOLSDIR_MAKE" && break
17028 done
17029 
17030 
17031   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17032   DESCRIPTION="make in tools-dir"
17033   if test "x$MAKE_CANDIDATE" != x; then
17034     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17035 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17036     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17037     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17038     if test "x$IS_GNU_MAKE" = x; then
17039       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17040 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17041     else
17042       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
17043       if test "x$IS_MODERN_MAKE" = x; then
17044         { $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
17045 $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;}
17046       else
17047         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17048           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17049             MAKE_EXPECTED_ENV='cygwin'
17050           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17051             MAKE_EXPECTED_ENV='msys'
17052           else
17053             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17054           fi
17055           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17056           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17057         else
17058           # Not relevant for non-Windows
17059           IS_MAKE_CORRECT_ENV=true
17060         fi
17061         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17062           { $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
17063 $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;}
17064         else
17065           FOUND_MAKE=$MAKE_CANDIDATE
17066 
17067   # Only process if variable expands to non-empty
17068 
17069   if test "x$FOUND_MAKE" != x; then
17070     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17071 
17072   # First separate the path from the arguments. This will split at the first
17073   # space.
17074   complete="$FOUND_MAKE"
17075   path="${complete%% *}"
17076   tmp="$complete EOL"
17077   arguments="${tmp#* }"
17078 
17079   # Input might be given as Windows format, start by converting to
17080   # unix format.
17081   new_path=`$CYGPATH -u "$path"`
17082 
17083   # Now try to locate executable using which
17084   new_path=`$WHICH "$new_path" 2> /dev/null`
17085   # bat and cmd files are not always considered executable in cygwin causing which
17086   # to not find them
17087   if test "x$new_path" = x \
17088       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17089       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17090     new_path=`$CYGPATH -u "$path"`
17091   fi
17092   if test "x$new_path" = x; then
17093     # Oops. Which didn't find the executable.
17094     # The splitting of arguments from the executable at a space might have been incorrect,
17095     # since paths with space are more likely in Windows. Give it another try with the whole
17096     # argument.
17097     path="$complete"
17098     arguments="EOL"
17099     new_path=`$CYGPATH -u "$path"`
17100     new_path=`$WHICH "$new_path" 2> /dev/null`
17101     # bat and cmd files are not always considered executable in cygwin causing which
17102     # to not find them
17103     if test "x$new_path" = x \
17104         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17105         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17106       new_path=`$CYGPATH -u "$path"`
17107     fi
17108     if test "x$new_path" = x; then
17109       # It's still not found. Now this is an unrecoverable error.
17110       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17111 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17112       has_space=`$ECHO "$complete" | $GREP " "`
17113       if test "x$has_space" != x; then
17114         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17115 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17116       fi
17117       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17118     fi
17119   fi
17120 
17121   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17122   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17123   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17124   # "foo.exe" is OK but "foo" is an error.
17125   #
17126   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17127   # It is also a way to make sure we got the proper file name for the real test later on.
17128   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17129   if test "x$test_shortpath" = x; then
17130     # Short path failed, file does not exist as specified.
17131     # Try adding .exe or .cmd
17132     if test -f "${new_path}.exe"; then
17133       input_to_shortpath="${new_path}.exe"
17134     elif test -f "${new_path}.cmd"; then
17135       input_to_shortpath="${new_path}.cmd"
17136     else
17137       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17138 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17139       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17140 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17141       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17142     fi
17143   else
17144     input_to_shortpath="$new_path"
17145   fi
17146 
17147   # Call helper function which possibly converts this using DOS-style short mode.
17148   # If so, the updated path is stored in $new_path.
17149   new_path="$input_to_shortpath"
17150 
17151   input_path="$input_to_shortpath"
17152   # Check if we need to convert this using DOS-style short mode. If the path
17153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17154   # take no chances and rewrite it.
17155   # Note: m4 eats our [], so we need to use [ and ] instead.
17156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17157   if test "x$has_forbidden_chars" != x; then
17158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17159     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17160     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17161     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17162       # Going to short mode and back again did indeed matter. Since short mode is
17163       # case insensitive, let's make it lowercase to improve readability.
17164       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17165       # Now convert it back to Unix-stile (cygpath)
17166       input_path=`$CYGPATH -u "$shortmode_path"`
17167       new_path="$input_path"
17168     fi
17169   fi
17170 
17171   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17172   if test "x$test_cygdrive_prefix" = x; then
17173     # As a simple fix, exclude /usr/bin since it's not a real path.
17174     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17175       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17176       # a path prefixed by /cygdrive for fixpath to work.
17177       new_path="$CYGWIN_ROOT_PATH$input_path"
17178     fi
17179   fi
17180 
17181   # remove trailing .exe if any
17182   new_path="${new_path/%.exe/}"
17183 
17184     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17185 
17186   # First separate the path from the arguments. This will split at the first
17187   # space.
17188   complete="$FOUND_MAKE"
17189   path="${complete%% *}"
17190   tmp="$complete EOL"
17191   arguments="${tmp#* }"
17192 
17193   # Input might be given as Windows format, start by converting to
17194   # unix format.
17195   new_path="$path"
17196 
17197   windows_path="$new_path"
17198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17199     unix_path=`$CYGPATH -u "$windows_path"`
17200     new_path="$unix_path"
17201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17203     new_path="$unix_path"
17204   fi
17205 
17206 
17207   # Now try to locate executable using which
17208   new_path=`$WHICH "$new_path" 2> /dev/null`
17209 
17210   if test "x$new_path" = x; then
17211     # Oops. Which didn't find the executable.
17212     # The splitting of arguments from the executable at a space might have been incorrect,
17213     # since paths with space are more likely in Windows. Give it another try with the whole
17214     # argument.
17215     path="$complete"
17216     arguments="EOL"
17217     new_path="$path"
17218 
17219   windows_path="$new_path"
17220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17221     unix_path=`$CYGPATH -u "$windows_path"`
17222     new_path="$unix_path"
17223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17224     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17225     new_path="$unix_path"
17226   fi
17227 
17228 
17229     new_path=`$WHICH "$new_path" 2> /dev/null`
17230     # bat and cmd files are not always considered executable in MSYS causing which
17231     # to not find them
17232     if test "x$new_path" = x \
17233         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17234         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17235       new_path="$path"
17236 
17237   windows_path="$new_path"
17238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17239     unix_path=`$CYGPATH -u "$windows_path"`
17240     new_path="$unix_path"
17241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17243     new_path="$unix_path"
17244   fi
17245 
17246     fi
17247 
17248     if test "x$new_path" = x; then
17249       # It's still not found. Now this is an unrecoverable error.
17250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17251 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17252       has_space=`$ECHO "$complete" | $GREP " "`
17253       if test "x$has_space" != x; then
17254         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17255 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17256       fi
17257       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17258     fi
17259   fi
17260 
17261   # Now new_path has a complete unix path to the binary
17262   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17263     # Keep paths in /bin as-is, but remove trailing .exe if any
17264     new_path="${new_path/%.exe/}"
17265     # Do not save /bin paths to all_fixpath_prefixes!
17266   else
17267     # Not in mixed or Windows style, start by that.
17268     new_path=`cmd //c echo $new_path`
17269 
17270   input_path="$new_path"
17271   # Check if we need to convert this using DOS-style short mode. If the path
17272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17273   # take no chances and rewrite it.
17274   # Note: m4 eats our [], so we need to use [ and ] instead.
17275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17276   if test "x$has_forbidden_chars" != x; then
17277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17278     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17279   fi
17280 
17281     # Output is in $new_path
17282 
17283   windows_path="$new_path"
17284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17285     unix_path=`$CYGPATH -u "$windows_path"`
17286     new_path="$unix_path"
17287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17288     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17289     new_path="$unix_path"
17290   fi
17291 
17292     # remove trailing .exe if any
17293     new_path="${new_path/%.exe/}"
17294 
17295     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17296     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17297   fi
17298 
17299     else
17300       # We're on a unix platform. Hooray! :)
17301       # First separate the path from the arguments. This will split at the first
17302       # space.
17303       complete="$FOUND_MAKE"
17304       path="${complete%% *}"
17305       tmp="$complete EOL"
17306       arguments="${tmp#* }"
17307 
17308       # Cannot rely on the command "which" here since it doesn't always work.
17309       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17310       if test -z "$is_absolute_path"; then
17311         # Path to executable is not absolute. Find it.
17312         IFS_save="$IFS"
17313         IFS=:
17314         for p in $PATH; do
17315           if test -f "$p/$path" && test -x "$p/$path"; then
17316             new_path="$p/$path"
17317             break
17318           fi
17319         done
17320         IFS="$IFS_save"
17321       else
17322         # This is an absolute path, we can use it without further modifications.
17323         new_path="$path"
17324       fi
17325 
17326       if test "x$new_path" = x; then
17327         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17328 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17329         has_space=`$ECHO "$complete" | $GREP " "`
17330         if test "x$has_space" != x; then
17331           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17332 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17333         fi
17334         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17335       fi
17336     fi
17337 
17338     # Now join together the path and the arguments once again
17339     if test "x$arguments" != xEOL; then
17340       new_complete="$new_path ${arguments% *}"
17341     else
17342       new_complete="$new_path"
17343     fi
17344 
17345     if test "x$complete" != "x$new_complete"; then
17346       FOUND_MAKE="$new_complete"
17347       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17348 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17349     fi
17350   fi
17351 
17352         fi
17353       fi
17354     fi
17355   fi
17356 
17357         fi
17358         PATH=$OLD_PATH
17359       fi
17360     fi
17361 
17362     if test "x$FOUND_MAKE" = x; then
17363       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
17364     fi
17365   fi
17366 
17367   MAKE=$FOUND_MAKE
17368 
17369   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17370 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17371 
17372 
17373   # Check if make supports the output sync option and if so, setup using it.
17374   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17375 $as_echo_n "checking if make --output-sync is supported... " >&6; }
17376   if $MAKE --version -O > /dev/null 2>&1; then
17377     OUTPUT_SYNC_SUPPORTED=true
17378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17379 $as_echo "yes" >&6; }
17380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17381 $as_echo_n "checking for output-sync value... " >&6; }
17382 
17383 # Check whether --with-output-sync was given.
17384 if test "${with_output_sync+set}" = set; then :
17385   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17386 fi
17387 
17388     if test "x$OUTPUT_SYNC" = "x"; then
17389       OUTPUT_SYNC=none
17390     fi
17391     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17392 $as_echo "$OUTPUT_SYNC" >&6; }
17393     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17394       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17395     fi
17396   else
17397     OUTPUT_SYNC_SUPPORTED=false
17398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17399 $as_echo "no" >&6; }
17400   fi
17401 
17402 
17403 
17404 
17405 
17406 
17407   # Test if find supports -delete
17408   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17409 $as_echo_n "checking if find supports -delete... " >&6; }
17410   FIND_DELETE="-delete"
17411 
17412   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17413 
17414   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17415 
17416   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17417   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17418     # No, it does not.
17419     rm $DELETEDIR/TestIfFindSupportsDelete
17420     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17421       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17422       FIND_DELETE="-print | xargs rm"
17423     else
17424       FIND_DELETE="-exec rm \{\} \+"
17425     fi
17426     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17427 $as_echo "no" >&6; }
17428   else
17429     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17430 $as_echo "yes" >&6; }
17431   fi
17432   rmdir $DELETEDIR
17433 
17434 
17435 
17436   # These tools might not be installed by default,
17437   # need hint on how to install them.
17438 
17439 
17440 
17441   # Publish this variable in the help.
17442 
17443 
17444   if test "x$UNZIP" = x; then
17445     # The variable is not set by user, try to locate tool using the code snippet
17446     for ac_prog in unzip
17447 do
17448   # Extract the first word of "$ac_prog", so it can be a program name with args.
17449 set dummy $ac_prog; ac_word=$2
17450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17451 $as_echo_n "checking for $ac_word... " >&6; }
17452 if ${ac_cv_path_UNZIP+:} false; then :
17453   $as_echo_n "(cached) " >&6
17454 else
17455   case $UNZIP in
17456   [\\/]* | ?:[\\/]*)
17457   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17458   ;;
17459   *)
17460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17461 for as_dir in $PATH
17462 do
17463   IFS=$as_save_IFS
17464   test -z "$as_dir" && as_dir=.
17465     for ac_exec_ext in '' $ac_executable_extensions; do
17466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17467     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17469     break 2
17470   fi
17471 done
17472   done
17473 IFS=$as_save_IFS
17474 
17475   ;;
17476 esac
17477 fi
17478 UNZIP=$ac_cv_path_UNZIP
17479 if test -n "$UNZIP"; then
17480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17481 $as_echo "$UNZIP" >&6; }
17482 else
17483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17484 $as_echo "no" >&6; }
17485 fi
17486 
17487 
17488   test -n "$UNZIP" && break
17489 done
17490 
17491   else
17492     # The variable is set, but is it from the command line or the environment?
17493 
17494     # Try to remove the string !UNZIP! from our list.
17495     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17496     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17497       # If it failed, the variable was not from the command line. Ignore it,
17498       # but warn the user (except for BASH, which is always set by the calling BASH).
17499       if test "xUNZIP" != xBASH; then
17500         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17501 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17502       fi
17503       # Try to locate tool using the code snippet
17504       for ac_prog in unzip
17505 do
17506   # Extract the first word of "$ac_prog", so it can be a program name with args.
17507 set dummy $ac_prog; ac_word=$2
17508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17509 $as_echo_n "checking for $ac_word... " >&6; }
17510 if ${ac_cv_path_UNZIP+:} false; then :
17511   $as_echo_n "(cached) " >&6
17512 else
17513   case $UNZIP in
17514   [\\/]* | ?:[\\/]*)
17515   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17516   ;;
17517   *)
17518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17519 for as_dir in $PATH
17520 do
17521   IFS=$as_save_IFS
17522   test -z "$as_dir" && as_dir=.
17523     for ac_exec_ext in '' $ac_executable_extensions; do
17524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17525     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17527     break 2
17528   fi
17529 done
17530   done
17531 IFS=$as_save_IFS
17532 
17533   ;;
17534 esac
17535 fi
17536 UNZIP=$ac_cv_path_UNZIP
17537 if test -n "$UNZIP"; then
17538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17539 $as_echo "$UNZIP" >&6; }
17540 else
17541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17542 $as_echo "no" >&6; }
17543 fi
17544 
17545 
17546   test -n "$UNZIP" && break
17547 done
17548 
17549     else
17550       # If it succeeded, then it was overridden by the user. We will use it
17551       # for the tool.
17552 
17553       # First remove it from the list of overridden variables, so we can test
17554       # for unknown variables in the end.
17555       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17556 
17557       # Check if the provided tool contains a complete path.
17558       tool_specified="$UNZIP"
17559       tool_basename="${tool_specified##*/}"
17560       if test "x$tool_basename" = "x$tool_specified"; then
17561         # A command without a complete path is provided, search $PATH.
17562         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17563 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17564         # Extract the first word of "$tool_basename", so it can be a program name with args.
17565 set dummy $tool_basename; ac_word=$2
17566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17567 $as_echo_n "checking for $ac_word... " >&6; }
17568 if ${ac_cv_path_UNZIP+:} false; then :
17569   $as_echo_n "(cached) " >&6
17570 else
17571   case $UNZIP in
17572   [\\/]* | ?:[\\/]*)
17573   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17574   ;;
17575   *)
17576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17577 for as_dir in $PATH
17578 do
17579   IFS=$as_save_IFS
17580   test -z "$as_dir" && as_dir=.
17581     for ac_exec_ext in '' $ac_executable_extensions; do
17582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17583     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17585     break 2
17586   fi
17587 done
17588   done
17589 IFS=$as_save_IFS
17590 
17591   ;;
17592 esac
17593 fi
17594 UNZIP=$ac_cv_path_UNZIP
17595 if test -n "$UNZIP"; then
17596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17597 $as_echo "$UNZIP" >&6; }
17598 else
17599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17600 $as_echo "no" >&6; }
17601 fi
17602 
17603 
17604         if test "x$UNZIP" = x; then
17605           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17606         fi
17607       else
17608         # Otherwise we believe it is a complete path. Use it as it is.
17609         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17610 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17611         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17612 $as_echo_n "checking for UNZIP... " >&6; }
17613         if test ! -x "$tool_specified"; then
17614           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17615 $as_echo "not found" >&6; }
17616           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17617         fi
17618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17619 $as_echo "$tool_specified" >&6; }
17620       fi
17621     fi
17622   fi
17623 
17624 
17625 
17626   if test "x$UNZIP" = x; then
17627     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17628   fi
17629 
17630 
17631 
17632 
17633 
17634   # Publish this variable in the help.
17635 
17636 
17637   if test "x$ZIP" = x; then
17638     # The variable is not set by user, try to locate tool using the code snippet
17639     for ac_prog in zip
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_ZIP+:} false; then :
17646   $as_echo_n "(cached) " >&6
17647 else
17648   case $ZIP in
17649   [\\/]* | ?:[\\/]*)
17650   ac_cv_path_ZIP="$ZIP" # 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_ZIP="$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 ZIP=$ac_cv_path_ZIP
17672 if test -n "$ZIP"; then
17673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17674 $as_echo "$ZIP" >&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 "$ZIP" && break
17682 done
17683 
17684   else
17685     # The variable is set, but is it from the command line or the environment?
17686 
17687     # Try to remove the string !ZIP! from our list.
17688     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17689     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17690       # If it failed, the variable was not from the command line. Ignore it,
17691       # but warn the user (except for BASH, which is always set by the calling BASH).
17692       if test "xZIP" != xBASH; then
17693         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17694 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17695       fi
17696       # Try to locate tool using the code snippet
17697       for ac_prog in zip
17698 do
17699   # Extract the first word of "$ac_prog", so it can be a program name with args.
17700 set dummy $ac_prog; 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_ZIP+:} false; then :
17704   $as_echo_n "(cached) " >&6
17705 else
17706   case $ZIP in
17707   [\\/]* | ?:[\\/]*)
17708   ac_cv_path_ZIP="$ZIP" # 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_ZIP="$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 ZIP=$ac_cv_path_ZIP
17730 if test -n "$ZIP"; then
17731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17732 $as_echo "$ZIP" >&6; }
17733 else
17734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735 $as_echo "no" >&6; }
17736 fi
17737 
17738 
17739   test -n "$ZIP" && break
17740 done
17741 
17742     else
17743       # If it succeeded, then it was overridden by the user. We will use it
17744       # for the tool.
17745 
17746       # First remove it from the list of overridden variables, so we can test
17747       # for unknown variables in the end.
17748       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17749 
17750       # Check if the provided tool contains a complete path.
17751       tool_specified="$ZIP"
17752       tool_basename="${tool_specified##*/}"
17753       if test "x$tool_basename" = "x$tool_specified"; then
17754         # A command without a complete path is provided, search $PATH.
17755         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17756 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17757         # Extract the first word of "$tool_basename", so it can be a program name with args.
17758 set dummy $tool_basename; ac_word=$2
17759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760 $as_echo_n "checking for $ac_word... " >&6; }
17761 if ${ac_cv_path_ZIP+:} false; then :
17762   $as_echo_n "(cached) " >&6
17763 else
17764   case $ZIP in
17765   [\\/]* | ?:[\\/]*)
17766   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17767   ;;
17768   *)
17769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17770 for as_dir in $PATH
17771 do
17772   IFS=$as_save_IFS
17773   test -z "$as_dir" && as_dir=.
17774     for ac_exec_ext in '' $ac_executable_extensions; do
17775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17776     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17778     break 2
17779   fi
17780 done
17781   done
17782 IFS=$as_save_IFS
17783 
17784   ;;
17785 esac
17786 fi
17787 ZIP=$ac_cv_path_ZIP
17788 if test -n "$ZIP"; then
17789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17790 $as_echo "$ZIP" >&6; }
17791 else
17792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17793 $as_echo "no" >&6; }
17794 fi
17795 
17796 
17797         if test "x$ZIP" = x; then
17798           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17799         fi
17800       else
17801         # Otherwise we believe it is a complete path. Use it as it is.
17802         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17803 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17804         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17805 $as_echo_n "checking for ZIP... " >&6; }
17806         if test ! -x "$tool_specified"; then
17807           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17808 $as_echo "not found" >&6; }
17809           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17810         fi
17811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17812 $as_echo "$tool_specified" >&6; }
17813       fi
17814     fi
17815   fi
17816 
17817 
17818 
17819   if test "x$ZIP" = x; then
17820     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17821   fi
17822 
17823 
17824 
17825   # Non-required basic tools
17826 
17827 
17828 
17829   # Publish this variable in the help.
17830 
17831 
17832   if test "x$LDD" = x; then
17833     # The variable is not set by user, try to locate tool using the code snippet
17834     for ac_prog in ldd
17835 do
17836   # Extract the first word of "$ac_prog", so it can be a program name with args.
17837 set dummy $ac_prog; ac_word=$2
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17839 $as_echo_n "checking for $ac_word... " >&6; }
17840 if ${ac_cv_path_LDD+:} false; then :
17841   $as_echo_n "(cached) " >&6
17842 else
17843   case $LDD in
17844   [\\/]* | ?:[\\/]*)
17845   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17846   ;;
17847   *)
17848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17849 for as_dir in $PATH
17850 do
17851   IFS=$as_save_IFS
17852   test -z "$as_dir" && as_dir=.
17853     for ac_exec_ext in '' $ac_executable_extensions; do
17854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17855     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17857     break 2
17858   fi
17859 done
17860   done
17861 IFS=$as_save_IFS
17862 
17863   ;;
17864 esac
17865 fi
17866 LDD=$ac_cv_path_LDD
17867 if test -n "$LDD"; then
17868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17869 $as_echo "$LDD" >&6; }
17870 else
17871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17872 $as_echo "no" >&6; }
17873 fi
17874 
17875 
17876   test -n "$LDD" && break
17877 done
17878 
17879   else
17880     # The variable is set, but is it from the command line or the environment?
17881 
17882     # Try to remove the string !LDD! from our list.
17883     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17884     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17885       # If it failed, the variable was not from the command line. Ignore it,
17886       # but warn the user (except for BASH, which is always set by the calling BASH).
17887       if test "xLDD" != xBASH; then
17888         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17889 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17890       fi
17891       # Try to locate tool using the code snippet
17892       for ac_prog in ldd
17893 do
17894   # Extract the first word of "$ac_prog", so it can be a program name with args.
17895 set dummy $ac_prog; ac_word=$2
17896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17897 $as_echo_n "checking for $ac_word... " >&6; }
17898 if ${ac_cv_path_LDD+:} false; then :
17899   $as_echo_n "(cached) " >&6
17900 else
17901   case $LDD in
17902   [\\/]* | ?:[\\/]*)
17903   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17904   ;;
17905   *)
17906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17907 for as_dir in $PATH
17908 do
17909   IFS=$as_save_IFS
17910   test -z "$as_dir" && as_dir=.
17911     for ac_exec_ext in '' $ac_executable_extensions; do
17912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17913     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17915     break 2
17916   fi
17917 done
17918   done
17919 IFS=$as_save_IFS
17920 
17921   ;;
17922 esac
17923 fi
17924 LDD=$ac_cv_path_LDD
17925 if test -n "$LDD"; then
17926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17927 $as_echo "$LDD" >&6; }
17928 else
17929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17930 $as_echo "no" >&6; }
17931 fi
17932 
17933 
17934   test -n "$LDD" && break
17935 done
17936 
17937     else
17938       # If it succeeded, then it was overridden by the user. We will use it
17939       # for the tool.
17940 
17941       # First remove it from the list of overridden variables, so we can test
17942       # for unknown variables in the end.
17943       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17944 
17945       # Check if the provided tool contains a complete path.
17946       tool_specified="$LDD"
17947       tool_basename="${tool_specified##*/}"
17948       if test "x$tool_basename" = "x$tool_specified"; then
17949         # A command without a complete path is provided, search $PATH.
17950         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17951 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17952         # Extract the first word of "$tool_basename", so it can be a program name with args.
17953 set dummy $tool_basename; ac_word=$2
17954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17955 $as_echo_n "checking for $ac_word... " >&6; }
17956 if ${ac_cv_path_LDD+:} false; then :
17957   $as_echo_n "(cached) " >&6
17958 else
17959   case $LDD in
17960   [\\/]* | ?:[\\/]*)
17961   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17962   ;;
17963   *)
17964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17965 for as_dir in $PATH
17966 do
17967   IFS=$as_save_IFS
17968   test -z "$as_dir" && as_dir=.
17969     for ac_exec_ext in '' $ac_executable_extensions; do
17970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17971     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17973     break 2
17974   fi
17975 done
17976   done
17977 IFS=$as_save_IFS
17978 
17979   ;;
17980 esac
17981 fi
17982 LDD=$ac_cv_path_LDD
17983 if test -n "$LDD"; then
17984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17985 $as_echo "$LDD" >&6; }
17986 else
17987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17988 $as_echo "no" >&6; }
17989 fi
17990 
17991 
17992         if test "x$LDD" = x; then
17993           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17994         fi
17995       else
17996         # Otherwise we believe it is a complete path. Use it as it is.
17997         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17998 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17999         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18000 $as_echo_n "checking for LDD... " >&6; }
18001         if test ! -x "$tool_specified"; then
18002           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18003 $as_echo "not found" >&6; }
18004           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18005         fi
18006         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18007 $as_echo "$tool_specified" >&6; }
18008       fi
18009     fi
18010   fi
18011 
18012 
18013   if test "x$LDD" = "x"; then
18014     # List shared lib dependencies is used for
18015     # debug output and checking for forbidden dependencies.
18016     # We can build without it.
18017     LDD="true"
18018   fi
18019 
18020 
18021   # Publish this variable in the help.
18022 
18023 
18024   if test "x$OTOOL" = x; then
18025     # The variable is not set by user, try to locate tool using the code snippet
18026     for ac_prog in otool
18027 do
18028   # Extract the first word of "$ac_prog", so it can be a program name with args.
18029 set dummy $ac_prog; ac_word=$2
18030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18031 $as_echo_n "checking for $ac_word... " >&6; }
18032 if ${ac_cv_path_OTOOL+:} false; then :
18033   $as_echo_n "(cached) " >&6
18034 else
18035   case $OTOOL in
18036   [\\/]* | ?:[\\/]*)
18037   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18038   ;;
18039   *)
18040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18041 for as_dir in $PATH
18042 do
18043   IFS=$as_save_IFS
18044   test -z "$as_dir" && as_dir=.
18045     for ac_exec_ext in '' $ac_executable_extensions; do
18046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18047     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18049     break 2
18050   fi
18051 done
18052   done
18053 IFS=$as_save_IFS
18054 
18055   ;;
18056 esac
18057 fi
18058 OTOOL=$ac_cv_path_OTOOL
18059 if test -n "$OTOOL"; then
18060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18061 $as_echo "$OTOOL" >&6; }
18062 else
18063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18064 $as_echo "no" >&6; }
18065 fi
18066 
18067 
18068   test -n "$OTOOL" && break
18069 done
18070 
18071   else
18072     # The variable is set, but is it from the command line or the environment?
18073 
18074     # Try to remove the string !OTOOL! from our list.
18075     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18076     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18077       # If it failed, the variable was not from the command line. Ignore it,
18078       # but warn the user (except for BASH, which is always set by the calling BASH).
18079       if test "xOTOOL" != xBASH; then
18080         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18081 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18082       fi
18083       # Try to locate tool using the code snippet
18084       for ac_prog in otool
18085 do
18086   # Extract the first word of "$ac_prog", so it can be a program name with args.
18087 set dummy $ac_prog; ac_word=$2
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18089 $as_echo_n "checking for $ac_word... " >&6; }
18090 if ${ac_cv_path_OTOOL+:} false; then :
18091   $as_echo_n "(cached) " >&6
18092 else
18093   case $OTOOL in
18094   [\\/]* | ?:[\\/]*)
18095   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18096   ;;
18097   *)
18098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18099 for as_dir in $PATH
18100 do
18101   IFS=$as_save_IFS
18102   test -z "$as_dir" && as_dir=.
18103     for ac_exec_ext in '' $ac_executable_extensions; do
18104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18105     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18107     break 2
18108   fi
18109 done
18110   done
18111 IFS=$as_save_IFS
18112 
18113   ;;
18114 esac
18115 fi
18116 OTOOL=$ac_cv_path_OTOOL
18117 if test -n "$OTOOL"; then
18118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18119 $as_echo "$OTOOL" >&6; }
18120 else
18121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18122 $as_echo "no" >&6; }
18123 fi
18124 
18125 
18126   test -n "$OTOOL" && break
18127 done
18128 
18129     else
18130       # If it succeeded, then it was overridden by the user. We will use it
18131       # for the tool.
18132 
18133       # First remove it from the list of overridden variables, so we can test
18134       # for unknown variables in the end.
18135       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18136 
18137       # Check if the provided tool contains a complete path.
18138       tool_specified="$OTOOL"
18139       tool_basename="${tool_specified##*/}"
18140       if test "x$tool_basename" = "x$tool_specified"; then
18141         # A command without a complete path is provided, search $PATH.
18142         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18143 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18144         # Extract the first word of "$tool_basename", so it can be a program name with args.
18145 set dummy $tool_basename; 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_OTOOL+:} false; then :
18149   $as_echo_n "(cached) " >&6
18150 else
18151   case $OTOOL in
18152   [\\/]* | ?:[\\/]*)
18153   ac_cv_path_OTOOL="$OTOOL" # 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_OTOOL="$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 OTOOL=$ac_cv_path_OTOOL
18175 if test -n "$OTOOL"; then
18176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18177 $as_echo "$OTOOL" >&6; }
18178 else
18179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18180 $as_echo "no" >&6; }
18181 fi
18182 
18183 
18184         if test "x$OTOOL" = x; then
18185           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18186         fi
18187       else
18188         # Otherwise we believe it is a complete path. Use it as it is.
18189         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18190 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18192 $as_echo_n "checking for OTOOL... " >&6; }
18193         if test ! -x "$tool_specified"; then
18194           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18195 $as_echo "not found" >&6; }
18196           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18197         fi
18198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18199 $as_echo "$tool_specified" >&6; }
18200       fi
18201     fi
18202   fi
18203 
18204 
18205   if test "x$OTOOL" = "x"; then
18206     OTOOL="true"
18207   fi
18208 
18209 
18210   # Publish this variable in the help.
18211 
18212 
18213   if test "x$READELF" = x; then
18214     # The variable is not set by user, try to locate tool using the code snippet
18215     for ac_prog in greadelf readelf
18216 do
18217   # Extract the first word of "$ac_prog", so it can be a program name with args.
18218 set dummy $ac_prog; ac_word=$2
18219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18220 $as_echo_n "checking for $ac_word... " >&6; }
18221 if ${ac_cv_path_READELF+:} false; then :
18222   $as_echo_n "(cached) " >&6
18223 else
18224   case $READELF in
18225   [\\/]* | ?:[\\/]*)
18226   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18227   ;;
18228   *)
18229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18230 for as_dir in $PATH
18231 do
18232   IFS=$as_save_IFS
18233   test -z "$as_dir" && as_dir=.
18234     for ac_exec_ext in '' $ac_executable_extensions; do
18235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18236     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18238     break 2
18239   fi
18240 done
18241   done
18242 IFS=$as_save_IFS
18243 
18244   ;;
18245 esac
18246 fi
18247 READELF=$ac_cv_path_READELF
18248 if test -n "$READELF"; then
18249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18250 $as_echo "$READELF" >&6; }
18251 else
18252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18253 $as_echo "no" >&6; }
18254 fi
18255 
18256 
18257   test -n "$READELF" && break
18258 done
18259 
18260   else
18261     # The variable is set, but is it from the command line or the environment?
18262 
18263     # Try to remove the string !READELF! from our list.
18264     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18265     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18266       # If it failed, the variable was not from the command line. Ignore it,
18267       # but warn the user (except for BASH, which is always set by the calling BASH).
18268       if test "xREADELF" != xBASH; then
18269         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18270 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18271       fi
18272       # Try to locate tool using the code snippet
18273       for ac_prog in greadelf readelf
18274 do
18275   # Extract the first word of "$ac_prog", so it can be a program name with args.
18276 set dummy $ac_prog; ac_word=$2
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18278 $as_echo_n "checking for $ac_word... " >&6; }
18279 if ${ac_cv_path_READELF+:} false; then :
18280   $as_echo_n "(cached) " >&6
18281 else
18282   case $READELF in
18283   [\\/]* | ?:[\\/]*)
18284   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18285   ;;
18286   *)
18287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18288 for as_dir in $PATH
18289 do
18290   IFS=$as_save_IFS
18291   test -z "$as_dir" && as_dir=.
18292     for ac_exec_ext in '' $ac_executable_extensions; do
18293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18294     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18296     break 2
18297   fi
18298 done
18299   done
18300 IFS=$as_save_IFS
18301 
18302   ;;
18303 esac
18304 fi
18305 READELF=$ac_cv_path_READELF
18306 if test -n "$READELF"; then
18307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18308 $as_echo "$READELF" >&6; }
18309 else
18310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18311 $as_echo "no" >&6; }
18312 fi
18313 
18314 
18315   test -n "$READELF" && break
18316 done
18317 
18318     else
18319       # If it succeeded, then it was overridden by the user. We will use it
18320       # for the tool.
18321 
18322       # First remove it from the list of overridden variables, so we can test
18323       # for unknown variables in the end.
18324       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18325 
18326       # Check if the provided tool contains a complete path.
18327       tool_specified="$READELF"
18328       tool_basename="${tool_specified##*/}"
18329       if test "x$tool_basename" = "x$tool_specified"; then
18330         # A command without a complete path is provided, search $PATH.
18331         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18332 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18333         # Extract the first word of "$tool_basename", so it can be a program name with args.
18334 set dummy $tool_basename; ac_word=$2
18335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18336 $as_echo_n "checking for $ac_word... " >&6; }
18337 if ${ac_cv_path_READELF+:} false; then :
18338   $as_echo_n "(cached) " >&6
18339 else
18340   case $READELF in
18341   [\\/]* | ?:[\\/]*)
18342   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18343   ;;
18344   *)
18345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18346 for as_dir in $PATH
18347 do
18348   IFS=$as_save_IFS
18349   test -z "$as_dir" && as_dir=.
18350     for ac_exec_ext in '' $ac_executable_extensions; do
18351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18352     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18354     break 2
18355   fi
18356 done
18357   done
18358 IFS=$as_save_IFS
18359 
18360   ;;
18361 esac
18362 fi
18363 READELF=$ac_cv_path_READELF
18364 if test -n "$READELF"; then
18365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18366 $as_echo "$READELF" >&6; }
18367 else
18368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18369 $as_echo "no" >&6; }
18370 fi
18371 
18372 
18373         if test "x$READELF" = x; then
18374           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18375         fi
18376       else
18377         # Otherwise we believe it is a complete path. Use it as it is.
18378         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18379 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18380         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18381 $as_echo_n "checking for READELF... " >&6; }
18382         if test ! -x "$tool_specified"; then
18383           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18384 $as_echo "not found" >&6; }
18385           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18386         fi
18387         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18388 $as_echo "$tool_specified" >&6; }
18389       fi
18390     fi
18391   fi
18392 
18393 
18394 
18395 
18396   # Publish this variable in the help.
18397 
18398 
18399   if test "x$HG" = x; then
18400     # The variable is not set by user, try to locate tool using the code snippet
18401     for ac_prog in hg
18402 do
18403   # Extract the first word of "$ac_prog", so it can be a program name with args.
18404 set dummy $ac_prog; ac_word=$2
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18406 $as_echo_n "checking for $ac_word... " >&6; }
18407 if ${ac_cv_path_HG+:} false; then :
18408   $as_echo_n "(cached) " >&6
18409 else
18410   case $HG in
18411   [\\/]* | ?:[\\/]*)
18412   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18413   ;;
18414   *)
18415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18416 for as_dir in $PATH
18417 do
18418   IFS=$as_save_IFS
18419   test -z "$as_dir" && as_dir=.
18420     for ac_exec_ext in '' $ac_executable_extensions; do
18421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18422     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18424     break 2
18425   fi
18426 done
18427   done
18428 IFS=$as_save_IFS
18429 
18430   ;;
18431 esac
18432 fi
18433 HG=$ac_cv_path_HG
18434 if test -n "$HG"; then
18435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18436 $as_echo "$HG" >&6; }
18437 else
18438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18439 $as_echo "no" >&6; }
18440 fi
18441 
18442 
18443   test -n "$HG" && break
18444 done
18445 
18446   else
18447     # The variable is set, but is it from the command line or the environment?
18448 
18449     # Try to remove the string !HG! from our list.
18450     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18451     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18452       # If it failed, the variable was not from the command line. Ignore it,
18453       # but warn the user (except for BASH, which is always set by the calling BASH).
18454       if test "xHG" != xBASH; then
18455         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18456 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18457       fi
18458       # Try to locate tool using the code snippet
18459       for ac_prog in hg
18460 do
18461   # Extract the first word of "$ac_prog", so it can be a program name with args.
18462 set dummy $ac_prog; ac_word=$2
18463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18464 $as_echo_n "checking for $ac_word... " >&6; }
18465 if ${ac_cv_path_HG+:} false; then :
18466   $as_echo_n "(cached) " >&6
18467 else
18468   case $HG in
18469   [\\/]* | ?:[\\/]*)
18470   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18471   ;;
18472   *)
18473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18474 for as_dir in $PATH
18475 do
18476   IFS=$as_save_IFS
18477   test -z "$as_dir" && as_dir=.
18478     for ac_exec_ext in '' $ac_executable_extensions; do
18479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18480     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18482     break 2
18483   fi
18484 done
18485   done
18486 IFS=$as_save_IFS
18487 
18488   ;;
18489 esac
18490 fi
18491 HG=$ac_cv_path_HG
18492 if test -n "$HG"; then
18493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18494 $as_echo "$HG" >&6; }
18495 else
18496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18497 $as_echo "no" >&6; }
18498 fi
18499 
18500 
18501   test -n "$HG" && break
18502 done
18503 
18504     else
18505       # If it succeeded, then it was overridden by the user. We will use it
18506       # for the tool.
18507 
18508       # First remove it from the list of overridden variables, so we can test
18509       # for unknown variables in the end.
18510       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18511 
18512       # Check if the provided tool contains a complete path.
18513       tool_specified="$HG"
18514       tool_basename="${tool_specified##*/}"
18515       if test "x$tool_basename" = "x$tool_specified"; then
18516         # A command without a complete path is provided, search $PATH.
18517         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18518 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18519         # Extract the first word of "$tool_basename", so it can be a program name with args.
18520 set dummy $tool_basename; ac_word=$2
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18522 $as_echo_n "checking for $ac_word... " >&6; }
18523 if ${ac_cv_path_HG+:} false; then :
18524   $as_echo_n "(cached) " >&6
18525 else
18526   case $HG in
18527   [\\/]* | ?:[\\/]*)
18528   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18529   ;;
18530   *)
18531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18532 for as_dir in $PATH
18533 do
18534   IFS=$as_save_IFS
18535   test -z "$as_dir" && as_dir=.
18536     for ac_exec_ext in '' $ac_executable_extensions; do
18537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18538     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18540     break 2
18541   fi
18542 done
18543   done
18544 IFS=$as_save_IFS
18545 
18546   ;;
18547 esac
18548 fi
18549 HG=$ac_cv_path_HG
18550 if test -n "$HG"; then
18551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18552 $as_echo "$HG" >&6; }
18553 else
18554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18555 $as_echo "no" >&6; }
18556 fi
18557 
18558 
18559         if test "x$HG" = x; then
18560           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18561         fi
18562       else
18563         # Otherwise we believe it is a complete path. Use it as it is.
18564         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18565 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18566         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18567 $as_echo_n "checking for HG... " >&6; }
18568         if test ! -x "$tool_specified"; then
18569           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18570 $as_echo "not found" >&6; }
18571           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18572         fi
18573         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18574 $as_echo "$tool_specified" >&6; }
18575       fi
18576     fi
18577   fi
18578 
18579 
18580 
18581 
18582   # Publish this variable in the help.
18583 
18584 
18585   if test "x$STAT" = x; then
18586     # The variable is not set by user, try to locate tool using the code snippet
18587     for ac_prog in stat
18588 do
18589   # Extract the first word of "$ac_prog", so it can be a program name with args.
18590 set dummy $ac_prog; ac_word=$2
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18592 $as_echo_n "checking for $ac_word... " >&6; }
18593 if ${ac_cv_path_STAT+:} false; then :
18594   $as_echo_n "(cached) " >&6
18595 else
18596   case $STAT in
18597   [\\/]* | ?:[\\/]*)
18598   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18599   ;;
18600   *)
18601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18602 for as_dir in $PATH
18603 do
18604   IFS=$as_save_IFS
18605   test -z "$as_dir" && as_dir=.
18606     for ac_exec_ext in '' $ac_executable_extensions; do
18607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18608     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18610     break 2
18611   fi
18612 done
18613   done
18614 IFS=$as_save_IFS
18615 
18616   ;;
18617 esac
18618 fi
18619 STAT=$ac_cv_path_STAT
18620 if test -n "$STAT"; then
18621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18622 $as_echo "$STAT" >&6; }
18623 else
18624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18625 $as_echo "no" >&6; }
18626 fi
18627 
18628 
18629   test -n "$STAT" && break
18630 done
18631 
18632   else
18633     # The variable is set, but is it from the command line or the environment?
18634 
18635     # Try to remove the string !STAT! from our list.
18636     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18637     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18638       # If it failed, the variable was not from the command line. Ignore it,
18639       # but warn the user (except for BASH, which is always set by the calling BASH).
18640       if test "xSTAT" != xBASH; then
18641         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18642 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18643       fi
18644       # Try to locate tool using the code snippet
18645       for ac_prog in stat
18646 do
18647   # Extract the first word of "$ac_prog", so it can be a program name with args.
18648 set dummy $ac_prog; ac_word=$2
18649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18650 $as_echo_n "checking for $ac_word... " >&6; }
18651 if ${ac_cv_path_STAT+:} false; then :
18652   $as_echo_n "(cached) " >&6
18653 else
18654   case $STAT in
18655   [\\/]* | ?:[\\/]*)
18656   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18657   ;;
18658   *)
18659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18660 for as_dir in $PATH
18661 do
18662   IFS=$as_save_IFS
18663   test -z "$as_dir" && as_dir=.
18664     for ac_exec_ext in '' $ac_executable_extensions; do
18665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18666     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18668     break 2
18669   fi
18670 done
18671   done
18672 IFS=$as_save_IFS
18673 
18674   ;;
18675 esac
18676 fi
18677 STAT=$ac_cv_path_STAT
18678 if test -n "$STAT"; then
18679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18680 $as_echo "$STAT" >&6; }
18681 else
18682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18683 $as_echo "no" >&6; }
18684 fi
18685 
18686 
18687   test -n "$STAT" && break
18688 done
18689 
18690     else
18691       # If it succeeded, then it was overridden by the user. We will use it
18692       # for the tool.
18693 
18694       # First remove it from the list of overridden variables, so we can test
18695       # for unknown variables in the end.
18696       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18697 
18698       # Check if the provided tool contains a complete path.
18699       tool_specified="$STAT"
18700       tool_basename="${tool_specified##*/}"
18701       if test "x$tool_basename" = "x$tool_specified"; then
18702         # A command without a complete path is provided, search $PATH.
18703         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18704 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18705         # Extract the first word of "$tool_basename", so it can be a program name with args.
18706 set dummy $tool_basename; ac_word=$2
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18708 $as_echo_n "checking for $ac_word... " >&6; }
18709 if ${ac_cv_path_STAT+:} false; then :
18710   $as_echo_n "(cached) " >&6
18711 else
18712   case $STAT in
18713   [\\/]* | ?:[\\/]*)
18714   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18715   ;;
18716   *)
18717   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18718 for as_dir in $PATH
18719 do
18720   IFS=$as_save_IFS
18721   test -z "$as_dir" && as_dir=.
18722     for ac_exec_ext in '' $ac_executable_extensions; do
18723   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18724     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18725     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18726     break 2
18727   fi
18728 done
18729   done
18730 IFS=$as_save_IFS
18731 
18732   ;;
18733 esac
18734 fi
18735 STAT=$ac_cv_path_STAT
18736 if test -n "$STAT"; then
18737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18738 $as_echo "$STAT" >&6; }
18739 else
18740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18741 $as_echo "no" >&6; }
18742 fi
18743 
18744 
18745         if test "x$STAT" = x; then
18746           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18747         fi
18748       else
18749         # Otherwise we believe it is a complete path. Use it as it is.
18750         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18751 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18752         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18753 $as_echo_n "checking for STAT... " >&6; }
18754         if test ! -x "$tool_specified"; then
18755           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18756 $as_echo "not found" >&6; }
18757           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18758         fi
18759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18760 $as_echo "$tool_specified" >&6; }
18761       fi
18762     fi
18763   fi
18764 
18765 
18766 
18767 
18768   # Publish this variable in the help.
18769 
18770 
18771   if test "x$TIME" = x; then
18772     # The variable is not set by user, try to locate tool using the code snippet
18773     for ac_prog in time
18774 do
18775   # Extract the first word of "$ac_prog", so it can be a program name with args.
18776 set dummy $ac_prog; ac_word=$2
18777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18778 $as_echo_n "checking for $ac_word... " >&6; }
18779 if ${ac_cv_path_TIME+:} false; then :
18780   $as_echo_n "(cached) " >&6
18781 else
18782   case $TIME in
18783   [\\/]* | ?:[\\/]*)
18784   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18785   ;;
18786   *)
18787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18788 for as_dir in $PATH
18789 do
18790   IFS=$as_save_IFS
18791   test -z "$as_dir" && as_dir=.
18792     for ac_exec_ext in '' $ac_executable_extensions; do
18793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18794     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18796     break 2
18797   fi
18798 done
18799   done
18800 IFS=$as_save_IFS
18801 
18802   ;;
18803 esac
18804 fi
18805 TIME=$ac_cv_path_TIME
18806 if test -n "$TIME"; then
18807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18808 $as_echo "$TIME" >&6; }
18809 else
18810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18811 $as_echo "no" >&6; }
18812 fi
18813 
18814 
18815   test -n "$TIME" && break
18816 done
18817 
18818   else
18819     # The variable is set, but is it from the command line or the environment?
18820 
18821     # Try to remove the string !TIME! from our list.
18822     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18823     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18824       # If it failed, the variable was not from the command line. Ignore it,
18825       # but warn the user (except for BASH, which is always set by the calling BASH).
18826       if test "xTIME" != xBASH; then
18827         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18828 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18829       fi
18830       # Try to locate tool using the code snippet
18831       for ac_prog in time
18832 do
18833   # Extract the first word of "$ac_prog", so it can be a program name with args.
18834 set dummy $ac_prog; ac_word=$2
18835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18836 $as_echo_n "checking for $ac_word... " >&6; }
18837 if ${ac_cv_path_TIME+:} false; then :
18838   $as_echo_n "(cached) " >&6
18839 else
18840   case $TIME in
18841   [\\/]* | ?:[\\/]*)
18842   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18843   ;;
18844   *)
18845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18846 for as_dir in $PATH
18847 do
18848   IFS=$as_save_IFS
18849   test -z "$as_dir" && as_dir=.
18850     for ac_exec_ext in '' $ac_executable_extensions; do
18851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18852     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18854     break 2
18855   fi
18856 done
18857   done
18858 IFS=$as_save_IFS
18859 
18860   ;;
18861 esac
18862 fi
18863 TIME=$ac_cv_path_TIME
18864 if test -n "$TIME"; then
18865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18866 $as_echo "$TIME" >&6; }
18867 else
18868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18869 $as_echo "no" >&6; }
18870 fi
18871 
18872 
18873   test -n "$TIME" && break
18874 done
18875 
18876     else
18877       # If it succeeded, then it was overridden by the user. We will use it
18878       # for the tool.
18879 
18880       # First remove it from the list of overridden variables, so we can test
18881       # for unknown variables in the end.
18882       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18883 
18884       # Check if the provided tool contains a complete path.
18885       tool_specified="$TIME"
18886       tool_basename="${tool_specified##*/}"
18887       if test "x$tool_basename" = "x$tool_specified"; then
18888         # A command without a complete path is provided, search $PATH.
18889         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18890 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18891         # Extract the first word of "$tool_basename", so it can be a program name with args.
18892 set dummy $tool_basename; ac_word=$2
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18894 $as_echo_n "checking for $ac_word... " >&6; }
18895 if ${ac_cv_path_TIME+:} false; then :
18896   $as_echo_n "(cached) " >&6
18897 else
18898   case $TIME in
18899   [\\/]* | ?:[\\/]*)
18900   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18901   ;;
18902   *)
18903   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18904 for as_dir in $PATH
18905 do
18906   IFS=$as_save_IFS
18907   test -z "$as_dir" && as_dir=.
18908     for ac_exec_ext in '' $ac_executable_extensions; do
18909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18910     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18912     break 2
18913   fi
18914 done
18915   done
18916 IFS=$as_save_IFS
18917 
18918   ;;
18919 esac
18920 fi
18921 TIME=$ac_cv_path_TIME
18922 if test -n "$TIME"; then
18923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18924 $as_echo "$TIME" >&6; }
18925 else
18926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18927 $as_echo "no" >&6; }
18928 fi
18929 
18930 
18931         if test "x$TIME" = x; then
18932           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18933         fi
18934       else
18935         # Otherwise we believe it is a complete path. Use it as it is.
18936         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18937 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18938         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18939 $as_echo_n "checking for TIME... " >&6; }
18940         if test ! -x "$tool_specified"; then
18941           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18942 $as_echo "not found" >&6; }
18943           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18944         fi
18945         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18946 $as_echo "$tool_specified" >&6; }
18947       fi
18948     fi
18949   fi
18950 
18951 
18952   # Check if it's GNU time
18953   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18954   if test "x$IS_GNU_TIME" != x; then
18955     IS_GNU_TIME=yes
18956   else
18957     IS_GNU_TIME=no
18958   fi
18959 
18960 
18961   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18962 
18963 
18964 
18965   # Publish this variable in the help.
18966 
18967 
18968   if test "x$DSYMUTIL" = x; then
18969     # The variable is not set by user, try to locate tool using the code snippet
18970     for ac_prog in dsymutil
18971 do
18972   # Extract the first word of "$ac_prog", so it can be a program name with args.
18973 set dummy $ac_prog; ac_word=$2
18974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18975 $as_echo_n "checking for $ac_word... " >&6; }
18976 if ${ac_cv_path_DSYMUTIL+:} false; then :
18977   $as_echo_n "(cached) " >&6
18978 else
18979   case $DSYMUTIL in
18980   [\\/]* | ?:[\\/]*)
18981   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18982   ;;
18983   *)
18984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18985 for as_dir in $PATH
18986 do
18987   IFS=$as_save_IFS
18988   test -z "$as_dir" && as_dir=.
18989     for ac_exec_ext in '' $ac_executable_extensions; do
18990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18991     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18993     break 2
18994   fi
18995 done
18996   done
18997 IFS=$as_save_IFS
18998 
18999   ;;
19000 esac
19001 fi
19002 DSYMUTIL=$ac_cv_path_DSYMUTIL
19003 if test -n "$DSYMUTIL"; then
19004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19005 $as_echo "$DSYMUTIL" >&6; }
19006 else
19007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19008 $as_echo "no" >&6; }
19009 fi
19010 
19011 
19012   test -n "$DSYMUTIL" && break
19013 done
19014 
19015   else
19016     # The variable is set, but is it from the command line or the environment?
19017 
19018     # Try to remove the string !DSYMUTIL! from our list.
19019     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19020     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19021       # If it failed, the variable was not from the command line. Ignore it,
19022       # but warn the user (except for BASH, which is always set by the calling BASH).
19023       if test "xDSYMUTIL" != xBASH; then
19024         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19025 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19026       fi
19027       # Try to locate tool using the code snippet
19028       for ac_prog in dsymutil
19029 do
19030   # Extract the first word of "$ac_prog", so it can be a program name with args.
19031 set dummy $ac_prog; ac_word=$2
19032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19033 $as_echo_n "checking for $ac_word... " >&6; }
19034 if ${ac_cv_path_DSYMUTIL+:} false; then :
19035   $as_echo_n "(cached) " >&6
19036 else
19037   case $DSYMUTIL in
19038   [\\/]* | ?:[\\/]*)
19039   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19040   ;;
19041   *)
19042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19043 for as_dir in $PATH
19044 do
19045   IFS=$as_save_IFS
19046   test -z "$as_dir" && as_dir=.
19047     for ac_exec_ext in '' $ac_executable_extensions; do
19048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19049     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19051     break 2
19052   fi
19053 done
19054   done
19055 IFS=$as_save_IFS
19056 
19057   ;;
19058 esac
19059 fi
19060 DSYMUTIL=$ac_cv_path_DSYMUTIL
19061 if test -n "$DSYMUTIL"; then
19062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19063 $as_echo "$DSYMUTIL" >&6; }
19064 else
19065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19066 $as_echo "no" >&6; }
19067 fi
19068 
19069 
19070   test -n "$DSYMUTIL" && break
19071 done
19072 
19073     else
19074       # If it succeeded, then it was overridden by the user. We will use it
19075       # for the tool.
19076 
19077       # First remove it from the list of overridden variables, so we can test
19078       # for unknown variables in the end.
19079       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19080 
19081       # Check if the provided tool contains a complete path.
19082       tool_specified="$DSYMUTIL"
19083       tool_basename="${tool_specified##*/}"
19084       if test "x$tool_basename" = "x$tool_specified"; then
19085         # A command without a complete path is provided, search $PATH.
19086         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19087 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19088         # Extract the first word of "$tool_basename", so it can be a program name with args.
19089 set dummy $tool_basename; ac_word=$2
19090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19091 $as_echo_n "checking for $ac_word... " >&6; }
19092 if ${ac_cv_path_DSYMUTIL+:} false; then :
19093   $as_echo_n "(cached) " >&6
19094 else
19095   case $DSYMUTIL in
19096   [\\/]* | ?:[\\/]*)
19097   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19098   ;;
19099   *)
19100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19101 for as_dir in $PATH
19102 do
19103   IFS=$as_save_IFS
19104   test -z "$as_dir" && as_dir=.
19105     for ac_exec_ext in '' $ac_executable_extensions; do
19106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19107     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19109     break 2
19110   fi
19111 done
19112   done
19113 IFS=$as_save_IFS
19114 
19115   ;;
19116 esac
19117 fi
19118 DSYMUTIL=$ac_cv_path_DSYMUTIL
19119 if test -n "$DSYMUTIL"; then
19120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19121 $as_echo "$DSYMUTIL" >&6; }
19122 else
19123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19124 $as_echo "no" >&6; }
19125 fi
19126 
19127 
19128         if test "x$DSYMUTIL" = x; then
19129           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19130         fi
19131       else
19132         # Otherwise we believe it is a complete path. Use it as it is.
19133         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19134 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19135         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19136 $as_echo_n "checking for DSYMUTIL... " >&6; }
19137         if test ! -x "$tool_specified"; then
19138           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19139 $as_echo "not found" >&6; }
19140           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19141         fi
19142         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19143 $as_echo "$tool_specified" >&6; }
19144       fi
19145     fi
19146   fi
19147 
19148 
19149 
19150   if test "x$DSYMUTIL" = x; then
19151     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19152   fi
19153 
19154 
19155 
19156 
19157 
19158   # Publish this variable in the help.
19159 
19160 
19161   if test "x$XATTR" = x; then
19162     # The variable is not set by user, try to locate tool using the code snippet
19163     for ac_prog in xattr
19164 do
19165   # Extract the first word of "$ac_prog", so it can be a program name with args.
19166 set dummy $ac_prog; ac_word=$2
19167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19168 $as_echo_n "checking for $ac_word... " >&6; }
19169 if ${ac_cv_path_XATTR+:} false; then :
19170   $as_echo_n "(cached) " >&6
19171 else
19172   case $XATTR in
19173   [\\/]* | ?:[\\/]*)
19174   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19175   ;;
19176   *)
19177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19178 for as_dir in $PATH
19179 do
19180   IFS=$as_save_IFS
19181   test -z "$as_dir" && as_dir=.
19182     for ac_exec_ext in '' $ac_executable_extensions; do
19183   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19184     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19186     break 2
19187   fi
19188 done
19189   done
19190 IFS=$as_save_IFS
19191 
19192   ;;
19193 esac
19194 fi
19195 XATTR=$ac_cv_path_XATTR
19196 if test -n "$XATTR"; then
19197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19198 $as_echo "$XATTR" >&6; }
19199 else
19200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19201 $as_echo "no" >&6; }
19202 fi
19203 
19204 
19205   test -n "$XATTR" && break
19206 done
19207 
19208   else
19209     # The variable is set, but is it from the command line or the environment?
19210 
19211     # Try to remove the string !XATTR! from our list.
19212     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19213     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19214       # If it failed, the variable was not from the command line. Ignore it,
19215       # but warn the user (except for BASH, which is always set by the calling BASH).
19216       if test "xXATTR" != xBASH; then
19217         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19218 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19219       fi
19220       # Try to locate tool using the code snippet
19221       for ac_prog in xattr
19222 do
19223   # Extract the first word of "$ac_prog", so it can be a program name with args.
19224 set dummy $ac_prog; ac_word=$2
19225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19226 $as_echo_n "checking for $ac_word... " >&6; }
19227 if ${ac_cv_path_XATTR+:} false; then :
19228   $as_echo_n "(cached) " >&6
19229 else
19230   case $XATTR in
19231   [\\/]* | ?:[\\/]*)
19232   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19233   ;;
19234   *)
19235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19236 for as_dir in $PATH
19237 do
19238   IFS=$as_save_IFS
19239   test -z "$as_dir" && as_dir=.
19240     for ac_exec_ext in '' $ac_executable_extensions; do
19241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19242     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19244     break 2
19245   fi
19246 done
19247   done
19248 IFS=$as_save_IFS
19249 
19250   ;;
19251 esac
19252 fi
19253 XATTR=$ac_cv_path_XATTR
19254 if test -n "$XATTR"; then
19255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19256 $as_echo "$XATTR" >&6; }
19257 else
19258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19259 $as_echo "no" >&6; }
19260 fi
19261 
19262 
19263   test -n "$XATTR" && break
19264 done
19265 
19266     else
19267       # If it succeeded, then it was overridden by the user. We will use it
19268       # for the tool.
19269 
19270       # First remove it from the list of overridden variables, so we can test
19271       # for unknown variables in the end.
19272       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19273 
19274       # Check if the provided tool contains a complete path.
19275       tool_specified="$XATTR"
19276       tool_basename="${tool_specified##*/}"
19277       if test "x$tool_basename" = "x$tool_specified"; then
19278         # A command without a complete path is provided, search $PATH.
19279         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19280 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19281         # Extract the first word of "$tool_basename", so it can be a program name with args.
19282 set dummy $tool_basename; ac_word=$2
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19284 $as_echo_n "checking for $ac_word... " >&6; }
19285 if ${ac_cv_path_XATTR+:} false; then :
19286   $as_echo_n "(cached) " >&6
19287 else
19288   case $XATTR in
19289   [\\/]* | ?:[\\/]*)
19290   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19291   ;;
19292   *)
19293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19294 for as_dir in $PATH
19295 do
19296   IFS=$as_save_IFS
19297   test -z "$as_dir" && as_dir=.
19298     for ac_exec_ext in '' $ac_executable_extensions; do
19299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19300     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19302     break 2
19303   fi
19304 done
19305   done
19306 IFS=$as_save_IFS
19307 
19308   ;;
19309 esac
19310 fi
19311 XATTR=$ac_cv_path_XATTR
19312 if test -n "$XATTR"; then
19313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19314 $as_echo "$XATTR" >&6; }
19315 else
19316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317 $as_echo "no" >&6; }
19318 fi
19319 
19320 
19321         if test "x$XATTR" = x; then
19322           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19323         fi
19324       else
19325         # Otherwise we believe it is a complete path. Use it as it is.
19326         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19327 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19328         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19329 $as_echo_n "checking for XATTR... " >&6; }
19330         if test ! -x "$tool_specified"; then
19331           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19332 $as_echo "not found" >&6; }
19333           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19334         fi
19335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19336 $as_echo "$tool_specified" >&6; }
19337       fi
19338     fi
19339   fi
19340 
19341 
19342 
19343   if test "x$XATTR" = x; then
19344     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19345   fi
19346 
19347 
19348 
19349 
19350   # Publish this variable in the help.
19351 
19352 
19353   if test "x$CODESIGN" = x; then
19354     # The variable is not set by user, try to locate tool using the code snippet
19355     for ac_prog in codesign
19356 do
19357   # Extract the first word of "$ac_prog", so it can be a program name with args.
19358 set dummy $ac_prog; ac_word=$2
19359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19360 $as_echo_n "checking for $ac_word... " >&6; }
19361 if ${ac_cv_path_CODESIGN+:} false; then :
19362   $as_echo_n "(cached) " >&6
19363 else
19364   case $CODESIGN in
19365   [\\/]* | ?:[\\/]*)
19366   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19367   ;;
19368   *)
19369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19370 for as_dir in $PATH
19371 do
19372   IFS=$as_save_IFS
19373   test -z "$as_dir" && as_dir=.
19374     for ac_exec_ext in '' $ac_executable_extensions; do
19375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19376     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19378     break 2
19379   fi
19380 done
19381   done
19382 IFS=$as_save_IFS
19383 
19384   ;;
19385 esac
19386 fi
19387 CODESIGN=$ac_cv_path_CODESIGN
19388 if test -n "$CODESIGN"; then
19389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19390 $as_echo "$CODESIGN" >&6; }
19391 else
19392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19393 $as_echo "no" >&6; }
19394 fi
19395 
19396 
19397   test -n "$CODESIGN" && break
19398 done
19399 
19400   else
19401     # The variable is set, but is it from the command line or the environment?
19402 
19403     # Try to remove the string !CODESIGN! from our list.
19404     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19405     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19406       # If it failed, the variable was not from the command line. Ignore it,
19407       # but warn the user (except for BASH, which is always set by the calling BASH).
19408       if test "xCODESIGN" != xBASH; then
19409         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19410 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19411       fi
19412       # Try to locate tool using the code snippet
19413       for ac_prog in codesign
19414 do
19415   # Extract the first word of "$ac_prog", so it can be a program name with args.
19416 set dummy $ac_prog; ac_word=$2
19417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19418 $as_echo_n "checking for $ac_word... " >&6; }
19419 if ${ac_cv_path_CODESIGN+:} false; then :
19420   $as_echo_n "(cached) " >&6
19421 else
19422   case $CODESIGN in
19423   [\\/]* | ?:[\\/]*)
19424   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19425   ;;
19426   *)
19427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19428 for as_dir in $PATH
19429 do
19430   IFS=$as_save_IFS
19431   test -z "$as_dir" && as_dir=.
19432     for ac_exec_ext in '' $ac_executable_extensions; do
19433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19434     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19436     break 2
19437   fi
19438 done
19439   done
19440 IFS=$as_save_IFS
19441 
19442   ;;
19443 esac
19444 fi
19445 CODESIGN=$ac_cv_path_CODESIGN
19446 if test -n "$CODESIGN"; then
19447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19448 $as_echo "$CODESIGN" >&6; }
19449 else
19450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19451 $as_echo "no" >&6; }
19452 fi
19453 
19454 
19455   test -n "$CODESIGN" && break
19456 done
19457 
19458     else
19459       # If it succeeded, then it was overridden by the user. We will use it
19460       # for the tool.
19461 
19462       # First remove it from the list of overridden variables, so we can test
19463       # for unknown variables in the end.
19464       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19465 
19466       # Check if the provided tool contains a complete path.
19467       tool_specified="$CODESIGN"
19468       tool_basename="${tool_specified##*/}"
19469       if test "x$tool_basename" = "x$tool_specified"; then
19470         # A command without a complete path is provided, search $PATH.
19471         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19472 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19473         # Extract the first word of "$tool_basename", so it can be a program name with args.
19474 set dummy $tool_basename; ac_word=$2
19475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19476 $as_echo_n "checking for $ac_word... " >&6; }
19477 if ${ac_cv_path_CODESIGN+:} false; then :
19478   $as_echo_n "(cached) " >&6
19479 else
19480   case $CODESIGN in
19481   [\\/]* | ?:[\\/]*)
19482   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19483   ;;
19484   *)
19485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19486 for as_dir in $PATH
19487 do
19488   IFS=$as_save_IFS
19489   test -z "$as_dir" && as_dir=.
19490     for ac_exec_ext in '' $ac_executable_extensions; do
19491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19492     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19494     break 2
19495   fi
19496 done
19497   done
19498 IFS=$as_save_IFS
19499 
19500   ;;
19501 esac
19502 fi
19503 CODESIGN=$ac_cv_path_CODESIGN
19504 if test -n "$CODESIGN"; then
19505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19506 $as_echo "$CODESIGN" >&6; }
19507 else
19508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19509 $as_echo "no" >&6; }
19510 fi
19511 
19512 
19513         if test "x$CODESIGN" = x; then
19514           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19515         fi
19516       else
19517         # Otherwise we believe it is a complete path. Use it as it is.
19518         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19519 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19520         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19521 $as_echo_n "checking for CODESIGN... " >&6; }
19522         if test ! -x "$tool_specified"; then
19523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19524 $as_echo "not found" >&6; }
19525           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19526         fi
19527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19528 $as_echo "$tool_specified" >&6; }
19529       fi
19530     fi
19531   fi
19532 
19533 
19534     if test "x$CODESIGN" != "x"; then
19535       # Verify that the openjdk_codesign certificate is present
19536       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19537 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19538       rm -f codesign-testfile
19539       touch codesign-testfile
19540       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19541       rm -f codesign-testfile
19542       if test "x$CODESIGN" = x; then
19543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19544 $as_echo "no" >&6; }
19545       else
19546         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19547 $as_echo "yes" >&6; }
19548       fi
19549     fi
19550   fi
19551 
19552 
19553   # Test if bash supports pipefail.
19554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19555 $as_echo_n "checking if bash supports pipefail... " >&6; }
19556   if ${BASH} -c 'set -o pipefail'; then
19557     BASH_ARGS="$BASH_ARGS -o pipefail"
19558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19559 $as_echo "yes" >&6; }
19560   else
19561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19562 $as_echo "no" >&6; }
19563   fi
19564 
19565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19566 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19567   if ${BASH} -e -c 'true'; then
19568     BASH_ARGS="$BASH_ARGS -e"
19569     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19570 $as_echo "yes" >&6; }
19571   else
19572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573 $as_echo "no" >&6; }
19574   fi
19575 
19576 
19577 
19578 
19579 # Check if pkg-config is available.
19580 
19581 
19582 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19583         if test -n "$ac_tool_prefix"; then
19584   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19585 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19587 $as_echo_n "checking for $ac_word... " >&6; }
19588 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19589   $as_echo_n "(cached) " >&6
19590 else
19591   case $PKG_CONFIG in
19592   [\\/]* | ?:[\\/]*)
19593   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19594   ;;
19595   *)
19596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19597 for as_dir in $PATH
19598 do
19599   IFS=$as_save_IFS
19600   test -z "$as_dir" && as_dir=.
19601     for ac_exec_ext in '' $ac_executable_extensions; do
19602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19603     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19605     break 2
19606   fi
19607 done
19608   done
19609 IFS=$as_save_IFS
19610 
19611   ;;
19612 esac
19613 fi
19614 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19615 if test -n "$PKG_CONFIG"; then
19616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19617 $as_echo "$PKG_CONFIG" >&6; }
19618 else
19619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19620 $as_echo "no" >&6; }
19621 fi
19622 
19623 
19624 fi
19625 if test -z "$ac_cv_path_PKG_CONFIG"; then
19626   ac_pt_PKG_CONFIG=$PKG_CONFIG
19627   # Extract the first word of "pkg-config", so it can be a program name with args.
19628 set dummy pkg-config; ac_word=$2
19629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19630 $as_echo_n "checking for $ac_word... " >&6; }
19631 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19632   $as_echo_n "(cached) " >&6
19633 else
19634   case $ac_pt_PKG_CONFIG in
19635   [\\/]* | ?:[\\/]*)
19636   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19637   ;;
19638   *)
19639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19640 for as_dir in $PATH
19641 do
19642   IFS=$as_save_IFS
19643   test -z "$as_dir" && as_dir=.
19644     for ac_exec_ext in '' $ac_executable_extensions; do
19645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19646     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19648     break 2
19649   fi
19650 done
19651   done
19652 IFS=$as_save_IFS
19653 
19654   ;;
19655 esac
19656 fi
19657 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19658 if test -n "$ac_pt_PKG_CONFIG"; then
19659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19660 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19661 else
19662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19663 $as_echo "no" >&6; }
19664 fi
19665 
19666   if test "x$ac_pt_PKG_CONFIG" = x; then
19667     PKG_CONFIG=""
19668   else
19669     case $cross_compiling:$ac_tool_warned in
19670 yes:)
19671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19672 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19673 ac_tool_warned=yes ;;
19674 esac
19675     PKG_CONFIG=$ac_pt_PKG_CONFIG
19676   fi
19677 else
19678   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19679 fi
19680 
19681 fi
19682 if test -n "$PKG_CONFIG"; then
19683         _pkg_min_version=0.9.0
19684         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19685 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19686         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19687                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19688 $as_echo "yes" >&6; }
19689         else
19690                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19691 $as_echo "no" >&6; }
19692                 PKG_CONFIG=""
19693         fi
19694 
19695 fi
19696 
19697 # After basic tools have been setup, we can check build os specific details.
19698 
19699   ###############################################################################
19700 
19701   # Note that this is the build platform OS version!
19702 
19703   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19704   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19705   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19706   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19707 
19708 
19709 
19710 
19711 
19712 # Setup builddeps, for automatic downloading of tools we need.
19713 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19714 # boot-jdk setup, but we need to have basic tools setup first.
19715 
19716 
19717 # Check whether --with-builddeps-conf was given.
19718 if test "${with_builddeps_conf+set}" = set; then :
19719   withval=$with_builddeps_conf;
19720 fi
19721 
19722 
19723 
19724 # Check whether --with-builddeps-server was given.
19725 if test "${with_builddeps_server+set}" = set; then :
19726   withval=$with_builddeps_server;
19727 fi
19728 
19729 
19730 
19731 # Check whether --with-builddeps-dir was given.
19732 if test "${with_builddeps_dir+set}" = set; then :
19733   withval=$with_builddeps_dir;
19734 else
19735   with_builddeps_dir=/localhome/builddeps
19736 fi
19737 
19738 
19739 
19740 # Check whether --with-builddeps-group was given.
19741 if test "${with_builddeps_group+set}" = set; then :
19742   withval=$with_builddeps_group;
19743 fi
19744 
19745 
19746 
19747 
19748   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19749     if test "x$with_builddeps_conf" != x; then
19750       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19751 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19752       builddepsfile=$with_builddeps_conf
19753       if test -s $builddepsfile; then
19754         . $builddepsfile
19755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19756 $as_echo "loaded!" >&6; }
19757       else
19758         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19759       fi
19760     else
19761       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19762 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19763       builddepsfile=`mktemp`
19764       touch $builddepsfile
19765       # Put all found confs into a single file.
19766       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19767       # Source the file to acquire the variables
19768       if test -s $builddepsfile; then
19769         . $builddepsfile
19770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19771 $as_echo "found at least one!" >&6; }
19772       else
19773         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19774       fi
19775     fi
19776     # Create build and target names that use _ instead of "-" and ".".
19777     # This is necessary to use them in variable names.
19778     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19779     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19780     # Extract rewrite information for build and target
19781     eval rewritten_build=\${REWRITE_${build_var}}
19782     if test "x$rewritten_build" = x; then
19783       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19784       echo Build stays the same $rewritten_build
19785     else
19786       echo Rewriting build for builddeps into $rewritten_build
19787     fi
19788     eval rewritten_target=\${REWRITE_${target_var}}
19789     if test "x$rewritten_target" = x; then
19790       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19791       echo Target stays the same $rewritten_target
19792     else
19793       echo Rewriting target for builddeps into $rewritten_target
19794     fi
19795     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19796     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19797   fi
19798   for ac_prog in 7z unzip
19799 do
19800   # Extract the first word of "$ac_prog", so it can be a program name with args.
19801 set dummy $ac_prog; ac_word=$2
19802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19803 $as_echo_n "checking for $ac_word... " >&6; }
19804 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19805   $as_echo_n "(cached) " >&6
19806 else
19807   if test -n "$BDEPS_UNZIP"; then
19808   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19809 else
19810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19811 for as_dir in $PATH
19812 do
19813   IFS=$as_save_IFS
19814   test -z "$as_dir" && as_dir=.
19815     for ac_exec_ext in '' $ac_executable_extensions; do
19816   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19817     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19819     break 2
19820   fi
19821 done
19822   done
19823 IFS=$as_save_IFS
19824 
19825 fi
19826 fi
19827 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19828 if test -n "$BDEPS_UNZIP"; then
19829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19830 $as_echo "$BDEPS_UNZIP" >&6; }
19831 else
19832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19833 $as_echo "no" >&6; }
19834 fi
19835 
19836 
19837   test -n "$BDEPS_UNZIP" && break
19838 done
19839 
19840   if test "x$BDEPS_UNZIP" = x7z; then
19841     BDEPS_UNZIP="7z x"
19842   fi
19843 
19844   for ac_prog in wget lftp ftp
19845 do
19846   # Extract the first word of "$ac_prog", so it can be a program name with args.
19847 set dummy $ac_prog; ac_word=$2
19848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19849 $as_echo_n "checking for $ac_word... " >&6; }
19850 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19851   $as_echo_n "(cached) " >&6
19852 else
19853   if test -n "$BDEPS_FTP"; then
19854   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19855 else
19856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19857 for as_dir in $PATH
19858 do
19859   IFS=$as_save_IFS
19860   test -z "$as_dir" && as_dir=.
19861     for ac_exec_ext in '' $ac_executable_extensions; do
19862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19863     ac_cv_prog_BDEPS_FTP="$ac_prog"
19864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19865     break 2
19866   fi
19867 done
19868   done
19869 IFS=$as_save_IFS
19870 
19871 fi
19872 fi
19873 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19874 if test -n "$BDEPS_FTP"; then
19875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19876 $as_echo "$BDEPS_FTP" >&6; }
19877 else
19878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19879 $as_echo "no" >&6; }
19880 fi
19881 
19882 
19883   test -n "$BDEPS_FTP" && break
19884 done
19885 
19886 
19887 
19888 ###############################################################################
19889 #
19890 # Determine OpenJDK variants, options and version numbers.
19891 #
19892 ###############################################################################
19893 
19894 # We need build & target for this.
19895 
19896 
19897   ###############################################################################
19898   #
19899   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19900   # We always build headless support.
19901   #
19902   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19903 $as_echo_n "checking headful support... " >&6; }
19904   # Check whether --enable-headful was given.
19905 if test "${enable_headful+set}" = set; then :
19906   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19907 else
19908   SUPPORT_HEADFUL=yes
19909 fi
19910 
19911 
19912   SUPPORT_HEADLESS=yes
19913   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19914 
19915   if test "x$SUPPORT_HEADFUL" = xyes; then
19916     # We are building both headful and headless.
19917     headful_msg="include support for both headful and headless"
19918   fi
19919 
19920   if test "x$SUPPORT_HEADFUL" = xno; then
19921     # Thus we are building headless only.
19922     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19923     headful_msg="headless only"
19924   fi
19925 
19926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19927 $as_echo "$headful_msg" >&6; }
19928 
19929 
19930 
19931 
19932 
19933   # Control wether Hotspot runs Queens test after build.
19934   # Check whether --enable-hotspot-test-in-build was given.
19935 if test "${enable_hotspot_test_in_build+set}" = set; then :
19936   enableval=$enable_hotspot_test_in_build;
19937 else
19938   enable_hotspot_test_in_build=no
19939 fi
19940 
19941   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19942     TEST_IN_BUILD=true
19943   else
19944     TEST_IN_BUILD=false
19945   fi
19946 
19947 
19948   ###############################################################################
19949   #
19950   # Choose cacerts source file
19951   #
19952 
19953 # Check whether --with-cacerts-file was given.
19954 if test "${with_cacerts_file+set}" = set; then :
19955   withval=$with_cacerts_file;
19956 fi
19957 
19958   if test "x$with_cacerts_file" != x; then
19959     CACERTS_FILE=$with_cacerts_file
19960   fi
19961 
19962 
19963   ###############################################################################
19964   #
19965   # Enable or disable unlimited crypto
19966   #
19967   # Check whether --enable-unlimited-crypto was given.
19968 if test "${enable_unlimited_crypto+set}" = set; then :
19969   enableval=$enable_unlimited_crypto;
19970 else
19971   enable_unlimited_crypto=no
19972 fi
19973 
19974   if test "x$enable_unlimited_crypto" = "xyes"; then
19975     UNLIMITED_CRYPTO=true
19976   else
19977     UNLIMITED_CRYPTO=false
19978   fi
19979 
19980 
19981   ###############################################################################
19982   #
19983   # Enable or disable the elliptic curve crypto implementation
19984   #
19985 
19986 
19987   ###############################################################################
19988   #
19989   # --enable-rmiconnector-iiop
19990   #
19991   # Check whether --enable-rmiconnector-iiop was given.
19992 if test "${enable_rmiconnector_iiop+set}" = set; then :
19993   enableval=$enable_rmiconnector_iiop;
19994 fi
19995 
19996   if test "x$enable_rmiconnector_iiop" = "xyes"; then
19997     RMICONNECTOR_IIOP=true
19998   else
19999     RMICONNECTOR_IIOP=false
20000   fi
20001 
20002 
20003   ###############################################################################
20004   #
20005   # Compress jars
20006   #
20007   COMPRESS_JARS=false
20008 
20009 
20010 
20011 
20012   # Source the version numbers
20013   . $AUTOCONF_DIR/version-numbers
20014 
20015   # Get the settings from parameters
20016 
20017 # Check whether --with-milestone was given.
20018 if test "${with_milestone+set}" = set; then :
20019   withval=$with_milestone;
20020 fi
20021 
20022   if test "x$with_milestone" = xyes; then
20023     as_fn_error $? "Milestone must have a value" "$LINENO" 5
20024   elif test "x$with_milestone" != x; then
20025     MILESTONE="$with_milestone"
20026   fi
20027   if test "x$MILESTONE" = x; then
20028     MILESTONE=internal
20029   fi
20030 
20031 
20032 # Check whether --with-update-version was given.
20033 if test "${with_update_version+set}" = set; then :
20034   withval=$with_update_version;
20035 fi
20036 
20037   if test "x$with_update_version" = xyes; then
20038     as_fn_error $? "Update version must have a value" "$LINENO" 5
20039   elif test "x$with_update_version" != x; then
20040     JDK_UPDATE_VERSION="$with_update_version"
20041     # On macosx 10.7, it's not possible to set --with-update-version=0X due
20042     # to a bug in expr (which reduces it to just X). To work around this, we
20043     # always add a 0 to one digit update versions.
20044     if test "${#JDK_UPDATE_VERSION}" = "1"; then
20045       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20046     fi
20047   fi
20048 
20049 
20050 # Check whether --with-user-release-suffix was given.
20051 if test "${with_user_release_suffix+set}" = set; then :
20052   withval=$with_user_release_suffix;
20053 fi
20054 
20055   if test "x$with_user_release_suffix" = xyes; then
20056     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20057   elif test "x$with_user_release_suffix" != x; then
20058     USER_RELEASE_SUFFIX="$with_user_release_suffix"
20059   fi
20060 
20061 
20062 # Check whether --with-build-number was given.
20063 if test "${with_build_number+set}" = set; then :
20064   withval=$with_build_number;
20065 fi
20066 
20067   if test "x$with_build_number" = xyes; then
20068     as_fn_error $? "Build number must have a value" "$LINENO" 5
20069   elif test "x$with_build_number" != x; then
20070     JDK_BUILD_NUMBER="$with_build_number"
20071   fi
20072   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20073   if test "x$JDK_BUILD_NUMBER" = x; then
20074     JDK_BUILD_NUMBER=b00
20075     if test "x$USER_RELEASE_SUFFIX" = x; then
20076       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20077       # Avoid [:alnum:] since it depends on the locale.
20078       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20079       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20080     fi
20081   fi
20082 
20083   # Now set the JDK version, milestone, build number etc.
20084 
20085 
20086 
20087 
20088 
20089 
20090 
20091 
20092 
20093 
20094 
20095 
20096 
20097 
20098 
20099 
20100 # Check whether --with-copyright-year was given.
20101 if test "${with_copyright_year+set}" = set; then :
20102   withval=$with_copyright_year;
20103 fi
20104 
20105   if test "x$with_copyright_year" = xyes; then
20106     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20107   elif test "x$with_copyright_year" != x; then
20108     COPYRIGHT_YEAR="$with_copyright_year"
20109   else
20110     COPYRIGHT_YEAR=`date +'%Y'`
20111   fi
20112 
20113 
20114   if test "x$JDK_UPDATE_VERSION" != x; then
20115     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20116   else
20117     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20118   fi
20119 
20120 
20121   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20122 
20123 
20124 
20125 ###############################################################################
20126 #
20127 # Setup BootJDK, used to bootstrap the build.
20128 #
20129 ###############################################################################
20130 
20131 
20132   BOOT_JDK_FOUND=no
20133 
20134 # Check whether --with-boot-jdk was given.
20135 if test "${with_boot_jdk+set}" = set; then :
20136   withval=$with_boot_jdk;
20137 fi
20138 
20139 
20140   # We look for the Boot JDK through various means, going from more certain to
20141   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20142   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20143   # must check if this is indeed valid; otherwise we'll continue looking.
20144 
20145   # Test: Is bootjdk explicitely set by command line arguments?
20146 
20147   if test "x$BOOT_JDK_FOUND" = xno; then
20148     # Now execute the test
20149 
20150   if test "x$with_boot_jdk" != x; then
20151     BOOT_JDK=$with_boot_jdk
20152     BOOT_JDK_FOUND=maybe
20153     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20154 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20155   fi
20156 
20157 
20158     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20159     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20160       # Do we have a bin/java?
20161       if test ! -x "$BOOT_JDK/bin/java"; then
20162         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20163 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20164         BOOT_JDK_FOUND=no
20165       else
20166         # Do we have a bin/javac?
20167         if test ! -x "$BOOT_JDK/bin/javac"; then
20168           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20169 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20170           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20171 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20172           BOOT_JDK_FOUND=no
20173         else
20174           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20175           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20176 
20177           # Extra M4 quote needed to protect [] in grep expression.
20178           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20179           if test "x$FOUND_CORRECT_VERSION" = x; then
20180             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20182             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20183 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20184             BOOT_JDK_FOUND=no
20185           else
20186             # We're done! :-)
20187             BOOT_JDK_FOUND=yes
20188 
20189   # Only process if variable expands to non-empty
20190 
20191   if test "x$BOOT_JDK" != x; then
20192     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20193 
20194   # Input might be given as Windows format, start by converting to
20195   # unix format.
20196   path="$BOOT_JDK"
20197   new_path=`$CYGPATH -u "$path"`
20198 
20199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20202   # "foo.exe" is OK but "foo" is an error.
20203   #
20204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20205   # It is also a way to make sure we got the proper file name for the real test later on.
20206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20207   if test "x$test_shortpath" = x; then
20208     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20209 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20210     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20211   fi
20212 
20213   # Call helper function which possibly converts this using DOS-style short mode.
20214   # If so, the updated path is stored in $new_path.
20215 
20216   input_path="$new_path"
20217   # Check if we need to convert this using DOS-style short mode. If the path
20218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20219   # take no chances and rewrite it.
20220   # Note: m4 eats our [], so we need to use [ and ] instead.
20221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20222   if test "x$has_forbidden_chars" != x; then
20223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20227       # Going to short mode and back again did indeed matter. Since short mode is
20228       # case insensitive, let's make it lowercase to improve readability.
20229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20230       # Now convert it back to Unix-stile (cygpath)
20231       input_path=`$CYGPATH -u "$shortmode_path"`
20232       new_path="$input_path"
20233     fi
20234   fi
20235 
20236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20237   if test "x$test_cygdrive_prefix" = x; then
20238     # As a simple fix, exclude /usr/bin since it's not a real path.
20239     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20241       # a path prefixed by /cygdrive for fixpath to work.
20242       new_path="$CYGWIN_ROOT_PATH$input_path"
20243     fi
20244   fi
20245 
20246 
20247   if test "x$path" != "x$new_path"; then
20248     BOOT_JDK="$new_path"
20249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20250 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20251   fi
20252 
20253     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20254 
20255   path="$BOOT_JDK"
20256   has_colon=`$ECHO $path | $GREP ^.:`
20257   new_path="$path"
20258   if test "x$has_colon" = x; then
20259     # Not in mixed or Windows style, start by that.
20260     new_path=`cmd //c echo $path`
20261   fi
20262 
20263 
20264   input_path="$new_path"
20265   # Check if we need to convert this using DOS-style short mode. If the path
20266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20267   # take no chances and rewrite it.
20268   # Note: m4 eats our [], so we need to use [ and ] instead.
20269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20270   if test "x$has_forbidden_chars" != x; then
20271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20273   fi
20274 
20275 
20276   windows_path="$new_path"
20277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20278     unix_path=`$CYGPATH -u "$windows_path"`
20279     new_path="$unix_path"
20280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20282     new_path="$unix_path"
20283   fi
20284 
20285   if test "x$path" != "x$new_path"; then
20286     BOOT_JDK="$new_path"
20287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20288 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20289   fi
20290 
20291   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20292   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20293 
20294     else
20295       # We're on a unix platform. Hooray! :)
20296       path="$BOOT_JDK"
20297       has_space=`$ECHO "$path" | $GREP " "`
20298       if test "x$has_space" != x; then
20299         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20301         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20302       fi
20303 
20304       # Use eval to expand a potential ~
20305       eval path="$path"
20306       if test ! -f "$path" && test ! -d "$path"; then
20307         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20308       fi
20309 
20310       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20311     fi
20312   fi
20313 
20314             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20315 $as_echo_n "checking for Boot JDK... " >&6; }
20316             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20317 $as_echo "$BOOT_JDK" >&6; }
20318             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20319 $as_echo_n "checking Boot JDK version... " >&6; }
20320             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20321             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20322 $as_echo "$BOOT_JDK_VERSION" >&6; }
20323           fi # end check jdk version
20324         fi # end check javac
20325       fi # end check java
20326     fi # end check boot jdk found
20327   fi
20328 
20329   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20330     # Having specified an argument which is incorrect will produce an instant failure;
20331     # we should not go on looking
20332     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20333   fi
20334 
20335   # Test: Is bootjdk available from builddeps?
20336 
20337   if test "x$BOOT_JDK_FOUND" = xno; then
20338     # Now execute the test
20339 
20340 
20341 
20342   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20343     # Source the builddeps file again, to make sure it uses the latest variables!
20344     . $builddepsfile
20345     # Look for a target and build machine specific resource!
20346     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20347     if test "x$resource" = x; then
20348       # Ok, lets instead look for a target specific resource
20349       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20350     fi
20351     if test "x$resource" = x; then
20352       # Ok, lets instead look for a build specific resource
20353       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20354     fi
20355     if test "x$resource" = x; then
20356       # Ok, lets instead look for a generic resource
20357       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20358       resource=${builddep_bootjdk}
20359     fi
20360     if test "x$resource" != x; then
20361       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20362 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20363       # If the resource in the builddeps.conf file is an existing directory,
20364       # for example /java/linux/cups
20365       if test -d ${resource}; then
20366         depdir=${resource}
20367       else
20368 
20369   # bootjdk is for example mymodule
20370   # $resource is for example libs/general/libmymod_1_2_3.zip
20371   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20372   # $with_builddeps_dir is for example /localhome/builddeps
20373   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20374   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20375   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20376   filename=`basename $resource`
20377   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20378   filebase=${filename%%.*}
20379   extension=${filename#*.}
20380   installdir=$with_builddeps_dir/$filebase
20381   if test ! -f $installdir/$filename.unpacked; then
20382     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20383 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20384     if test ! -d $installdir; then
20385       mkdir -p $installdir
20386     fi
20387     if test ! -d $installdir; then
20388       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20389     fi
20390     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20391     touch $tmpfile
20392     if test ! -f $tmpfile; then
20393       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20394     fi
20395 
20396   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20397   # $tmpfile is the local file name for the downloaded file.
20398   VALID_TOOL=no
20399   if test "x$BDEPS_FTP" = xwget; then
20400     VALID_TOOL=yes
20401     wget -O $tmpfile $with_builddeps_server/$resource
20402   fi
20403   if test "x$BDEPS_FTP" = xlftp; then
20404     VALID_TOOL=yes
20405     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20406   fi
20407   if test "x$BDEPS_FTP" = xftp; then
20408     VALID_TOOL=yes
20409     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20410     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20411     FTPUSERPWD=${FTPSERVER%%@*}
20412     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20413       FTPUSER=${userpwd%%:*}
20414       FTPPWD=${userpwd#*@}
20415       FTPSERVER=${FTPSERVER#*@}
20416     else
20417       FTPUSER=ftp
20418       FTPPWD=ftp
20419     fi
20420     # the "pass" command does not work on some
20421     # ftp clients (read ftp.exe) but if it works,
20422     # passive mode is better!
20423     ( \
20424         echo "user $FTPUSER $FTPPWD"        ; \
20425         echo "pass"                         ; \
20426         echo "bin"                          ; \
20427         echo "get $FTPPATH $tmpfile"              ; \
20428     ) | ftp -in $FTPSERVER
20429   fi
20430   if test "x$VALID_TOOL" != xyes; then
20431     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20432   fi
20433 
20434     mv $tmpfile $installdir/$filename
20435     if test ! -s $installdir/$filename; then
20436       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20437     fi
20438     case "$extension" in
20439       zip)  echo "Unzipping $installdir/$filename..."
20440         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20441         ;;
20442       tar.gz) echo "Untaring $installdir/$filename..."
20443         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20444         ;;
20445       tgz) echo "Untaring $installdir/$filename..."
20446         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20447         ;;
20448       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20449         ;;
20450     esac
20451   fi
20452   if test -f $installdir/$filename.unpacked; then
20453     depdir=$installdir
20454   fi
20455 
20456       fi
20457       # Source the builddeps file again, because in the previous command, the depdir
20458       # was updated to point at the current build dependency install directory.
20459       . $builddepsfile
20460       # Now extract variables from the builddeps.conf files.
20461       theroot=${builddep_bootjdk_ROOT}
20462       thecflags=${builddep_bootjdk_CFLAGS}
20463       thelibs=${builddep_bootjdk_LIBS}
20464       if test "x$depdir" = x; then
20465         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20466       fi
20467       BOOT_JDK=$depdir
20468       if test "x$theroot" != x; then
20469         BOOT_JDK="$theroot"
20470       fi
20471       if test "x$thecflags" != x; then
20472         BOOT_JDK_CFLAGS="$thecflags"
20473       fi
20474       if test "x$thelibs" != x; then
20475         BOOT_JDK_LIBS="$thelibs"
20476       fi
20477       BOOT_JDK_FOUND=maybe
20478       else BOOT_JDK_FOUND=no
20479 
20480     fi
20481     else BOOT_JDK_FOUND=no
20482 
20483   fi
20484 
20485 
20486 
20487     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20488     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20489       # Do we have a bin/java?
20490       if test ! -x "$BOOT_JDK/bin/java"; then
20491         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20492 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20493         BOOT_JDK_FOUND=no
20494       else
20495         # Do we have a bin/javac?
20496         if test ! -x "$BOOT_JDK/bin/javac"; then
20497           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20498 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20499           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20500 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20501           BOOT_JDK_FOUND=no
20502         else
20503           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20504           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20505 
20506           # Extra M4 quote needed to protect [] in grep expression.
20507           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20508           if test "x$FOUND_CORRECT_VERSION" = x; then
20509             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20510 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20511             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20512 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20513             BOOT_JDK_FOUND=no
20514           else
20515             # We're done! :-)
20516             BOOT_JDK_FOUND=yes
20517 
20518   # Only process if variable expands to non-empty
20519 
20520   if test "x$BOOT_JDK" != x; then
20521     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20522 
20523   # Input might be given as Windows format, start by converting to
20524   # unix format.
20525   path="$BOOT_JDK"
20526   new_path=`$CYGPATH -u "$path"`
20527 
20528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20531   # "foo.exe" is OK but "foo" is an error.
20532   #
20533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20534   # It is also a way to make sure we got the proper file name for the real test later on.
20535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20536   if test "x$test_shortpath" = x; then
20537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20538 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20539     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20540   fi
20541 
20542   # Call helper function which possibly converts this using DOS-style short mode.
20543   # If so, the updated path is stored in $new_path.
20544 
20545   input_path="$new_path"
20546   # Check if we need to convert this using DOS-style short mode. If the path
20547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20548   # take no chances and rewrite it.
20549   # Note: m4 eats our [], so we need to use [ and ] instead.
20550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20551   if test "x$has_forbidden_chars" != x; then
20552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20556       # Going to short mode and back again did indeed matter. Since short mode is
20557       # case insensitive, let's make it lowercase to improve readability.
20558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20559       # Now convert it back to Unix-stile (cygpath)
20560       input_path=`$CYGPATH -u "$shortmode_path"`
20561       new_path="$input_path"
20562     fi
20563   fi
20564 
20565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20566   if test "x$test_cygdrive_prefix" = x; then
20567     # As a simple fix, exclude /usr/bin since it's not a real path.
20568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20570       # a path prefixed by /cygdrive for fixpath to work.
20571       new_path="$CYGWIN_ROOT_PATH$input_path"
20572     fi
20573   fi
20574 
20575 
20576   if test "x$path" != "x$new_path"; then
20577     BOOT_JDK="$new_path"
20578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20579 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20580   fi
20581 
20582     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20583 
20584   path="$BOOT_JDK"
20585   has_colon=`$ECHO $path | $GREP ^.:`
20586   new_path="$path"
20587   if test "x$has_colon" = x; then
20588     # Not in mixed or Windows style, start by that.
20589     new_path=`cmd //c echo $path`
20590   fi
20591 
20592 
20593   input_path="$new_path"
20594   # Check if we need to convert this using DOS-style short mode. If the path
20595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20596   # take no chances and rewrite it.
20597   # Note: m4 eats our [], so we need to use [ and ] instead.
20598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20599   if test "x$has_forbidden_chars" != x; then
20600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20602   fi
20603 
20604 
20605   windows_path="$new_path"
20606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20607     unix_path=`$CYGPATH -u "$windows_path"`
20608     new_path="$unix_path"
20609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20611     new_path="$unix_path"
20612   fi
20613 
20614   if test "x$path" != "x$new_path"; then
20615     BOOT_JDK="$new_path"
20616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20617 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20618   fi
20619 
20620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20622 
20623     else
20624       # We're on a unix platform. Hooray! :)
20625       path="$BOOT_JDK"
20626       has_space=`$ECHO "$path" | $GREP " "`
20627       if test "x$has_space" != x; then
20628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20629 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20630         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20631       fi
20632 
20633       # Use eval to expand a potential ~
20634       eval path="$path"
20635       if test ! -f "$path" && test ! -d "$path"; then
20636         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20637       fi
20638 
20639       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20640     fi
20641   fi
20642 
20643             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20644 $as_echo_n "checking for Boot JDK... " >&6; }
20645             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20646 $as_echo "$BOOT_JDK" >&6; }
20647             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20648 $as_echo_n "checking Boot JDK version... " >&6; }
20649             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20650             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20651 $as_echo "$BOOT_JDK_VERSION" >&6; }
20652           fi # end check jdk version
20653         fi # end check javac
20654       fi # end check java
20655     fi # end check boot jdk found
20656   fi
20657 
20658 
20659   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20660 
20661   if test "x$BOOT_JDK_FOUND" = xno; then
20662     # Now execute the test
20663 
20664   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20665     # First check at user selected default
20666 
20667   if test "x$BOOT_JDK_FOUND" = xno; then
20668     # Now execute the test
20669 
20670   if test -x /usr/libexec/java_home; then
20671     BOOT_JDK=`/usr/libexec/java_home `
20672     BOOT_JDK_FOUND=maybe
20673     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20674 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20675   fi
20676 
20677 
20678     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20679     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20680       # Do we have a bin/java?
20681       if test ! -x "$BOOT_JDK/bin/java"; then
20682         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20684         BOOT_JDK_FOUND=no
20685       else
20686         # Do we have a bin/javac?
20687         if test ! -x "$BOOT_JDK/bin/javac"; then
20688           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20689 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20690           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20691 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20692           BOOT_JDK_FOUND=no
20693         else
20694           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20695           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20696 
20697           # Extra M4 quote needed to protect [] in grep expression.
20698           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20699           if test "x$FOUND_CORRECT_VERSION" = x; then
20700             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20702             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20703 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20704             BOOT_JDK_FOUND=no
20705           else
20706             # We're done! :-)
20707             BOOT_JDK_FOUND=yes
20708 
20709   # Only process if variable expands to non-empty
20710 
20711   if test "x$BOOT_JDK" != x; then
20712     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20713 
20714   # Input might be given as Windows format, start by converting to
20715   # unix format.
20716   path="$BOOT_JDK"
20717   new_path=`$CYGPATH -u "$path"`
20718 
20719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20722   # "foo.exe" is OK but "foo" is an error.
20723   #
20724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20725   # It is also a way to make sure we got the proper file name for the real test later on.
20726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20727   if test "x$test_shortpath" = x; then
20728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20729 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20730     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20731   fi
20732 
20733   # Call helper function which possibly converts this using DOS-style short mode.
20734   # If so, the updated path is stored in $new_path.
20735 
20736   input_path="$new_path"
20737   # Check if we need to convert this using DOS-style short mode. If the path
20738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20739   # take no chances and rewrite it.
20740   # Note: m4 eats our [], so we need to use [ and ] instead.
20741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20742   if test "x$has_forbidden_chars" != x; then
20743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20747       # Going to short mode and back again did indeed matter. Since short mode is
20748       # case insensitive, let's make it lowercase to improve readability.
20749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20750       # Now convert it back to Unix-stile (cygpath)
20751       input_path=`$CYGPATH -u "$shortmode_path"`
20752       new_path="$input_path"
20753     fi
20754   fi
20755 
20756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20757   if test "x$test_cygdrive_prefix" = x; then
20758     # As a simple fix, exclude /usr/bin since it's not a real path.
20759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20761       # a path prefixed by /cygdrive for fixpath to work.
20762       new_path="$CYGWIN_ROOT_PATH$input_path"
20763     fi
20764   fi
20765 
20766 
20767   if test "x$path" != "x$new_path"; then
20768     BOOT_JDK="$new_path"
20769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20770 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20771   fi
20772 
20773     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20774 
20775   path="$BOOT_JDK"
20776   has_colon=`$ECHO $path | $GREP ^.:`
20777   new_path="$path"
20778   if test "x$has_colon" = x; then
20779     # Not in mixed or Windows style, start by that.
20780     new_path=`cmd //c echo $path`
20781   fi
20782 
20783 
20784   input_path="$new_path"
20785   # Check if we need to convert this using DOS-style short mode. If the path
20786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20787   # take no chances and rewrite it.
20788   # Note: m4 eats our [], so we need to use [ and ] instead.
20789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20790   if test "x$has_forbidden_chars" != x; then
20791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20793   fi
20794 
20795 
20796   windows_path="$new_path"
20797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20798     unix_path=`$CYGPATH -u "$windows_path"`
20799     new_path="$unix_path"
20800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20802     new_path="$unix_path"
20803   fi
20804 
20805   if test "x$path" != "x$new_path"; then
20806     BOOT_JDK="$new_path"
20807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20808 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20809   fi
20810 
20811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20813 
20814     else
20815       # We're on a unix platform. Hooray! :)
20816       path="$BOOT_JDK"
20817       has_space=`$ECHO "$path" | $GREP " "`
20818       if test "x$has_space" != x; then
20819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20820 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20821         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20822       fi
20823 
20824       # Use eval to expand a potential ~
20825       eval path="$path"
20826       if test ! -f "$path" && test ! -d "$path"; then
20827         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20828       fi
20829 
20830       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20831     fi
20832   fi
20833 
20834             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20835 $as_echo_n "checking for Boot JDK... " >&6; }
20836             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20837 $as_echo "$BOOT_JDK" >&6; }
20838             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20839 $as_echo_n "checking Boot JDK version... " >&6; }
20840             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20842 $as_echo "$BOOT_JDK_VERSION" >&6; }
20843           fi # end check jdk version
20844         fi # end check javac
20845       fi # end check java
20846     fi # end check boot jdk found
20847   fi
20848 
20849     # If that did not work out (e.g. too old), try explicit versions instead
20850 
20851   if test "x$BOOT_JDK_FOUND" = xno; then
20852     # Now execute the test
20853 
20854   if test -x /usr/libexec/java_home; then
20855     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20856     BOOT_JDK_FOUND=maybe
20857     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20858 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20859   fi
20860 
20861 
20862     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20863     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20864       # Do we have a bin/java?
20865       if test ! -x "$BOOT_JDK/bin/java"; then
20866         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20868         BOOT_JDK_FOUND=no
20869       else
20870         # Do we have a bin/javac?
20871         if test ! -x "$BOOT_JDK/bin/javac"; then
20872           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20874           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20875 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20876           BOOT_JDK_FOUND=no
20877         else
20878           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20879           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20880 
20881           # Extra M4 quote needed to protect [] in grep expression.
20882           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20883           if test "x$FOUND_CORRECT_VERSION" = x; then
20884             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20885 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20886             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20887 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20888             BOOT_JDK_FOUND=no
20889           else
20890             # We're done! :-)
20891             BOOT_JDK_FOUND=yes
20892 
20893   # Only process if variable expands to non-empty
20894 
20895   if test "x$BOOT_JDK" != x; then
20896     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20897 
20898   # Input might be given as Windows format, start by converting to
20899   # unix format.
20900   path="$BOOT_JDK"
20901   new_path=`$CYGPATH -u "$path"`
20902 
20903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20906   # "foo.exe" is OK but "foo" is an error.
20907   #
20908   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20909   # It is also a way to make sure we got the proper file name for the real test later on.
20910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20911   if test "x$test_shortpath" = x; then
20912     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20913 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20914     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20915   fi
20916 
20917   # Call helper function which possibly converts this using DOS-style short mode.
20918   # If so, the updated path is stored in $new_path.
20919 
20920   input_path="$new_path"
20921   # Check if we need to convert this using DOS-style short mode. If the path
20922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20923   # take no chances and rewrite it.
20924   # Note: m4 eats our [], so we need to use [ and ] instead.
20925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20926   if test "x$has_forbidden_chars" != x; then
20927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20931       # Going to short mode and back again did indeed matter. Since short mode is
20932       # case insensitive, let's make it lowercase to improve readability.
20933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20934       # Now convert it back to Unix-stile (cygpath)
20935       input_path=`$CYGPATH -u "$shortmode_path"`
20936       new_path="$input_path"
20937     fi
20938   fi
20939 
20940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20941   if test "x$test_cygdrive_prefix" = x; then
20942     # As a simple fix, exclude /usr/bin since it's not a real path.
20943     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20945       # a path prefixed by /cygdrive for fixpath to work.
20946       new_path="$CYGWIN_ROOT_PATH$input_path"
20947     fi
20948   fi
20949 
20950 
20951   if test "x$path" != "x$new_path"; then
20952     BOOT_JDK="$new_path"
20953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20954 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20955   fi
20956 
20957     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20958 
20959   path="$BOOT_JDK"
20960   has_colon=`$ECHO $path | $GREP ^.:`
20961   new_path="$path"
20962   if test "x$has_colon" = x; then
20963     # Not in mixed or Windows style, start by that.
20964     new_path=`cmd //c echo $path`
20965   fi
20966 
20967 
20968   input_path="$new_path"
20969   # Check if we need to convert this using DOS-style short mode. If the path
20970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20971   # take no chances and rewrite it.
20972   # Note: m4 eats our [], so we need to use [ and ] instead.
20973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20974   if test "x$has_forbidden_chars" != x; then
20975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20976     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20977   fi
20978 
20979 
20980   windows_path="$new_path"
20981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20982     unix_path=`$CYGPATH -u "$windows_path"`
20983     new_path="$unix_path"
20984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20986     new_path="$unix_path"
20987   fi
20988 
20989   if test "x$path" != "x$new_path"; then
20990     BOOT_JDK="$new_path"
20991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20992 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20993   fi
20994 
20995   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20996   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20997 
20998     else
20999       # We're on a unix platform. Hooray! :)
21000       path="$BOOT_JDK"
21001       has_space=`$ECHO "$path" | $GREP " "`
21002       if test "x$has_space" != x; then
21003         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21004 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21005         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21006       fi
21007 
21008       # Use eval to expand a potential ~
21009       eval path="$path"
21010       if test ! -f "$path" && test ! -d "$path"; then
21011         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21012       fi
21013 
21014       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21015     fi
21016   fi
21017 
21018             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21019 $as_echo_n "checking for Boot JDK... " >&6; }
21020             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21021 $as_echo "$BOOT_JDK" >&6; }
21022             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21023 $as_echo_n "checking Boot JDK version... " >&6; }
21024             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21025             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21026 $as_echo "$BOOT_JDK_VERSION" >&6; }
21027           fi # end check jdk version
21028         fi # end check javac
21029       fi # end check java
21030     fi # end check boot jdk found
21031   fi
21032 
21033 
21034   if test "x$BOOT_JDK_FOUND" = xno; then
21035     # Now execute the test
21036 
21037   if test -x /usr/libexec/java_home; then
21038     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21039     BOOT_JDK_FOUND=maybe
21040     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21041 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21042   fi
21043 
21044 
21045     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21046     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21047       # Do we have a bin/java?
21048       if test ! -x "$BOOT_JDK/bin/java"; then
21049         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21051         BOOT_JDK_FOUND=no
21052       else
21053         # Do we have a bin/javac?
21054         if test ! -x "$BOOT_JDK/bin/javac"; then
21055           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21057           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21058 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21059           BOOT_JDK_FOUND=no
21060         else
21061           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21062           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21063 
21064           # Extra M4 quote needed to protect [] in grep expression.
21065           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21066           if test "x$FOUND_CORRECT_VERSION" = x; then
21067             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21069             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21070 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21071             BOOT_JDK_FOUND=no
21072           else
21073             # We're done! :-)
21074             BOOT_JDK_FOUND=yes
21075 
21076   # Only process if variable expands to non-empty
21077 
21078   if test "x$BOOT_JDK" != x; then
21079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21080 
21081   # Input might be given as Windows format, start by converting to
21082   # unix format.
21083   path="$BOOT_JDK"
21084   new_path=`$CYGPATH -u "$path"`
21085 
21086   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21087   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21088   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21089   # "foo.exe" is OK but "foo" is an error.
21090   #
21091   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21092   # It is also a way to make sure we got the proper file name for the real test later on.
21093   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21094   if test "x$test_shortpath" = x; then
21095     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21096 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21097     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21098   fi
21099 
21100   # Call helper function which possibly converts this using DOS-style short mode.
21101   # If so, the updated path is stored in $new_path.
21102 
21103   input_path="$new_path"
21104   # Check if we need to convert this using DOS-style short mode. If the path
21105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21106   # take no chances and rewrite it.
21107   # Note: m4 eats our [], so we need to use [ and ] instead.
21108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21109   if test "x$has_forbidden_chars" != x; then
21110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21114       # Going to short mode and back again did indeed matter. Since short mode is
21115       # case insensitive, let's make it lowercase to improve readability.
21116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21117       # Now convert it back to Unix-stile (cygpath)
21118       input_path=`$CYGPATH -u "$shortmode_path"`
21119       new_path="$input_path"
21120     fi
21121   fi
21122 
21123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21124   if test "x$test_cygdrive_prefix" = x; then
21125     # As a simple fix, exclude /usr/bin since it's not a real path.
21126     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21128       # a path prefixed by /cygdrive for fixpath to work.
21129       new_path="$CYGWIN_ROOT_PATH$input_path"
21130     fi
21131   fi
21132 
21133 
21134   if test "x$path" != "x$new_path"; then
21135     BOOT_JDK="$new_path"
21136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21138   fi
21139 
21140     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21141 
21142   path="$BOOT_JDK"
21143   has_colon=`$ECHO $path | $GREP ^.:`
21144   new_path="$path"
21145   if test "x$has_colon" = x; then
21146     # Not in mixed or Windows style, start by that.
21147     new_path=`cmd //c echo $path`
21148   fi
21149 
21150 
21151   input_path="$new_path"
21152   # Check if we need to convert this using DOS-style short mode. If the path
21153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21154   # take no chances and rewrite it.
21155   # Note: m4 eats our [], so we need to use [ and ] instead.
21156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21157   if test "x$has_forbidden_chars" != x; then
21158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21159     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21160   fi
21161 
21162 
21163   windows_path="$new_path"
21164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21165     unix_path=`$CYGPATH -u "$windows_path"`
21166     new_path="$unix_path"
21167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21169     new_path="$unix_path"
21170   fi
21171 
21172   if test "x$path" != "x$new_path"; then
21173     BOOT_JDK="$new_path"
21174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21175 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21176   fi
21177 
21178   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21179   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21180 
21181     else
21182       # We're on a unix platform. Hooray! :)
21183       path="$BOOT_JDK"
21184       has_space=`$ECHO "$path" | $GREP " "`
21185       if test "x$has_space" != x; then
21186         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21187 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21188         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21189       fi
21190 
21191       # Use eval to expand a potential ~
21192       eval path="$path"
21193       if test ! -f "$path" && test ! -d "$path"; then
21194         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21195       fi
21196 
21197       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21198     fi
21199   fi
21200 
21201             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21202 $as_echo_n "checking for Boot JDK... " >&6; }
21203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21204 $as_echo "$BOOT_JDK" >&6; }
21205             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21206 $as_echo_n "checking Boot JDK version... " >&6; }
21207             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21208             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21209 $as_echo "$BOOT_JDK_VERSION" >&6; }
21210           fi # end check jdk version
21211         fi # end check javac
21212       fi # end check java
21213     fi # end check boot jdk found
21214   fi
21215 
21216 
21217   if test "x$BOOT_JDK_FOUND" = xno; then
21218     # Now execute the test
21219 
21220   if test -x /usr/libexec/java_home; then
21221     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21222     BOOT_JDK_FOUND=maybe
21223     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21224 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21225   fi
21226 
21227 
21228     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21229     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21230       # Do we have a bin/java?
21231       if test ! -x "$BOOT_JDK/bin/java"; then
21232         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21234         BOOT_JDK_FOUND=no
21235       else
21236         # Do we have a bin/javac?
21237         if test ! -x "$BOOT_JDK/bin/javac"; then
21238           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21239 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21240           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21241 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21242           BOOT_JDK_FOUND=no
21243         else
21244           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21245           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21246 
21247           # Extra M4 quote needed to protect [] in grep expression.
21248           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21249           if test "x$FOUND_CORRECT_VERSION" = x; then
21250             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21252             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21253 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21254             BOOT_JDK_FOUND=no
21255           else
21256             # We're done! :-)
21257             BOOT_JDK_FOUND=yes
21258 
21259   # Only process if variable expands to non-empty
21260 
21261   if test "x$BOOT_JDK" != x; then
21262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21263 
21264   # Input might be given as Windows format, start by converting to
21265   # unix format.
21266   path="$BOOT_JDK"
21267   new_path=`$CYGPATH -u "$path"`
21268 
21269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21272   # "foo.exe" is OK but "foo" is an error.
21273   #
21274   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21275   # It is also a way to make sure we got the proper file name for the real test later on.
21276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21277   if test "x$test_shortpath" = x; then
21278     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21279 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21280     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21281   fi
21282 
21283   # Call helper function which possibly converts this using DOS-style short mode.
21284   # If so, the updated path is stored in $new_path.
21285 
21286   input_path="$new_path"
21287   # Check if we need to convert this using DOS-style short mode. If the path
21288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21289   # take no chances and rewrite it.
21290   # Note: m4 eats our [], so we need to use [ and ] instead.
21291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21292   if test "x$has_forbidden_chars" != x; then
21293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21294     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21295     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21296     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21297       # Going to short mode and back again did indeed matter. Since short mode is
21298       # case insensitive, let's make it lowercase to improve readability.
21299       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21300       # Now convert it back to Unix-stile (cygpath)
21301       input_path=`$CYGPATH -u "$shortmode_path"`
21302       new_path="$input_path"
21303     fi
21304   fi
21305 
21306   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21307   if test "x$test_cygdrive_prefix" = x; then
21308     # As a simple fix, exclude /usr/bin since it's not a real path.
21309     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21310       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21311       # a path prefixed by /cygdrive for fixpath to work.
21312       new_path="$CYGWIN_ROOT_PATH$input_path"
21313     fi
21314   fi
21315 
21316 
21317   if test "x$path" != "x$new_path"; then
21318     BOOT_JDK="$new_path"
21319     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21320 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21321   fi
21322 
21323     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21324 
21325   path="$BOOT_JDK"
21326   has_colon=`$ECHO $path | $GREP ^.:`
21327   new_path="$path"
21328   if test "x$has_colon" = x; then
21329     # Not in mixed or Windows style, start by that.
21330     new_path=`cmd //c echo $path`
21331   fi
21332 
21333 
21334   input_path="$new_path"
21335   # Check if we need to convert this using DOS-style short mode. If the path
21336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21337   # take no chances and rewrite it.
21338   # Note: m4 eats our [], so we need to use [ and ] instead.
21339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21340   if test "x$has_forbidden_chars" != x; then
21341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21342     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21343   fi
21344 
21345 
21346   windows_path="$new_path"
21347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21348     unix_path=`$CYGPATH -u "$windows_path"`
21349     new_path="$unix_path"
21350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21352     new_path="$unix_path"
21353   fi
21354 
21355   if test "x$path" != "x$new_path"; then
21356     BOOT_JDK="$new_path"
21357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21358 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21359   fi
21360 
21361   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21362   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21363 
21364     else
21365       # We're on a unix platform. Hooray! :)
21366       path="$BOOT_JDK"
21367       has_space=`$ECHO "$path" | $GREP " "`
21368       if test "x$has_space" != x; then
21369         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21370 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21371         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21372       fi
21373 
21374       # Use eval to expand a potential ~
21375       eval path="$path"
21376       if test ! -f "$path" && test ! -d "$path"; then
21377         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21378       fi
21379 
21380       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21381     fi
21382   fi
21383 
21384             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21385 $as_echo_n "checking for Boot JDK... " >&6; }
21386             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21387 $as_echo "$BOOT_JDK" >&6; }
21388             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21389 $as_echo_n "checking Boot JDK version... " >&6; }
21390             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21391             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21392 $as_echo "$BOOT_JDK_VERSION" >&6; }
21393           fi # end check jdk version
21394         fi # end check javac
21395       fi # end check java
21396     fi # end check boot jdk found
21397   fi
21398 
21399   fi
21400 
21401 
21402     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21403     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21404       # Do we have a bin/java?
21405       if test ! -x "$BOOT_JDK/bin/java"; then
21406         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21407 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21408         BOOT_JDK_FOUND=no
21409       else
21410         # Do we have a bin/javac?
21411         if test ! -x "$BOOT_JDK/bin/javac"; then
21412           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21413 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21414           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21415 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21416           BOOT_JDK_FOUND=no
21417         else
21418           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21419           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21420 
21421           # Extra M4 quote needed to protect [] in grep expression.
21422           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21423           if test "x$FOUND_CORRECT_VERSION" = x; then
21424             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21425 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21426             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21427 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21428             BOOT_JDK_FOUND=no
21429           else
21430             # We're done! :-)
21431             BOOT_JDK_FOUND=yes
21432 
21433   # Only process if variable expands to non-empty
21434 
21435   if test "x$BOOT_JDK" != x; then
21436     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21437 
21438   # Input might be given as Windows format, start by converting to
21439   # unix format.
21440   path="$BOOT_JDK"
21441   new_path=`$CYGPATH -u "$path"`
21442 
21443   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21444   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21445   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21446   # "foo.exe" is OK but "foo" is an error.
21447   #
21448   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21449   # It is also a way to make sure we got the proper file name for the real test later on.
21450   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21451   if test "x$test_shortpath" = x; then
21452     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21453 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21454     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21455   fi
21456 
21457   # Call helper function which possibly converts this using DOS-style short mode.
21458   # If so, the updated path is stored in $new_path.
21459 
21460   input_path="$new_path"
21461   # Check if we need to convert this using DOS-style short mode. If the path
21462   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21463   # take no chances and rewrite it.
21464   # Note: m4 eats our [], so we need to use [ and ] instead.
21465   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21466   if test "x$has_forbidden_chars" != x; then
21467     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21468     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21469     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21470     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21471       # Going to short mode and back again did indeed matter. Since short mode is
21472       # case insensitive, let's make it lowercase to improve readability.
21473       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21474       # Now convert it back to Unix-stile (cygpath)
21475       input_path=`$CYGPATH -u "$shortmode_path"`
21476       new_path="$input_path"
21477     fi
21478   fi
21479 
21480   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21481   if test "x$test_cygdrive_prefix" = x; then
21482     # As a simple fix, exclude /usr/bin since it's not a real path.
21483     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21484       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21485       # a path prefixed by /cygdrive for fixpath to work.
21486       new_path="$CYGWIN_ROOT_PATH$input_path"
21487     fi
21488   fi
21489 
21490 
21491   if test "x$path" != "x$new_path"; then
21492     BOOT_JDK="$new_path"
21493     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21494 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21495   fi
21496 
21497     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21498 
21499   path="$BOOT_JDK"
21500   has_colon=`$ECHO $path | $GREP ^.:`
21501   new_path="$path"
21502   if test "x$has_colon" = x; then
21503     # Not in mixed or Windows style, start by that.
21504     new_path=`cmd //c echo $path`
21505   fi
21506 
21507 
21508   input_path="$new_path"
21509   # Check if we need to convert this using DOS-style short mode. If the path
21510   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21511   # take no chances and rewrite it.
21512   # Note: m4 eats our [], so we need to use [ and ] instead.
21513   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21514   if test "x$has_forbidden_chars" != x; then
21515     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21516     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21517   fi
21518 
21519 
21520   windows_path="$new_path"
21521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21522     unix_path=`$CYGPATH -u "$windows_path"`
21523     new_path="$unix_path"
21524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21526     new_path="$unix_path"
21527   fi
21528 
21529   if test "x$path" != "x$new_path"; then
21530     BOOT_JDK="$new_path"
21531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21532 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21533   fi
21534 
21535   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21536   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21537 
21538     else
21539       # We're on a unix platform. Hooray! :)
21540       path="$BOOT_JDK"
21541       has_space=`$ECHO "$path" | $GREP " "`
21542       if test "x$has_space" != x; then
21543         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21544 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21545         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21546       fi
21547 
21548       # Use eval to expand a potential ~
21549       eval path="$path"
21550       if test ! -f "$path" && test ! -d "$path"; then
21551         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21552       fi
21553 
21554       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21555     fi
21556   fi
21557 
21558             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21559 $as_echo_n "checking for Boot JDK... " >&6; }
21560             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21561 $as_echo "$BOOT_JDK" >&6; }
21562             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21563 $as_echo_n "checking Boot JDK version... " >&6; }
21564             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21565             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21566 $as_echo "$BOOT_JDK_VERSION" >&6; }
21567           fi # end check jdk version
21568         fi # end check javac
21569       fi # end check java
21570     fi # end check boot jdk found
21571   fi
21572 
21573 
21574   # Test: Is $JAVA_HOME set?
21575 
21576   if test "x$BOOT_JDK_FOUND" = xno; then
21577     # Now execute the test
21578 
21579   if test "x$JAVA_HOME" != x; then
21580     JAVA_HOME_PROCESSED="$JAVA_HOME"
21581 
21582   # Only process if variable expands to non-empty
21583 
21584   if test "x$JAVA_HOME_PROCESSED" != x; then
21585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21586 
21587   # Input might be given as Windows format, start by converting to
21588   # unix format.
21589   path="$JAVA_HOME_PROCESSED"
21590   new_path=`$CYGPATH -u "$path"`
21591 
21592   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21593   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21594   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21595   # "foo.exe" is OK but "foo" is an error.
21596   #
21597   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21598   # It is also a way to make sure we got the proper file name for the real test later on.
21599   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21600   if test "x$test_shortpath" = x; then
21601     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21602 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21603     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21604   fi
21605 
21606   # Call helper function which possibly converts this using DOS-style short mode.
21607   # If so, the updated path is stored in $new_path.
21608 
21609   input_path="$new_path"
21610   # Check if we need to convert this using DOS-style short mode. If the path
21611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21612   # take no chances and rewrite it.
21613   # Note: m4 eats our [], so we need to use [ and ] instead.
21614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21615   if test "x$has_forbidden_chars" != x; then
21616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21620       # Going to short mode and back again did indeed matter. Since short mode is
21621       # case insensitive, let's make it lowercase to improve readability.
21622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21623       # Now convert it back to Unix-stile (cygpath)
21624       input_path=`$CYGPATH -u "$shortmode_path"`
21625       new_path="$input_path"
21626     fi
21627   fi
21628 
21629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21630   if test "x$test_cygdrive_prefix" = x; then
21631     # As a simple fix, exclude /usr/bin since it's not a real path.
21632     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21634       # a path prefixed by /cygdrive for fixpath to work.
21635       new_path="$CYGWIN_ROOT_PATH$input_path"
21636     fi
21637   fi
21638 
21639 
21640   if test "x$path" != "x$new_path"; then
21641     JAVA_HOME_PROCESSED="$new_path"
21642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21643 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21644   fi
21645 
21646     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21647 
21648   path="$JAVA_HOME_PROCESSED"
21649   has_colon=`$ECHO $path | $GREP ^.:`
21650   new_path="$path"
21651   if test "x$has_colon" = x; then
21652     # Not in mixed or Windows style, start by that.
21653     new_path=`cmd //c echo $path`
21654   fi
21655 
21656 
21657   input_path="$new_path"
21658   # Check if we need to convert this using DOS-style short mode. If the path
21659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21660   # take no chances and rewrite it.
21661   # Note: m4 eats our [], so we need to use [ and ] instead.
21662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21663   if test "x$has_forbidden_chars" != x; then
21664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21665     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21666   fi
21667 
21668 
21669   windows_path="$new_path"
21670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21671     unix_path=`$CYGPATH -u "$windows_path"`
21672     new_path="$unix_path"
21673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21674     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21675     new_path="$unix_path"
21676   fi
21677 
21678   if test "x$path" != "x$new_path"; then
21679     JAVA_HOME_PROCESSED="$new_path"
21680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21681 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21682   fi
21683 
21684   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21685   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21686 
21687     else
21688       # We're on a unix platform. Hooray! :)
21689       path="$JAVA_HOME_PROCESSED"
21690       has_space=`$ECHO "$path" | $GREP " "`
21691       if test "x$has_space" != x; then
21692         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21693 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21694         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21695       fi
21696 
21697       # Use eval to expand a potential ~
21698       eval path="$path"
21699       if test ! -f "$path" && test ! -d "$path"; then
21700         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21701       fi
21702 
21703       JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21704     fi
21705   fi
21706 
21707     if test ! -d "$JAVA_HOME_PROCESSED"; then
21708       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21709 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21710     else
21711       # Aha, the user has set a JAVA_HOME
21712       # let us use that as the Boot JDK.
21713       BOOT_JDK="$JAVA_HOME_PROCESSED"
21714       BOOT_JDK_FOUND=maybe
21715       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21716 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21717     fi
21718   fi
21719 
21720 
21721     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21722     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21723       # Do we have a bin/java?
21724       if test ! -x "$BOOT_JDK/bin/java"; then
21725         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21726 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21727         BOOT_JDK_FOUND=no
21728       else
21729         # Do we have a bin/javac?
21730         if test ! -x "$BOOT_JDK/bin/javac"; then
21731           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21733           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21734 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21735           BOOT_JDK_FOUND=no
21736         else
21737           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21738           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21739 
21740           # Extra M4 quote needed to protect [] in grep expression.
21741           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21742           if test "x$FOUND_CORRECT_VERSION" = x; then
21743             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21744 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21745             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21746 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21747             BOOT_JDK_FOUND=no
21748           else
21749             # We're done! :-)
21750             BOOT_JDK_FOUND=yes
21751 
21752   # Only process if variable expands to non-empty
21753 
21754   if test "x$BOOT_JDK" != x; then
21755     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21756 
21757   # Input might be given as Windows format, start by converting to
21758   # unix format.
21759   path="$BOOT_JDK"
21760   new_path=`$CYGPATH -u "$path"`
21761 
21762   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21763   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21764   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21765   # "foo.exe" is OK but "foo" is an error.
21766   #
21767   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21768   # It is also a way to make sure we got the proper file name for the real test later on.
21769   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21770   if test "x$test_shortpath" = x; then
21771     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21772 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21773     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21774   fi
21775 
21776   # Call helper function which possibly converts this using DOS-style short mode.
21777   # If so, the updated path is stored in $new_path.
21778 
21779   input_path="$new_path"
21780   # Check if we need to convert this using DOS-style short mode. If the path
21781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21782   # take no chances and rewrite it.
21783   # Note: m4 eats our [], so we need to use [ and ] instead.
21784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21785   if test "x$has_forbidden_chars" != x; then
21786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21787     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21788     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21789     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21790       # Going to short mode and back again did indeed matter. Since short mode is
21791       # case insensitive, let's make it lowercase to improve readability.
21792       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21793       # Now convert it back to Unix-stile (cygpath)
21794       input_path=`$CYGPATH -u "$shortmode_path"`
21795       new_path="$input_path"
21796     fi
21797   fi
21798 
21799   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21800   if test "x$test_cygdrive_prefix" = x; then
21801     # As a simple fix, exclude /usr/bin since it's not a real path.
21802     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21803       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21804       # a path prefixed by /cygdrive for fixpath to work.
21805       new_path="$CYGWIN_ROOT_PATH$input_path"
21806     fi
21807   fi
21808 
21809 
21810   if test "x$path" != "x$new_path"; then
21811     BOOT_JDK="$new_path"
21812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21813 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21814   fi
21815 
21816     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21817 
21818   path="$BOOT_JDK"
21819   has_colon=`$ECHO $path | $GREP ^.:`
21820   new_path="$path"
21821   if test "x$has_colon" = x; then
21822     # Not in mixed or Windows style, start by that.
21823     new_path=`cmd //c echo $path`
21824   fi
21825 
21826 
21827   input_path="$new_path"
21828   # Check if we need to convert this using DOS-style short mode. If the path
21829   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21830   # take no chances and rewrite it.
21831   # Note: m4 eats our [], so we need to use [ and ] instead.
21832   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21833   if test "x$has_forbidden_chars" != x; then
21834     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21835     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21836   fi
21837 
21838 
21839   windows_path="$new_path"
21840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21841     unix_path=`$CYGPATH -u "$windows_path"`
21842     new_path="$unix_path"
21843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21845     new_path="$unix_path"
21846   fi
21847 
21848   if test "x$path" != "x$new_path"; then
21849     BOOT_JDK="$new_path"
21850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21851 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21852   fi
21853 
21854   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21855   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21856 
21857     else
21858       # We're on a unix platform. Hooray! :)
21859       path="$BOOT_JDK"
21860       has_space=`$ECHO "$path" | $GREP " "`
21861       if test "x$has_space" != x; then
21862         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21863 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21864         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21865       fi
21866 
21867       # Use eval to expand a potential ~
21868       eval path="$path"
21869       if test ! -f "$path" && test ! -d "$path"; then
21870         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21871       fi
21872 
21873       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21874     fi
21875   fi
21876 
21877             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21878 $as_echo_n "checking for Boot JDK... " >&6; }
21879             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21880 $as_echo "$BOOT_JDK" >&6; }
21881             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21882 $as_echo_n "checking Boot JDK version... " >&6; }
21883             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21884             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21885 $as_echo "$BOOT_JDK_VERSION" >&6; }
21886           fi # end check jdk version
21887         fi # end check javac
21888       fi # end check java
21889     fi # end check boot jdk found
21890   fi
21891 
21892 
21893   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21894 
21895   if test "x$BOOT_JDK_FOUND" = xno; then
21896     # Now execute the test
21897 
21898   # Extract the first word of "javac", so it can be a program name with args.
21899 set dummy javac; ac_word=$2
21900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21901 $as_echo_n "checking for $ac_word... " >&6; }
21902 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21903   $as_echo_n "(cached) " >&6
21904 else
21905   case $JAVAC_CHECK in
21906   [\\/]* | ?:[\\/]*)
21907   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21908   ;;
21909   *)
21910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21911 for as_dir in $PATH
21912 do
21913   IFS=$as_save_IFS
21914   test -z "$as_dir" && as_dir=.
21915     for ac_exec_ext in '' $ac_executable_extensions; do
21916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21917     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21919     break 2
21920   fi
21921 done
21922   done
21923 IFS=$as_save_IFS
21924 
21925   ;;
21926 esac
21927 fi
21928 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21929 if test -n "$JAVAC_CHECK"; then
21930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21931 $as_echo "$JAVAC_CHECK" >&6; }
21932 else
21933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21934 $as_echo "no" >&6; }
21935 fi
21936 
21937 
21938   # Extract the first word of "java", so it can be a program name with args.
21939 set dummy java; ac_word=$2
21940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21941 $as_echo_n "checking for $ac_word... " >&6; }
21942 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21943   $as_echo_n "(cached) " >&6
21944 else
21945   case $JAVA_CHECK in
21946   [\\/]* | ?:[\\/]*)
21947   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21948   ;;
21949   *)
21950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951 for as_dir in $PATH
21952 do
21953   IFS=$as_save_IFS
21954   test -z "$as_dir" && as_dir=.
21955     for ac_exec_ext in '' $ac_executable_extensions; do
21956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21957     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959     break 2
21960   fi
21961 done
21962   done
21963 IFS=$as_save_IFS
21964 
21965   ;;
21966 esac
21967 fi
21968 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21969 if test -n "$JAVA_CHECK"; then
21970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21971 $as_echo "$JAVA_CHECK" >&6; }
21972 else
21973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21974 $as_echo "no" >&6; }
21975 fi
21976 
21977 
21978   BINARY="$JAVAC_CHECK"
21979   if test "x$JAVAC_CHECK" = x; then
21980     BINARY="$JAVA_CHECK"
21981   fi
21982   if test "x$BINARY" != x; then
21983     # So there is a java(c) binary, it might be part of a JDK.
21984     # Lets find the JDK/JRE directory by following symbolic links.
21985     # Linux/GNU systems often have links from /usr/bin/java to
21986     # /etc/alternatives/java to the real JDK binary.
21987 
21988   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21989     # Follow a chain of symbolic links. Use readlink
21990     # where it exists, else fall back to horribly
21991     # complicated shell code.
21992     if test "x$READLINK_TESTED" != yes; then
21993       # On MacOSX there is a readlink tool with a different
21994       # purpose than the GNU readlink tool. Check the found readlink.
21995       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21996       if test "x$ISGNU" = x; then
21997         # A readlink that we do not know how to use.
21998         # Are there other non-GNU readlinks out there?
21999         READLINK_TESTED=yes
22000         READLINK=
22001       fi
22002     fi
22003 
22004     if test "x$READLINK" != x; then
22005       BINARY=`$READLINK -f $BINARY`
22006     else
22007       # Save the current directory for restoring afterwards
22008       STARTDIR=$PWD
22009       COUNTER=0
22010       sym_link_dir=`$DIRNAME $BINARY`
22011       sym_link_file=`$BASENAME $BINARY`
22012       cd $sym_link_dir
22013       # Use -P flag to resolve symlinks in directories.
22014       cd `$THEPWDCMD -P`
22015       sym_link_dir=`$THEPWDCMD -P`
22016       # Resolve file symlinks
22017       while test $COUNTER -lt 20; do
22018         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22019         if test "x$ISLINK" == x; then
22020           # This is not a symbolic link! We are done!
22021           break
22022         fi
22023         # Again resolve directory symlinks since the target of the just found
22024         # link could be in a different directory
22025         cd `$DIRNAME $ISLINK`
22026         sym_link_dir=`$THEPWDCMD -P`
22027         sym_link_file=`$BASENAME $ISLINK`
22028         let COUNTER=COUNTER+1
22029       done
22030       cd $STARTDIR
22031       BINARY=$sym_link_dir/$sym_link_file
22032     fi
22033   fi
22034 
22035     BOOT_JDK=`dirname "$BINARY"`
22036     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22037     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22038       # Looks like we found ourselves an JDK
22039       BOOT_JDK_FOUND=maybe
22040       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22041 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22042     fi
22043   fi
22044 
22045 
22046     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22047     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22048       # Do we have a bin/java?
22049       if test ! -x "$BOOT_JDK/bin/java"; then
22050         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22052         BOOT_JDK_FOUND=no
22053       else
22054         # Do we have a bin/javac?
22055         if test ! -x "$BOOT_JDK/bin/javac"; then
22056           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22057 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22058           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22059 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22060           BOOT_JDK_FOUND=no
22061         else
22062           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22063           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22064 
22065           # Extra M4 quote needed to protect [] in grep expression.
22066           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22067           if test "x$FOUND_CORRECT_VERSION" = x; then
22068             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22070             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22071 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22072             BOOT_JDK_FOUND=no
22073           else
22074             # We're done! :-)
22075             BOOT_JDK_FOUND=yes
22076 
22077   # Only process if variable expands to non-empty
22078 
22079   if test "x$BOOT_JDK" != x; then
22080     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22081 
22082   # Input might be given as Windows format, start by converting to
22083   # unix format.
22084   path="$BOOT_JDK"
22085   new_path=`$CYGPATH -u "$path"`
22086 
22087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22090   # "foo.exe" is OK but "foo" is an error.
22091   #
22092   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22093   # It is also a way to make sure we got the proper file name for the real test later on.
22094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22095   if test "x$test_shortpath" = x; then
22096     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22098     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22099   fi
22100 
22101   # Call helper function which possibly converts this using DOS-style short mode.
22102   # If so, the updated path is stored in $new_path.
22103 
22104   input_path="$new_path"
22105   # Check if we need to convert this using DOS-style short mode. If the path
22106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22107   # take no chances and rewrite it.
22108   # Note: m4 eats our [], so we need to use [ and ] instead.
22109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22110   if test "x$has_forbidden_chars" != x; then
22111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22115       # Going to short mode and back again did indeed matter. Since short mode is
22116       # case insensitive, let's make it lowercase to improve readability.
22117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22118       # Now convert it back to Unix-stile (cygpath)
22119       input_path=`$CYGPATH -u "$shortmode_path"`
22120       new_path="$input_path"
22121     fi
22122   fi
22123 
22124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22125   if test "x$test_cygdrive_prefix" = x; then
22126     # As a simple fix, exclude /usr/bin since it's not a real path.
22127     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22129       # a path prefixed by /cygdrive for fixpath to work.
22130       new_path="$CYGWIN_ROOT_PATH$input_path"
22131     fi
22132   fi
22133 
22134 
22135   if test "x$path" != "x$new_path"; then
22136     BOOT_JDK="$new_path"
22137     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22138 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22139   fi
22140 
22141     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22142 
22143   path="$BOOT_JDK"
22144   has_colon=`$ECHO $path | $GREP ^.:`
22145   new_path="$path"
22146   if test "x$has_colon" = x; then
22147     # Not in mixed or Windows style, start by that.
22148     new_path=`cmd //c echo $path`
22149   fi
22150 
22151 
22152   input_path="$new_path"
22153   # Check if we need to convert this using DOS-style short mode. If the path
22154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22155   # take no chances and rewrite it.
22156   # Note: m4 eats our [], so we need to use [ and ] instead.
22157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22158   if test "x$has_forbidden_chars" != x; then
22159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22161   fi
22162 
22163 
22164   windows_path="$new_path"
22165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22166     unix_path=`$CYGPATH -u "$windows_path"`
22167     new_path="$unix_path"
22168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22170     new_path="$unix_path"
22171   fi
22172 
22173   if test "x$path" != "x$new_path"; then
22174     BOOT_JDK="$new_path"
22175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22177   fi
22178 
22179   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22180   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22181 
22182     else
22183       # We're on a unix platform. Hooray! :)
22184       path="$BOOT_JDK"
22185       has_space=`$ECHO "$path" | $GREP " "`
22186       if test "x$has_space" != x; then
22187         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22188 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22189         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22190       fi
22191 
22192       # Use eval to expand a potential ~
22193       eval path="$path"
22194       if test ! -f "$path" && test ! -d "$path"; then
22195         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22196       fi
22197 
22198       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22199     fi
22200   fi
22201 
22202             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22203 $as_echo_n "checking for Boot JDK... " >&6; }
22204             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22205 $as_echo "$BOOT_JDK" >&6; }
22206             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22207 $as_echo_n "checking Boot JDK version... " >&6; }
22208             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22210 $as_echo "$BOOT_JDK_VERSION" >&6; }
22211           fi # end check jdk version
22212         fi # end check javac
22213       fi # end check java
22214     fi # end check boot jdk found
22215   fi
22216 
22217 
22218   # Test: Is there a JDK installed in default, well-known locations?
22219 
22220   if test "x$BOOT_JDK_FOUND" = xno; then
22221     # Now execute the test
22222 
22223   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22224 
22225   if test "x$BOOT_JDK_FOUND" = xno; then
22226     # Now execute the test
22227 
22228   if test "x$ProgramW6432" != x; then
22229     VIRTUAL_DIR="$ProgramW6432/Java"
22230 
22231   windows_path="$VIRTUAL_DIR"
22232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22233     unix_path=`$CYGPATH -u "$windows_path"`
22234     VIRTUAL_DIR="$unix_path"
22235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22237     VIRTUAL_DIR="$unix_path"
22238   fi
22239 
22240 
22241   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22242   BOOT_JDK_SUFFIX=""
22243   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22244   if test "x$ALL_JDKS_FOUND" != x; then
22245     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22246 
22247   if test "x$BOOT_JDK_FOUND" = xno; then
22248     # Now execute the test
22249 
22250         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22251         if test -d "$BOOT_JDK"; then
22252           BOOT_JDK_FOUND=maybe
22253           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22254 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22255         fi
22256 
22257 
22258     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22259     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22260       # Do we have a bin/java?
22261       if test ! -x "$BOOT_JDK/bin/java"; then
22262         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22263 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22264         BOOT_JDK_FOUND=no
22265       else
22266         # Do we have a bin/javac?
22267         if test ! -x "$BOOT_JDK/bin/javac"; then
22268           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22269 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22270           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22271 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22272           BOOT_JDK_FOUND=no
22273         else
22274           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22275           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22276 
22277           # Extra M4 quote needed to protect [] in grep expression.
22278           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22279           if test "x$FOUND_CORRECT_VERSION" = x; then
22280             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22281 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22282             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22283 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22284             BOOT_JDK_FOUND=no
22285           else
22286             # We're done! :-)
22287             BOOT_JDK_FOUND=yes
22288 
22289   # Only process if variable expands to non-empty
22290 
22291   if test "x$BOOT_JDK" != x; then
22292     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22293 
22294   # Input might be given as Windows format, start by converting to
22295   # unix format.
22296   path="$BOOT_JDK"
22297   new_path=`$CYGPATH -u "$path"`
22298 
22299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22302   # "foo.exe" is OK but "foo" is an error.
22303   #
22304   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22305   # It is also a way to make sure we got the proper file name for the real test later on.
22306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22307   if test "x$test_shortpath" = x; then
22308     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22309 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22310     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22311   fi
22312 
22313   # Call helper function which possibly converts this using DOS-style short mode.
22314   # If so, the updated path is stored in $new_path.
22315 
22316   input_path="$new_path"
22317   # Check if we need to convert this using DOS-style short mode. If the path
22318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22319   # take no chances and rewrite it.
22320   # Note: m4 eats our [], so we need to use [ and ] instead.
22321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22322   if test "x$has_forbidden_chars" != x; then
22323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22324     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22325     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22326     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22327       # Going to short mode and back again did indeed matter. Since short mode is
22328       # case insensitive, let's make it lowercase to improve readability.
22329       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22330       # Now convert it back to Unix-stile (cygpath)
22331       input_path=`$CYGPATH -u "$shortmode_path"`
22332       new_path="$input_path"
22333     fi
22334   fi
22335 
22336   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22337   if test "x$test_cygdrive_prefix" = x; then
22338     # As a simple fix, exclude /usr/bin since it's not a real path.
22339     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22340       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22341       # a path prefixed by /cygdrive for fixpath to work.
22342       new_path="$CYGWIN_ROOT_PATH$input_path"
22343     fi
22344   fi
22345 
22346 
22347   if test "x$path" != "x$new_path"; then
22348     BOOT_JDK="$new_path"
22349     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22350 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22351   fi
22352 
22353     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22354 
22355   path="$BOOT_JDK"
22356   has_colon=`$ECHO $path | $GREP ^.:`
22357   new_path="$path"
22358   if test "x$has_colon" = x; then
22359     # Not in mixed or Windows style, start by that.
22360     new_path=`cmd //c echo $path`
22361   fi
22362 
22363 
22364   input_path="$new_path"
22365   # Check if we need to convert this using DOS-style short mode. If the path
22366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22367   # take no chances and rewrite it.
22368   # Note: m4 eats our [], so we need to use [ and ] instead.
22369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22370   if test "x$has_forbidden_chars" != x; then
22371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22372     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22373   fi
22374 
22375 
22376   windows_path="$new_path"
22377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22378     unix_path=`$CYGPATH -u "$windows_path"`
22379     new_path="$unix_path"
22380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22382     new_path="$unix_path"
22383   fi
22384 
22385   if test "x$path" != "x$new_path"; then
22386     BOOT_JDK="$new_path"
22387     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22388 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22389   fi
22390 
22391   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22392   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22393 
22394     else
22395       # We're on a unix platform. Hooray! :)
22396       path="$BOOT_JDK"
22397       has_space=`$ECHO "$path" | $GREP " "`
22398       if test "x$has_space" != x; then
22399         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22400 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22401         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22402       fi
22403 
22404       # Use eval to expand a potential ~
22405       eval path="$path"
22406       if test ! -f "$path" && test ! -d "$path"; then
22407         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22408       fi
22409 
22410       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22411     fi
22412   fi
22413 
22414             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22415 $as_echo_n "checking for Boot JDK... " >&6; }
22416             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22417 $as_echo "$BOOT_JDK" >&6; }
22418             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22419 $as_echo_n "checking Boot JDK version... " >&6; }
22420             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22421             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22422 $as_echo "$BOOT_JDK_VERSION" >&6; }
22423           fi # end check jdk version
22424         fi # end check javac
22425       fi # end check java
22426     fi # end check boot jdk found
22427   fi
22428 
22429     done
22430   fi
22431 
22432   fi
22433 
22434 
22435     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22436     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22437       # Do we have a bin/java?
22438       if test ! -x "$BOOT_JDK/bin/java"; then
22439         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22440 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22441         BOOT_JDK_FOUND=no
22442       else
22443         # Do we have a bin/javac?
22444         if test ! -x "$BOOT_JDK/bin/javac"; then
22445           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22446 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22447           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22448 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22449           BOOT_JDK_FOUND=no
22450         else
22451           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22452           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22453 
22454           # Extra M4 quote needed to protect [] in grep expression.
22455           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22456           if test "x$FOUND_CORRECT_VERSION" = x; then
22457             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22458 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22459             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22460 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22461             BOOT_JDK_FOUND=no
22462           else
22463             # We're done! :-)
22464             BOOT_JDK_FOUND=yes
22465 
22466   # Only process if variable expands to non-empty
22467 
22468   if test "x$BOOT_JDK" != x; then
22469     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22470 
22471   # Input might be given as Windows format, start by converting to
22472   # unix format.
22473   path="$BOOT_JDK"
22474   new_path=`$CYGPATH -u "$path"`
22475 
22476   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22477   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22478   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22479   # "foo.exe" is OK but "foo" is an error.
22480   #
22481   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22482   # It is also a way to make sure we got the proper file name for the real test later on.
22483   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22484   if test "x$test_shortpath" = x; then
22485     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22486 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22487     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22488   fi
22489 
22490   # Call helper function which possibly converts this using DOS-style short mode.
22491   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22502     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22503     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22504       # Going to short mode and back again did indeed matter. Since short mode is
22505       # case insensitive, let's make it lowercase to improve readability.
22506       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22507       # Now convert it back to Unix-stile (cygpath)
22508       input_path=`$CYGPATH -u "$shortmode_path"`
22509       new_path="$input_path"
22510     fi
22511   fi
22512 
22513   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22514   if test "x$test_cygdrive_prefix" = x; then
22515     # As a simple fix, exclude /usr/bin since it's not a real path.
22516     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22517       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22518       # a path prefixed by /cygdrive for fixpath to work.
22519       new_path="$CYGWIN_ROOT_PATH$input_path"
22520     fi
22521   fi
22522 
22523 
22524   if test "x$path" != "x$new_path"; then
22525     BOOT_JDK="$new_path"
22526     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22527 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22528   fi
22529 
22530     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22531 
22532   path="$BOOT_JDK"
22533   has_colon=`$ECHO $path | $GREP ^.:`
22534   new_path="$path"
22535   if test "x$has_colon" = x; then
22536     # Not in mixed or Windows style, start by that.
22537     new_path=`cmd //c echo $path`
22538   fi
22539 
22540 
22541   input_path="$new_path"
22542   # Check if we need to convert this using DOS-style short mode. If the path
22543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22544   # take no chances and rewrite it.
22545   # Note: m4 eats our [], so we need to use [ and ] instead.
22546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22547   if test "x$has_forbidden_chars" != x; then
22548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22549     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22550   fi
22551 
22552 
22553   windows_path="$new_path"
22554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22555     unix_path=`$CYGPATH -u "$windows_path"`
22556     new_path="$unix_path"
22557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22559     new_path="$unix_path"
22560   fi
22561 
22562   if test "x$path" != "x$new_path"; then
22563     BOOT_JDK="$new_path"
22564     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22565 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22566   fi
22567 
22568   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22569   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22570 
22571     else
22572       # We're on a unix platform. Hooray! :)
22573       path="$BOOT_JDK"
22574       has_space=`$ECHO "$path" | $GREP " "`
22575       if test "x$has_space" != x; then
22576         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22577 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22578         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22579       fi
22580 
22581       # Use eval to expand a potential ~
22582       eval path="$path"
22583       if test ! -f "$path" && test ! -d "$path"; then
22584         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22585       fi
22586 
22587       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22588     fi
22589   fi
22590 
22591             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22592 $as_echo_n "checking for Boot JDK... " >&6; }
22593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22594 $as_echo "$BOOT_JDK" >&6; }
22595             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22596 $as_echo_n "checking Boot JDK version... " >&6; }
22597             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22598             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22599 $as_echo "$BOOT_JDK_VERSION" >&6; }
22600           fi # end check jdk version
22601         fi # end check javac
22602       fi # end check java
22603     fi # end check boot jdk found
22604   fi
22605 
22606 
22607   if test "x$BOOT_JDK_FOUND" = xno; then
22608     # Now execute the test
22609 
22610   if test "x$PROGRAMW6432" != x; then
22611     VIRTUAL_DIR="$PROGRAMW6432/Java"
22612 
22613   windows_path="$VIRTUAL_DIR"
22614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22615     unix_path=`$CYGPATH -u "$windows_path"`
22616     VIRTUAL_DIR="$unix_path"
22617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22619     VIRTUAL_DIR="$unix_path"
22620   fi
22621 
22622 
22623   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22624   BOOT_JDK_SUFFIX=""
22625   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22626   if test "x$ALL_JDKS_FOUND" != x; then
22627     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22628 
22629   if test "x$BOOT_JDK_FOUND" = xno; then
22630     # Now execute the test
22631 
22632         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22633         if test -d "$BOOT_JDK"; then
22634           BOOT_JDK_FOUND=maybe
22635           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22636 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22637         fi
22638 
22639 
22640     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22641     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22642       # Do we have a bin/java?
22643       if test ! -x "$BOOT_JDK/bin/java"; then
22644         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22645 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22646         BOOT_JDK_FOUND=no
22647       else
22648         # Do we have a bin/javac?
22649         if test ! -x "$BOOT_JDK/bin/javac"; then
22650           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22652           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22653 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22654           BOOT_JDK_FOUND=no
22655         else
22656           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22657           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22658 
22659           # Extra M4 quote needed to protect [] in grep expression.
22660           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22661           if test "x$FOUND_CORRECT_VERSION" = x; then
22662             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22663 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22664             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22665 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22666             BOOT_JDK_FOUND=no
22667           else
22668             # We're done! :-)
22669             BOOT_JDK_FOUND=yes
22670 
22671   # Only process if variable expands to non-empty
22672 
22673   if test "x$BOOT_JDK" != x; then
22674     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22675 
22676   # Input might be given as Windows format, start by converting to
22677   # unix format.
22678   path="$BOOT_JDK"
22679   new_path=`$CYGPATH -u "$path"`
22680 
22681   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22682   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22683   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22684   # "foo.exe" is OK but "foo" is an error.
22685   #
22686   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22687   # It is also a way to make sure we got the proper file name for the real test later on.
22688   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22689   if test "x$test_shortpath" = x; then
22690     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22691 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22692     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22693   fi
22694 
22695   # Call helper function which possibly converts this using DOS-style short mode.
22696   # If so, the updated path is stored in $new_path.
22697 
22698   input_path="$new_path"
22699   # Check if we need to convert this using DOS-style short mode. If the path
22700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22701   # take no chances and rewrite it.
22702   # Note: m4 eats our [], so we need to use [ and ] instead.
22703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22704   if test "x$has_forbidden_chars" != x; then
22705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22706     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22707     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22708     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22709       # Going to short mode and back again did indeed matter. Since short mode is
22710       # case insensitive, let's make it lowercase to improve readability.
22711       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22712       # Now convert it back to Unix-stile (cygpath)
22713       input_path=`$CYGPATH -u "$shortmode_path"`
22714       new_path="$input_path"
22715     fi
22716   fi
22717 
22718   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22719   if test "x$test_cygdrive_prefix" = x; then
22720     # As a simple fix, exclude /usr/bin since it's not a real path.
22721     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22722       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22723       # a path prefixed by /cygdrive for fixpath to work.
22724       new_path="$CYGWIN_ROOT_PATH$input_path"
22725     fi
22726   fi
22727 
22728 
22729   if test "x$path" != "x$new_path"; then
22730     BOOT_JDK="$new_path"
22731     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22732 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22733   fi
22734 
22735     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22736 
22737   path="$BOOT_JDK"
22738   has_colon=`$ECHO $path | $GREP ^.:`
22739   new_path="$path"
22740   if test "x$has_colon" = x; then
22741     # Not in mixed or Windows style, start by that.
22742     new_path=`cmd //c echo $path`
22743   fi
22744 
22745 
22746   input_path="$new_path"
22747   # Check if we need to convert this using DOS-style short mode. If the path
22748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22749   # take no chances and rewrite it.
22750   # Note: m4 eats our [], so we need to use [ and ] instead.
22751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22752   if test "x$has_forbidden_chars" != x; then
22753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22754     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22755   fi
22756 
22757 
22758   windows_path="$new_path"
22759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22760     unix_path=`$CYGPATH -u "$windows_path"`
22761     new_path="$unix_path"
22762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22763     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22764     new_path="$unix_path"
22765   fi
22766 
22767   if test "x$path" != "x$new_path"; then
22768     BOOT_JDK="$new_path"
22769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22770 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22771   fi
22772 
22773   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22774   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22775 
22776     else
22777       # We're on a unix platform. Hooray! :)
22778       path="$BOOT_JDK"
22779       has_space=`$ECHO "$path" | $GREP " "`
22780       if test "x$has_space" != x; then
22781         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22782 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22783         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22784       fi
22785 
22786       # Use eval to expand a potential ~
22787       eval path="$path"
22788       if test ! -f "$path" && test ! -d "$path"; then
22789         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22790       fi
22791 
22792       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22793     fi
22794   fi
22795 
22796             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22797 $as_echo_n "checking for Boot JDK... " >&6; }
22798             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22799 $as_echo "$BOOT_JDK" >&6; }
22800             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22801 $as_echo_n "checking Boot JDK version... " >&6; }
22802             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22803             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22804 $as_echo "$BOOT_JDK_VERSION" >&6; }
22805           fi # end check jdk version
22806         fi # end check javac
22807       fi # end check java
22808     fi # end check boot jdk found
22809   fi
22810 
22811     done
22812   fi
22813 
22814   fi
22815 
22816 
22817     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22818     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22819       # Do we have a bin/java?
22820       if test ! -x "$BOOT_JDK/bin/java"; then
22821         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22823         BOOT_JDK_FOUND=no
22824       else
22825         # Do we have a bin/javac?
22826         if test ! -x "$BOOT_JDK/bin/javac"; then
22827           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22828 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22829           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22830 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22831           BOOT_JDK_FOUND=no
22832         else
22833           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22834           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22835 
22836           # Extra M4 quote needed to protect [] in grep expression.
22837           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22838           if test "x$FOUND_CORRECT_VERSION" = x; then
22839             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22840 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22841             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22842 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22843             BOOT_JDK_FOUND=no
22844           else
22845             # We're done! :-)
22846             BOOT_JDK_FOUND=yes
22847 
22848   # Only process if variable expands to non-empty
22849 
22850   if test "x$BOOT_JDK" != x; then
22851     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22852 
22853   # Input might be given as Windows format, start by converting to
22854   # unix format.
22855   path="$BOOT_JDK"
22856   new_path=`$CYGPATH -u "$path"`
22857 
22858   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22859   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22860   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22861   # "foo.exe" is OK but "foo" is an error.
22862   #
22863   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22864   # It is also a way to make sure we got the proper file name for the real test later on.
22865   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22866   if test "x$test_shortpath" = x; then
22867     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22868 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22869     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22870   fi
22871 
22872   # Call helper function which possibly converts this using DOS-style short mode.
22873   # If so, the updated path is stored in $new_path.
22874 
22875   input_path="$new_path"
22876   # Check if we need to convert this using DOS-style short mode. If the path
22877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22878   # take no chances and rewrite it.
22879   # Note: m4 eats our [], so we need to use [ and ] instead.
22880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22881   if test "x$has_forbidden_chars" != x; then
22882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22883     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22884     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22885     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22886       # Going to short mode and back again did indeed matter. Since short mode is
22887       # case insensitive, let's make it lowercase to improve readability.
22888       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22889       # Now convert it back to Unix-stile (cygpath)
22890       input_path=`$CYGPATH -u "$shortmode_path"`
22891       new_path="$input_path"
22892     fi
22893   fi
22894 
22895   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22896   if test "x$test_cygdrive_prefix" = x; then
22897     # As a simple fix, exclude /usr/bin since it's not a real path.
22898     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22899       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22900       # a path prefixed by /cygdrive for fixpath to work.
22901       new_path="$CYGWIN_ROOT_PATH$input_path"
22902     fi
22903   fi
22904 
22905 
22906   if test "x$path" != "x$new_path"; then
22907     BOOT_JDK="$new_path"
22908     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22909 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22910   fi
22911 
22912     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22913 
22914   path="$BOOT_JDK"
22915   has_colon=`$ECHO $path | $GREP ^.:`
22916   new_path="$path"
22917   if test "x$has_colon" = x; then
22918     # Not in mixed or Windows style, start by that.
22919     new_path=`cmd //c echo $path`
22920   fi
22921 
22922 
22923   input_path="$new_path"
22924   # Check if we need to convert this using DOS-style short mode. If the path
22925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22926   # take no chances and rewrite it.
22927   # Note: m4 eats our [], so we need to use [ and ] instead.
22928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22929   if test "x$has_forbidden_chars" != x; then
22930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22931     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22932   fi
22933 
22934 
22935   windows_path="$new_path"
22936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22937     unix_path=`$CYGPATH -u "$windows_path"`
22938     new_path="$unix_path"
22939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22941     new_path="$unix_path"
22942   fi
22943 
22944   if test "x$path" != "x$new_path"; then
22945     BOOT_JDK="$new_path"
22946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22948   fi
22949 
22950   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22951   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22952 
22953     else
22954       # We're on a unix platform. Hooray! :)
22955       path="$BOOT_JDK"
22956       has_space=`$ECHO "$path" | $GREP " "`
22957       if test "x$has_space" != x; then
22958         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22959 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22960         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22961       fi
22962 
22963       # Use eval to expand a potential ~
22964       eval path="$path"
22965       if test ! -f "$path" && test ! -d "$path"; then
22966         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22967       fi
22968 
22969       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22970     fi
22971   fi
22972 
22973             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22974 $as_echo_n "checking for Boot JDK... " >&6; }
22975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22976 $as_echo "$BOOT_JDK" >&6; }
22977             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22978 $as_echo_n "checking Boot JDK version... " >&6; }
22979             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22980             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22981 $as_echo "$BOOT_JDK_VERSION" >&6; }
22982           fi # end check jdk version
22983         fi # end check javac
22984       fi # end check java
22985     fi # end check boot jdk found
22986   fi
22987 
22988 
22989   if test "x$BOOT_JDK_FOUND" = xno; then
22990     # Now execute the test
22991 
22992   if test "x$PROGRAMFILES" != x; then
22993     VIRTUAL_DIR="$PROGRAMFILES/Java"
22994 
22995   windows_path="$VIRTUAL_DIR"
22996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22997     unix_path=`$CYGPATH -u "$windows_path"`
22998     VIRTUAL_DIR="$unix_path"
22999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23001     VIRTUAL_DIR="$unix_path"
23002   fi
23003 
23004 
23005   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23006   BOOT_JDK_SUFFIX=""
23007   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23008   if test "x$ALL_JDKS_FOUND" != x; then
23009     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23010 
23011   if test "x$BOOT_JDK_FOUND" = xno; then
23012     # Now execute the test
23013 
23014         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23015         if test -d "$BOOT_JDK"; then
23016           BOOT_JDK_FOUND=maybe
23017           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23018 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23019         fi
23020 
23021 
23022     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23023     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23024       # Do we have a bin/java?
23025       if test ! -x "$BOOT_JDK/bin/java"; then
23026         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23027 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23028         BOOT_JDK_FOUND=no
23029       else
23030         # Do we have a bin/javac?
23031         if test ! -x "$BOOT_JDK/bin/javac"; then
23032           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23034           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23035 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23036           BOOT_JDK_FOUND=no
23037         else
23038           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23039           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23040 
23041           # Extra M4 quote needed to protect [] in grep expression.
23042           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23043           if test "x$FOUND_CORRECT_VERSION" = x; then
23044             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23045 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23046             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23047 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23048             BOOT_JDK_FOUND=no
23049           else
23050             # We're done! :-)
23051             BOOT_JDK_FOUND=yes
23052 
23053   # Only process if variable expands to non-empty
23054 
23055   if test "x$BOOT_JDK" != x; then
23056     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23057 
23058   # Input might be given as Windows format, start by converting to
23059   # unix format.
23060   path="$BOOT_JDK"
23061   new_path=`$CYGPATH -u "$path"`
23062 
23063   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23064   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23065   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23066   # "foo.exe" is OK but "foo" is an error.
23067   #
23068   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23069   # It is also a way to make sure we got the proper file name for the real test later on.
23070   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23071   if test "x$test_shortpath" = x; then
23072     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23073 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23074     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23075   fi
23076 
23077   # Call helper function which possibly converts this using DOS-style short mode.
23078   # If so, the updated path is stored in $new_path.
23079 
23080   input_path="$new_path"
23081   # Check if we need to convert this using DOS-style short mode. If the path
23082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23083   # take no chances and rewrite it.
23084   # Note: m4 eats our [], so we need to use [ and ] instead.
23085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23086   if test "x$has_forbidden_chars" != x; then
23087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23088     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23089     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23090     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23091       # Going to short mode and back again did indeed matter. Since short mode is
23092       # case insensitive, let's make it lowercase to improve readability.
23093       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23094       # Now convert it back to Unix-stile (cygpath)
23095       input_path=`$CYGPATH -u "$shortmode_path"`
23096       new_path="$input_path"
23097     fi
23098   fi
23099 
23100   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23101   if test "x$test_cygdrive_prefix" = x; then
23102     # As a simple fix, exclude /usr/bin since it's not a real path.
23103     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23104       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23105       # a path prefixed by /cygdrive for fixpath to work.
23106       new_path="$CYGWIN_ROOT_PATH$input_path"
23107     fi
23108   fi
23109 
23110 
23111   if test "x$path" != "x$new_path"; then
23112     BOOT_JDK="$new_path"
23113     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23114 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23115   fi
23116 
23117     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23118 
23119   path="$BOOT_JDK"
23120   has_colon=`$ECHO $path | $GREP ^.:`
23121   new_path="$path"
23122   if test "x$has_colon" = x; then
23123     # Not in mixed or Windows style, start by that.
23124     new_path=`cmd //c echo $path`
23125   fi
23126 
23127 
23128   input_path="$new_path"
23129   # Check if we need to convert this using DOS-style short mode. If the path
23130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23131   # take no chances and rewrite it.
23132   # Note: m4 eats our [], so we need to use [ and ] instead.
23133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23134   if test "x$has_forbidden_chars" != x; then
23135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23136     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23137   fi
23138 
23139 
23140   windows_path="$new_path"
23141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23142     unix_path=`$CYGPATH -u "$windows_path"`
23143     new_path="$unix_path"
23144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23145     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23146     new_path="$unix_path"
23147   fi
23148 
23149   if test "x$path" != "x$new_path"; then
23150     BOOT_JDK="$new_path"
23151     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23152 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23153   fi
23154 
23155   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23156   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23157 
23158     else
23159       # We're on a unix platform. Hooray! :)
23160       path="$BOOT_JDK"
23161       has_space=`$ECHO "$path" | $GREP " "`
23162       if test "x$has_space" != x; then
23163         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23164 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23165         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23166       fi
23167 
23168       # Use eval to expand a potential ~
23169       eval path="$path"
23170       if test ! -f "$path" && test ! -d "$path"; then
23171         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23172       fi
23173 
23174       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23175     fi
23176   fi
23177 
23178             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23179 $as_echo_n "checking for Boot JDK... " >&6; }
23180             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23181 $as_echo "$BOOT_JDK" >&6; }
23182             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23183 $as_echo_n "checking Boot JDK version... " >&6; }
23184             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23185             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23186 $as_echo "$BOOT_JDK_VERSION" >&6; }
23187           fi # end check jdk version
23188         fi # end check javac
23189       fi # end check java
23190     fi # end check boot jdk found
23191   fi
23192 
23193     done
23194   fi
23195 
23196   fi
23197 
23198 
23199     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23200     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23201       # Do we have a bin/java?
23202       if test ! -x "$BOOT_JDK/bin/java"; then
23203         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23204 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23205         BOOT_JDK_FOUND=no
23206       else
23207         # Do we have a bin/javac?
23208         if test ! -x "$BOOT_JDK/bin/javac"; then
23209           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23210 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23211           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23212 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23213           BOOT_JDK_FOUND=no
23214         else
23215           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23216           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23217 
23218           # Extra M4 quote needed to protect [] in grep expression.
23219           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23220           if test "x$FOUND_CORRECT_VERSION" = x; then
23221             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23222 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23223             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23224 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23225             BOOT_JDK_FOUND=no
23226           else
23227             # We're done! :-)
23228             BOOT_JDK_FOUND=yes
23229 
23230   # Only process if variable expands to non-empty
23231 
23232   if test "x$BOOT_JDK" != x; then
23233     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23234 
23235   # Input might be given as Windows format, start by converting to
23236   # unix format.
23237   path="$BOOT_JDK"
23238   new_path=`$CYGPATH -u "$path"`
23239 
23240   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23241   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23242   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23243   # "foo.exe" is OK but "foo" is an error.
23244   #
23245   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23246   # It is also a way to make sure we got the proper file name for the real test later on.
23247   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23248   if test "x$test_shortpath" = x; then
23249     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23250 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23251     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23252   fi
23253 
23254   # Call helper function which possibly converts this using DOS-style short mode.
23255   # If so, the updated path is stored in $new_path.
23256 
23257   input_path="$new_path"
23258   # Check if we need to convert this using DOS-style short mode. If the path
23259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23260   # take no chances and rewrite it.
23261   # Note: m4 eats our [], so we need to use [ and ] instead.
23262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23263   if test "x$has_forbidden_chars" != x; then
23264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23265     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23266     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23267     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23268       # Going to short mode and back again did indeed matter. Since short mode is
23269       # case insensitive, let's make it lowercase to improve readability.
23270       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23271       # Now convert it back to Unix-stile (cygpath)
23272       input_path=`$CYGPATH -u "$shortmode_path"`
23273       new_path="$input_path"
23274     fi
23275   fi
23276 
23277   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23278   if test "x$test_cygdrive_prefix" = x; then
23279     # As a simple fix, exclude /usr/bin since it's not a real path.
23280     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23281       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23282       # a path prefixed by /cygdrive for fixpath to work.
23283       new_path="$CYGWIN_ROOT_PATH$input_path"
23284     fi
23285   fi
23286 
23287 
23288   if test "x$path" != "x$new_path"; then
23289     BOOT_JDK="$new_path"
23290     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23291 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23292   fi
23293 
23294     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23295 
23296   path="$BOOT_JDK"
23297   has_colon=`$ECHO $path | $GREP ^.:`
23298   new_path="$path"
23299   if test "x$has_colon" = x; then
23300     # Not in mixed or Windows style, start by that.
23301     new_path=`cmd //c echo $path`
23302   fi
23303 
23304 
23305   input_path="$new_path"
23306   # Check if we need to convert this using DOS-style short mode. If the path
23307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23308   # take no chances and rewrite it.
23309   # Note: m4 eats our [], so we need to use [ and ] instead.
23310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23311   if test "x$has_forbidden_chars" != x; then
23312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23313     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23314   fi
23315 
23316 
23317   windows_path="$new_path"
23318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23319     unix_path=`$CYGPATH -u "$windows_path"`
23320     new_path="$unix_path"
23321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23323     new_path="$unix_path"
23324   fi
23325 
23326   if test "x$path" != "x$new_path"; then
23327     BOOT_JDK="$new_path"
23328     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23329 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23330   fi
23331 
23332   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23333   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23334 
23335     else
23336       # We're on a unix platform. Hooray! :)
23337       path="$BOOT_JDK"
23338       has_space=`$ECHO "$path" | $GREP " "`
23339       if test "x$has_space" != x; then
23340         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23341 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23342         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23343       fi
23344 
23345       # Use eval to expand a potential ~
23346       eval path="$path"
23347       if test ! -f "$path" && test ! -d "$path"; then
23348         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23349       fi
23350 
23351       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23352     fi
23353   fi
23354 
23355             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23356 $as_echo_n "checking for Boot JDK... " >&6; }
23357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23358 $as_echo "$BOOT_JDK" >&6; }
23359             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23360 $as_echo_n "checking Boot JDK version... " >&6; }
23361             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23362             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23363 $as_echo "$BOOT_JDK_VERSION" >&6; }
23364           fi # end check jdk version
23365         fi # end check javac
23366       fi # end check java
23367     fi # end check boot jdk found
23368   fi
23369 
23370 
23371   if test "x$BOOT_JDK_FOUND" = xno; then
23372     # Now execute the test
23373 
23374   if test "x$ProgramFiles" != x; then
23375     VIRTUAL_DIR="$ProgramFiles/Java"
23376 
23377   windows_path="$VIRTUAL_DIR"
23378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23379     unix_path=`$CYGPATH -u "$windows_path"`
23380     VIRTUAL_DIR="$unix_path"
23381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23383     VIRTUAL_DIR="$unix_path"
23384   fi
23385 
23386 
23387   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23388   BOOT_JDK_SUFFIX=""
23389   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23390   if test "x$ALL_JDKS_FOUND" != x; then
23391     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23392 
23393   if test "x$BOOT_JDK_FOUND" = xno; then
23394     # Now execute the test
23395 
23396         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23397         if test -d "$BOOT_JDK"; then
23398           BOOT_JDK_FOUND=maybe
23399           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23400 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23401         fi
23402 
23403 
23404     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23405     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23406       # Do we have a bin/java?
23407       if test ! -x "$BOOT_JDK/bin/java"; then
23408         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23409 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23410         BOOT_JDK_FOUND=no
23411       else
23412         # Do we have a bin/javac?
23413         if test ! -x "$BOOT_JDK/bin/javac"; then
23414           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23415 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23416           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23417 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23418           BOOT_JDK_FOUND=no
23419         else
23420           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23421           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23422 
23423           # Extra M4 quote needed to protect [] in grep expression.
23424           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23425           if test "x$FOUND_CORRECT_VERSION" = x; then
23426             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23427 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23428             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23429 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23430             BOOT_JDK_FOUND=no
23431           else
23432             # We're done! :-)
23433             BOOT_JDK_FOUND=yes
23434 
23435   # Only process if variable expands to non-empty
23436 
23437   if test "x$BOOT_JDK" != x; then
23438     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23439 
23440   # Input might be given as Windows format, start by converting to
23441   # unix format.
23442   path="$BOOT_JDK"
23443   new_path=`$CYGPATH -u "$path"`
23444 
23445   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23446   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23447   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23448   # "foo.exe" is OK but "foo" is an error.
23449   #
23450   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23451   # It is also a way to make sure we got the proper file name for the real test later on.
23452   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23453   if test "x$test_shortpath" = x; then
23454     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23455 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23456     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23457   fi
23458 
23459   # Call helper function which possibly converts this using DOS-style short mode.
23460   # If so, the updated path is stored in $new_path.
23461 
23462   input_path="$new_path"
23463   # Check if we need to convert this using DOS-style short mode. If the path
23464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23465   # take no chances and rewrite it.
23466   # Note: m4 eats our [], so we need to use [ and ] instead.
23467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23468   if test "x$has_forbidden_chars" != x; then
23469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23473       # Going to short mode and back again did indeed matter. Since short mode is
23474       # case insensitive, let's make it lowercase to improve readability.
23475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23476       # Now convert it back to Unix-stile (cygpath)
23477       input_path=`$CYGPATH -u "$shortmode_path"`
23478       new_path="$input_path"
23479     fi
23480   fi
23481 
23482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23483   if test "x$test_cygdrive_prefix" = x; then
23484     # As a simple fix, exclude /usr/bin since it's not a real path.
23485     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23487       # a path prefixed by /cygdrive for fixpath to work.
23488       new_path="$CYGWIN_ROOT_PATH$input_path"
23489     fi
23490   fi
23491 
23492 
23493   if test "x$path" != "x$new_path"; then
23494     BOOT_JDK="$new_path"
23495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23496 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23497   fi
23498 
23499     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23500 
23501   path="$BOOT_JDK"
23502   has_colon=`$ECHO $path | $GREP ^.:`
23503   new_path="$path"
23504   if test "x$has_colon" = x; then
23505     # Not in mixed or Windows style, start by that.
23506     new_path=`cmd //c echo $path`
23507   fi
23508 
23509 
23510   input_path="$new_path"
23511   # Check if we need to convert this using DOS-style short mode. If the path
23512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23513   # take no chances and rewrite it.
23514   # Note: m4 eats our [], so we need to use [ and ] instead.
23515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23516   if test "x$has_forbidden_chars" != x; then
23517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23518     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23519   fi
23520 
23521 
23522   windows_path="$new_path"
23523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23524     unix_path=`$CYGPATH -u "$windows_path"`
23525     new_path="$unix_path"
23526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23528     new_path="$unix_path"
23529   fi
23530 
23531   if test "x$path" != "x$new_path"; then
23532     BOOT_JDK="$new_path"
23533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23534 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23535   fi
23536 
23537   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23538   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23539 
23540     else
23541       # We're on a unix platform. Hooray! :)
23542       path="$BOOT_JDK"
23543       has_space=`$ECHO "$path" | $GREP " "`
23544       if test "x$has_space" != x; then
23545         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23546 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23547         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23548       fi
23549 
23550       # Use eval to expand a potential ~
23551       eval path="$path"
23552       if test ! -f "$path" && test ! -d "$path"; then
23553         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23554       fi
23555 
23556       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23557     fi
23558   fi
23559 
23560             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23561 $as_echo_n "checking for Boot JDK... " >&6; }
23562             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23563 $as_echo "$BOOT_JDK" >&6; }
23564             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23565 $as_echo_n "checking Boot JDK version... " >&6; }
23566             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23567             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23568 $as_echo "$BOOT_JDK_VERSION" >&6; }
23569           fi # end check jdk version
23570         fi # end check javac
23571       fi # end check java
23572     fi # end check boot jdk found
23573   fi
23574 
23575     done
23576   fi
23577 
23578   fi
23579 
23580 
23581     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23582     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23583       # Do we have a bin/java?
23584       if test ! -x "$BOOT_JDK/bin/java"; then
23585         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23586 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23587         BOOT_JDK_FOUND=no
23588       else
23589         # Do we have a bin/javac?
23590         if test ! -x "$BOOT_JDK/bin/javac"; then
23591           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23592 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23593           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23594 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23595           BOOT_JDK_FOUND=no
23596         else
23597           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23598           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23599 
23600           # Extra M4 quote needed to protect [] in grep expression.
23601           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23602           if test "x$FOUND_CORRECT_VERSION" = x; then
23603             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23604 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23605             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23606 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23607             BOOT_JDK_FOUND=no
23608           else
23609             # We're done! :-)
23610             BOOT_JDK_FOUND=yes
23611 
23612   # Only process if variable expands to non-empty
23613 
23614   if test "x$BOOT_JDK" != x; then
23615     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23616 
23617   # Input might be given as Windows format, start by converting to
23618   # unix format.
23619   path="$BOOT_JDK"
23620   new_path=`$CYGPATH -u "$path"`
23621 
23622   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23623   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23624   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23625   # "foo.exe" is OK but "foo" is an error.
23626   #
23627   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23628   # It is also a way to make sure we got the proper file name for the real test later on.
23629   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23630   if test "x$test_shortpath" = x; then
23631     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23632 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23633     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23634   fi
23635 
23636   # Call helper function which possibly converts this using DOS-style short mode.
23637   # If so, the updated path is stored in $new_path.
23638 
23639   input_path="$new_path"
23640   # Check if we need to convert this using DOS-style short mode. If the path
23641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23642   # take no chances and rewrite it.
23643   # Note: m4 eats our [], so we need to use [ and ] instead.
23644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23645   if test "x$has_forbidden_chars" != x; then
23646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23647     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23648     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23649     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23650       # Going to short mode and back again did indeed matter. Since short mode is
23651       # case insensitive, let's make it lowercase to improve readability.
23652       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23653       # Now convert it back to Unix-stile (cygpath)
23654       input_path=`$CYGPATH -u "$shortmode_path"`
23655       new_path="$input_path"
23656     fi
23657   fi
23658 
23659   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23660   if test "x$test_cygdrive_prefix" = x; then
23661     # As a simple fix, exclude /usr/bin since it's not a real path.
23662     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23663       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23664       # a path prefixed by /cygdrive for fixpath to work.
23665       new_path="$CYGWIN_ROOT_PATH$input_path"
23666     fi
23667   fi
23668 
23669 
23670   if test "x$path" != "x$new_path"; then
23671     BOOT_JDK="$new_path"
23672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23673 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23674   fi
23675 
23676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23677 
23678   path="$BOOT_JDK"
23679   has_colon=`$ECHO $path | $GREP ^.:`
23680   new_path="$path"
23681   if test "x$has_colon" = x; then
23682     # Not in mixed or Windows style, start by that.
23683     new_path=`cmd //c echo $path`
23684   fi
23685 
23686 
23687   input_path="$new_path"
23688   # Check if we need to convert this using DOS-style short mode. If the path
23689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23690   # take no chances and rewrite it.
23691   # Note: m4 eats our [], so we need to use [ and ] instead.
23692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23693   if test "x$has_forbidden_chars" != x; then
23694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23696   fi
23697 
23698 
23699   windows_path="$new_path"
23700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23701     unix_path=`$CYGPATH -u "$windows_path"`
23702     new_path="$unix_path"
23703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23705     new_path="$unix_path"
23706   fi
23707 
23708   if test "x$path" != "x$new_path"; then
23709     BOOT_JDK="$new_path"
23710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23711 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23712   fi
23713 
23714   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23715   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23716 
23717     else
23718       # We're on a unix platform. Hooray! :)
23719       path="$BOOT_JDK"
23720       has_space=`$ECHO "$path" | $GREP " "`
23721       if test "x$has_space" != x; then
23722         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23723 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23724         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23725       fi
23726 
23727       # Use eval to expand a potential ~
23728       eval path="$path"
23729       if test ! -f "$path" && test ! -d "$path"; then
23730         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23731       fi
23732 
23733       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23734     fi
23735   fi
23736 
23737             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23738 $as_echo_n "checking for Boot JDK... " >&6; }
23739             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23740 $as_echo "$BOOT_JDK" >&6; }
23741             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23742 $as_echo_n "checking Boot JDK version... " >&6; }
23743             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23744             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23745 $as_echo "$BOOT_JDK_VERSION" >&6; }
23746           fi # end check jdk version
23747         fi # end check javac
23748       fi # end check java
23749     fi # end check boot jdk found
23750   fi
23751 
23752 
23753   if test "x$BOOT_JDK_FOUND" = xno; then
23754     # Now execute the test
23755 
23756   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23757   BOOT_JDK_SUFFIX=""
23758   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23759   if test "x$ALL_JDKS_FOUND" != x; then
23760     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23761 
23762   if test "x$BOOT_JDK_FOUND" = xno; then
23763     # Now execute the test
23764 
23765         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23766         if test -d "$BOOT_JDK"; then
23767           BOOT_JDK_FOUND=maybe
23768           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23769 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23770         fi
23771 
23772 
23773     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23774     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23775       # Do we have a bin/java?
23776       if test ! -x "$BOOT_JDK/bin/java"; then
23777         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23779         BOOT_JDK_FOUND=no
23780       else
23781         # Do we have a bin/javac?
23782         if test ! -x "$BOOT_JDK/bin/javac"; then
23783           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23785           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23786 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23787           BOOT_JDK_FOUND=no
23788         else
23789           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23790           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23791 
23792           # Extra M4 quote needed to protect [] in grep expression.
23793           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23794           if test "x$FOUND_CORRECT_VERSION" = x; then
23795             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23797             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23798 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23799             BOOT_JDK_FOUND=no
23800           else
23801             # We're done! :-)
23802             BOOT_JDK_FOUND=yes
23803 
23804   # Only process if variable expands to non-empty
23805 
23806   if test "x$BOOT_JDK" != x; then
23807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23808 
23809   # Input might be given as Windows format, start by converting to
23810   # unix format.
23811   path="$BOOT_JDK"
23812   new_path=`$CYGPATH -u "$path"`
23813 
23814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23817   # "foo.exe" is OK but "foo" is an error.
23818   #
23819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23820   # It is also a way to make sure we got the proper file name for the real test later on.
23821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23822   if test "x$test_shortpath" = x; then
23823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23824 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23825     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23826   fi
23827 
23828   # Call helper function which possibly converts this using DOS-style short mode.
23829   # If so, the updated path is stored in $new_path.
23830 
23831   input_path="$new_path"
23832   # Check if we need to convert this using DOS-style short mode. If the path
23833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23834   # take no chances and rewrite it.
23835   # Note: m4 eats our [], so we need to use [ and ] instead.
23836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23837   if test "x$has_forbidden_chars" != x; then
23838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23842       # Going to short mode and back again did indeed matter. Since short mode is
23843       # case insensitive, let's make it lowercase to improve readability.
23844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23845       # Now convert it back to Unix-stile (cygpath)
23846       input_path=`$CYGPATH -u "$shortmode_path"`
23847       new_path="$input_path"
23848     fi
23849   fi
23850 
23851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23852   if test "x$test_cygdrive_prefix" = x; then
23853     # As a simple fix, exclude /usr/bin since it's not a real path.
23854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23856       # a path prefixed by /cygdrive for fixpath to work.
23857       new_path="$CYGWIN_ROOT_PATH$input_path"
23858     fi
23859   fi
23860 
23861 
23862   if test "x$path" != "x$new_path"; then
23863     BOOT_JDK="$new_path"
23864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23865 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23866   fi
23867 
23868     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23869 
23870   path="$BOOT_JDK"
23871   has_colon=`$ECHO $path | $GREP ^.:`
23872   new_path="$path"
23873   if test "x$has_colon" = x; then
23874     # Not in mixed or Windows style, start by that.
23875     new_path=`cmd //c echo $path`
23876   fi
23877 
23878 
23879   input_path="$new_path"
23880   # Check if we need to convert this using DOS-style short mode. If the path
23881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23882   # take no chances and rewrite it.
23883   # Note: m4 eats our [], so we need to use [ and ] instead.
23884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23885   if test "x$has_forbidden_chars" != x; then
23886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23888   fi
23889 
23890 
23891   windows_path="$new_path"
23892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23893     unix_path=`$CYGPATH -u "$windows_path"`
23894     new_path="$unix_path"
23895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23897     new_path="$unix_path"
23898   fi
23899 
23900   if test "x$path" != "x$new_path"; then
23901     BOOT_JDK="$new_path"
23902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23904   fi
23905 
23906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23908 
23909     else
23910       # We're on a unix platform. Hooray! :)
23911       path="$BOOT_JDK"
23912       has_space=`$ECHO "$path" | $GREP " "`
23913       if test "x$has_space" != x; then
23914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23916         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23917       fi
23918 
23919       # Use eval to expand a potential ~
23920       eval path="$path"
23921       if test ! -f "$path" && test ! -d "$path"; then
23922         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23923       fi
23924 
23925       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23926     fi
23927   fi
23928 
23929             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23930 $as_echo_n "checking for Boot JDK... " >&6; }
23931             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23932 $as_echo "$BOOT_JDK" >&6; }
23933             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23934 $as_echo_n "checking Boot JDK version... " >&6; }
23935             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23937 $as_echo "$BOOT_JDK_VERSION" >&6; }
23938           fi # end check jdk version
23939         fi # end check javac
23940       fi # end check java
23941     fi # end check boot jdk found
23942   fi
23943 
23944     done
23945   fi
23946 
23947 
23948     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23949     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23950       # Do we have a bin/java?
23951       if test ! -x "$BOOT_JDK/bin/java"; then
23952         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23953 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23954         BOOT_JDK_FOUND=no
23955       else
23956         # Do we have a bin/javac?
23957         if test ! -x "$BOOT_JDK/bin/javac"; then
23958           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23959 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23960           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23961 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23962           BOOT_JDK_FOUND=no
23963         else
23964           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23965           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23966 
23967           # Extra M4 quote needed to protect [] in grep expression.
23968           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23969           if test "x$FOUND_CORRECT_VERSION" = x; then
23970             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23972             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23973 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23974             BOOT_JDK_FOUND=no
23975           else
23976             # We're done! :-)
23977             BOOT_JDK_FOUND=yes
23978 
23979   # Only process if variable expands to non-empty
23980 
23981   if test "x$BOOT_JDK" != x; then
23982     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23983 
23984   # Input might be given as Windows format, start by converting to
23985   # unix format.
23986   path="$BOOT_JDK"
23987   new_path=`$CYGPATH -u "$path"`
23988 
23989   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23990   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23991   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23992   # "foo.exe" is OK but "foo" is an error.
23993   #
23994   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23995   # It is also a way to make sure we got the proper file name for the real test later on.
23996   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23997   if test "x$test_shortpath" = x; then
23998     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23999 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24000     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24001   fi
24002 
24003   # Call helper function which possibly converts this using DOS-style short mode.
24004   # If so, the updated path is stored in $new_path.
24005 
24006   input_path="$new_path"
24007   # Check if we need to convert this using DOS-style short mode. If the path
24008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24009   # take no chances and rewrite it.
24010   # Note: m4 eats our [], so we need to use [ and ] instead.
24011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24012   if test "x$has_forbidden_chars" != x; then
24013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24014     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24015     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24016     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24017       # Going to short mode and back again did indeed matter. Since short mode is
24018       # case insensitive, let's make it lowercase to improve readability.
24019       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24020       # Now convert it back to Unix-stile (cygpath)
24021       input_path=`$CYGPATH -u "$shortmode_path"`
24022       new_path="$input_path"
24023     fi
24024   fi
24025 
24026   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24027   if test "x$test_cygdrive_prefix" = x; then
24028     # As a simple fix, exclude /usr/bin since it's not a real path.
24029     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24030       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24031       # a path prefixed by /cygdrive for fixpath to work.
24032       new_path="$CYGWIN_ROOT_PATH$input_path"
24033     fi
24034   fi
24035 
24036 
24037   if test "x$path" != "x$new_path"; then
24038     BOOT_JDK="$new_path"
24039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24040 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24041   fi
24042 
24043     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24044 
24045   path="$BOOT_JDK"
24046   has_colon=`$ECHO $path | $GREP ^.:`
24047   new_path="$path"
24048   if test "x$has_colon" = x; then
24049     # Not in mixed or Windows style, start by that.
24050     new_path=`cmd //c echo $path`
24051   fi
24052 
24053 
24054   input_path="$new_path"
24055   # Check if we need to convert this using DOS-style short mode. If the path
24056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24057   # take no chances and rewrite it.
24058   # Note: m4 eats our [], so we need to use [ and ] instead.
24059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24060   if test "x$has_forbidden_chars" != x; then
24061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24063   fi
24064 
24065 
24066   windows_path="$new_path"
24067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24068     unix_path=`$CYGPATH -u "$windows_path"`
24069     new_path="$unix_path"
24070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24072     new_path="$unix_path"
24073   fi
24074 
24075   if test "x$path" != "x$new_path"; then
24076     BOOT_JDK="$new_path"
24077     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24078 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24079   fi
24080 
24081   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24082   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24083 
24084     else
24085       # We're on a unix platform. Hooray! :)
24086       path="$BOOT_JDK"
24087       has_space=`$ECHO "$path" | $GREP " "`
24088       if test "x$has_space" != x; then
24089         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24091         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24092       fi
24093 
24094       # Use eval to expand a potential ~
24095       eval path="$path"
24096       if test ! -f "$path" && test ! -d "$path"; then
24097         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24098       fi
24099 
24100       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24101     fi
24102   fi
24103 
24104             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24105 $as_echo_n "checking for Boot JDK... " >&6; }
24106             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24107 $as_echo "$BOOT_JDK" >&6; }
24108             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24109 $as_echo_n "checking Boot JDK version... " >&6; }
24110             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24111             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24112 $as_echo "$BOOT_JDK_VERSION" >&6; }
24113           fi # end check jdk version
24114         fi # end check javac
24115       fi # end check java
24116     fi # end check boot jdk found
24117   fi
24118 
24119   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24120 
24121   if test "x$BOOT_JDK_FOUND" = xno; then
24122     # Now execute the test
24123 
24124   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24125   BOOT_JDK_SUFFIX="/Contents/Home"
24126   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24127   if test "x$ALL_JDKS_FOUND" != x; then
24128     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24129 
24130   if test "x$BOOT_JDK_FOUND" = xno; then
24131     # Now execute the test
24132 
24133         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24134         if test -d "$BOOT_JDK"; then
24135           BOOT_JDK_FOUND=maybe
24136           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24137 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24138         fi
24139 
24140 
24141     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24142     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24143       # Do we have a bin/java?
24144       if test ! -x "$BOOT_JDK/bin/java"; then
24145         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24146 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24147         BOOT_JDK_FOUND=no
24148       else
24149         # Do we have a bin/javac?
24150         if test ! -x "$BOOT_JDK/bin/javac"; then
24151           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24153           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24154 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24155           BOOT_JDK_FOUND=no
24156         else
24157           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24158           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24159 
24160           # Extra M4 quote needed to protect [] in grep expression.
24161           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24162           if test "x$FOUND_CORRECT_VERSION" = x; then
24163             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24164 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24165             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24166 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24167             BOOT_JDK_FOUND=no
24168           else
24169             # We're done! :-)
24170             BOOT_JDK_FOUND=yes
24171 
24172   # Only process if variable expands to non-empty
24173 
24174   if test "x$BOOT_JDK" != x; then
24175     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24176 
24177   # Input might be given as Windows format, start by converting to
24178   # unix format.
24179   path="$BOOT_JDK"
24180   new_path=`$CYGPATH -u "$path"`
24181 
24182   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24183   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24184   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24185   # "foo.exe" is OK but "foo" is an error.
24186   #
24187   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24188   # It is also a way to make sure we got the proper file name for the real test later on.
24189   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24190   if test "x$test_shortpath" = x; then
24191     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24192 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24193     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24194   fi
24195 
24196   # Call helper function which possibly converts this using DOS-style short mode.
24197   # If so, the updated path is stored in $new_path.
24198 
24199   input_path="$new_path"
24200   # Check if we need to convert this using DOS-style short mode. If the path
24201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24202   # take no chances and rewrite it.
24203   # Note: m4 eats our [], so we need to use [ and ] instead.
24204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24205   if test "x$has_forbidden_chars" != x; then
24206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24210       # Going to short mode and back again did indeed matter. Since short mode is
24211       # case insensitive, let's make it lowercase to improve readability.
24212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24213       # Now convert it back to Unix-stile (cygpath)
24214       input_path=`$CYGPATH -u "$shortmode_path"`
24215       new_path="$input_path"
24216     fi
24217   fi
24218 
24219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24220   if test "x$test_cygdrive_prefix" = x; then
24221     # As a simple fix, exclude /usr/bin since it's not a real path.
24222     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24224       # a path prefixed by /cygdrive for fixpath to work.
24225       new_path="$CYGWIN_ROOT_PATH$input_path"
24226     fi
24227   fi
24228 
24229 
24230   if test "x$path" != "x$new_path"; then
24231     BOOT_JDK="$new_path"
24232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24233 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24234   fi
24235 
24236     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24237 
24238   path="$BOOT_JDK"
24239   has_colon=`$ECHO $path | $GREP ^.:`
24240   new_path="$path"
24241   if test "x$has_colon" = x; then
24242     # Not in mixed or Windows style, start by that.
24243     new_path=`cmd //c echo $path`
24244   fi
24245 
24246 
24247   input_path="$new_path"
24248   # Check if we need to convert this using DOS-style short mode. If the path
24249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24250   # take no chances and rewrite it.
24251   # Note: m4 eats our [], so we need to use [ and ] instead.
24252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24253   if test "x$has_forbidden_chars" != x; then
24254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24255     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24256   fi
24257 
24258 
24259   windows_path="$new_path"
24260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24261     unix_path=`$CYGPATH -u "$windows_path"`
24262     new_path="$unix_path"
24263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24265     new_path="$unix_path"
24266   fi
24267 
24268   if test "x$path" != "x$new_path"; then
24269     BOOT_JDK="$new_path"
24270     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24271 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24272   fi
24273 
24274   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24275   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24276 
24277     else
24278       # We're on a unix platform. Hooray! :)
24279       path="$BOOT_JDK"
24280       has_space=`$ECHO "$path" | $GREP " "`
24281       if test "x$has_space" != x; then
24282         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24283 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24284         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24285       fi
24286 
24287       # Use eval to expand a potential ~
24288       eval path="$path"
24289       if test ! -f "$path" && test ! -d "$path"; then
24290         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24291       fi
24292 
24293       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24294     fi
24295   fi
24296 
24297             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24298 $as_echo_n "checking for Boot JDK... " >&6; }
24299             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24300 $as_echo "$BOOT_JDK" >&6; }
24301             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24302 $as_echo_n "checking Boot JDK version... " >&6; }
24303             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24304             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24305 $as_echo "$BOOT_JDK_VERSION" >&6; }
24306           fi # end check jdk version
24307         fi # end check javac
24308       fi # end check java
24309     fi # end check boot jdk found
24310   fi
24311 
24312     done
24313   fi
24314 
24315 
24316     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24317     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24318       # Do we have a bin/java?
24319       if test ! -x "$BOOT_JDK/bin/java"; then
24320         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24322         BOOT_JDK_FOUND=no
24323       else
24324         # Do we have a bin/javac?
24325         if test ! -x "$BOOT_JDK/bin/javac"; then
24326           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24327 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24328           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24329 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24330           BOOT_JDK_FOUND=no
24331         else
24332           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24333           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24334 
24335           # Extra M4 quote needed to protect [] in grep expression.
24336           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24337           if test "x$FOUND_CORRECT_VERSION" = x; then
24338             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24340             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24341 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24342             BOOT_JDK_FOUND=no
24343           else
24344             # We're done! :-)
24345             BOOT_JDK_FOUND=yes
24346 
24347   # Only process if variable expands to non-empty
24348 
24349   if test "x$BOOT_JDK" != x; then
24350     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24351 
24352   # Input might be given as Windows format, start by converting to
24353   # unix format.
24354   path="$BOOT_JDK"
24355   new_path=`$CYGPATH -u "$path"`
24356 
24357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24360   # "foo.exe" is OK but "foo" is an error.
24361   #
24362   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24363   # It is also a way to make sure we got the proper file name for the real test later on.
24364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24365   if test "x$test_shortpath" = x; then
24366     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24367 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24368     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24369   fi
24370 
24371   # Call helper function which possibly converts this using DOS-style short mode.
24372   # If so, the updated path is stored in $new_path.
24373 
24374   input_path="$new_path"
24375   # Check if we need to convert this using DOS-style short mode. If the path
24376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24377   # take no chances and rewrite it.
24378   # Note: m4 eats our [], so we need to use [ and ] instead.
24379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24380   if test "x$has_forbidden_chars" != x; then
24381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24385       # Going to short mode and back again did indeed matter. Since short mode is
24386       # case insensitive, let's make it lowercase to improve readability.
24387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24388       # Now convert it back to Unix-stile (cygpath)
24389       input_path=`$CYGPATH -u "$shortmode_path"`
24390       new_path="$input_path"
24391     fi
24392   fi
24393 
24394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24395   if test "x$test_cygdrive_prefix" = x; then
24396     # As a simple fix, exclude /usr/bin since it's not a real path.
24397     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24399       # a path prefixed by /cygdrive for fixpath to work.
24400       new_path="$CYGWIN_ROOT_PATH$input_path"
24401     fi
24402   fi
24403 
24404 
24405   if test "x$path" != "x$new_path"; then
24406     BOOT_JDK="$new_path"
24407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24408 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24409   fi
24410 
24411     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24412 
24413   path="$BOOT_JDK"
24414   has_colon=`$ECHO $path | $GREP ^.:`
24415   new_path="$path"
24416   if test "x$has_colon" = x; then
24417     # Not in mixed or Windows style, start by that.
24418     new_path=`cmd //c echo $path`
24419   fi
24420 
24421 
24422   input_path="$new_path"
24423   # Check if we need to convert this using DOS-style short mode. If the path
24424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24425   # take no chances and rewrite it.
24426   # Note: m4 eats our [], so we need to use [ and ] instead.
24427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24428   if test "x$has_forbidden_chars" != x; then
24429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24431   fi
24432 
24433 
24434   windows_path="$new_path"
24435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24436     unix_path=`$CYGPATH -u "$windows_path"`
24437     new_path="$unix_path"
24438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24440     new_path="$unix_path"
24441   fi
24442 
24443   if test "x$path" != "x$new_path"; then
24444     BOOT_JDK="$new_path"
24445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24446 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24447   fi
24448 
24449   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24450   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24451 
24452     else
24453       # We're on a unix platform. Hooray! :)
24454       path="$BOOT_JDK"
24455       has_space=`$ECHO "$path" | $GREP " "`
24456       if test "x$has_space" != x; then
24457         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24458 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24459         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24460       fi
24461 
24462       # Use eval to expand a potential ~
24463       eval path="$path"
24464       if test ! -f "$path" && test ! -d "$path"; then
24465         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24466       fi
24467 
24468       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24469     fi
24470   fi
24471 
24472             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24473 $as_echo_n "checking for Boot JDK... " >&6; }
24474             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24475 $as_echo "$BOOT_JDK" >&6; }
24476             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24477 $as_echo_n "checking Boot JDK version... " >&6; }
24478             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24480 $as_echo "$BOOT_JDK_VERSION" >&6; }
24481           fi # end check jdk version
24482         fi # end check javac
24483       fi # end check java
24484     fi # end check boot jdk found
24485   fi
24486 
24487 
24488   if test "x$BOOT_JDK_FOUND" = xno; then
24489     # Now execute the test
24490 
24491   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24492   BOOT_JDK_SUFFIX="/Contents/Home"
24493   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24494   if test "x$ALL_JDKS_FOUND" != x; then
24495     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24496 
24497   if test "x$BOOT_JDK_FOUND" = xno; then
24498     # Now execute the test
24499 
24500         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24501         if test -d "$BOOT_JDK"; then
24502           BOOT_JDK_FOUND=maybe
24503           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24504 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24505         fi
24506 
24507 
24508     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24509     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24510       # Do we have a bin/java?
24511       if test ! -x "$BOOT_JDK/bin/java"; then
24512         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24513 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24514         BOOT_JDK_FOUND=no
24515       else
24516         # Do we have a bin/javac?
24517         if test ! -x "$BOOT_JDK/bin/javac"; then
24518           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24519 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24520           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24521 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24522           BOOT_JDK_FOUND=no
24523         else
24524           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24525           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24526 
24527           # Extra M4 quote needed to protect [] in grep expression.
24528           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24529           if test "x$FOUND_CORRECT_VERSION" = x; then
24530             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24531 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24532             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24533 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24534             BOOT_JDK_FOUND=no
24535           else
24536             # We're done! :-)
24537             BOOT_JDK_FOUND=yes
24538 
24539   # Only process if variable expands to non-empty
24540 
24541   if test "x$BOOT_JDK" != x; then
24542     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24543 
24544   # Input might be given as Windows format, start by converting to
24545   # unix format.
24546   path="$BOOT_JDK"
24547   new_path=`$CYGPATH -u "$path"`
24548 
24549   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24550   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24551   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24552   # "foo.exe" is OK but "foo" is an error.
24553   #
24554   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24555   # It is also a way to make sure we got the proper file name for the real test later on.
24556   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24557   if test "x$test_shortpath" = x; then
24558     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24559 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24560     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24561   fi
24562 
24563   # Call helper function which possibly converts this using DOS-style short mode.
24564   # If so, the updated path is stored in $new_path.
24565 
24566   input_path="$new_path"
24567   # Check if we need to convert this using DOS-style short mode. If the path
24568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24569   # take no chances and rewrite it.
24570   # Note: m4 eats our [], so we need to use [ and ] instead.
24571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24572   if test "x$has_forbidden_chars" != x; then
24573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24577       # Going to short mode and back again did indeed matter. Since short mode is
24578       # case insensitive, let's make it lowercase to improve readability.
24579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24580       # Now convert it back to Unix-stile (cygpath)
24581       input_path=`$CYGPATH -u "$shortmode_path"`
24582       new_path="$input_path"
24583     fi
24584   fi
24585 
24586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24587   if test "x$test_cygdrive_prefix" = x; then
24588     # As a simple fix, exclude /usr/bin since it's not a real path.
24589     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24591       # a path prefixed by /cygdrive for fixpath to work.
24592       new_path="$CYGWIN_ROOT_PATH$input_path"
24593     fi
24594   fi
24595 
24596 
24597   if test "x$path" != "x$new_path"; then
24598     BOOT_JDK="$new_path"
24599     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24600 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24601   fi
24602 
24603     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24604 
24605   path="$BOOT_JDK"
24606   has_colon=`$ECHO $path | $GREP ^.:`
24607   new_path="$path"
24608   if test "x$has_colon" = x; then
24609     # Not in mixed or Windows style, start by that.
24610     new_path=`cmd //c echo $path`
24611   fi
24612 
24613 
24614   input_path="$new_path"
24615   # Check if we need to convert this using DOS-style short mode. If the path
24616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24617   # take no chances and rewrite it.
24618   # Note: m4 eats our [], so we need to use [ and ] instead.
24619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24620   if test "x$has_forbidden_chars" != x; then
24621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24622     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24623   fi
24624 
24625 
24626   windows_path="$new_path"
24627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24628     unix_path=`$CYGPATH -u "$windows_path"`
24629     new_path="$unix_path"
24630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24632     new_path="$unix_path"
24633   fi
24634 
24635   if test "x$path" != "x$new_path"; then
24636     BOOT_JDK="$new_path"
24637     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24638 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24639   fi
24640 
24641   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24642   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24643 
24644     else
24645       # We're on a unix platform. Hooray! :)
24646       path="$BOOT_JDK"
24647       has_space=`$ECHO "$path" | $GREP " "`
24648       if test "x$has_space" != x; then
24649         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24650 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24651         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24652       fi
24653 
24654       # Use eval to expand a potential ~
24655       eval path="$path"
24656       if test ! -f "$path" && test ! -d "$path"; then
24657         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24658       fi
24659 
24660       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24661     fi
24662   fi
24663 
24664             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24665 $as_echo_n "checking for Boot JDK... " >&6; }
24666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24667 $as_echo "$BOOT_JDK" >&6; }
24668             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24669 $as_echo_n "checking Boot JDK version... " >&6; }
24670             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24671             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24672 $as_echo "$BOOT_JDK_VERSION" >&6; }
24673           fi # end check jdk version
24674         fi # end check javac
24675       fi # end check java
24676     fi # end check boot jdk found
24677   fi
24678 
24679     done
24680   fi
24681 
24682 
24683     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24684     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24685       # Do we have a bin/java?
24686       if test ! -x "$BOOT_JDK/bin/java"; then
24687         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24689         BOOT_JDK_FOUND=no
24690       else
24691         # Do we have a bin/javac?
24692         if test ! -x "$BOOT_JDK/bin/javac"; then
24693           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24695           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24696 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24697           BOOT_JDK_FOUND=no
24698         else
24699           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24700           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24701 
24702           # Extra M4 quote needed to protect [] in grep expression.
24703           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24704           if test "x$FOUND_CORRECT_VERSION" = x; then
24705             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24707             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24708 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24709             BOOT_JDK_FOUND=no
24710           else
24711             # We're done! :-)
24712             BOOT_JDK_FOUND=yes
24713 
24714   # Only process if variable expands to non-empty
24715 
24716   if test "x$BOOT_JDK" != x; then
24717     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24718 
24719   # Input might be given as Windows format, start by converting to
24720   # unix format.
24721   path="$BOOT_JDK"
24722   new_path=`$CYGPATH -u "$path"`
24723 
24724   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24725   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24726   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24727   # "foo.exe" is OK but "foo" is an error.
24728   #
24729   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24730   # It is also a way to make sure we got the proper file name for the real test later on.
24731   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24732   if test "x$test_shortpath" = x; then
24733     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24734 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24735     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24736   fi
24737 
24738   # Call helper function which possibly converts this using DOS-style short mode.
24739   # If so, the updated path is stored in $new_path.
24740 
24741   input_path="$new_path"
24742   # Check if we need to convert this using DOS-style short mode. If the path
24743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24744   # take no chances and rewrite it.
24745   # Note: m4 eats our [], so we need to use [ and ] instead.
24746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24747   if test "x$has_forbidden_chars" != x; then
24748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24752       # Going to short mode and back again did indeed matter. Since short mode is
24753       # case insensitive, let's make it lowercase to improve readability.
24754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24755       # Now convert it back to Unix-stile (cygpath)
24756       input_path=`$CYGPATH -u "$shortmode_path"`
24757       new_path="$input_path"
24758     fi
24759   fi
24760 
24761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24762   if test "x$test_cygdrive_prefix" = x; then
24763     # As a simple fix, exclude /usr/bin since it's not a real path.
24764     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24766       # a path prefixed by /cygdrive for fixpath to work.
24767       new_path="$CYGWIN_ROOT_PATH$input_path"
24768     fi
24769   fi
24770 
24771 
24772   if test "x$path" != "x$new_path"; then
24773     BOOT_JDK="$new_path"
24774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24775 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24776   fi
24777 
24778     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24779 
24780   path="$BOOT_JDK"
24781   has_colon=`$ECHO $path | $GREP ^.:`
24782   new_path="$path"
24783   if test "x$has_colon" = x; then
24784     # Not in mixed or Windows style, start by that.
24785     new_path=`cmd //c echo $path`
24786   fi
24787 
24788 
24789   input_path="$new_path"
24790   # Check if we need to convert this using DOS-style short mode. If the path
24791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24792   # take no chances and rewrite it.
24793   # Note: m4 eats our [], so we need to use [ and ] instead.
24794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24795   if test "x$has_forbidden_chars" != x; then
24796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24797     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24798   fi
24799 
24800 
24801   windows_path="$new_path"
24802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24803     unix_path=`$CYGPATH -u "$windows_path"`
24804     new_path="$unix_path"
24805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24807     new_path="$unix_path"
24808   fi
24809 
24810   if test "x$path" != "x$new_path"; then
24811     BOOT_JDK="$new_path"
24812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24813 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24814   fi
24815 
24816   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24817   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24818 
24819     else
24820       # We're on a unix platform. Hooray! :)
24821       path="$BOOT_JDK"
24822       has_space=`$ECHO "$path" | $GREP " "`
24823       if test "x$has_space" != x; then
24824         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24825 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24826         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24827       fi
24828 
24829       # Use eval to expand a potential ~
24830       eval path="$path"
24831       if test ! -f "$path" && test ! -d "$path"; then
24832         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24833       fi
24834 
24835       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24836     fi
24837   fi
24838 
24839             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24840 $as_echo_n "checking for Boot JDK... " >&6; }
24841             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24842 $as_echo "$BOOT_JDK" >&6; }
24843             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24844 $as_echo_n "checking Boot JDK version... " >&6; }
24845             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24846             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24847 $as_echo "$BOOT_JDK_VERSION" >&6; }
24848           fi # end check jdk version
24849         fi # end check javac
24850       fi # end check java
24851     fi # end check boot jdk found
24852   fi
24853 
24854   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24855 
24856   if test "x$BOOT_JDK_FOUND" = xno; then
24857     # Now execute the test
24858 
24859   BOOT_JDK_PREFIX="/usr/lib/jvm"
24860   BOOT_JDK_SUFFIX=""
24861   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24862   if test "x$ALL_JDKS_FOUND" != x; then
24863     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24864 
24865   if test "x$BOOT_JDK_FOUND" = xno; then
24866     # Now execute the test
24867 
24868         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24869         if test -d "$BOOT_JDK"; then
24870           BOOT_JDK_FOUND=maybe
24871           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24872 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24873         fi
24874 
24875 
24876     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24877     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24878       # Do we have a bin/java?
24879       if test ! -x "$BOOT_JDK/bin/java"; then
24880         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24882         BOOT_JDK_FOUND=no
24883       else
24884         # Do we have a bin/javac?
24885         if test ! -x "$BOOT_JDK/bin/javac"; then
24886           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24887 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24888           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24889 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24890           BOOT_JDK_FOUND=no
24891         else
24892           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24893           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24894 
24895           # Extra M4 quote needed to protect [] in grep expression.
24896           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24897           if test "x$FOUND_CORRECT_VERSION" = x; then
24898             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24899 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24900             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24901 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24902             BOOT_JDK_FOUND=no
24903           else
24904             # We're done! :-)
24905             BOOT_JDK_FOUND=yes
24906 
24907   # Only process if variable expands to non-empty
24908 
24909   if test "x$BOOT_JDK" != x; then
24910     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24911 
24912   # Input might be given as Windows format, start by converting to
24913   # unix format.
24914   path="$BOOT_JDK"
24915   new_path=`$CYGPATH -u "$path"`
24916 
24917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24920   # "foo.exe" is OK but "foo" is an error.
24921   #
24922   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24923   # It is also a way to make sure we got the proper file name for the real test later on.
24924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24925   if test "x$test_shortpath" = x; then
24926     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24927 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24928     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24929   fi
24930 
24931   # Call helper function which possibly converts this using DOS-style short mode.
24932   # If so, the updated path is stored in $new_path.
24933 
24934   input_path="$new_path"
24935   # Check if we need to convert this using DOS-style short mode. If the path
24936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24937   # take no chances and rewrite it.
24938   # Note: m4 eats our [], so we need to use [ and ] instead.
24939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24940   if test "x$has_forbidden_chars" != x; then
24941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24945       # Going to short mode and back again did indeed matter. Since short mode is
24946       # case insensitive, let's make it lowercase to improve readability.
24947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24948       # Now convert it back to Unix-stile (cygpath)
24949       input_path=`$CYGPATH -u "$shortmode_path"`
24950       new_path="$input_path"
24951     fi
24952   fi
24953 
24954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24955   if test "x$test_cygdrive_prefix" = x; then
24956     # As a simple fix, exclude /usr/bin since it's not a real path.
24957     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24959       # a path prefixed by /cygdrive for fixpath to work.
24960       new_path="$CYGWIN_ROOT_PATH$input_path"
24961     fi
24962   fi
24963 
24964 
24965   if test "x$path" != "x$new_path"; then
24966     BOOT_JDK="$new_path"
24967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24968 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24969   fi
24970 
24971     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24972 
24973   path="$BOOT_JDK"
24974   has_colon=`$ECHO $path | $GREP ^.:`
24975   new_path="$path"
24976   if test "x$has_colon" = x; then
24977     # Not in mixed or Windows style, start by that.
24978     new_path=`cmd //c echo $path`
24979   fi
24980 
24981 
24982   input_path="$new_path"
24983   # Check if we need to convert this using DOS-style short mode. If the path
24984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24985   # take no chances and rewrite it.
24986   # Note: m4 eats our [], so we need to use [ and ] instead.
24987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24988   if test "x$has_forbidden_chars" != x; then
24989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24991   fi
24992 
24993 
24994   windows_path="$new_path"
24995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24996     unix_path=`$CYGPATH -u "$windows_path"`
24997     new_path="$unix_path"
24998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25000     new_path="$unix_path"
25001   fi
25002 
25003   if test "x$path" != "x$new_path"; then
25004     BOOT_JDK="$new_path"
25005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25006 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25007   fi
25008 
25009   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25010   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25011 
25012     else
25013       # We're on a unix platform. Hooray! :)
25014       path="$BOOT_JDK"
25015       has_space=`$ECHO "$path" | $GREP " "`
25016       if test "x$has_space" != x; then
25017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25018 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25019         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25020       fi
25021 
25022       # Use eval to expand a potential ~
25023       eval path="$path"
25024       if test ! -f "$path" && test ! -d "$path"; then
25025         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25026       fi
25027 
25028       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25029     fi
25030   fi
25031 
25032             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25033 $as_echo_n "checking for Boot JDK... " >&6; }
25034             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25035 $as_echo "$BOOT_JDK" >&6; }
25036             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25037 $as_echo_n "checking Boot JDK version... " >&6; }
25038             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25039             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25040 $as_echo "$BOOT_JDK_VERSION" >&6; }
25041           fi # end check jdk version
25042         fi # end check javac
25043       fi # end check java
25044     fi # end check boot jdk found
25045   fi
25046 
25047     done
25048   fi
25049 
25050 
25051     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25052     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25053       # Do we have a bin/java?
25054       if test ! -x "$BOOT_JDK/bin/java"; then
25055         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25057         BOOT_JDK_FOUND=no
25058       else
25059         # Do we have a bin/javac?
25060         if test ! -x "$BOOT_JDK/bin/javac"; then
25061           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25063           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25064 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25065           BOOT_JDK_FOUND=no
25066         else
25067           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25068           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25069 
25070           # Extra M4 quote needed to protect [] in grep expression.
25071           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25072           if test "x$FOUND_CORRECT_VERSION" = x; then
25073             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25075             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25076 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25077             BOOT_JDK_FOUND=no
25078           else
25079             # We're done! :-)
25080             BOOT_JDK_FOUND=yes
25081 
25082   # Only process if variable expands to non-empty
25083 
25084   if test "x$BOOT_JDK" != x; then
25085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25086 
25087   # Input might be given as Windows format, start by converting to
25088   # unix format.
25089   path="$BOOT_JDK"
25090   new_path=`$CYGPATH -u "$path"`
25091 
25092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25095   # "foo.exe" is OK but "foo" is an error.
25096   #
25097   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25098   # It is also a way to make sure we got the proper file name for the real test later on.
25099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25100   if test "x$test_shortpath" = x; then
25101     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25102 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25103     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25104   fi
25105 
25106   # Call helper function which possibly converts this using DOS-style short mode.
25107   # If so, the updated path is stored in $new_path.
25108 
25109   input_path="$new_path"
25110   # Check if we need to convert this using DOS-style short mode. If the path
25111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25112   # take no chances and rewrite it.
25113   # Note: m4 eats our [], so we need to use [ and ] instead.
25114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25115   if test "x$has_forbidden_chars" != x; then
25116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25120       # Going to short mode and back again did indeed matter. Since short mode is
25121       # case insensitive, let's make it lowercase to improve readability.
25122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25123       # Now convert it back to Unix-stile (cygpath)
25124       input_path=`$CYGPATH -u "$shortmode_path"`
25125       new_path="$input_path"
25126     fi
25127   fi
25128 
25129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25130   if test "x$test_cygdrive_prefix" = x; then
25131     # As a simple fix, exclude /usr/bin since it's not a real path.
25132     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25134       # a path prefixed by /cygdrive for fixpath to work.
25135       new_path="$CYGWIN_ROOT_PATH$input_path"
25136     fi
25137   fi
25138 
25139 
25140   if test "x$path" != "x$new_path"; then
25141     BOOT_JDK="$new_path"
25142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25143 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25144   fi
25145 
25146     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25147 
25148   path="$BOOT_JDK"
25149   has_colon=`$ECHO $path | $GREP ^.:`
25150   new_path="$path"
25151   if test "x$has_colon" = x; then
25152     # Not in mixed or Windows style, start by that.
25153     new_path=`cmd //c echo $path`
25154   fi
25155 
25156 
25157   input_path="$new_path"
25158   # Check if we need to convert this using DOS-style short mode. If the path
25159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25160   # take no chances and rewrite it.
25161   # Note: m4 eats our [], so we need to use [ and ] instead.
25162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25163   if test "x$has_forbidden_chars" != x; then
25164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25166   fi
25167 
25168 
25169   windows_path="$new_path"
25170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25171     unix_path=`$CYGPATH -u "$windows_path"`
25172     new_path="$unix_path"
25173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25175     new_path="$unix_path"
25176   fi
25177 
25178   if test "x$path" != "x$new_path"; then
25179     BOOT_JDK="$new_path"
25180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25181 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25182   fi
25183 
25184   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25185   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25186 
25187     else
25188       # We're on a unix platform. Hooray! :)
25189       path="$BOOT_JDK"
25190       has_space=`$ECHO "$path" | $GREP " "`
25191       if test "x$has_space" != x; then
25192         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25194         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25195       fi
25196 
25197       # Use eval to expand a potential ~
25198       eval path="$path"
25199       if test ! -f "$path" && test ! -d "$path"; then
25200         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25201       fi
25202 
25203       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25204     fi
25205   fi
25206 
25207             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25208 $as_echo_n "checking for Boot JDK... " >&6; }
25209             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25210 $as_echo "$BOOT_JDK" >&6; }
25211             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25212 $as_echo_n "checking Boot JDK version... " >&6; }
25213             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25214             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25215 $as_echo "$BOOT_JDK_VERSION" >&6; }
25216           fi # end check jdk version
25217         fi # end check javac
25218       fi # end check java
25219     fi # end check boot jdk found
25220   fi
25221 
25222   fi
25223 
25224 
25225     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25226     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25227       # Do we have a bin/java?
25228       if test ! -x "$BOOT_JDK/bin/java"; then
25229         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25230 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25231         BOOT_JDK_FOUND=no
25232       else
25233         # Do we have a bin/javac?
25234         if test ! -x "$BOOT_JDK/bin/javac"; then
25235           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25236 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25237           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25238 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25239           BOOT_JDK_FOUND=no
25240         else
25241           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25242           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25243 
25244           # Extra M4 quote needed to protect [] in grep expression.
25245           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25246           if test "x$FOUND_CORRECT_VERSION" = x; then
25247             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25249             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25250 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25251             BOOT_JDK_FOUND=no
25252           else
25253             # We're done! :-)
25254             BOOT_JDK_FOUND=yes
25255 
25256   # Only process if variable expands to non-empty
25257 
25258   if test "x$BOOT_JDK" != x; then
25259     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25260 
25261   # Input might be given as Windows format, start by converting to
25262   # unix format.
25263   path="$BOOT_JDK"
25264   new_path=`$CYGPATH -u "$path"`
25265 
25266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25269   # "foo.exe" is OK but "foo" is an error.
25270   #
25271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25272   # It is also a way to make sure we got the proper file name for the real test later on.
25273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25274   if test "x$test_shortpath" = x; then
25275     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25276 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25277     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25278   fi
25279 
25280   # Call helper function which possibly converts this using DOS-style short mode.
25281   # If so, the updated path is stored in $new_path.
25282 
25283   input_path="$new_path"
25284   # Check if we need to convert this using DOS-style short mode. If the path
25285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25286   # take no chances and rewrite it.
25287   # Note: m4 eats our [], so we need to use [ and ] instead.
25288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25289   if test "x$has_forbidden_chars" != x; then
25290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25294       # Going to short mode and back again did indeed matter. Since short mode is
25295       # case insensitive, let's make it lowercase to improve readability.
25296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25297       # Now convert it back to Unix-stile (cygpath)
25298       input_path=`$CYGPATH -u "$shortmode_path"`
25299       new_path="$input_path"
25300     fi
25301   fi
25302 
25303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25304   if test "x$test_cygdrive_prefix" = x; then
25305     # As a simple fix, exclude /usr/bin since it's not a real path.
25306     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25308       # a path prefixed by /cygdrive for fixpath to work.
25309       new_path="$CYGWIN_ROOT_PATH$input_path"
25310     fi
25311   fi
25312 
25313 
25314   if test "x$path" != "x$new_path"; then
25315     BOOT_JDK="$new_path"
25316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25317 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25318   fi
25319 
25320     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25321 
25322   path="$BOOT_JDK"
25323   has_colon=`$ECHO $path | $GREP ^.:`
25324   new_path="$path"
25325   if test "x$has_colon" = x; then
25326     # Not in mixed or Windows style, start by that.
25327     new_path=`cmd //c echo $path`
25328   fi
25329 
25330 
25331   input_path="$new_path"
25332   # Check if we need to convert this using DOS-style short mode. If the path
25333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25334   # take no chances and rewrite it.
25335   # Note: m4 eats our [], so we need to use [ and ] instead.
25336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25337   if test "x$has_forbidden_chars" != x; then
25338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25340   fi
25341 
25342 
25343   windows_path="$new_path"
25344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25345     unix_path=`$CYGPATH -u "$windows_path"`
25346     new_path="$unix_path"
25347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25349     new_path="$unix_path"
25350   fi
25351 
25352   if test "x$path" != "x$new_path"; then
25353     BOOT_JDK="$new_path"
25354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25355 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25356   fi
25357 
25358   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25359   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25360 
25361     else
25362       # We're on a unix platform. Hooray! :)
25363       path="$BOOT_JDK"
25364       has_space=`$ECHO "$path" | $GREP " "`
25365       if test "x$has_space" != x; then
25366         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25367 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25368         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25369       fi
25370 
25371       # Use eval to expand a potential ~
25372       eval path="$path"
25373       if test ! -f "$path" && test ! -d "$path"; then
25374         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25375       fi
25376 
25377       BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25378     fi
25379   fi
25380 
25381             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25382 $as_echo_n "checking for Boot JDK... " >&6; }
25383             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25384 $as_echo "$BOOT_JDK" >&6; }
25385             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25386 $as_echo_n "checking Boot JDK version... " >&6; }
25387             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25388             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25389 $as_echo "$BOOT_JDK_VERSION" >&6; }
25390           fi # end check jdk version
25391         fi # end check javac
25392       fi # end check java
25393     fi # end check boot jdk found
25394   fi
25395 
25396 
25397   # If we haven't found anything yet, we've truly lost. Give up.
25398   if test "x$BOOT_JDK_FOUND" = xno; then
25399 
25400   # Print a helpful message on how to acquire the necessary build dependency.
25401   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25402   MISSING_DEPENDENCY=openjdk
25403 
25404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25405     cygwin_help $MISSING_DEPENDENCY
25406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25407     msys_help $MISSING_DEPENDENCY
25408   else
25409     PKGHANDLER_COMMAND=
25410 
25411     case $PKGHANDLER in
25412       apt-get)
25413         apt_help     $MISSING_DEPENDENCY ;;
25414       yum)
25415         yum_help     $MISSING_DEPENDENCY ;;
25416       port)
25417         port_help    $MISSING_DEPENDENCY ;;
25418       pkgutil)
25419         pkgutil_help $MISSING_DEPENDENCY ;;
25420       pkgadd)
25421         pkgadd_help  $MISSING_DEPENDENCY ;;
25422     esac
25423 
25424     if test "x$PKGHANDLER_COMMAND" != x; then
25425       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25426     fi
25427   fi
25428 
25429     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25430 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25431     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25432 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25433     as_fn_error $? "Cannot continue" "$LINENO" 5
25434   fi
25435 
25436 
25437 
25438   # Setup tools from the Boot JDK.
25439 
25440   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25441 
25442   # Publish this variable in the help.
25443 
25444 
25445   if test "x$JAVA" = x; then
25446     # The variable is not set by user, try to locate tool using the code snippet
25447 
25448       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25449 $as_echo_n "checking for java in Boot JDK... " >&6; }
25450       JAVA=$BOOT_JDK/bin/java
25451       if test ! -x $JAVA; then
25452         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25453 $as_echo "not found" >&6; }
25454         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25455 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25456         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25457       fi
25458       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25459 $as_echo "ok" >&6; }
25460 
25461 
25462   else
25463     # The variable is set, but is it from the command line or the environment?
25464 
25465     # Try to remove the string !JAVA! from our list.
25466     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25467     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25468       # If it failed, the variable was not from the command line. Ignore it,
25469       # but warn the user (except for BASH, which is always set by the calling BASH).
25470       if test "xJAVA" != xBASH; then
25471         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25472 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25473       fi
25474       # Try to locate tool using the code snippet
25475 
25476       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25477 $as_echo_n "checking for java in Boot JDK... " >&6; }
25478       JAVA=$BOOT_JDK/bin/java
25479       if test ! -x $JAVA; then
25480         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25481 $as_echo "not found" >&6; }
25482         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25483 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25484         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25485       fi
25486       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25487 $as_echo "ok" >&6; }
25488 
25489 
25490     else
25491       # If it succeeded, then it was overridden by the user. We will use it
25492       # for the tool.
25493 
25494       # First remove it from the list of overridden variables, so we can test
25495       # for unknown variables in the end.
25496       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25497 
25498       # Check if the provided tool contains a complete path.
25499       tool_specified="$JAVA"
25500       tool_basename="${tool_specified##*/}"
25501       if test "x$tool_basename" = "x$tool_specified"; then
25502         # A command without a complete path is provided, search $PATH.
25503         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25504 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25505         # Extract the first word of "$tool_basename", so it can be a program name with args.
25506 set dummy $tool_basename; ac_word=$2
25507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25508 $as_echo_n "checking for $ac_word... " >&6; }
25509 if ${ac_cv_path_JAVA+:} false; then :
25510   $as_echo_n "(cached) " >&6
25511 else
25512   case $JAVA in
25513   [\\/]* | ?:[\\/]*)
25514   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25515   ;;
25516   *)
25517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25518 for as_dir in $PATH
25519 do
25520   IFS=$as_save_IFS
25521   test -z "$as_dir" && as_dir=.
25522     for ac_exec_ext in '' $ac_executable_extensions; do
25523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25524     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25526     break 2
25527   fi
25528 done
25529   done
25530 IFS=$as_save_IFS
25531 
25532   ;;
25533 esac
25534 fi
25535 JAVA=$ac_cv_path_JAVA
25536 if test -n "$JAVA"; then
25537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25538 $as_echo "$JAVA" >&6; }
25539 else
25540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25541 $as_echo "no" >&6; }
25542 fi
25543 
25544 
25545         if test "x$JAVA" = x; then
25546           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25547         fi
25548       else
25549         # Otherwise we believe it is a complete path. Use it as it is.
25550         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25551 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25552         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25553 $as_echo_n "checking for JAVA... " >&6; }
25554         if test ! -x "$tool_specified"; then
25555           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25556 $as_echo "not found" >&6; }
25557           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25558         fi
25559         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25560 $as_echo "$tool_specified" >&6; }
25561       fi
25562     fi
25563   fi
25564 
25565 
25566 
25567   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25568 
25569   # Publish this variable in the help.
25570 
25571 
25572   if test "x$JAVAC" = x; then
25573     # The variable is not set by user, try to locate tool using the code snippet
25574 
25575       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25576 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25577       JAVAC=$BOOT_JDK/bin/javac
25578       if test ! -x $JAVAC; then
25579         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25580 $as_echo "not found" >&6; }
25581         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25582 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25583         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25584       fi
25585       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25586 $as_echo "ok" >&6; }
25587 
25588 
25589   else
25590     # The variable is set, but is it from the command line or the environment?
25591 
25592     # Try to remove the string !JAVAC! from our list.
25593     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25594     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25595       # If it failed, the variable was not from the command line. Ignore it,
25596       # but warn the user (except for BASH, which is always set by the calling BASH).
25597       if test "xJAVAC" != xBASH; then
25598         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25599 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25600       fi
25601       # Try to locate tool using the code snippet
25602 
25603       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25604 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25605       JAVAC=$BOOT_JDK/bin/javac
25606       if test ! -x $JAVAC; then
25607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25608 $as_echo "not found" >&6; }
25609         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25610 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25611         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25612       fi
25613       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25614 $as_echo "ok" >&6; }
25615 
25616 
25617     else
25618       # If it succeeded, then it was overridden by the user. We will use it
25619       # for the tool.
25620 
25621       # First remove it from the list of overridden variables, so we can test
25622       # for unknown variables in the end.
25623       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25624 
25625       # Check if the provided tool contains a complete path.
25626       tool_specified="$JAVAC"
25627       tool_basename="${tool_specified##*/}"
25628       if test "x$tool_basename" = "x$tool_specified"; then
25629         # A command without a complete path is provided, search $PATH.
25630         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25631 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25632         # Extract the first word of "$tool_basename", so it can be a program name with args.
25633 set dummy $tool_basename; ac_word=$2
25634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25635 $as_echo_n "checking for $ac_word... " >&6; }
25636 if ${ac_cv_path_JAVAC+:} false; then :
25637   $as_echo_n "(cached) " >&6
25638 else
25639   case $JAVAC in
25640   [\\/]* | ?:[\\/]*)
25641   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25642   ;;
25643   *)
25644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25645 for as_dir in $PATH
25646 do
25647   IFS=$as_save_IFS
25648   test -z "$as_dir" && as_dir=.
25649     for ac_exec_ext in '' $ac_executable_extensions; do
25650   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25651     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25653     break 2
25654   fi
25655 done
25656   done
25657 IFS=$as_save_IFS
25658 
25659   ;;
25660 esac
25661 fi
25662 JAVAC=$ac_cv_path_JAVAC
25663 if test -n "$JAVAC"; then
25664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25665 $as_echo "$JAVAC" >&6; }
25666 else
25667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25668 $as_echo "no" >&6; }
25669 fi
25670 
25671 
25672         if test "x$JAVAC" = x; then
25673           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25674         fi
25675       else
25676         # Otherwise we believe it is a complete path. Use it as it is.
25677         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25678 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25679         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25680 $as_echo_n "checking for JAVAC... " >&6; }
25681         if test ! -x "$tool_specified"; then
25682           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25683 $as_echo "not found" >&6; }
25684           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25685         fi
25686         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25687 $as_echo "$tool_specified" >&6; }
25688       fi
25689     fi
25690   fi
25691 
25692 
25693 
25694   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25695 
25696   # Publish this variable in the help.
25697 
25698 
25699   if test "x$JAVAH" = x; then
25700     # The variable is not set by user, try to locate tool using the code snippet
25701 
25702       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25703 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25704       JAVAH=$BOOT_JDK/bin/javah
25705       if test ! -x $JAVAH; then
25706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25707 $as_echo "not found" >&6; }
25708         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25709 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25710         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25711       fi
25712       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25713 $as_echo "ok" >&6; }
25714 
25715 
25716   else
25717     # The variable is set, but is it from the command line or the environment?
25718 
25719     # Try to remove the string !JAVAH! from our list.
25720     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25721     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25722       # If it failed, the variable was not from the command line. Ignore it,
25723       # but warn the user (except for BASH, which is always set by the calling BASH).
25724       if test "xJAVAH" != xBASH; then
25725         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25726 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25727       fi
25728       # Try to locate tool using the code snippet
25729 
25730       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25731 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25732       JAVAH=$BOOT_JDK/bin/javah
25733       if test ! -x $JAVAH; then
25734         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25735 $as_echo "not found" >&6; }
25736         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25737 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25738         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25739       fi
25740       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25741 $as_echo "ok" >&6; }
25742 
25743 
25744     else
25745       # If it succeeded, then it was overridden by the user. We will use it
25746       # for the tool.
25747 
25748       # First remove it from the list of overridden variables, so we can test
25749       # for unknown variables in the end.
25750       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25751 
25752       # Check if the provided tool contains a complete path.
25753       tool_specified="$JAVAH"
25754       tool_basename="${tool_specified##*/}"
25755       if test "x$tool_basename" = "x$tool_specified"; then
25756         # A command without a complete path is provided, search $PATH.
25757         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25758 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25759         # Extract the first word of "$tool_basename", so it can be a program name with args.
25760 set dummy $tool_basename; ac_word=$2
25761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25762 $as_echo_n "checking for $ac_word... " >&6; }
25763 if ${ac_cv_path_JAVAH+:} false; then :
25764   $as_echo_n "(cached) " >&6
25765 else
25766   case $JAVAH in
25767   [\\/]* | ?:[\\/]*)
25768   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25769   ;;
25770   *)
25771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25772 for as_dir in $PATH
25773 do
25774   IFS=$as_save_IFS
25775   test -z "$as_dir" && as_dir=.
25776     for ac_exec_ext in '' $ac_executable_extensions; do
25777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25778     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25780     break 2
25781   fi
25782 done
25783   done
25784 IFS=$as_save_IFS
25785 
25786   ;;
25787 esac
25788 fi
25789 JAVAH=$ac_cv_path_JAVAH
25790 if test -n "$JAVAH"; then
25791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25792 $as_echo "$JAVAH" >&6; }
25793 else
25794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25795 $as_echo "no" >&6; }
25796 fi
25797 
25798 
25799         if test "x$JAVAH" = x; then
25800           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25801         fi
25802       else
25803         # Otherwise we believe it is a complete path. Use it as it is.
25804         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25805 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25806         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25807 $as_echo_n "checking for JAVAH... " >&6; }
25808         if test ! -x "$tool_specified"; then
25809           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25810 $as_echo "not found" >&6; }
25811           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25812         fi
25813         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25814 $as_echo "$tool_specified" >&6; }
25815       fi
25816     fi
25817   fi
25818 
25819 
25820 
25821   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25822 
25823   # Publish this variable in the help.
25824 
25825 
25826   if test "x$JAR" = x; then
25827     # The variable is not set by user, try to locate tool using the code snippet
25828 
25829       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25830 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25831       JAR=$BOOT_JDK/bin/jar
25832       if test ! -x $JAR; then
25833         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25834 $as_echo "not found" >&6; }
25835         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25836 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25837         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25838       fi
25839       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25840 $as_echo "ok" >&6; }
25841 
25842 
25843   else
25844     # The variable is set, but is it from the command line or the environment?
25845 
25846     # Try to remove the string !JAR! from our list.
25847     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25848     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25849       # If it failed, the variable was not from the command line. Ignore it,
25850       # but warn the user (except for BASH, which is always set by the calling BASH).
25851       if test "xJAR" != xBASH; then
25852         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25853 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25854       fi
25855       # Try to locate tool using the code snippet
25856 
25857       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25858 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25859       JAR=$BOOT_JDK/bin/jar
25860       if test ! -x $JAR; then
25861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25862 $as_echo "not found" >&6; }
25863         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25864 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25865         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25866       fi
25867       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25868 $as_echo "ok" >&6; }
25869 
25870 
25871     else
25872       # If it succeeded, then it was overridden by the user. We will use it
25873       # for the tool.
25874 
25875       # First remove it from the list of overridden variables, so we can test
25876       # for unknown variables in the end.
25877       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25878 
25879       # Check if the provided tool contains a complete path.
25880       tool_specified="$JAR"
25881       tool_basename="${tool_specified##*/}"
25882       if test "x$tool_basename" = "x$tool_specified"; then
25883         # A command without a complete path is provided, search $PATH.
25884         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25885 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25886         # Extract the first word of "$tool_basename", so it can be a program name with args.
25887 set dummy $tool_basename; ac_word=$2
25888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25889 $as_echo_n "checking for $ac_word... " >&6; }
25890 if ${ac_cv_path_JAR+:} false; then :
25891   $as_echo_n "(cached) " >&6
25892 else
25893   case $JAR in
25894   [\\/]* | ?:[\\/]*)
25895   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25896   ;;
25897   *)
25898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25899 for as_dir in $PATH
25900 do
25901   IFS=$as_save_IFS
25902   test -z "$as_dir" && as_dir=.
25903     for ac_exec_ext in '' $ac_executable_extensions; do
25904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25905     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25907     break 2
25908   fi
25909 done
25910   done
25911 IFS=$as_save_IFS
25912 
25913   ;;
25914 esac
25915 fi
25916 JAR=$ac_cv_path_JAR
25917 if test -n "$JAR"; then
25918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25919 $as_echo "$JAR" >&6; }
25920 else
25921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25922 $as_echo "no" >&6; }
25923 fi
25924 
25925 
25926         if test "x$JAR" = x; then
25927           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25928         fi
25929       else
25930         # Otherwise we believe it is a complete path. Use it as it is.
25931         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25932 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25934 $as_echo_n "checking for JAR... " >&6; }
25935         if test ! -x "$tool_specified"; then
25936           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25937 $as_echo "not found" >&6; }
25938           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25939         fi
25940         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25941 $as_echo "$tool_specified" >&6; }
25942       fi
25943     fi
25944   fi
25945 
25946 
25947 
25948   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25949 
25950   # Publish this variable in the help.
25951 
25952 
25953   if test "x$NATIVE2ASCII" = x; then
25954     # The variable is not set by user, try to locate tool using the code snippet
25955 
25956       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25957 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25958       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25959       if test ! -x $NATIVE2ASCII; then
25960         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25961 $as_echo "not found" >&6; }
25962         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25963 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25964         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25965       fi
25966       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25967 $as_echo "ok" >&6; }
25968 
25969 
25970   else
25971     # The variable is set, but is it from the command line or the environment?
25972 
25973     # Try to remove the string !NATIVE2ASCII! from our list.
25974     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25975     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25976       # If it failed, the variable was not from the command line. Ignore it,
25977       # but warn the user (except for BASH, which is always set by the calling BASH).
25978       if test "xNATIVE2ASCII" != xBASH; then
25979         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25980 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25981       fi
25982       # Try to locate tool using the code snippet
25983 
25984       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25985 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25986       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25987       if test ! -x $NATIVE2ASCII; then
25988         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25989 $as_echo "not found" >&6; }
25990         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25991 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25992         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25993       fi
25994       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25995 $as_echo "ok" >&6; }
25996 
25997 
25998     else
25999       # If it succeeded, then it was overridden by the user. We will use it
26000       # for the tool.
26001 
26002       # First remove it from the list of overridden variables, so we can test
26003       # for unknown variables in the end.
26004       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26005 
26006       # Check if the provided tool contains a complete path.
26007       tool_specified="$NATIVE2ASCII"
26008       tool_basename="${tool_specified##*/}"
26009       if test "x$tool_basename" = "x$tool_specified"; then
26010         # A command without a complete path is provided, search $PATH.
26011         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
26012 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26013         # Extract the first word of "$tool_basename", so it can be a program name with args.
26014 set dummy $tool_basename; ac_word=$2
26015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26016 $as_echo_n "checking for $ac_word... " >&6; }
26017 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26018   $as_echo_n "(cached) " >&6
26019 else
26020   case $NATIVE2ASCII in
26021   [\\/]* | ?:[\\/]*)
26022   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26023   ;;
26024   *)
26025   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26026 for as_dir in $PATH
26027 do
26028   IFS=$as_save_IFS
26029   test -z "$as_dir" && as_dir=.
26030     for ac_exec_ext in '' $ac_executable_extensions; do
26031   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26032     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26033     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26034     break 2
26035   fi
26036 done
26037   done
26038 IFS=$as_save_IFS
26039 
26040   ;;
26041 esac
26042 fi
26043 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26044 if test -n "$NATIVE2ASCII"; then
26045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26046 $as_echo "$NATIVE2ASCII" >&6; }
26047 else
26048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26049 $as_echo "no" >&6; }
26050 fi
26051 
26052 
26053         if test "x$NATIVE2ASCII" = x; then
26054           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26055         fi
26056       else
26057         # Otherwise we believe it is a complete path. Use it as it is.
26058         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26059 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26060         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26061 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
26062         if test ! -x "$tool_specified"; then
26063           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26064 $as_echo "not found" >&6; }
26065           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26066         fi
26067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26068 $as_echo "$tool_specified" >&6; }
26069       fi
26070     fi
26071   fi
26072 
26073 
26074 
26075   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26076 
26077   # Publish this variable in the help.
26078 
26079 
26080   if test "x$JARSIGNER" = x; then
26081     # The variable is not set by user, try to locate tool using the code snippet
26082 
26083       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26084 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26085       JARSIGNER=$BOOT_JDK/bin/jarsigner
26086       if test ! -x $JARSIGNER; then
26087         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26088 $as_echo "not found" >&6; }
26089         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26090 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26091         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26092       fi
26093       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26094 $as_echo "ok" >&6; }
26095 
26096 
26097   else
26098     # The variable is set, but is it from the command line or the environment?
26099 
26100     # Try to remove the string !JARSIGNER! from our list.
26101     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26102     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26103       # If it failed, the variable was not from the command line. Ignore it,
26104       # but warn the user (except for BASH, which is always set by the calling BASH).
26105       if test "xJARSIGNER" != xBASH; then
26106         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26107 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26108       fi
26109       # Try to locate tool using the code snippet
26110 
26111       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26112 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26113       JARSIGNER=$BOOT_JDK/bin/jarsigner
26114       if test ! -x $JARSIGNER; then
26115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26116 $as_echo "not found" >&6; }
26117         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26118 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26119         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26120       fi
26121       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26122 $as_echo "ok" >&6; }
26123 
26124 
26125     else
26126       # If it succeeded, then it was overridden by the user. We will use it
26127       # for the tool.
26128 
26129       # First remove it from the list of overridden variables, so we can test
26130       # for unknown variables in the end.
26131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26132 
26133       # Check if the provided tool contains a complete path.
26134       tool_specified="$JARSIGNER"
26135       tool_basename="${tool_specified##*/}"
26136       if test "x$tool_basename" = "x$tool_specified"; then
26137         # A command without a complete path is provided, search $PATH.
26138         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26139 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26140         # Extract the first word of "$tool_basename", so it can be a program name with args.
26141 set dummy $tool_basename; ac_word=$2
26142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26143 $as_echo_n "checking for $ac_word... " >&6; }
26144 if ${ac_cv_path_JARSIGNER+:} false; then :
26145   $as_echo_n "(cached) " >&6
26146 else
26147   case $JARSIGNER in
26148   [\\/]* | ?:[\\/]*)
26149   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26150   ;;
26151   *)
26152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26153 for as_dir in $PATH
26154 do
26155   IFS=$as_save_IFS
26156   test -z "$as_dir" && as_dir=.
26157     for ac_exec_ext in '' $ac_executable_extensions; do
26158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26159     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26161     break 2
26162   fi
26163 done
26164   done
26165 IFS=$as_save_IFS
26166 
26167   ;;
26168 esac
26169 fi
26170 JARSIGNER=$ac_cv_path_JARSIGNER
26171 if test -n "$JARSIGNER"; then
26172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26173 $as_echo "$JARSIGNER" >&6; }
26174 else
26175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26176 $as_echo "no" >&6; }
26177 fi
26178 
26179 
26180         if test "x$JARSIGNER" = x; then
26181           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26182         fi
26183       else
26184         # Otherwise we believe it is a complete path. Use it as it is.
26185         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26186 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26187         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26188 $as_echo_n "checking for JARSIGNER... " >&6; }
26189         if test ! -x "$tool_specified"; then
26190           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26191 $as_echo "not found" >&6; }
26192           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26193         fi
26194         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26195 $as_echo "$tool_specified" >&6; }
26196       fi
26197     fi
26198   fi
26199 
26200 
26201 
26202   # Finally, set some other options...
26203 
26204   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26205   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26206 
26207 
26208 
26209 
26210 ###############################################################################
26211 #
26212 # Configure the sources to use. We can add or override individual directories.
26213 #
26214 ###############################################################################
26215 
26216 
26217   # Where are the sources. Any of these can be overridden
26218   # using --with-override-corba and the likes.
26219   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26220   CORBA_TOPDIR="$SRC_ROOT/corba"
26221   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26222   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26223   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26224   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26225   JDK_TOPDIR="$SRC_ROOT/jdk"
26226 
26227 
26228 
26229 
26230 
26231 
26232 
26233 
26234 
26235 
26236   ###############################################################################
26237   #
26238   # Pickup additional source for a component from outside of the source root
26239   # or override source for a component.
26240   #
26241 
26242 # Check whether --with-add-source-root was given.
26243 if test "${with_add_source_root+set}" = set; then :
26244   withval=$with_add_source_root;
26245 fi
26246 
26247 
26248 
26249 # Check whether --with-override-source-root was given.
26250 if test "${with_override_source_root+set}" = set; then :
26251   withval=$with_override_source_root;
26252 fi
26253 
26254 
26255 
26256 # Check whether --with-adds-and-overrides was given.
26257 if test "${with_adds_and_overrides+set}" = set; then :
26258   withval=$with_adds_and_overrides;
26259 fi
26260 
26261 
26262   if test "x$with_adds_and_overrides" != x; then
26263     with_add_source_root="$with_adds_and_overrides/adds"
26264     with_override_source_root="$with_adds_and_overrides/overrides"
26265   fi
26266 
26267   if test "x$with_add_source_root" != x; then
26268     if ! test -d $with_add_source_root; then
26269       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26270     fi
26271     CURDIR="$PWD"
26272     cd "$with_add_source_root"
26273     ADD_SRC_ROOT="`pwd`"
26274     cd "$CURDIR"
26275     # Verify that the addon source root does not have any root makefiles.
26276     # If it does, then it is usually an error, prevent this.
26277     if test -f $with_add_source_root/langtools/make/Makefile; then
26278       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
26279     fi
26280     if test -f $with_add_source_root/corba/make/Makefile; then
26281       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
26282     fi
26283     if test -f $with_add_source_root/jaxp/make/Makefile; then
26284       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
26285     fi
26286     if test -f $with_add_source_root/jaxws/make/Makefile; then
26287       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
26288     fi
26289     if test -f $with_add_source_root/hotspot/make/Makefile; then
26290       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
26291     fi
26292     if test -f $with_add_source_root/nashorn/make/Makefile; then
26293       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
26294     fi
26295     if test -f $with_add_source_root/jdk/make/Makefile; then
26296       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
26297     fi
26298   fi
26299 
26300 
26301   if test "x$with_override_source_root" != x; then
26302     if ! test -d $with_override_source_root; then
26303       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26304     fi
26305     CURDIR="$PWD"
26306     cd "$with_override_source_root"
26307     OVERRIDE_SRC_ROOT="`pwd`"
26308     cd "$CURDIR"
26309     if test -f $with_override_source_root/langtools/make/Makefile; then
26310       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
26311     fi
26312     if test -f $with_override_source_root/corba/make/Makefile; then
26313       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
26314     fi
26315     if test -f $with_override_source_root/jaxp/make/Makefile; then
26316       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
26317     fi
26318     if test -f $with_override_source_root/jaxws/make/Makefile; then
26319       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
26320     fi
26321     if test -f $with_override_source_root/hotspot/make/Makefile; then
26322       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
26323     fi
26324     if test -f $with_override_source_root/nashorn/make/Makefile; then
26325       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
26326     fi
26327     if test -f $with_override_source_root/jdk/make/Makefile; then
26328       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
26329     fi
26330   fi
26331 
26332 
26333   ###############################################################################
26334   #
26335   # Override a repo completely, this is used for example when you have 3 small
26336   # development sandboxes of the langtools sources and want to avoid having 3 full
26337   # OpenJDK sources checked out on disk.
26338   #
26339   # Assuming that the 3 langtools sandboxes are located here:
26340   # /home/fredrik/sandbox1/langtools
26341   # /home/fredrik/sandbox2/langtools
26342   # /home/fredrik/sandbox3/langtools
26343   #
26344   # From the source root you create build subdirs manually:
26345   #     mkdir -p build1 build2 build3
26346   # in each build directory run:
26347   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26348   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26349   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26350   #
26351 
26352 
26353 # Check whether --with-override-langtools was given.
26354 if test "${with_override_langtools+set}" = set; then :
26355   withval=$with_override_langtools;
26356 fi
26357 
26358 
26359 
26360 # Check whether --with-override-corba was given.
26361 if test "${with_override_corba+set}" = set; then :
26362   withval=$with_override_corba;
26363 fi
26364 
26365 
26366 
26367 # Check whether --with-override-jaxp was given.
26368 if test "${with_override_jaxp+set}" = set; then :
26369   withval=$with_override_jaxp;
26370 fi
26371 
26372 
26373 
26374 # Check whether --with-override-jaxws was given.
26375 if test "${with_override_jaxws+set}" = set; then :
26376   withval=$with_override_jaxws;
26377 fi
26378 
26379 
26380 
26381 # Check whether --with-override-hotspot was given.
26382 if test "${with_override_hotspot+set}" = set; then :
26383   withval=$with_override_hotspot;
26384 fi
26385 
26386 
26387 
26388 # Check whether --with-override-nashorn was given.
26389 if test "${with_override_nashorn+set}" = set; then :
26390   withval=$with_override_nashorn;
26391 fi
26392 
26393 
26394 
26395 # Check whether --with-override-jdk was given.
26396 if test "${with_override_jdk+set}" = set; then :
26397   withval=$with_override_jdk;
26398 fi
26399 
26400 
26401   if test "x$with_override_langtools" != x; then
26402     CURDIR="$PWD"
26403     cd "$with_override_langtools"
26404     LANGTOOLS_TOPDIR="`pwd`"
26405     cd "$CURDIR"
26406     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26407       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26408     fi
26409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26410 $as_echo_n "checking if langtools should be overridden... " >&6; }
26411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26412 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26413   fi
26414   if test "x$with_override_corba" != x; then
26415     CURDIR="$PWD"
26416     cd "$with_override_corba"
26417     CORBA_TOPDIR="`pwd`"
26418     cd "$CURDIR"
26419     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26420       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26421     fi
26422     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26423 $as_echo_n "checking if corba should be overridden... " >&6; }
26424     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26425 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26426   fi
26427   if test "x$with_override_jaxp" != x; then
26428     CURDIR="$PWD"
26429     cd "$with_override_jaxp"
26430     JAXP_TOPDIR="`pwd`"
26431     cd "$CURDIR"
26432     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26433       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26434     fi
26435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26436 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26437     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26438 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26439   fi
26440   if test "x$with_override_jaxws" != x; then
26441     CURDIR="$PWD"
26442     cd "$with_override_jaxws"
26443     JAXWS_TOPDIR="`pwd`"
26444     cd "$CURDIR"
26445     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26446       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26447     fi
26448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26449 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26450     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26451 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26452   fi
26453   if test "x$with_override_hotspot" != x; then
26454     CURDIR="$PWD"
26455     cd "$with_override_hotspot"
26456     HOTSPOT_TOPDIR="`pwd`"
26457     cd "$CURDIR"
26458     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26459       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26460     fi
26461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26462 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26463     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26464 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26465   fi
26466   if test "x$with_override_nashorn" != x; then
26467     CURDIR="$PWD"
26468     cd "$with_override_nashorn"
26469     NASHORN_TOPDIR="`pwd`"
26470     cd "$CURDIR"
26471     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26472       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26473     fi
26474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26475 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26476     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26477 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26478   fi
26479   if test "x$with_override_jdk" != x; then
26480     CURDIR="$PWD"
26481     cd "$with_override_jdk"
26482     JDK_TOPDIR="`pwd`"
26483     cd "$CURDIR"
26484     if ! test -f $JDK_TOPDIR/make/Makefile; then
26485       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26486     fi
26487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26488 $as_echo_n "checking if JDK should be overridden... " >&6; }
26489     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26490 $as_echo "yes with $JDK_TOPDIR" >&6; }
26491   fi
26492 
26493 
26494   BUILD_OUTPUT="$OUTPUT_ROOT"
26495 
26496 
26497   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26498   BUILD_HOTSPOT=true
26499 
26500 
26501 
26502 # Check whether --with-import-hotspot was given.
26503 if test "${with_import_hotspot+set}" = set; then :
26504   withval=$with_import_hotspot;
26505 fi
26506 
26507   if test "x$with_import_hotspot" != x; then
26508     CURDIR="$PWD"
26509     cd "$with_import_hotspot"
26510     HOTSPOT_DIST="`pwd`"
26511     cd "$CURDIR"
26512     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26513       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26514     fi
26515     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26516 $as_echo_n "checking if hotspot should be imported... " >&6; }
26517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26518 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26519     BUILD_HOTSPOT=false
26520   fi
26521 
26522   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26523 
26524 
26525 ###############################################################################
26526 #
26527 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26528 # native code.
26529 #
26530 ###############################################################################
26531 
26532 # First determine the toolchain type (compiler family)
26533 
26534 
26535 # Check whether --with-toolchain-type was given.
26536 if test "${with_toolchain_type+set}" = set; then :
26537   withval=$with_toolchain_type;
26538 fi
26539 
26540 
26541   # Use indirect variable referencing
26542   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26543   VALID_TOOLCHAINS=${!toolchain_var_name}
26544 
26545   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26546     if test -n "$XCODEBUILD"; then
26547       # On Mac OS X, default toolchain to clang after Xcode 5
26548       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26549       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26550       if test $? -ne 0; then
26551         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26552       fi
26553       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26554           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26555           $CUT -f 1 -d .`
26556       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26557 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26558       if test $XCODE_MAJOR_VERSION -ge 5; then
26559           DEFAULT_TOOLCHAIN="clang"
26560       else
26561           DEFAULT_TOOLCHAIN="gcc"
26562       fi
26563     else
26564       # If Xcode is not installed, but the command line tools are
26565       # then we can't run xcodebuild. On these systems we should
26566       # default to clang
26567       DEFAULT_TOOLCHAIN="clang"
26568     fi
26569   else
26570     # First toolchain type in the list is the default
26571     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26572   fi
26573 
26574   if test "x$with_toolchain_type" = xlist; then
26575     # List all toolchains
26576     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26577 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26578     for toolchain in $VALID_TOOLCHAINS; do
26579       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26580       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26581       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26582     done
26583 
26584     exit 0
26585   elif test "x$with_toolchain_type" != x; then
26586     # User override; check that it is valid
26587     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26588       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26589 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26590       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26591 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26592       as_fn_error $? "Cannot continue." "$LINENO" 5
26593     fi
26594     TOOLCHAIN_TYPE=$with_toolchain_type
26595   else
26596     # No flag given, use default
26597     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26598   fi
26599 
26600 
26601   TOOLCHAIN_CC_BINARY_clang="clang"
26602   TOOLCHAIN_CC_BINARY_gcc="gcc"
26603   TOOLCHAIN_CC_BINARY_microsoft="cl"
26604   TOOLCHAIN_CC_BINARY_solstudio="cc"
26605   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26606 
26607   TOOLCHAIN_CXX_BINARY_clang="clang++"
26608   TOOLCHAIN_CXX_BINARY_gcc="g++"
26609   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26610   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26611   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26612 
26613   # Use indirect variable referencing
26614   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26615   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26616   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26617   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26618   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26619   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26620 
26621 
26622   # Define filename patterns
26623   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26624     LIBRARY_PREFIX=
26625     SHARED_LIBRARY_SUFFIX='.dll'
26626     STATIC_LIBRARY_SUFFIX='.lib'
26627     SHARED_LIBRARY='$1.dll'
26628     STATIC_LIBRARY='$1.lib'
26629     OBJ_SUFFIX='.obj'
26630     EXE_SUFFIX='.exe'
26631   else
26632     LIBRARY_PREFIX=lib
26633     SHARED_LIBRARY_SUFFIX='.so'
26634     STATIC_LIBRARY_SUFFIX='.a'
26635     SHARED_LIBRARY='lib$1.so'
26636     STATIC_LIBRARY='lib$1.a'
26637     OBJ_SUFFIX='.o'
26638     EXE_SUFFIX=''
26639     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26640       SHARED_LIBRARY='lib$1.dylib'
26641       SHARED_LIBRARY_SUFFIX='.dylib'
26642     fi
26643   fi
26644 
26645 
26646 
26647 
26648 
26649 
26650 
26651 
26652 
26653 
26654   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26655     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26656 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26657   else
26658     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26659 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26660   fi
26661 
26662 
26663 # Then detect the actual binaries needed
26664 
26665   # FIXME: Is this needed?
26666   ac_ext=cpp
26667 ac_cpp='$CXXCPP $CPPFLAGS'
26668 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26669 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26670 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26671 
26672 
26673   # Store the CFLAGS etc passed to the configure script.
26674   ORG_CFLAGS="$CFLAGS"
26675   ORG_CXXFLAGS="$CXXFLAGS"
26676 
26677   # On Windows, we need to detect the visual studio installation first.
26678   # This will change the PATH, but we need to keep that new PATH even
26679   # after toolchain detection is done, since the compiler (on x86) uses
26680   # it for DLL resolution in runtime.
26681   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26682 
26683   # Store path to cygwin link.exe to help excluding it when searching for
26684   # VS linker. This must be done before changing the PATH when looking for VS.
26685   # Extract the first word of "link", so it can be a program name with args.
26686 set dummy link; ac_word=$2
26687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26688 $as_echo_n "checking for $ac_word... " >&6; }
26689 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26690   $as_echo_n "(cached) " >&6
26691 else
26692   case $CYGWIN_LINK in
26693   [\\/]* | ?:[\\/]*)
26694   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26695   ;;
26696   *)
26697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26698 for as_dir in $PATH
26699 do
26700   IFS=$as_save_IFS
26701   test -z "$as_dir" && as_dir=.
26702     for ac_exec_ext in '' $ac_executable_extensions; do
26703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26704     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26706     break 2
26707   fi
26708 done
26709   done
26710 IFS=$as_save_IFS
26711 
26712   ;;
26713 esac
26714 fi
26715 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26716 if test -n "$CYGWIN_LINK"; then
26717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26718 $as_echo "$CYGWIN_LINK" >&6; }
26719 else
26720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26721 $as_echo "no" >&6; }
26722 fi
26723 
26724 
26725   if test "x$CYGWIN_LINK" != x; then
26726     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26727 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26728     "$CYGWIN_LINK" --version > /dev/null
26729     if test $? -eq 0 ; then
26730       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26731 $as_echo "yes" >&6; }
26732     else
26733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26734 $as_echo "no" >&6; }
26735       # This might be the VS linker. Don't exclude it later on.
26736       CYGWIN_LINK=""
26737     fi
26738   fi
26739 
26740   # First-hand choice is to locate and run the vsvars bat file.
26741 
26742 
26743 # Check whether --with-toolchain-version was given.
26744 if test "${with_toolchain_version+set}" = set; then :
26745   withval=$with_toolchain_version;
26746 fi
26747 
26748 
26749   if test "x$with_toolchain_version" = xlist; then
26750     # List all toolchains
26751     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26752 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26753     for version in $VALID_VS_VERSIONS; do
26754       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26755       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26756     done
26757 
26758     exit 0
26759   elif test "x$with_toolchain_version" != x; then
26760     # User override; check that it is valid
26761     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26762       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26763 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26764       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26765 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26766       as_fn_error $? "Cannot continue." "$LINENO" 5
26767     fi
26768     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26769   else
26770     # No flag given, use default
26771     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26772   fi
26773 
26774   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26775 
26776   VS_VERSION="$VS_VERSION"
26777   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26778   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26779   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26780   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26781 
26782   # When using --with-tools-dir, assume it points to the correct and default
26783   # version of Visual Studio or that --with-toolchain-version was also set.
26784   if test "x$with_tools_dir" != x; then
26785 
26786   if test "x$VS_ENV_CMD" = x; then
26787     VS_VERSION="${VS_VERSION}"
26788     VS_BASE="$with_tools_dir/../.."
26789     METHOD="--with-tools-dir"
26790 
26791     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26792       VCVARSFILE="vc/bin/vcvars32.bat"
26793     else
26794       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26795     fi
26796 
26797 
26798   windows_path="$VS_BASE"
26799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26800     unix_path=`$CYGPATH -u "$windows_path"`
26801     VS_BASE="$unix_path"
26802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26804     VS_BASE="$unix_path"
26805   fi
26806 
26807     if test -d "$VS_BASE"; then
26808       if test -f "$VS_BASE/$VCVARSFILE"; then
26809         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26810 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26811         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26812         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26813         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26814         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26815       else
26816         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26817 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26818         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26819 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26820       fi
26821     fi
26822   fi
26823 
26824 
26825   if test "x$VS_ENV_CMD" = x; then
26826     VS_VERSION="${VS_VERSION}"
26827     VS_BASE="$with_tools_dir/../../.."
26828     METHOD="--with-tools-dir"
26829 
26830     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26831       VCVARSFILE="vc/bin/vcvars32.bat"
26832     else
26833       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26834     fi
26835 
26836 
26837   windows_path="$VS_BASE"
26838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26839     unix_path=`$CYGPATH -u "$windows_path"`
26840     VS_BASE="$unix_path"
26841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26843     VS_BASE="$unix_path"
26844   fi
26845 
26846     if test -d "$VS_BASE"; then
26847       if test -f "$VS_BASE/$VCVARSFILE"; then
26848         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26849 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26850         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26851         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26852         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26853         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26854       else
26855         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26856 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26857         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26858 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26859       fi
26860     fi
26861   fi
26862 
26863     if test "x$VS_ENV_CMD" = x; then
26864       # Having specified an argument which is incorrect will produce an instant failure;
26865       # we should not go on looking
26866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26867 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26868       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26869 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26870       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26871 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26872       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26873     fi
26874   fi
26875 
26876   VS_ENV_CMD=""
26877   VS_ENV_ARGS=""
26878 
26879   if test "x$VS_COMNTOOLS" != x; then
26880 
26881   if test "x$VS_ENV_CMD" = x; then
26882     VS_VERSION="${VS_VERSION}"
26883     VS_BASE="$VS_COMNTOOLS/../.."
26884     METHOD="$VS_COMNTOOLS_VAR variable"
26885 
26886     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26887       VCVARSFILE="vc/bin/vcvars32.bat"
26888     else
26889       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26890     fi
26891 
26892 
26893   windows_path="$VS_BASE"
26894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26895     unix_path=`$CYGPATH -u "$windows_path"`
26896     VS_BASE="$unix_path"
26897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26899     VS_BASE="$unix_path"
26900   fi
26901 
26902     if test -d "$VS_BASE"; then
26903       if test -f "$VS_BASE/$VCVARSFILE"; then
26904         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26905 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26906         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26907         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26908         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26909         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26910       else
26911         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26912 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26913         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26914 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26915       fi
26916     fi
26917   fi
26918 
26919   fi
26920   if test "x$PROGRAMFILES" != x; then
26921 
26922   if test "x$VS_ENV_CMD" = x; then
26923     VS_VERSION="${VS_VERSION}"
26924     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26925     METHOD="well-known name"
26926 
26927     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26928       VCVARSFILE="vc/bin/vcvars32.bat"
26929     else
26930       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26931     fi
26932 
26933 
26934   windows_path="$VS_BASE"
26935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26936     unix_path=`$CYGPATH -u "$windows_path"`
26937     VS_BASE="$unix_path"
26938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26940     VS_BASE="$unix_path"
26941   fi
26942 
26943     if test -d "$VS_BASE"; then
26944       if test -f "$VS_BASE/$VCVARSFILE"; then
26945         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26946 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26947         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26948         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26949         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26950         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26951       else
26952         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26953 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26954         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26955 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26956       fi
26957     fi
26958   fi
26959 
26960   fi
26961   # Work around the insanely named ProgramFiles(x86) env variable
26962   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26963   if test "x$PROGRAMFILES_X86" != x; then
26964 
26965   if test "x$VS_ENV_CMD" = x; then
26966     VS_VERSION="${VS_VERSION}"
26967     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26968     METHOD="well-known name"
26969 
26970     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26971       VCVARSFILE="vc/bin/vcvars32.bat"
26972     else
26973       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26974     fi
26975 
26976 
26977   windows_path="$VS_BASE"
26978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26979     unix_path=`$CYGPATH -u "$windows_path"`
26980     VS_BASE="$unix_path"
26981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26983     VS_BASE="$unix_path"
26984   fi
26985 
26986     if test -d "$VS_BASE"; then
26987       if test -f "$VS_BASE/$VCVARSFILE"; then
26988         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26989 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26990         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26991         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26992         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26993         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26994       else
26995         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26996 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26997         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26998 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26999       fi
27000     fi
27001   fi
27002 
27003   fi
27004 
27005   if test "x$VS_ENV_CMD" = x; then
27006     VS_VERSION="${VS_VERSION}"
27007     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27008     METHOD="well-known name"
27009 
27010     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27011       VCVARSFILE="vc/bin/vcvars32.bat"
27012     else
27013       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27014     fi
27015 
27016 
27017   windows_path="$VS_BASE"
27018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27019     unix_path=`$CYGPATH -u "$windows_path"`
27020     VS_BASE="$unix_path"
27021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27023     VS_BASE="$unix_path"
27024   fi
27025 
27026     if test -d "$VS_BASE"; then
27027       if test -f "$VS_BASE/$VCVARSFILE"; then
27028         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27029 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27030         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27031         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27032         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27033         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27034       else
27035         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27036 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27037         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27038 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27039       fi
27040     fi
27041   fi
27042 
27043 
27044   if test "x$VS_ENV_CMD" = x; then
27045     VS_VERSION="${VS_VERSION}"
27046     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27047     METHOD="well-known name"
27048 
27049     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27050       VCVARSFILE="vc/bin/vcvars32.bat"
27051     else
27052       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27053     fi
27054 
27055 
27056   windows_path="$VS_BASE"
27057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058     unix_path=`$CYGPATH -u "$windows_path"`
27059     VS_BASE="$unix_path"
27060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062     VS_BASE="$unix_path"
27063   fi
27064 
27065     if test -d "$VS_BASE"; then
27066       if test -f "$VS_BASE/$VCVARSFILE"; then
27067         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27068 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27069         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27070         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27071         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27072         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27073       else
27074         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27075 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27076         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27077 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27078       fi
27079     fi
27080   fi
27081 
27082 
27083   if test "x$SDK_INSTALL_DIR" != x; then
27084     if test "x$ProgramW6432" != x; then
27085 
27086   if test "x$VS_ENV_CMD" = x; then
27087     VS_VERSION="${VS_VERSION}"
27088     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27089     METHOD="well-known name"
27090 
27091   windows_path="$WIN_SDK_BASE"
27092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27093     unix_path=`$CYGPATH -u "$windows_path"`
27094     WIN_SDK_BASE="$unix_path"
27095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27097     WIN_SDK_BASE="$unix_path"
27098   fi
27099 
27100     if test -d "$WIN_SDK_BASE"; then
27101       # There have been cases of partial or broken SDK installations. A missing
27102       # lib dir is not going to work.
27103       if test ! -d "$WIN_SDK_BASE/lib"; then
27104         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27105 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27106         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27107 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27108       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27109         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27110 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27111         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27112         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27113           VS_ENV_ARGS="/x86"
27114         else
27115           VS_ENV_ARGS="/x64"
27116         fi
27117         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27118         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27119         # TODO: improve detection for other versions of SDK
27120         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27121       else
27122         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27123 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27124         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27125 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27126       fi
27127     fi
27128   fi
27129 
27130     fi
27131     if test "x$PROGRAMW6432" != x; then
27132 
27133   if test "x$VS_ENV_CMD" = x; then
27134     VS_VERSION="${VS_VERSION}"
27135     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27136     METHOD="well-known name"
27137 
27138   windows_path="$WIN_SDK_BASE"
27139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27140     unix_path=`$CYGPATH -u "$windows_path"`
27141     WIN_SDK_BASE="$unix_path"
27142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27144     WIN_SDK_BASE="$unix_path"
27145   fi
27146 
27147     if test -d "$WIN_SDK_BASE"; then
27148       # There have been cases of partial or broken SDK installations. A missing
27149       # lib dir is not going to work.
27150       if test ! -d "$WIN_SDK_BASE/lib"; then
27151         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27152 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27153         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27154 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27155       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27156         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27157 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27158         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27159         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27160           VS_ENV_ARGS="/x86"
27161         else
27162           VS_ENV_ARGS="/x64"
27163         fi
27164         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27165         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27166         # TODO: improve detection for other versions of SDK
27167         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27168       else
27169         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27170 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27171         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27172 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27173       fi
27174     fi
27175   fi
27176 
27177     fi
27178     if test "x$PROGRAMFILES" != x; then
27179 
27180   if test "x$VS_ENV_CMD" = x; then
27181     VS_VERSION="${VS_VERSION}"
27182     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27183     METHOD="well-known name"
27184 
27185   windows_path="$WIN_SDK_BASE"
27186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27187     unix_path=`$CYGPATH -u "$windows_path"`
27188     WIN_SDK_BASE="$unix_path"
27189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27191     WIN_SDK_BASE="$unix_path"
27192   fi
27193 
27194     if test -d "$WIN_SDK_BASE"; then
27195       # There have been cases of partial or broken SDK installations. A missing
27196       # lib dir is not going to work.
27197       if test ! -d "$WIN_SDK_BASE/lib"; then
27198         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27199 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27200         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27201 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27202       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27203         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27204 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27205         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27206         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27207           VS_ENV_ARGS="/x86"
27208         else
27209           VS_ENV_ARGS="/x64"
27210         fi
27211         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27212         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27213         # TODO: improve detection for other versions of SDK
27214         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27215       else
27216         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27217 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27218         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27219 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27220       fi
27221     fi
27222   fi
27223 
27224     fi
27225 
27226   if test "x$VS_ENV_CMD" = x; then
27227     VS_VERSION="${VS_VERSION}"
27228     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27229     METHOD="well-known name"
27230 
27231   windows_path="$WIN_SDK_BASE"
27232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27233     unix_path=`$CYGPATH -u "$windows_path"`
27234     WIN_SDK_BASE="$unix_path"
27235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27237     WIN_SDK_BASE="$unix_path"
27238   fi
27239 
27240     if test -d "$WIN_SDK_BASE"; then
27241       # There have been cases of partial or broken SDK installations. A missing
27242       # lib dir is not going to work.
27243       if test ! -d "$WIN_SDK_BASE/lib"; then
27244         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27245 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27246         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27247 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27248       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27249         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27250 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27251         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27252         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27253           VS_ENV_ARGS="/x86"
27254         else
27255           VS_ENV_ARGS="/x64"
27256         fi
27257         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27258         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27259         # TODO: improve detection for other versions of SDK
27260         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27261       else
27262         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27263 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27264         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27265 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27266       fi
27267     fi
27268   fi
27269 
27270 
27271   if test "x$VS_ENV_CMD" = x; then
27272     VS_VERSION="${VS_VERSION}"
27273     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27274     METHOD="well-known name"
27275 
27276   windows_path="$WIN_SDK_BASE"
27277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27278     unix_path=`$CYGPATH -u "$windows_path"`
27279     WIN_SDK_BASE="$unix_path"
27280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27282     WIN_SDK_BASE="$unix_path"
27283   fi
27284 
27285     if test -d "$WIN_SDK_BASE"; then
27286       # There have been cases of partial or broken SDK installations. A missing
27287       # lib dir is not going to work.
27288       if test ! -d "$WIN_SDK_BASE/lib"; then
27289         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27290 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27291         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27292 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27293       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27294         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27295 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27296         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27297         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27298           VS_ENV_ARGS="/x86"
27299         else
27300           VS_ENV_ARGS="/x64"
27301         fi
27302         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27303         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27304         # TODO: improve detection for other versions of SDK
27305         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27306       else
27307         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27308 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27309         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27310 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27311       fi
27312     fi
27313   fi
27314 
27315   fi
27316 
27317     if test "x$VS_ENV_CMD" != x; then
27318       TOOLCHAIN_VERSION=$VS_VERSION
27319       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27320       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27321       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27322       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27323       # The rest of the variables are already evaled while probing
27324       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27325 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27326       break
27327     fi
27328   done
27329 
27330 
27331   if test "x$VS_ENV_CMD" != x; then
27332     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27333 
27334   # Only process if variable expands to non-empty
27335 
27336   if test "x$VS_ENV_CMD" != x; then
27337     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27338 
27339   # First separate the path from the arguments. This will split at the first
27340   # space.
27341   complete="$VS_ENV_CMD"
27342   path="${complete%% *}"
27343   tmp="$complete EOL"
27344   arguments="${tmp#* }"
27345 
27346   # Input might be given as Windows format, start by converting to
27347   # unix format.
27348   new_path=`$CYGPATH -u "$path"`
27349 
27350   # Now try to locate executable using which
27351   new_path=`$WHICH "$new_path" 2> /dev/null`
27352   # bat and cmd files are not always considered executable in cygwin causing which
27353   # to not find them
27354   if test "x$new_path" = x \
27355       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27356       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27357     new_path=`$CYGPATH -u "$path"`
27358   fi
27359   if test "x$new_path" = x; then
27360     # Oops. Which didn't find the executable.
27361     # The splitting of arguments from the executable at a space might have been incorrect,
27362     # since paths with space are more likely in Windows. Give it another try with the whole
27363     # argument.
27364     path="$complete"
27365     arguments="EOL"
27366     new_path=`$CYGPATH -u "$path"`
27367     new_path=`$WHICH "$new_path" 2> /dev/null`
27368     # bat and cmd files are not always considered executable in cygwin causing which
27369     # to not find them
27370     if test "x$new_path" = x \
27371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27373       new_path=`$CYGPATH -u "$path"`
27374     fi
27375     if test "x$new_path" = x; then
27376       # It's still not found. Now this is an unrecoverable error.
27377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27378 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27379       has_space=`$ECHO "$complete" | $GREP " "`
27380       if test "x$has_space" != x; then
27381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27383       fi
27384       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27385     fi
27386   fi
27387 
27388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27391   # "foo.exe" is OK but "foo" is an error.
27392   #
27393   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27394   # It is also a way to make sure we got the proper file name for the real test later on.
27395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27396   if test "x$test_shortpath" = x; then
27397     # Short path failed, file does not exist as specified.
27398     # Try adding .exe or .cmd
27399     if test -f "${new_path}.exe"; then
27400       input_to_shortpath="${new_path}.exe"
27401     elif test -f "${new_path}.cmd"; then
27402       input_to_shortpath="${new_path}.cmd"
27403     else
27404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27405 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27406       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27407 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27408       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27409     fi
27410   else
27411     input_to_shortpath="$new_path"
27412   fi
27413 
27414   # Call helper function which possibly converts this using DOS-style short mode.
27415   # If so, the updated path is stored in $new_path.
27416   new_path="$input_to_shortpath"
27417 
27418   input_path="$input_to_shortpath"
27419   # Check if we need to convert this using DOS-style short mode. If the path
27420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27421   # take no chances and rewrite it.
27422   # Note: m4 eats our [], so we need to use [ and ] instead.
27423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27424   if test "x$has_forbidden_chars" != x; then
27425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27429       # Going to short mode and back again did indeed matter. Since short mode is
27430       # case insensitive, let's make it lowercase to improve readability.
27431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27432       # Now convert it back to Unix-stile (cygpath)
27433       input_path=`$CYGPATH -u "$shortmode_path"`
27434       new_path="$input_path"
27435     fi
27436   fi
27437 
27438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27439   if test "x$test_cygdrive_prefix" = x; then
27440     # As a simple fix, exclude /usr/bin since it's not a real path.
27441     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27443       # a path prefixed by /cygdrive for fixpath to work.
27444       new_path="$CYGWIN_ROOT_PATH$input_path"
27445     fi
27446   fi
27447 
27448   # remove trailing .exe if any
27449   new_path="${new_path/%.exe/}"
27450 
27451     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27452 
27453   # First separate the path from the arguments. This will split at the first
27454   # space.
27455   complete="$VS_ENV_CMD"
27456   path="${complete%% *}"
27457   tmp="$complete EOL"
27458   arguments="${tmp#* }"
27459 
27460   # Input might be given as Windows format, start by converting to
27461   # unix format.
27462   new_path="$path"
27463 
27464   windows_path="$new_path"
27465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27466     unix_path=`$CYGPATH -u "$windows_path"`
27467     new_path="$unix_path"
27468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27470     new_path="$unix_path"
27471   fi
27472 
27473 
27474   # Now try to locate executable using which
27475   new_path=`$WHICH "$new_path" 2> /dev/null`
27476 
27477   if test "x$new_path" = x; then
27478     # Oops. Which didn't find the executable.
27479     # The splitting of arguments from the executable at a space might have been incorrect,
27480     # since paths with space are more likely in Windows. Give it another try with the whole
27481     # argument.
27482     path="$complete"
27483     arguments="EOL"
27484     new_path="$path"
27485 
27486   windows_path="$new_path"
27487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27488     unix_path=`$CYGPATH -u "$windows_path"`
27489     new_path="$unix_path"
27490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27492     new_path="$unix_path"
27493   fi
27494 
27495 
27496     new_path=`$WHICH "$new_path" 2> /dev/null`
27497     # bat and cmd files are not always considered executable in MSYS causing which
27498     # to not find them
27499     if test "x$new_path" = x \
27500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27502       new_path="$path"
27503 
27504   windows_path="$new_path"
27505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27506     unix_path=`$CYGPATH -u "$windows_path"`
27507     new_path="$unix_path"
27508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27510     new_path="$unix_path"
27511   fi
27512 
27513     fi
27514 
27515     if test "x$new_path" = x; then
27516       # It's still not found. Now this is an unrecoverable error.
27517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27518 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27519       has_space=`$ECHO "$complete" | $GREP " "`
27520       if test "x$has_space" != x; then
27521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27523       fi
27524       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27525     fi
27526   fi
27527 
27528   # Now new_path has a complete unix path to the binary
27529   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27530     # Keep paths in /bin as-is, but remove trailing .exe if any
27531     new_path="${new_path/%.exe/}"
27532     # Do not save /bin paths to all_fixpath_prefixes!
27533   else
27534     # Not in mixed or Windows style, start by that.
27535     new_path=`cmd //c echo $new_path`
27536 
27537   input_path="$new_path"
27538   # Check if we need to convert this using DOS-style short mode. If the path
27539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27540   # take no chances and rewrite it.
27541   # Note: m4 eats our [], so we need to use [ and ] instead.
27542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27543   if test "x$has_forbidden_chars" != x; then
27544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27546   fi
27547 
27548     # Output is in $new_path
27549 
27550   windows_path="$new_path"
27551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27552     unix_path=`$CYGPATH -u "$windows_path"`
27553     new_path="$unix_path"
27554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27556     new_path="$unix_path"
27557   fi
27558 
27559     # remove trailing .exe if any
27560     new_path="${new_path/%.exe/}"
27561 
27562     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27563     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27564   fi
27565 
27566     else
27567       # We're on a unix platform. Hooray! :)
27568       # First separate the path from the arguments. This will split at the first
27569       # space.
27570       complete="$VS_ENV_CMD"
27571       path="${complete%% *}"
27572       tmp="$complete EOL"
27573       arguments="${tmp#* }"
27574 
27575       # Cannot rely on the command "which" here since it doesn't always work.
27576       is_absolute_path=`$ECHO "$path" | $GREP ^/`
27577       if test -z "$is_absolute_path"; then
27578         # Path to executable is not absolute. Find it.
27579         IFS_save="$IFS"
27580         IFS=:
27581         for p in $PATH; do
27582           if test -f "$p/$path" && test -x "$p/$path"; then
27583             new_path="$p/$path"
27584             break
27585           fi
27586         done
27587         IFS="$IFS_save"
27588       else
27589         # This is an absolute path, we can use it without further modifications.
27590         new_path="$path"
27591       fi
27592 
27593       if test "x$new_path" = x; then
27594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27595 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27596         has_space=`$ECHO "$complete" | $GREP " "`
27597         if test "x$has_space" != x; then
27598           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27599 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27600         fi
27601         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27602       fi
27603     fi
27604 
27605     # Now join together the path and the arguments once again
27606     if test "x$arguments" != xEOL; then
27607       new_complete="$new_path ${arguments% *}"
27608     else
27609       new_complete="$new_path"
27610     fi
27611 
27612     if test "x$complete" != "x$new_complete"; then
27613       VS_ENV_CMD="$new_complete"
27614       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27615 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27616     fi
27617   fi
27618 
27619 
27620     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27621     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27622 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27623 
27624     # We need to create a couple of temporary files.
27625     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27626     $MKDIR -p $VS_ENV_TMP_DIR
27627 
27628     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27629     # Instead create a shell script which will set the relevant variables when run.
27630     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27631 
27632   unix_path="$WINPATH_VS_ENV_CMD"
27633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27634     windows_path=`$CYGPATH -m "$unix_path"`
27635     WINPATH_VS_ENV_CMD="$windows_path"
27636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27637     windows_path=`cmd //c echo $unix_path`
27638     WINPATH_VS_ENV_CMD="$windows_path"
27639   fi
27640 
27641     WINPATH_BASH="$BASH"
27642 
27643   unix_path="$WINPATH_BASH"
27644   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27645     windows_path=`$CYGPATH -m "$unix_path"`
27646     WINPATH_BASH="$windows_path"
27647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27648     windows_path=`cmd //c echo $unix_path`
27649     WINPATH_BASH="$windows_path"
27650   fi
27651 
27652 
27653     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27654     # script (executable by bash) that will setup the important variables.
27655     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27656     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27657     # This will end up something like:
27658     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27659     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27660     # These will end up something like:
27661     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27662     # The trailing space for everyone except PATH is no typo, but is needed due
27663     # to trailing \ in the Windows paths. These will be stripped later.
27664     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27665     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27666     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27667     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27668     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27669     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27670 
27671     # Now execute the newly created bat file.
27672     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27673     # Change directory so we don't need to mess with Windows paths in redirects.
27674     cd $VS_ENV_TMP_DIR
27675     cmd /c extract-vs-env.bat | $CAT
27676     cd $CURDIR
27677 
27678     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27679       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27680 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27681       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27682 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27683       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27684 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27685       as_fn_error $? "Cannot continue" "$LINENO" 5
27686     fi
27687 
27688     # Now set all paths and other env variables. This will allow the rest of
27689     # the configure script to find and run the compiler in the proper way.
27690     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27691 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27692     . $VS_ENV_TMP_DIR/set-vs-env.sh
27693     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27694     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27695   else
27696     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27697     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27698 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27699   fi
27700 
27701   # At this point, we should have correct variables in the environment, or we can't continue.
27702   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27703 $as_echo_n "checking for Visual Studio variables... " >&6; }
27704 
27705   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27706     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27707       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27708 $as_echo "present but broken" >&6; }
27709       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27710     else
27711       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27712 $as_echo "ok" >&6; }
27713       # Remove any trailing "\" ";" and " " from the variables.
27714       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27715       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27716       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27717       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27718       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27719       # Remove any paths containing # (typically F#) as that messes up make. This
27720       # is needed if visual studio was installed with F# support.
27721       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27722 
27723 
27724 
27725 
27726 
27727       # Convert VS_INCLUDE into SYSROOT_CFLAGS
27728       OLDIFS="$IFS"
27729       IFS=";"
27730       for i in $VS_INCLUDE; do
27731         ipath=$i
27732         # Only process non-empty elements
27733         if test "x$ipath" != x; then
27734           IFS="$OLDIFS"
27735           # Check that directory exists before calling fixup_path
27736           testpath=$ipath
27737 
27738   windows_path="$testpath"
27739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27740     unix_path=`$CYGPATH -u "$windows_path"`
27741     testpath="$unix_path"
27742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27744     testpath="$unix_path"
27745   fi
27746 
27747           if test -d "$testpath"; then
27748 
27749   # Only process if variable expands to non-empty
27750 
27751   if test "x$ipath" != x; then
27752     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753 
27754   # Input might be given as Windows format, start by converting to
27755   # unix format.
27756   path="$ipath"
27757   new_path=`$CYGPATH -u "$path"`
27758 
27759   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27760   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27761   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27762   # "foo.exe" is OK but "foo" is an error.
27763   #
27764   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27765   # It is also a way to make sure we got the proper file name for the real test later on.
27766   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27767   if test "x$test_shortpath" = x; then
27768     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27769 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27770     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27771   fi
27772 
27773   # Call helper function which possibly converts this using DOS-style short mode.
27774   # If so, the updated path is stored in $new_path.
27775 
27776   input_path="$new_path"
27777   # Check if we need to convert this using DOS-style short mode. If the path
27778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27779   # take no chances and rewrite it.
27780   # Note: m4 eats our [], so we need to use [ and ] instead.
27781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27782   if test "x$has_forbidden_chars" != x; then
27783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27784     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27785     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27786     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27787       # Going to short mode and back again did indeed matter. Since short mode is
27788       # case insensitive, let's make it lowercase to improve readability.
27789       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27790       # Now convert it back to Unix-stile (cygpath)
27791       input_path=`$CYGPATH -u "$shortmode_path"`
27792       new_path="$input_path"
27793     fi
27794   fi
27795 
27796   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27797   if test "x$test_cygdrive_prefix" = x; then
27798     # As a simple fix, exclude /usr/bin since it's not a real path.
27799     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27800       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27801       # a path prefixed by /cygdrive for fixpath to work.
27802       new_path="$CYGWIN_ROOT_PATH$input_path"
27803     fi
27804   fi
27805 
27806 
27807   if test "x$path" != "x$new_path"; then
27808     ipath="$new_path"
27809     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27810 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27811   fi
27812 
27813     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27814 
27815   path="$ipath"
27816   has_colon=`$ECHO $path | $GREP ^.:`
27817   new_path="$path"
27818   if test "x$has_colon" = x; then
27819     # Not in mixed or Windows style, start by that.
27820     new_path=`cmd //c echo $path`
27821   fi
27822 
27823 
27824   input_path="$new_path"
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27833   fi
27834 
27835 
27836   windows_path="$new_path"
27837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27838     unix_path=`$CYGPATH -u "$windows_path"`
27839     new_path="$unix_path"
27840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27842     new_path="$unix_path"
27843   fi
27844 
27845   if test "x$path" != "x$new_path"; then
27846     ipath="$new_path"
27847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27848 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27849   fi
27850 
27851   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27852   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27853 
27854     else
27855       # We're on a unix platform. Hooray! :)
27856       path="$ipath"
27857       has_space=`$ECHO "$path" | $GREP " "`
27858       if test "x$has_space" != x; then
27859         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27860 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27861         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27862       fi
27863 
27864       # Use eval to expand a potential ~
27865       eval path="$path"
27866       if test ! -f "$path" && test ! -d "$path"; then
27867         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27868       fi
27869 
27870       ipath="`cd "$path"; $THEPWDCMD -L`"
27871     fi
27872   fi
27873 
27874             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27875           fi
27876           IFS=";"
27877         fi
27878       done
27879       # Convert VS_LIB into SYSROOT_LDFLAGS
27880       for i in $VS_LIB; do
27881         libpath=$i
27882         # Only process non-empty elements
27883         if test "x$libpath" != x; then
27884           IFS="$OLDIFS"
27885           # Check that directory exists before calling fixup_path
27886           testpath=$libpath
27887 
27888   windows_path="$testpath"
27889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27890     unix_path=`$CYGPATH -u "$windows_path"`
27891     testpath="$unix_path"
27892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27894     testpath="$unix_path"
27895   fi
27896 
27897           if test -d "$testpath"; then
27898 
27899   # Only process if variable expands to non-empty
27900 
27901   if test "x$libpath" != x; then
27902     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27903 
27904   # Input might be given as Windows format, start by converting to
27905   # unix format.
27906   path="$libpath"
27907   new_path=`$CYGPATH -u "$path"`
27908 
27909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27912   # "foo.exe" is OK but "foo" is an error.
27913   #
27914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27915   # It is also a way to make sure we got the proper file name for the real test later on.
27916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27917   if test "x$test_shortpath" = x; then
27918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27919 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27920     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27921   fi
27922 
27923   # Call helper function which possibly converts this using DOS-style short mode.
27924   # If so, the updated path is stored in $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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27937       # Going to short mode and back again did indeed matter. Since short mode is
27938       # case insensitive, let's make it lowercase to improve readability.
27939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27940       # Now convert it back to Unix-stile (cygpath)
27941       input_path=`$CYGPATH -u "$shortmode_path"`
27942       new_path="$input_path"
27943     fi
27944   fi
27945 
27946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27947   if test "x$test_cygdrive_prefix" = x; then
27948     # As a simple fix, exclude /usr/bin since it's not a real path.
27949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27951       # a path prefixed by /cygdrive for fixpath to work.
27952       new_path="$CYGWIN_ROOT_PATH$input_path"
27953     fi
27954   fi
27955 
27956 
27957   if test "x$path" != "x$new_path"; then
27958     libpath="$new_path"
27959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27960 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27961   fi
27962 
27963     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27964 
27965   path="$libpath"
27966   has_colon=`$ECHO $path | $GREP ^.:`
27967   new_path="$path"
27968   if test "x$has_colon" = x; then
27969     # Not in mixed or Windows style, start by that.
27970     new_path=`cmd //c echo $path`
27971   fi
27972 
27973 
27974   input_path="$new_path"
27975   # Check if we need to convert this using DOS-style short mode. If the path
27976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27977   # take no chances and rewrite it.
27978   # Note: m4 eats our [], so we need to use [ and ] instead.
27979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27980   if test "x$has_forbidden_chars" != x; then
27981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27983   fi
27984 
27985 
27986   windows_path="$new_path"
27987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27988     unix_path=`$CYGPATH -u "$windows_path"`
27989     new_path="$unix_path"
27990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27992     new_path="$unix_path"
27993   fi
27994 
27995   if test "x$path" != "x$new_path"; then
27996     libpath="$new_path"
27997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27998 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27999   fi
28000 
28001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28003 
28004     else
28005       # We're on a unix platform. Hooray! :)
28006       path="$libpath"
28007       has_space=`$ECHO "$path" | $GREP " "`
28008       if test "x$has_space" != x; then
28009         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28010 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28011         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28012       fi
28013 
28014       # Use eval to expand a potential ~
28015       eval path="$path"
28016       if test ! -f "$path" && test ! -d "$path"; then
28017         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28018       fi
28019 
28020       libpath="`cd "$path"; $THEPWDCMD -L`"
28021     fi
28022   fi
28023 
28024             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28025           fi
28026           IFS=";"
28027         fi
28028       done
28029       IFS="$OLDIFS"
28030     fi
28031   else
28032     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28033 $as_echo "not found" >&6; }
28034 
28035     if test "x$VS_ENV_CMD" = x; then
28036       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28037 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28038       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28039 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28040     else
28041       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28042 $as_echo "$as_me: Running the extraction script failed." >&6;}
28043     fi
28044     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28045 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28046     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28047 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28048     as_fn_error $? "Cannot continue" "$LINENO" 5
28049   fi
28050 
28051     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28052     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28053     PATH="$VS_PATH"
28054     # The microsoft toolchain also requires INCLUDE and LIB to be set.
28055     export INCLUDE="$VS_INCLUDE"
28056     export LIB="$VS_LIB"
28057   fi
28058 
28059   # autoconf magic only relies on PATH, so update it if tools dir is specified
28060   OLD_PATH="$PATH"
28061 
28062   # For solaris we really need solaris tools, and not the GNU equivalent.
28063   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28064   # so add that to path before starting to probe.
28065   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
28066   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28067     PATH="/usr/ccs/bin:$PATH"
28068   fi
28069 
28070   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28071   # override all other locations.
28072   if test "x$TOOLCHAIN_PATH" != x; then
28073     PATH=$TOOLCHAIN_PATH:$PATH
28074   fi
28075 
28076 
28077   #
28078   # Setup the compilers (CC and CXX)
28079   #
28080 
28081   COMPILER_NAME=C
28082   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28083 
28084   if test "x$CC" != x; then
28085     # User has supplied compiler name already, always let that override.
28086     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28087 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28088     if test "x`basename $CC`" = "x$CC"; then
28089       # A command without a complete path is provided, search $PATH.
28090 
28091       for ac_prog in $CC
28092 do
28093   # Extract the first word of "$ac_prog", so it can be a program name with args.
28094 set dummy $ac_prog; ac_word=$2
28095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28096 $as_echo_n "checking for $ac_word... " >&6; }
28097 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28098   $as_echo_n "(cached) " >&6
28099 else
28100   case $POTENTIAL_CC in
28101   [\\/]* | ?:[\\/]*)
28102   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28103   ;;
28104   *)
28105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28106 for as_dir in $PATH
28107 do
28108   IFS=$as_save_IFS
28109   test -z "$as_dir" && as_dir=.
28110     for ac_exec_ext in '' $ac_executable_extensions; do
28111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28112     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28114     break 2
28115   fi
28116 done
28117   done
28118 IFS=$as_save_IFS
28119 
28120   ;;
28121 esac
28122 fi
28123 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28124 if test -n "$POTENTIAL_CC"; then
28125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28126 $as_echo "$POTENTIAL_CC" >&6; }
28127 else
28128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28129 $as_echo "no" >&6; }
28130 fi
28131 
28132 
28133   test -n "$POTENTIAL_CC" && break
28134 done
28135 
28136       if test "x$POTENTIAL_CC" != x; then
28137         CC=$POTENTIAL_CC
28138       else
28139         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28140       fi
28141     else
28142       # Otherwise it might already be a complete path
28143       if test ! -x "$CC"; then
28144         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28145       fi
28146     fi
28147   else
28148     # No user supplied value. Locate compiler ourselves.
28149 
28150     # If we are cross compiling, assume cross compilation tools follows the
28151     # cross compilation standard where they are prefixed with the autoconf
28152     # standard name for the target. For example the binary
28153     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28154     # If we are not cross compiling, then the default compiler name will be
28155     # used.
28156 
28157     CC=
28158     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28159     # before checking the rest of the PATH.
28160     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28161     # step, this should not be necessary.
28162     if test -n "$TOOLCHAIN_PATH"; then
28163       PATH_save="$PATH"
28164       PATH="$TOOLCHAIN_PATH"
28165       for ac_prog in $SEARCH_LIST
28166 do
28167   # Extract the first word of "$ac_prog", so it can be a program name with args.
28168 set dummy $ac_prog; ac_word=$2
28169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28170 $as_echo_n "checking for $ac_word... " >&6; }
28171 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28172   $as_echo_n "(cached) " >&6
28173 else
28174   case $TOOLCHAIN_PATH_CC in
28175   [\\/]* | ?:[\\/]*)
28176   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28177   ;;
28178   *)
28179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28180 for as_dir in $PATH
28181 do
28182   IFS=$as_save_IFS
28183   test -z "$as_dir" && as_dir=.
28184     for ac_exec_ext in '' $ac_executable_extensions; do
28185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28186     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28188     break 2
28189   fi
28190 done
28191   done
28192 IFS=$as_save_IFS
28193 
28194   ;;
28195 esac
28196 fi
28197 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28198 if test -n "$TOOLCHAIN_PATH_CC"; then
28199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28200 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28201 else
28202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28203 $as_echo "no" >&6; }
28204 fi
28205 
28206 
28207   test -n "$TOOLCHAIN_PATH_CC" && break
28208 done
28209 
28210       CC=$TOOLCHAIN_PATH_CC
28211       PATH="$PATH_save"
28212     fi
28213 
28214     # AC_PATH_PROGS can't be run multiple times with the same variable,
28215     # so create a new name for this run.
28216     if test "x$CC" = x; then
28217       for ac_prog in $SEARCH_LIST
28218 do
28219   # Extract the first word of "$ac_prog", so it can be a program name with args.
28220 set dummy $ac_prog; ac_word=$2
28221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28222 $as_echo_n "checking for $ac_word... " >&6; }
28223 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28224   $as_echo_n "(cached) " >&6
28225 else
28226   case $POTENTIAL_CC in
28227   [\\/]* | ?:[\\/]*)
28228   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28229   ;;
28230   *)
28231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28232 for as_dir in $PATH
28233 do
28234   IFS=$as_save_IFS
28235   test -z "$as_dir" && as_dir=.
28236     for ac_exec_ext in '' $ac_executable_extensions; do
28237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28238     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28240     break 2
28241   fi
28242 done
28243   done
28244 IFS=$as_save_IFS
28245 
28246   ;;
28247 esac
28248 fi
28249 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28250 if test -n "$POTENTIAL_CC"; then
28251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28252 $as_echo "$POTENTIAL_CC" >&6; }
28253 else
28254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28255 $as_echo "no" >&6; }
28256 fi
28257 
28258 
28259   test -n "$POTENTIAL_CC" && break
28260 done
28261 
28262       CC=$POTENTIAL_CC
28263     fi
28264 
28265     if test "x$CC" = x; then
28266 
28267   # Print a helpful message on how to acquire the necessary build dependency.
28268   # devkit is the help tag: freetype, cups, pulse, alsa etc
28269   MISSING_DEPENDENCY=devkit
28270 
28271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28272     cygwin_help $MISSING_DEPENDENCY
28273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28274     msys_help $MISSING_DEPENDENCY
28275   else
28276     PKGHANDLER_COMMAND=
28277 
28278     case $PKGHANDLER in
28279       apt-get)
28280         apt_help     $MISSING_DEPENDENCY ;;
28281       yum)
28282         yum_help     $MISSING_DEPENDENCY ;;
28283       port)
28284         port_help    $MISSING_DEPENDENCY ;;
28285       pkgutil)
28286         pkgutil_help $MISSING_DEPENDENCY ;;
28287       pkgadd)
28288         pkgadd_help  $MISSING_DEPENDENCY ;;
28289     esac
28290 
28291     if test "x$PKGHANDLER_COMMAND" != x; then
28292       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28293     fi
28294   fi
28295 
28296       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28297     fi
28298   fi
28299 
28300   # Now we have a compiler binary in CC. Make sure it's okay.
28301 
28302   # Only process if variable expands to non-empty
28303 
28304   if test "x$CC" != x; then
28305     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28306 
28307   # First separate the path from the arguments. This will split at the first
28308   # space.
28309   complete="$CC"
28310   path="${complete%% *}"
28311   tmp="$complete EOL"
28312   arguments="${tmp#* }"
28313 
28314   # Input might be given as Windows format, start by converting to
28315   # unix format.
28316   new_path=`$CYGPATH -u "$path"`
28317 
28318   # Now try to locate executable using which
28319   new_path=`$WHICH "$new_path" 2> /dev/null`
28320   # bat and cmd files are not always considered executable in cygwin causing which
28321   # to not find them
28322   if test "x$new_path" = x \
28323       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28324       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28325     new_path=`$CYGPATH -u "$path"`
28326   fi
28327   if test "x$new_path" = x; then
28328     # Oops. Which didn't find the executable.
28329     # The splitting of arguments from the executable at a space might have been incorrect,
28330     # since paths with space are more likely in Windows. Give it another try with the whole
28331     # argument.
28332     path="$complete"
28333     arguments="EOL"
28334     new_path=`$CYGPATH -u "$path"`
28335     new_path=`$WHICH "$new_path" 2> /dev/null`
28336     # bat and cmd files are not always considered executable in cygwin causing which
28337     # to not find them
28338     if test "x$new_path" = x \
28339         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28340         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28341       new_path=`$CYGPATH -u "$path"`
28342     fi
28343     if test "x$new_path" = x; then
28344       # It's still not found. Now this is an unrecoverable error.
28345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28346 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28347       has_space=`$ECHO "$complete" | $GREP " "`
28348       if test "x$has_space" != x; then
28349         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28350 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28351       fi
28352       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28353     fi
28354   fi
28355 
28356   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28357   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28358   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28359   # "foo.exe" is OK but "foo" is an error.
28360   #
28361   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28362   # It is also a way to make sure we got the proper file name for the real test later on.
28363   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28364   if test "x$test_shortpath" = x; then
28365     # Short path failed, file does not exist as specified.
28366     # Try adding .exe or .cmd
28367     if test -f "${new_path}.exe"; then
28368       input_to_shortpath="${new_path}.exe"
28369     elif test -f "${new_path}.cmd"; then
28370       input_to_shortpath="${new_path}.cmd"
28371     else
28372       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28373 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28374       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28375 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28376       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28377     fi
28378   else
28379     input_to_shortpath="$new_path"
28380   fi
28381 
28382   # Call helper function which possibly converts this using DOS-style short mode.
28383   # If so, the updated path is stored in $new_path.
28384   new_path="$input_to_shortpath"
28385 
28386   input_path="$input_to_shortpath"
28387   # Check if we need to convert this using DOS-style short mode. If the path
28388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28389   # take no chances and rewrite it.
28390   # Note: m4 eats our [], so we need to use [ and ] instead.
28391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28392   if test "x$has_forbidden_chars" != x; then
28393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28394     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28395     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28396     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28397       # Going to short mode and back again did indeed matter. Since short mode is
28398       # case insensitive, let's make it lowercase to improve readability.
28399       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28400       # Now convert it back to Unix-stile (cygpath)
28401       input_path=`$CYGPATH -u "$shortmode_path"`
28402       new_path="$input_path"
28403     fi
28404   fi
28405 
28406   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28407   if test "x$test_cygdrive_prefix" = x; then
28408     # As a simple fix, exclude /usr/bin since it's not a real path.
28409     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28410       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28411       # a path prefixed by /cygdrive for fixpath to work.
28412       new_path="$CYGWIN_ROOT_PATH$input_path"
28413     fi
28414   fi
28415 
28416   # remove trailing .exe if any
28417   new_path="${new_path/%.exe/}"
28418 
28419     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28420 
28421   # First separate the path from the arguments. This will split at the first
28422   # space.
28423   complete="$CC"
28424   path="${complete%% *}"
28425   tmp="$complete EOL"
28426   arguments="${tmp#* }"
28427 
28428   # Input might be given as Windows format, start by converting to
28429   # unix format.
28430   new_path="$path"
28431 
28432   windows_path="$new_path"
28433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28434     unix_path=`$CYGPATH -u "$windows_path"`
28435     new_path="$unix_path"
28436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28438     new_path="$unix_path"
28439   fi
28440 
28441 
28442   # Now try to locate executable using which
28443   new_path=`$WHICH "$new_path" 2> /dev/null`
28444 
28445   if test "x$new_path" = x; then
28446     # Oops. Which didn't find the executable.
28447     # The splitting of arguments from the executable at a space might have been incorrect,
28448     # since paths with space are more likely in Windows. Give it another try with the whole
28449     # argument.
28450     path="$complete"
28451     arguments="EOL"
28452     new_path="$path"
28453 
28454   windows_path="$new_path"
28455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28456     unix_path=`$CYGPATH -u "$windows_path"`
28457     new_path="$unix_path"
28458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28459     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28460     new_path="$unix_path"
28461   fi
28462 
28463 
28464     new_path=`$WHICH "$new_path" 2> /dev/null`
28465     # bat and cmd files are not always considered executable in MSYS causing which
28466     # to not find them
28467     if test "x$new_path" = x \
28468         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28469         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28470       new_path="$path"
28471 
28472   windows_path="$new_path"
28473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28474     unix_path=`$CYGPATH -u "$windows_path"`
28475     new_path="$unix_path"
28476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28478     new_path="$unix_path"
28479   fi
28480 
28481     fi
28482 
28483     if test "x$new_path" = x; then
28484       # It's still not found. Now this is an unrecoverable error.
28485       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28486 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28487       has_space=`$ECHO "$complete" | $GREP " "`
28488       if test "x$has_space" != x; then
28489         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28490 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28491       fi
28492       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28493     fi
28494   fi
28495 
28496   # Now new_path has a complete unix path to the binary
28497   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28498     # Keep paths in /bin as-is, but remove trailing .exe if any
28499     new_path="${new_path/%.exe/}"
28500     # Do not save /bin paths to all_fixpath_prefixes!
28501   else
28502     # Not in mixed or Windows style, start by that.
28503     new_path=`cmd //c echo $new_path`
28504 
28505   input_path="$new_path"
28506   # Check if we need to convert this using DOS-style short mode. If the path
28507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28508   # take no chances and rewrite it.
28509   # Note: m4 eats our [], so we need to use [ and ] instead.
28510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28511   if test "x$has_forbidden_chars" != x; then
28512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28513     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28514   fi
28515 
28516     # Output is in $new_path
28517 
28518   windows_path="$new_path"
28519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28520     unix_path=`$CYGPATH -u "$windows_path"`
28521     new_path="$unix_path"
28522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28524     new_path="$unix_path"
28525   fi
28526 
28527     # remove trailing .exe if any
28528     new_path="${new_path/%.exe/}"
28529 
28530     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28531     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28532   fi
28533 
28534     else
28535       # We're on a unix platform. Hooray! :)
28536       # First separate the path from the arguments. This will split at the first
28537       # space.
28538       complete="$CC"
28539       path="${complete%% *}"
28540       tmp="$complete EOL"
28541       arguments="${tmp#* }"
28542 
28543       # Cannot rely on the command "which" here since it doesn't always work.
28544       is_absolute_path=`$ECHO "$path" | $GREP ^/`
28545       if test -z "$is_absolute_path"; then
28546         # Path to executable is not absolute. Find it.
28547         IFS_save="$IFS"
28548         IFS=:
28549         for p in $PATH; do
28550           if test -f "$p/$path" && test -x "$p/$path"; then
28551             new_path="$p/$path"
28552             break
28553           fi
28554         done
28555         IFS="$IFS_save"
28556       else
28557         # This is an absolute path, we can use it without further modifications.
28558         new_path="$path"
28559       fi
28560 
28561       if test "x$new_path" = x; then
28562         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28563 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28564         has_space=`$ECHO "$complete" | $GREP " "`
28565         if test "x$has_space" != x; then
28566           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28567 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28568         fi
28569         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28570       fi
28571     fi
28572 
28573     # Now join together the path and the arguments once again
28574     if test "x$arguments" != xEOL; then
28575       new_complete="$new_path ${arguments% *}"
28576     else
28577       new_complete="$new_path"
28578     fi
28579 
28580     if test "x$complete" != "x$new_complete"; then
28581       CC="$new_complete"
28582       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28583 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28584     fi
28585   fi
28586 
28587   TEST_COMPILER="$CC"
28588   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28589   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28590   if test "x$OPENJDK_BUILD_OS" != xaix; then
28591     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28593 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28594 
28595   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28596     # Follow a chain of symbolic links. Use readlink
28597     # where it exists, else fall back to horribly
28598     # complicated shell code.
28599     if test "x$READLINK_TESTED" != yes; then
28600       # On MacOSX there is a readlink tool with a different
28601       # purpose than the GNU readlink tool. Check the found readlink.
28602       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28603       if test "x$ISGNU" = x; then
28604         # A readlink that we do not know how to use.
28605         # Are there other non-GNU readlinks out there?
28606         READLINK_TESTED=yes
28607         READLINK=
28608       fi
28609     fi
28610 
28611     if test "x$READLINK" != x; then
28612       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28613     else
28614       # Save the current directory for restoring afterwards
28615       STARTDIR=$PWD
28616       COUNTER=0
28617       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28618       sym_link_file=`$BASENAME $TEST_COMPILER`
28619       cd $sym_link_dir
28620       # Use -P flag to resolve symlinks in directories.
28621       cd `$THEPWDCMD -P`
28622       sym_link_dir=`$THEPWDCMD -P`
28623       # Resolve file symlinks
28624       while test $COUNTER -lt 20; do
28625         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28626         if test "x$ISLINK" == x; then
28627           # This is not a symbolic link! We are done!
28628           break
28629         fi
28630         # Again resolve directory symlinks since the target of the just found
28631         # link could be in a different directory
28632         cd `$DIRNAME $ISLINK`
28633         sym_link_dir=`$THEPWDCMD -P`
28634         sym_link_file=`$BASENAME $ISLINK`
28635         let COUNTER=COUNTER+1
28636       done
28637       cd $STARTDIR
28638       TEST_COMPILER=$sym_link_dir/$sym_link_file
28639     fi
28640   fi
28641 
28642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28643 $as_echo "$TEST_COMPILER" >&6; }
28644   fi
28645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28646 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28647 
28648   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28649   if test "x$COMPILER_BASENAME" = "xccache"; then
28650     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28651 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28652     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28653     # We want to control ccache invocation ourselves, so ignore this cc and try
28654     # searching again.
28655 
28656     # Remove the path to the fake ccache cc from the PATH
28657     RETRY_COMPILER_SAVED_PATH="$PATH"
28658     COMPILER_DIRNAME=`$DIRNAME $CC`
28659     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28660 
28661     # Try again looking for our compiler
28662     if test -n "$ac_tool_prefix"; then
28663   for ac_prog in $TOOLCHAIN_CC_BINARY
28664   do
28665     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28666 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28668 $as_echo_n "checking for $ac_word... " >&6; }
28669 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28670   $as_echo_n "(cached) " >&6
28671 else
28672   if test -n "$PROPER_COMPILER_CC"; then
28673   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28674 else
28675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28676 for as_dir in $PATH
28677 do
28678   IFS=$as_save_IFS
28679   test -z "$as_dir" && as_dir=.
28680     for ac_exec_ext in '' $ac_executable_extensions; do
28681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28682     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28684     break 2
28685   fi
28686 done
28687   done
28688 IFS=$as_save_IFS
28689 
28690 fi
28691 fi
28692 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28693 if test -n "$PROPER_COMPILER_CC"; then
28694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28695 $as_echo "$PROPER_COMPILER_CC" >&6; }
28696 else
28697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28698 $as_echo "no" >&6; }
28699 fi
28700 
28701 
28702     test -n "$PROPER_COMPILER_CC" && break
28703   done
28704 fi
28705 if test -z "$PROPER_COMPILER_CC"; then
28706   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28707   for ac_prog in $TOOLCHAIN_CC_BINARY
28708 do
28709   # Extract the first word of "$ac_prog", so it can be a program name with args.
28710 set dummy $ac_prog; ac_word=$2
28711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28712 $as_echo_n "checking for $ac_word... " >&6; }
28713 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28714   $as_echo_n "(cached) " >&6
28715 else
28716   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28717   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28718 else
28719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28720 for as_dir in $PATH
28721 do
28722   IFS=$as_save_IFS
28723   test -z "$as_dir" && as_dir=.
28724     for ac_exec_ext in '' $ac_executable_extensions; do
28725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28726     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28728     break 2
28729   fi
28730 done
28731   done
28732 IFS=$as_save_IFS
28733 
28734 fi
28735 fi
28736 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28737 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28739 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28740 else
28741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28742 $as_echo "no" >&6; }
28743 fi
28744 
28745 
28746   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28747 done
28748 
28749   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28750     PROPER_COMPILER_CC=""
28751   else
28752     case $cross_compiling:$ac_tool_warned in
28753 yes:)
28754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28755 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28756 ac_tool_warned=yes ;;
28757 esac
28758     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28759   fi
28760 fi
28761 
28762 
28763   # Only process if variable expands to non-empty
28764 
28765   if test "x$PROPER_COMPILER_CC" != x; then
28766     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767 
28768   # First separate the path from the arguments. This will split at the first
28769   # space.
28770   complete="$PROPER_COMPILER_CC"
28771   path="${complete%% *}"
28772   tmp="$complete EOL"
28773   arguments="${tmp#* }"
28774 
28775   # Input might be given as Windows format, start by converting to
28776   # unix format.
28777   new_path=`$CYGPATH -u "$path"`
28778 
28779   # Now try to locate executable using which
28780   new_path=`$WHICH "$new_path" 2> /dev/null`
28781   # bat and cmd files are not always considered executable in cygwin causing which
28782   # to not find them
28783   if test "x$new_path" = x \
28784       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28785       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28786     new_path=`$CYGPATH -u "$path"`
28787   fi
28788   if test "x$new_path" = x; then
28789     # Oops. Which didn't find the executable.
28790     # The splitting of arguments from the executable at a space might have been incorrect,
28791     # since paths with space are more likely in Windows. Give it another try with the whole
28792     # argument.
28793     path="$complete"
28794     arguments="EOL"
28795     new_path=`$CYGPATH -u "$path"`
28796     new_path=`$WHICH "$new_path" 2> /dev/null`
28797     # bat and cmd files are not always considered executable in cygwin causing which
28798     # to not find them
28799     if test "x$new_path" = x \
28800         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28801         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28802       new_path=`$CYGPATH -u "$path"`
28803     fi
28804     if test "x$new_path" = x; then
28805       # It's still not found. Now this is an unrecoverable error.
28806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28807 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28808       has_space=`$ECHO "$complete" | $GREP " "`
28809       if test "x$has_space" != x; then
28810         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28811 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28812       fi
28813       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28814     fi
28815   fi
28816 
28817   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28818   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28819   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28820   # "foo.exe" is OK but "foo" is an error.
28821   #
28822   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28823   # It is also a way to make sure we got the proper file name for the real test later on.
28824   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28825   if test "x$test_shortpath" = x; then
28826     # Short path failed, file does not exist as specified.
28827     # Try adding .exe or .cmd
28828     if test -f "${new_path}.exe"; then
28829       input_to_shortpath="${new_path}.exe"
28830     elif test -f "${new_path}.cmd"; then
28831       input_to_shortpath="${new_path}.cmd"
28832     else
28833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28834 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28835       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28836 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28837       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28838     fi
28839   else
28840     input_to_shortpath="$new_path"
28841   fi
28842 
28843   # Call helper function which possibly converts this using DOS-style short mode.
28844   # If so, the updated path is stored in $new_path.
28845   new_path="$input_to_shortpath"
28846 
28847   input_path="$input_to_shortpath"
28848   # Check if we need to convert this using DOS-style short mode. If the path
28849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850   # take no chances and rewrite it.
28851   # Note: m4 eats our [], so we need to use [ and ] instead.
28852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28853   if test "x$has_forbidden_chars" != x; then
28854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28858       # Going to short mode and back again did indeed matter. Since short mode is
28859       # case insensitive, let's make it lowercase to improve readability.
28860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28861       # Now convert it back to Unix-stile (cygpath)
28862       input_path=`$CYGPATH -u "$shortmode_path"`
28863       new_path="$input_path"
28864     fi
28865   fi
28866 
28867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28868   if test "x$test_cygdrive_prefix" = x; then
28869     # As a simple fix, exclude /usr/bin since it's not a real path.
28870     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28872       # a path prefixed by /cygdrive for fixpath to work.
28873       new_path="$CYGWIN_ROOT_PATH$input_path"
28874     fi
28875   fi
28876 
28877   # remove trailing .exe if any
28878   new_path="${new_path/%.exe/}"
28879 
28880     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28881 
28882   # First separate the path from the arguments. This will split at the first
28883   # space.
28884   complete="$PROPER_COMPILER_CC"
28885   path="${complete%% *}"
28886   tmp="$complete EOL"
28887   arguments="${tmp#* }"
28888 
28889   # Input might be given as Windows format, start by converting to
28890   # unix format.
28891   new_path="$path"
28892 
28893   windows_path="$new_path"
28894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28895     unix_path=`$CYGPATH -u "$windows_path"`
28896     new_path="$unix_path"
28897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28899     new_path="$unix_path"
28900   fi
28901 
28902 
28903   # Now try to locate executable using which
28904   new_path=`$WHICH "$new_path" 2> /dev/null`
28905 
28906   if test "x$new_path" = x; then
28907     # Oops. Which didn't find the executable.
28908     # The splitting of arguments from the executable at a space might have been incorrect,
28909     # since paths with space are more likely in Windows. Give it another try with the whole
28910     # argument.
28911     path="$complete"
28912     arguments="EOL"
28913     new_path="$path"
28914 
28915   windows_path="$new_path"
28916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28917     unix_path=`$CYGPATH -u "$windows_path"`
28918     new_path="$unix_path"
28919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28921     new_path="$unix_path"
28922   fi
28923 
28924 
28925     new_path=`$WHICH "$new_path" 2> /dev/null`
28926     # bat and cmd files are not always considered executable in MSYS causing which
28927     # to not find them
28928     if test "x$new_path" = x \
28929         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28930         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28931       new_path="$path"
28932 
28933   windows_path="$new_path"
28934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28935     unix_path=`$CYGPATH -u "$windows_path"`
28936     new_path="$unix_path"
28937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28939     new_path="$unix_path"
28940   fi
28941 
28942     fi
28943 
28944     if test "x$new_path" = x; then
28945       # It's still not found. Now this is an unrecoverable error.
28946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28947 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28948       has_space=`$ECHO "$complete" | $GREP " "`
28949       if test "x$has_space" != x; then
28950         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28951 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28952       fi
28953       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28954     fi
28955   fi
28956 
28957   # Now new_path has a complete unix path to the binary
28958   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28959     # Keep paths in /bin as-is, but remove trailing .exe if any
28960     new_path="${new_path/%.exe/}"
28961     # Do not save /bin paths to all_fixpath_prefixes!
28962   else
28963     # Not in mixed or Windows style, start by that.
28964     new_path=`cmd //c echo $new_path`
28965 
28966   input_path="$new_path"
28967   # Check if we need to convert this using DOS-style short mode. If the path
28968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28969   # take no chances and rewrite it.
28970   # Note: m4 eats our [], so we need to use [ and ] instead.
28971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28972   if test "x$has_forbidden_chars" != x; then
28973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28975   fi
28976 
28977     # Output is in $new_path
28978 
28979   windows_path="$new_path"
28980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28981     unix_path=`$CYGPATH -u "$windows_path"`
28982     new_path="$unix_path"
28983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28985     new_path="$unix_path"
28986   fi
28987 
28988     # remove trailing .exe if any
28989     new_path="${new_path/%.exe/}"
28990 
28991     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28992     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28993   fi
28994 
28995     else
28996       # We're on a unix platform. Hooray! :)
28997       # First separate the path from the arguments. This will split at the first
28998       # space.
28999       complete="$PROPER_COMPILER_CC"
29000       path="${complete%% *}"
29001       tmp="$complete EOL"
29002       arguments="${tmp#* }"
29003 
29004       # Cannot rely on the command "which" here since it doesn't always work.
29005       is_absolute_path=`$ECHO "$path" | $GREP ^/`
29006       if test -z "$is_absolute_path"; then
29007         # Path to executable is not absolute. Find it.
29008         IFS_save="$IFS"
29009         IFS=:
29010         for p in $PATH; do
29011           if test -f "$p/$path" && test -x "$p/$path"; then
29012             new_path="$p/$path"
29013             break
29014           fi
29015         done
29016         IFS="$IFS_save"
29017       else
29018         # This is an absolute path, we can use it without further modifications.
29019         new_path="$path"
29020       fi
29021 
29022       if test "x$new_path" = x; then
29023         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29024 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29025         has_space=`$ECHO "$complete" | $GREP " "`
29026         if test "x$has_space" != x; then
29027           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29028 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29029         fi
29030         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29031       fi
29032     fi
29033 
29034     # Now join together the path and the arguments once again
29035     if test "x$arguments" != xEOL; then
29036       new_complete="$new_path ${arguments% *}"
29037     else
29038       new_complete="$new_path"
29039     fi
29040 
29041     if test "x$complete" != "x$new_complete"; then
29042       PROPER_COMPILER_CC="$new_complete"
29043       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29044 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29045     fi
29046   fi
29047 
29048     PATH="$RETRY_COMPILER_SAVED_PATH"
29049 
29050     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29051 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29052 
29053   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29054     # Follow a chain of symbolic links. Use readlink
29055     # where it exists, else fall back to horribly
29056     # complicated shell code.
29057     if test "x$READLINK_TESTED" != yes; then
29058       # On MacOSX there is a readlink tool with a different
29059       # purpose than the GNU readlink tool. Check the found readlink.
29060       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29061       if test "x$ISGNU" = x; then
29062         # A readlink that we do not know how to use.
29063         # Are there other non-GNU readlinks out there?
29064         READLINK_TESTED=yes
29065         READLINK=
29066       fi
29067     fi
29068 
29069     if test "x$READLINK" != x; then
29070       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29071     else
29072       # Save the current directory for restoring afterwards
29073       STARTDIR=$PWD
29074       COUNTER=0
29075       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29076       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29077       cd $sym_link_dir
29078       # Use -P flag to resolve symlinks in directories.
29079       cd `$THEPWDCMD -P`
29080       sym_link_dir=`$THEPWDCMD -P`
29081       # Resolve file symlinks
29082       while test $COUNTER -lt 20; do
29083         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29084         if test "x$ISLINK" == x; then
29085           # This is not a symbolic link! We are done!
29086           break
29087         fi
29088         # Again resolve directory symlinks since the target of the just found
29089         # link could be in a different directory
29090         cd `$DIRNAME $ISLINK`
29091         sym_link_dir=`$THEPWDCMD -P`
29092         sym_link_file=`$BASENAME $ISLINK`
29093         let COUNTER=COUNTER+1
29094       done
29095       cd $STARTDIR
29096       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29097     fi
29098   fi
29099 
29100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29101 $as_echo "$PROPER_COMPILER_CC" >&6; }
29102     CC="$PROPER_COMPILER_CC"
29103   else
29104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29105 $as_echo "no, keeping CC" >&6; }
29106   fi
29107 
29108 
29109   COMPILER=$CC
29110   COMPILER_NAME=$COMPILER_NAME
29111 
29112   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29113     # cc -V output typically looks like
29114     #     cc: Sun C 5.12 Linux_i386 2011/11/16
29115     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29116     # Check that this is likely to be the Solaris Studio cc.
29117     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29118     if test $? -ne 0; then
29119       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29120       { $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
29121 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29122       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29123 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29124       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29125 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29126       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29127     fi
29128     # Remove usage instructions (if present), and
29129     # collapse compiler output into a single line
29130     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29131         $SED -e 's/ *[Uu]sage:.*//'`
29132     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29133         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29134   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29135     # xlc -qversion output typically looks like
29136     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29137     #     Version: 11.01.0000.0015
29138     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29139     # Check that this is likely to be the IBM XL C compiler.
29140     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29141     if test $? -ne 0; then
29142       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29143       { $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
29144 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29145       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29146 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29147       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29148 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29149       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29150     fi
29151     # Collapse compiler output into a single line
29152     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29153     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29154         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29155   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29156     # There is no specific version flag, but all output starts with a version string.
29157     # First line typically looks something like:
29158     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29159     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29160     # Check that this is likely to be Microsoft CL.EXE.
29161     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29162     if test $? -ne 0; then
29163       { $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
29164 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29165       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29166 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29167       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29168     fi
29169     # Collapse compiler output into a single line
29170     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29171     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29172         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29173   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29174     # gcc --version output typically looks like
29175     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29176     #     Copyright (C) 2013 Free Software Foundation, Inc.
29177     #     This is free software; see the source for copying conditions.  There is NO
29178     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29179     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29180     # Check that this is likely to be GCC.
29181     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29182     if test $? -ne 0; then
29183       { $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
29184 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29185       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29186 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29187       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29188     fi
29189     # Remove Copyright and legalese from version string, and
29190     # collapse into a single line
29191     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29192         $SED -e 's/ *Copyright .*//'`
29193     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29194         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29195   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29196     # clang --version output typically looks like
29197     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29198     #    clang version 3.3 (tags/RELEASE_33/final)
29199     # or
29200     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29201     #    Target: x86_64-pc-linux-gnu
29202     #    Thread model: posix
29203     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29204     # Check that this is likely to be clang
29205     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29206     if test $? -ne 0; then
29207       { $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
29208 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29209       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29210 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29211       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29212     fi
29213     # Collapse compiler output into a single line
29214     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29215     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29216         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29217   else
29218       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29219   fi
29220   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29221   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29222   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29223   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29224 
29225   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29226 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29227 
29228 
29229   # Now that we have resolved CC ourself, let autoconf have its go at it
29230   ac_ext=c
29231 ac_cpp='$CPP $CPPFLAGS'
29232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29235 if test -n "$ac_tool_prefix"; then
29236   for ac_prog in $CC
29237   do
29238     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29239 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29241 $as_echo_n "checking for $ac_word... " >&6; }
29242 if ${ac_cv_prog_CC+:} false; then :
29243   $as_echo_n "(cached) " >&6
29244 else
29245   if test -n "$CC"; then
29246   ac_cv_prog_CC="$CC" # Let the user override the test.
29247 else
29248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29249 for as_dir in $PATH
29250 do
29251   IFS=$as_save_IFS
29252   test -z "$as_dir" && as_dir=.
29253     for ac_exec_ext in '' $ac_executable_extensions; do
29254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29255     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29257     break 2
29258   fi
29259 done
29260   done
29261 IFS=$as_save_IFS
29262 
29263 fi
29264 fi
29265 CC=$ac_cv_prog_CC
29266 if test -n "$CC"; then
29267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29268 $as_echo "$CC" >&6; }
29269 else
29270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29271 $as_echo "no" >&6; }
29272 fi
29273 
29274 
29275     test -n "$CC" && break
29276   done
29277 fi
29278 if test -z "$CC"; then
29279   ac_ct_CC=$CC
29280   for ac_prog in $CC
29281 do
29282   # Extract the first word of "$ac_prog", so it can be a program name with args.
29283 set dummy $ac_prog; ac_word=$2
29284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29285 $as_echo_n "checking for $ac_word... " >&6; }
29286 if ${ac_cv_prog_ac_ct_CC+:} false; then :
29287   $as_echo_n "(cached) " >&6
29288 else
29289   if test -n "$ac_ct_CC"; then
29290   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29291 else
29292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29293 for as_dir in $PATH
29294 do
29295   IFS=$as_save_IFS
29296   test -z "$as_dir" && as_dir=.
29297     for ac_exec_ext in '' $ac_executable_extensions; do
29298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29299     ac_cv_prog_ac_ct_CC="$ac_prog"
29300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29301     break 2
29302   fi
29303 done
29304   done
29305 IFS=$as_save_IFS
29306 
29307 fi
29308 fi
29309 ac_ct_CC=$ac_cv_prog_ac_ct_CC
29310 if test -n "$ac_ct_CC"; then
29311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29312 $as_echo "$ac_ct_CC" >&6; }
29313 else
29314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29315 $as_echo "no" >&6; }
29316 fi
29317 
29318 
29319   test -n "$ac_ct_CC" && break
29320 done
29321 
29322   if test "x$ac_ct_CC" = x; then
29323     CC=""
29324   else
29325     case $cross_compiling:$ac_tool_warned in
29326 yes:)
29327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29328 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29329 ac_tool_warned=yes ;;
29330 esac
29331     CC=$ac_ct_CC
29332   fi
29333 fi
29334 
29335 
29336 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29337 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29338 as_fn_error $? "no acceptable C compiler found in \$PATH
29339 See \`config.log' for more details" "$LINENO" 5; }
29340 
29341 # Provide some information about the compiler.
29342 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29343 set X $ac_compile
29344 ac_compiler=$2
29345 for ac_option in --version -v -V -qversion; do
29346   { { ac_try="$ac_compiler $ac_option >&5"
29347 case "(($ac_try" in
29348   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29349   *) ac_try_echo=$ac_try;;
29350 esac
29351 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29352 $as_echo "$ac_try_echo"; } >&5
29353   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29354   ac_status=$?
29355   if test -s conftest.err; then
29356     sed '10a\
29357 ... rest of stderr output deleted ...
29358          10q' conftest.err >conftest.er1
29359     cat conftest.er1 >&5
29360   fi
29361   rm -f conftest.er1 conftest.err
29362   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29363   test $ac_status = 0; }
29364 done
29365 
29366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29367 /* end confdefs.h.  */
29368 
29369 int
29370 main ()
29371 {
29372 
29373   ;
29374   return 0;
29375 }
29376 _ACEOF
29377 ac_clean_files_save=$ac_clean_files
29378 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29379 # Try to create an executable without -o first, disregard a.out.
29380 # It will help us diagnose broken compilers, and finding out an intuition
29381 # of exeext.
29382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29383 $as_echo_n "checking whether the C compiler works... " >&6; }
29384 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29385 
29386 # The possible output files:
29387 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29388 
29389 ac_rmfiles=
29390 for ac_file in $ac_files
29391 do
29392   case $ac_file in
29393     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29394     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29395   esac
29396 done
29397 rm -f $ac_rmfiles
29398 
29399 if { { ac_try="$ac_link_default"
29400 case "(($ac_try" in
29401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29402   *) ac_try_echo=$ac_try;;
29403 esac
29404 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29405 $as_echo "$ac_try_echo"; } >&5
29406   (eval "$ac_link_default") 2>&5
29407   ac_status=$?
29408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29409   test $ac_status = 0; }; then :
29410   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29411 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29412 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
29413 # so that the user can short-circuit this test for compilers unknown to
29414 # Autoconf.
29415 for ac_file in $ac_files ''
29416 do
29417   test -f "$ac_file" || continue
29418   case $ac_file in
29419     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29420         ;;
29421     [ab].out )
29422         # We found the default executable, but exeext='' is most
29423         # certainly right.
29424         break;;
29425     *.* )
29426         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29427         then :; else
29428            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29429         fi
29430         # We set ac_cv_exeext here because the later test for it is not
29431         # safe: cross compilers may not add the suffix if given an `-o'
29432         # argument, so we may need to know it at that point already.
29433         # Even if this section looks crufty: it has the advantage of
29434         # actually working.
29435         break;;
29436     * )
29437         break;;
29438   esac
29439 done
29440 test "$ac_cv_exeext" = no && ac_cv_exeext=
29441 
29442 else
29443   ac_file=''
29444 fi
29445 if test -z "$ac_file"; then :
29446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29447 $as_echo "no" >&6; }
29448 $as_echo "$as_me: failed program was:" >&5
29449 sed 's/^/| /' conftest.$ac_ext >&5
29450 
29451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29452 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29453 as_fn_error 77 "C compiler cannot create executables
29454 See \`config.log' for more details" "$LINENO" 5; }
29455 else
29456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29457 $as_echo "yes" >&6; }
29458 fi
29459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29460 $as_echo_n "checking for C compiler default output file name... " >&6; }
29461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29462 $as_echo "$ac_file" >&6; }
29463 ac_exeext=$ac_cv_exeext
29464 
29465 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29466 ac_clean_files=$ac_clean_files_save
29467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29468 $as_echo_n "checking for suffix of executables... " >&6; }
29469 if { { ac_try="$ac_link"
29470 case "(($ac_try" in
29471   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29472   *) ac_try_echo=$ac_try;;
29473 esac
29474 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29475 $as_echo "$ac_try_echo"; } >&5
29476   (eval "$ac_link") 2>&5
29477   ac_status=$?
29478   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29479   test $ac_status = 0; }; then :
29480   # If both `conftest.exe' and `conftest' are `present' (well, observable)
29481 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29482 # work properly (i.e., refer to `conftest.exe'), while it won't with
29483 # `rm'.
29484 for ac_file in conftest.exe conftest conftest.*; do
29485   test -f "$ac_file" || continue
29486   case $ac_file in
29487     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29488     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29489           break;;
29490     * ) break;;
29491   esac
29492 done
29493 else
29494   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29495 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29496 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29497 See \`config.log' for more details" "$LINENO" 5; }
29498 fi
29499 rm -f conftest conftest$ac_cv_exeext
29500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29501 $as_echo "$ac_cv_exeext" >&6; }
29502 
29503 rm -f conftest.$ac_ext
29504 EXEEXT=$ac_cv_exeext
29505 ac_exeext=$EXEEXT
29506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29507 /* end confdefs.h.  */
29508 #include <stdio.h>
29509 int
29510 main ()
29511 {
29512 FILE *f = fopen ("conftest.out", "w");
29513  return ferror (f) || fclose (f) != 0;
29514 
29515   ;
29516   return 0;
29517 }
29518 _ACEOF
29519 ac_clean_files="$ac_clean_files conftest.out"
29520 # Check that the compiler produces executables we can run.  If not, either
29521 # the compiler is broken, or we cross compile.
29522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29523 $as_echo_n "checking whether we are cross compiling... " >&6; }
29524 if test "$cross_compiling" != yes; then
29525   { { ac_try="$ac_link"
29526 case "(($ac_try" in
29527   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29528   *) ac_try_echo=$ac_try;;
29529 esac
29530 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29531 $as_echo "$ac_try_echo"; } >&5
29532   (eval "$ac_link") 2>&5
29533   ac_status=$?
29534   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29535   test $ac_status = 0; }
29536   if { ac_try='./conftest$ac_cv_exeext'
29537   { { case "(($ac_try" in
29538   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29539   *) ac_try_echo=$ac_try;;
29540 esac
29541 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29542 $as_echo "$ac_try_echo"; } >&5
29543   (eval "$ac_try") 2>&5
29544   ac_status=$?
29545   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29546   test $ac_status = 0; }; }; then
29547     cross_compiling=no
29548   else
29549     if test "$cross_compiling" = maybe; then
29550         cross_compiling=yes
29551     else
29552         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29553 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29554 as_fn_error $? "cannot run C compiled programs.
29555 If you meant to cross compile, use \`--host'.
29556 See \`config.log' for more details" "$LINENO" 5; }
29557     fi
29558   fi
29559 fi
29560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29561 $as_echo "$cross_compiling" >&6; }
29562 
29563 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29564 ac_clean_files=$ac_clean_files_save
29565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29566 $as_echo_n "checking for suffix of object files... " >&6; }
29567 if ${ac_cv_objext+:} false; then :
29568   $as_echo_n "(cached) " >&6
29569 else
29570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29571 /* end confdefs.h.  */
29572 
29573 int
29574 main ()
29575 {
29576 
29577   ;
29578   return 0;
29579 }
29580 _ACEOF
29581 rm -f conftest.o conftest.obj
29582 if { { ac_try="$ac_compile"
29583 case "(($ac_try" in
29584   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29585   *) ac_try_echo=$ac_try;;
29586 esac
29587 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29588 $as_echo "$ac_try_echo"; } >&5
29589   (eval "$ac_compile") 2>&5
29590   ac_status=$?
29591   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29592   test $ac_status = 0; }; then :
29593   for ac_file in conftest.o conftest.obj conftest.*; do
29594   test -f "$ac_file" || continue;
29595   case $ac_file in
29596     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29597     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29598        break;;
29599   esac
29600 done
29601 else
29602   $as_echo "$as_me: failed program was:" >&5
29603 sed 's/^/| /' conftest.$ac_ext >&5
29604 
29605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29606 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29607 as_fn_error $? "cannot compute suffix of object files: cannot compile
29608 See \`config.log' for more details" "$LINENO" 5; }
29609 fi
29610 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29611 fi
29612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29613 $as_echo "$ac_cv_objext" >&6; }
29614 OBJEXT=$ac_cv_objext
29615 ac_objext=$OBJEXT
29616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29617 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29618 if ${ac_cv_c_compiler_gnu+:} false; then :
29619   $as_echo_n "(cached) " >&6
29620 else
29621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29622 /* end confdefs.h.  */
29623 
29624 int
29625 main ()
29626 {
29627 #ifndef __GNUC__
29628        choke me
29629 #endif
29630 
29631   ;
29632   return 0;
29633 }
29634 _ACEOF
29635 if ac_fn_c_try_compile "$LINENO"; then :
29636   ac_compiler_gnu=yes
29637 else
29638   ac_compiler_gnu=no
29639 fi
29640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29641 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29642 
29643 fi
29644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29645 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29646 if test $ac_compiler_gnu = yes; then
29647   GCC=yes
29648 else
29649   GCC=
29650 fi
29651 ac_test_CFLAGS=${CFLAGS+set}
29652 ac_save_CFLAGS=$CFLAGS
29653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29654 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29655 if ${ac_cv_prog_cc_g+:} false; then :
29656   $as_echo_n "(cached) " >&6
29657 else
29658   ac_save_c_werror_flag=$ac_c_werror_flag
29659    ac_c_werror_flag=yes
29660    ac_cv_prog_cc_g=no
29661    CFLAGS="-g"
29662    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29663 /* end confdefs.h.  */
29664 
29665 int
29666 main ()
29667 {
29668 
29669   ;
29670   return 0;
29671 }
29672 _ACEOF
29673 if ac_fn_c_try_compile "$LINENO"; then :
29674   ac_cv_prog_cc_g=yes
29675 else
29676   CFLAGS=""
29677       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29678 /* end confdefs.h.  */
29679 
29680 int
29681 main ()
29682 {
29683 
29684   ;
29685   return 0;
29686 }
29687 _ACEOF
29688 if ac_fn_c_try_compile "$LINENO"; then :
29689 
29690 else
29691   ac_c_werror_flag=$ac_save_c_werror_flag
29692          CFLAGS="-g"
29693          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29694 /* end confdefs.h.  */
29695 
29696 int
29697 main ()
29698 {
29699 
29700   ;
29701   return 0;
29702 }
29703 _ACEOF
29704 if ac_fn_c_try_compile "$LINENO"; then :
29705   ac_cv_prog_cc_g=yes
29706 fi
29707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29708 fi
29709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29710 fi
29711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29712    ac_c_werror_flag=$ac_save_c_werror_flag
29713 fi
29714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29715 $as_echo "$ac_cv_prog_cc_g" >&6; }
29716 if test "$ac_test_CFLAGS" = set; then
29717   CFLAGS=$ac_save_CFLAGS
29718 elif test $ac_cv_prog_cc_g = yes; then
29719   if test "$GCC" = yes; then
29720     CFLAGS="-g -O2"
29721   else
29722     CFLAGS="-g"
29723   fi
29724 else
29725   if test "$GCC" = yes; then
29726     CFLAGS="-O2"
29727   else
29728     CFLAGS=
29729   fi
29730 fi
29731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29732 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29733 if ${ac_cv_prog_cc_c89+:} false; then :
29734   $as_echo_n "(cached) " >&6
29735 else
29736   ac_cv_prog_cc_c89=no
29737 ac_save_CC=$CC
29738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29739 /* end confdefs.h.  */
29740 #include <stdarg.h>
29741 #include <stdio.h>
29742 struct stat;
29743 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29744 struct buf { int x; };
29745 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29746 static char *e (p, i)
29747      char **p;
29748      int i;
29749 {
29750   return p[i];
29751 }
29752 static char *f (char * (*g) (char **, int), char **p, ...)
29753 {
29754   char *s;
29755   va_list v;
29756   va_start (v,p);
29757   s = g (p, va_arg (v,int));
29758   va_end (v);
29759   return s;
29760 }
29761 
29762 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29763    function prototypes and stuff, but not '\xHH' hex character constants.
29764    These don't provoke an error unfortunately, instead are silently treated
29765    as 'x'.  The following induces an error, until -std is added to get
29766    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29767    array size at least.  It's necessary to write '\x00'==0 to get something
29768    that's true only with -std.  */
29769 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29770 
29771 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29772    inside strings and character constants.  */
29773 #define FOO(x) 'x'
29774 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29775 
29776 int test (int i, double x);
29777 struct s1 {int (*f) (int a);};
29778 struct s2 {int (*f) (double a);};
29779 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29780 int argc;
29781 char **argv;
29782 int
29783 main ()
29784 {
29785 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29786   ;
29787   return 0;
29788 }
29789 _ACEOF
29790 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29791         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29792 do
29793   CC="$ac_save_CC $ac_arg"
29794   if ac_fn_c_try_compile "$LINENO"; then :
29795   ac_cv_prog_cc_c89=$ac_arg
29796 fi
29797 rm -f core conftest.err conftest.$ac_objext
29798   test "x$ac_cv_prog_cc_c89" != "xno" && break
29799 done
29800 rm -f conftest.$ac_ext
29801 CC=$ac_save_CC
29802 
29803 fi
29804 # AC_CACHE_VAL
29805 case "x$ac_cv_prog_cc_c89" in
29806   x)
29807     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29808 $as_echo "none needed" >&6; } ;;
29809   xno)
29810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29811 $as_echo "unsupported" >&6; } ;;
29812   *)
29813     CC="$CC $ac_cv_prog_cc_c89"
29814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29815 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29816 esac
29817 if test "x$ac_cv_prog_cc_c89" != xno; then :
29818 
29819 fi
29820 
29821 ac_ext=cpp
29822 ac_cpp='$CXXCPP $CPPFLAGS'
29823 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29824 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29825 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29826 
29827 
29828 
29829   COMPILER_NAME=C++
29830   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29831 
29832   if test "x$CXX" != x; then
29833     # User has supplied compiler name already, always let that override.
29834     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29835 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29836     if test "x`basename $CXX`" = "x$CXX"; then
29837       # A command without a complete path is provided, search $PATH.
29838 
29839       for ac_prog in $CXX
29840 do
29841   # Extract the first word of "$ac_prog", so it can be a program name with args.
29842 set dummy $ac_prog; ac_word=$2
29843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29844 $as_echo_n "checking for $ac_word... " >&6; }
29845 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29846   $as_echo_n "(cached) " >&6
29847 else
29848   case $POTENTIAL_CXX in
29849   [\\/]* | ?:[\\/]*)
29850   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29851   ;;
29852   *)
29853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29854 for as_dir in $PATH
29855 do
29856   IFS=$as_save_IFS
29857   test -z "$as_dir" && as_dir=.
29858     for ac_exec_ext in '' $ac_executable_extensions; do
29859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29860     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29862     break 2
29863   fi
29864 done
29865   done
29866 IFS=$as_save_IFS
29867 
29868   ;;
29869 esac
29870 fi
29871 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29872 if test -n "$POTENTIAL_CXX"; then
29873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29874 $as_echo "$POTENTIAL_CXX" >&6; }
29875 else
29876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29877 $as_echo "no" >&6; }
29878 fi
29879 
29880 
29881   test -n "$POTENTIAL_CXX" && break
29882 done
29883 
29884       if test "x$POTENTIAL_CXX" != x; then
29885         CXX=$POTENTIAL_CXX
29886       else
29887         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29888       fi
29889     else
29890       # Otherwise it might already be a complete path
29891       if test ! -x "$CXX"; then
29892         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29893       fi
29894     fi
29895   else
29896     # No user supplied value. Locate compiler ourselves.
29897 
29898     # If we are cross compiling, assume cross compilation tools follows the
29899     # cross compilation standard where they are prefixed with the autoconf
29900     # standard name for the target. For example the binary
29901     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29902     # If we are not cross compiling, then the default compiler name will be
29903     # used.
29904 
29905     CXX=
29906     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29907     # before checking the rest of the PATH.
29908     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29909     # step, this should not be necessary.
29910     if test -n "$TOOLCHAIN_PATH"; then
29911       PATH_save="$PATH"
29912       PATH="$TOOLCHAIN_PATH"
29913       for ac_prog in $SEARCH_LIST
29914 do
29915   # Extract the first word of "$ac_prog", so it can be a program name with args.
29916 set dummy $ac_prog; ac_word=$2
29917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29918 $as_echo_n "checking for $ac_word... " >&6; }
29919 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29920   $as_echo_n "(cached) " >&6
29921 else
29922   case $TOOLCHAIN_PATH_CXX in
29923   [\\/]* | ?:[\\/]*)
29924   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29925   ;;
29926   *)
29927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29928 for as_dir in $PATH
29929 do
29930   IFS=$as_save_IFS
29931   test -z "$as_dir" && as_dir=.
29932     for ac_exec_ext in '' $ac_executable_extensions; do
29933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29934     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29936     break 2
29937   fi
29938 done
29939   done
29940 IFS=$as_save_IFS
29941 
29942   ;;
29943 esac
29944 fi
29945 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29946 if test -n "$TOOLCHAIN_PATH_CXX"; then
29947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29948 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29949 else
29950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29951 $as_echo "no" >&6; }
29952 fi
29953 
29954 
29955   test -n "$TOOLCHAIN_PATH_CXX" && break
29956 done
29957 
29958       CXX=$TOOLCHAIN_PATH_CXX
29959       PATH="$PATH_save"
29960     fi
29961 
29962     # AC_PATH_PROGS can't be run multiple times with the same variable,
29963     # so create a new name for this run.
29964     if test "x$CXX" = x; then
29965       for ac_prog in $SEARCH_LIST
29966 do
29967   # Extract the first word of "$ac_prog", so it can be a program name with args.
29968 set dummy $ac_prog; ac_word=$2
29969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29970 $as_echo_n "checking for $ac_word... " >&6; }
29971 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29972   $as_echo_n "(cached) " >&6
29973 else
29974   case $POTENTIAL_CXX in
29975   [\\/]* | ?:[\\/]*)
29976   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29977   ;;
29978   *)
29979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29980 for as_dir in $PATH
29981 do
29982   IFS=$as_save_IFS
29983   test -z "$as_dir" && as_dir=.
29984     for ac_exec_ext in '' $ac_executable_extensions; do
29985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29986     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29988     break 2
29989   fi
29990 done
29991   done
29992 IFS=$as_save_IFS
29993 
29994   ;;
29995 esac
29996 fi
29997 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29998 if test -n "$POTENTIAL_CXX"; then
29999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30000 $as_echo "$POTENTIAL_CXX" >&6; }
30001 else
30002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30003 $as_echo "no" >&6; }
30004 fi
30005 
30006 
30007   test -n "$POTENTIAL_CXX" && break
30008 done
30009 
30010       CXX=$POTENTIAL_CXX
30011     fi
30012 
30013     if test "x$CXX" = x; then
30014 
30015   # Print a helpful message on how to acquire the necessary build dependency.
30016   # devkit is the help tag: freetype, cups, pulse, alsa etc
30017   MISSING_DEPENDENCY=devkit
30018 
30019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30020     cygwin_help $MISSING_DEPENDENCY
30021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30022     msys_help $MISSING_DEPENDENCY
30023   else
30024     PKGHANDLER_COMMAND=
30025 
30026     case $PKGHANDLER in
30027       apt-get)
30028         apt_help     $MISSING_DEPENDENCY ;;
30029       yum)
30030         yum_help     $MISSING_DEPENDENCY ;;
30031       port)
30032         port_help    $MISSING_DEPENDENCY ;;
30033       pkgutil)
30034         pkgutil_help $MISSING_DEPENDENCY ;;
30035       pkgadd)
30036         pkgadd_help  $MISSING_DEPENDENCY ;;
30037     esac
30038 
30039     if test "x$PKGHANDLER_COMMAND" != x; then
30040       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30041     fi
30042   fi
30043 
30044       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30045     fi
30046   fi
30047 
30048   # Now we have a compiler binary in CXX. Make sure it's okay.
30049 
30050   # Only process if variable expands to non-empty
30051 
30052   if test "x$CXX" != x; then
30053     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30054 
30055   # First separate the path from the arguments. This will split at the first
30056   # space.
30057   complete="$CXX"
30058   path="${complete%% *}"
30059   tmp="$complete EOL"
30060   arguments="${tmp#* }"
30061 
30062   # Input might be given as Windows format, start by converting to
30063   # unix format.
30064   new_path=`$CYGPATH -u "$path"`
30065 
30066   # Now try to locate executable using which
30067   new_path=`$WHICH "$new_path" 2> /dev/null`
30068   # bat and cmd files are not always considered executable in cygwin causing which
30069   # to not find them
30070   if test "x$new_path" = x \
30071       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30072       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30073     new_path=`$CYGPATH -u "$path"`
30074   fi
30075   if test "x$new_path" = x; then
30076     # Oops. Which didn't find the executable.
30077     # The splitting of arguments from the executable at a space might have been incorrect,
30078     # since paths with space are more likely in Windows. Give it another try with the whole
30079     # argument.
30080     path="$complete"
30081     arguments="EOL"
30082     new_path=`$CYGPATH -u "$path"`
30083     new_path=`$WHICH "$new_path" 2> /dev/null`
30084     # bat and cmd files are not always considered executable in cygwin causing which
30085     # to not find them
30086     if test "x$new_path" = x \
30087         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30088         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30089       new_path=`$CYGPATH -u "$path"`
30090     fi
30091     if test "x$new_path" = x; then
30092       # It's still not found. Now this is an unrecoverable error.
30093       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30094 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30095       has_space=`$ECHO "$complete" | $GREP " "`
30096       if test "x$has_space" != x; then
30097         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30098 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30099       fi
30100       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30101     fi
30102   fi
30103 
30104   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30105   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30106   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30107   # "foo.exe" is OK but "foo" is an error.
30108   #
30109   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30110   # It is also a way to make sure we got the proper file name for the real test later on.
30111   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30112   if test "x$test_shortpath" = x; then
30113     # Short path failed, file does not exist as specified.
30114     # Try adding .exe or .cmd
30115     if test -f "${new_path}.exe"; then
30116       input_to_shortpath="${new_path}.exe"
30117     elif test -f "${new_path}.cmd"; then
30118       input_to_shortpath="${new_path}.cmd"
30119     else
30120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30121 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30122       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30123 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30124       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30125     fi
30126   else
30127     input_to_shortpath="$new_path"
30128   fi
30129 
30130   # Call helper function which possibly converts this using DOS-style short mode.
30131   # If so, the updated path is stored in $new_path.
30132   new_path="$input_to_shortpath"
30133 
30134   input_path="$input_to_shortpath"
30135   # Check if we need to convert this using DOS-style short mode. If the path
30136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30137   # take no chances and rewrite it.
30138   # Note: m4 eats our [], so we need to use [ and ] instead.
30139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30140   if test "x$has_forbidden_chars" != x; then
30141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30142     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30143     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30144     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30145       # Going to short mode and back again did indeed matter. Since short mode is
30146       # case insensitive, let's make it lowercase to improve readability.
30147       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30148       # Now convert it back to Unix-stile (cygpath)
30149       input_path=`$CYGPATH -u "$shortmode_path"`
30150       new_path="$input_path"
30151     fi
30152   fi
30153 
30154   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30155   if test "x$test_cygdrive_prefix" = x; then
30156     # As a simple fix, exclude /usr/bin since it's not a real path.
30157     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30158       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30159       # a path prefixed by /cygdrive for fixpath to work.
30160       new_path="$CYGWIN_ROOT_PATH$input_path"
30161     fi
30162   fi
30163 
30164   # remove trailing .exe if any
30165   new_path="${new_path/%.exe/}"
30166 
30167     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30168 
30169   # First separate the path from the arguments. This will split at the first
30170   # space.
30171   complete="$CXX"
30172   path="${complete%% *}"
30173   tmp="$complete EOL"
30174   arguments="${tmp#* }"
30175 
30176   # Input might be given as Windows format, start by converting to
30177   # unix format.
30178   new_path="$path"
30179 
30180   windows_path="$new_path"
30181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30182     unix_path=`$CYGPATH -u "$windows_path"`
30183     new_path="$unix_path"
30184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30186     new_path="$unix_path"
30187   fi
30188 
30189 
30190   # Now try to locate executable using which
30191   new_path=`$WHICH "$new_path" 2> /dev/null`
30192 
30193   if test "x$new_path" = x; then
30194     # Oops. Which didn't find the executable.
30195     # The splitting of arguments from the executable at a space might have been incorrect,
30196     # since paths with space are more likely in Windows. Give it another try with the whole
30197     # argument.
30198     path="$complete"
30199     arguments="EOL"
30200     new_path="$path"
30201 
30202   windows_path="$new_path"
30203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30204     unix_path=`$CYGPATH -u "$windows_path"`
30205     new_path="$unix_path"
30206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30208     new_path="$unix_path"
30209   fi
30210 
30211 
30212     new_path=`$WHICH "$new_path" 2> /dev/null`
30213     # bat and cmd files are not always considered executable in MSYS causing which
30214     # to not find them
30215     if test "x$new_path" = x \
30216         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30217         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30218       new_path="$path"
30219 
30220   windows_path="$new_path"
30221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30222     unix_path=`$CYGPATH -u "$windows_path"`
30223     new_path="$unix_path"
30224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30226     new_path="$unix_path"
30227   fi
30228 
30229     fi
30230 
30231     if test "x$new_path" = x; then
30232       # It's still not found. Now this is an unrecoverable error.
30233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30234 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30235       has_space=`$ECHO "$complete" | $GREP " "`
30236       if test "x$has_space" != x; then
30237         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30238 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30239       fi
30240       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30241     fi
30242   fi
30243 
30244   # Now new_path has a complete unix path to the binary
30245   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30246     # Keep paths in /bin as-is, but remove trailing .exe if any
30247     new_path="${new_path/%.exe/}"
30248     # Do not save /bin paths to all_fixpath_prefixes!
30249   else
30250     # Not in mixed or Windows style, start by that.
30251     new_path=`cmd //c echo $new_path`
30252 
30253   input_path="$new_path"
30254   # Check if we need to convert this using DOS-style short mode. If the path
30255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30256   # take no chances and rewrite it.
30257   # Note: m4 eats our [], so we need to use [ and ] instead.
30258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30259   if test "x$has_forbidden_chars" != x; then
30260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30261     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30262   fi
30263 
30264     # Output is in $new_path
30265 
30266   windows_path="$new_path"
30267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30268     unix_path=`$CYGPATH -u "$windows_path"`
30269     new_path="$unix_path"
30270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30272     new_path="$unix_path"
30273   fi
30274 
30275     # remove trailing .exe if any
30276     new_path="${new_path/%.exe/}"
30277 
30278     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30279     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30280   fi
30281 
30282     else
30283       # We're on a unix platform. Hooray! :)
30284       # First separate the path from the arguments. This will split at the first
30285       # space.
30286       complete="$CXX"
30287       path="${complete%% *}"
30288       tmp="$complete EOL"
30289       arguments="${tmp#* }"
30290 
30291       # Cannot rely on the command "which" here since it doesn't always work.
30292       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30293       if test -z "$is_absolute_path"; then
30294         # Path to executable is not absolute. Find it.
30295         IFS_save="$IFS"
30296         IFS=:
30297         for p in $PATH; do
30298           if test -f "$p/$path" && test -x "$p/$path"; then
30299             new_path="$p/$path"
30300             break
30301           fi
30302         done
30303         IFS="$IFS_save"
30304       else
30305         # This is an absolute path, we can use it without further modifications.
30306         new_path="$path"
30307       fi
30308 
30309       if test "x$new_path" = x; then
30310         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30311 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30312         has_space=`$ECHO "$complete" | $GREP " "`
30313         if test "x$has_space" != x; then
30314           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30315 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30316         fi
30317         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30318       fi
30319     fi
30320 
30321     # Now join together the path and the arguments once again
30322     if test "x$arguments" != xEOL; then
30323       new_complete="$new_path ${arguments% *}"
30324     else
30325       new_complete="$new_path"
30326     fi
30327 
30328     if test "x$complete" != "x$new_complete"; then
30329       CXX="$new_complete"
30330       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30331 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30332     fi
30333   fi
30334 
30335   TEST_COMPILER="$CXX"
30336   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30337   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30338   if test "x$OPENJDK_BUILD_OS" != xaix; then
30339     # FIXME: This test should not be needed anymore; we don't do that for any platform.
30340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30341 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30342 
30343   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30344     # Follow a chain of symbolic links. Use readlink
30345     # where it exists, else fall back to horribly
30346     # complicated shell code.
30347     if test "x$READLINK_TESTED" != yes; then
30348       # On MacOSX there is a readlink tool with a different
30349       # purpose than the GNU readlink tool. Check the found readlink.
30350       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30351       if test "x$ISGNU" = x; then
30352         # A readlink that we do not know how to use.
30353         # Are there other non-GNU readlinks out there?
30354         READLINK_TESTED=yes
30355         READLINK=
30356       fi
30357     fi
30358 
30359     if test "x$READLINK" != x; then
30360       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30361     else
30362       # Save the current directory for restoring afterwards
30363       STARTDIR=$PWD
30364       COUNTER=0
30365       sym_link_dir=`$DIRNAME $TEST_COMPILER`
30366       sym_link_file=`$BASENAME $TEST_COMPILER`
30367       cd $sym_link_dir
30368       # Use -P flag to resolve symlinks in directories.
30369       cd `$THEPWDCMD -P`
30370       sym_link_dir=`$THEPWDCMD -P`
30371       # Resolve file symlinks
30372       while test $COUNTER -lt 20; do
30373         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30374         if test "x$ISLINK" == x; then
30375           # This is not a symbolic link! We are done!
30376           break
30377         fi
30378         # Again resolve directory symlinks since the target of the just found
30379         # link could be in a different directory
30380         cd `$DIRNAME $ISLINK`
30381         sym_link_dir=`$THEPWDCMD -P`
30382         sym_link_file=`$BASENAME $ISLINK`
30383         let COUNTER=COUNTER+1
30384       done
30385       cd $STARTDIR
30386       TEST_COMPILER=$sym_link_dir/$sym_link_file
30387     fi
30388   fi
30389 
30390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30391 $as_echo "$TEST_COMPILER" >&6; }
30392   fi
30393   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30394 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
30395 
30396   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30397   if test "x$COMPILER_BASENAME" = "xccache"; then
30398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30399 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30400     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30401     # We want to control ccache invocation ourselves, so ignore this cc and try
30402     # searching again.
30403 
30404     # Remove the path to the fake ccache cc from the PATH
30405     RETRY_COMPILER_SAVED_PATH="$PATH"
30406     COMPILER_DIRNAME=`$DIRNAME $CXX`
30407     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30408 
30409     # Try again looking for our compiler
30410     if test -n "$ac_tool_prefix"; then
30411   for ac_prog in $TOOLCHAIN_CXX_BINARY
30412   do
30413     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30414 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30416 $as_echo_n "checking for $ac_word... " >&6; }
30417 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30418   $as_echo_n "(cached) " >&6
30419 else
30420   if test -n "$PROPER_COMPILER_CXX"; then
30421   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30422 else
30423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30424 for as_dir in $PATH
30425 do
30426   IFS=$as_save_IFS
30427   test -z "$as_dir" && as_dir=.
30428     for ac_exec_ext in '' $ac_executable_extensions; do
30429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30430     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30432     break 2
30433   fi
30434 done
30435   done
30436 IFS=$as_save_IFS
30437 
30438 fi
30439 fi
30440 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30441 if test -n "$PROPER_COMPILER_CXX"; then
30442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30443 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30444 else
30445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30446 $as_echo "no" >&6; }
30447 fi
30448 
30449 
30450     test -n "$PROPER_COMPILER_CXX" && break
30451   done
30452 fi
30453 if test -z "$PROPER_COMPILER_CXX"; then
30454   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30455   for ac_prog in $TOOLCHAIN_CXX_BINARY
30456 do
30457   # Extract the first word of "$ac_prog", so it can be a program name with args.
30458 set dummy $ac_prog; ac_word=$2
30459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30460 $as_echo_n "checking for $ac_word... " >&6; }
30461 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30462   $as_echo_n "(cached) " >&6
30463 else
30464   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30465   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30466 else
30467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30468 for as_dir in $PATH
30469 do
30470   IFS=$as_save_IFS
30471   test -z "$as_dir" && as_dir=.
30472     for ac_exec_ext in '' $ac_executable_extensions; do
30473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30474     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30476     break 2
30477   fi
30478 done
30479   done
30480 IFS=$as_save_IFS
30481 
30482 fi
30483 fi
30484 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30485 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30487 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30488 else
30489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30490 $as_echo "no" >&6; }
30491 fi
30492 
30493 
30494   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30495 done
30496 
30497   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30498     PROPER_COMPILER_CXX=""
30499   else
30500     case $cross_compiling:$ac_tool_warned in
30501 yes:)
30502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30503 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30504 ac_tool_warned=yes ;;
30505 esac
30506     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30507   fi
30508 fi
30509 
30510 
30511   # Only process if variable expands to non-empty
30512 
30513   if test "x$PROPER_COMPILER_CXX" != x; then
30514     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30515 
30516   # First separate the path from the arguments. This will split at the first
30517   # space.
30518   complete="$PROPER_COMPILER_CXX"
30519   path="${complete%% *}"
30520   tmp="$complete EOL"
30521   arguments="${tmp#* }"
30522 
30523   # Input might be given as Windows format, start by converting to
30524   # unix format.
30525   new_path=`$CYGPATH -u "$path"`
30526 
30527   # Now try to locate executable using which
30528   new_path=`$WHICH "$new_path" 2> /dev/null`
30529   # bat and cmd files are not always considered executable in cygwin causing which
30530   # to not find them
30531   if test "x$new_path" = x \
30532       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30533       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30534     new_path=`$CYGPATH -u "$path"`
30535   fi
30536   if test "x$new_path" = x; then
30537     # Oops. Which didn't find the executable.
30538     # The splitting of arguments from the executable at a space might have been incorrect,
30539     # since paths with space are more likely in Windows. Give it another try with the whole
30540     # argument.
30541     path="$complete"
30542     arguments="EOL"
30543     new_path=`$CYGPATH -u "$path"`
30544     new_path=`$WHICH "$new_path" 2> /dev/null`
30545     # bat and cmd files are not always considered executable in cygwin causing which
30546     # to not find them
30547     if test "x$new_path" = x \
30548         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30549         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30550       new_path=`$CYGPATH -u "$path"`
30551     fi
30552     if test "x$new_path" = x; then
30553       # It's still not found. Now this is an unrecoverable error.
30554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30555 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30556       has_space=`$ECHO "$complete" | $GREP " "`
30557       if test "x$has_space" != x; then
30558         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30559 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30560       fi
30561       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30562     fi
30563   fi
30564 
30565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30568   # "foo.exe" is OK but "foo" is an error.
30569   #
30570   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30571   # It is also a way to make sure we got the proper file name for the real test later on.
30572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30573   if test "x$test_shortpath" = x; then
30574     # Short path failed, file does not exist as specified.
30575     # Try adding .exe or .cmd
30576     if test -f "${new_path}.exe"; then
30577       input_to_shortpath="${new_path}.exe"
30578     elif test -f "${new_path}.cmd"; then
30579       input_to_shortpath="${new_path}.cmd"
30580     else
30581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30582 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30583       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30584 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30585       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30586     fi
30587   else
30588     input_to_shortpath="$new_path"
30589   fi
30590 
30591   # Call helper function which possibly converts this using DOS-style short mode.
30592   # If so, the updated path is stored in $new_path.
30593   new_path="$input_to_shortpath"
30594 
30595   input_path="$input_to_shortpath"
30596   # Check if we need to convert this using DOS-style short mode. If the path
30597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30598   # take no chances and rewrite it.
30599   # Note: m4 eats our [], so we need to use [ and ] instead.
30600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30601   if test "x$has_forbidden_chars" != x; then
30602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30603     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30604     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30605     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30606       # Going to short mode and back again did indeed matter. Since short mode is
30607       # case insensitive, let's make it lowercase to improve readability.
30608       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30609       # Now convert it back to Unix-stile (cygpath)
30610       input_path=`$CYGPATH -u "$shortmode_path"`
30611       new_path="$input_path"
30612     fi
30613   fi
30614 
30615   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30616   if test "x$test_cygdrive_prefix" = x; then
30617     # As a simple fix, exclude /usr/bin since it's not a real path.
30618     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30619       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30620       # a path prefixed by /cygdrive for fixpath to work.
30621       new_path="$CYGWIN_ROOT_PATH$input_path"
30622     fi
30623   fi
30624 
30625   # remove trailing .exe if any
30626   new_path="${new_path/%.exe/}"
30627 
30628     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30629 
30630   # First separate the path from the arguments. This will split at the first
30631   # space.
30632   complete="$PROPER_COMPILER_CXX"
30633   path="${complete%% *}"
30634   tmp="$complete EOL"
30635   arguments="${tmp#* }"
30636 
30637   # Input might be given as Windows format, start by converting to
30638   # unix format.
30639   new_path="$path"
30640 
30641   windows_path="$new_path"
30642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30643     unix_path=`$CYGPATH -u "$windows_path"`
30644     new_path="$unix_path"
30645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30647     new_path="$unix_path"
30648   fi
30649 
30650 
30651   # Now try to locate executable using which
30652   new_path=`$WHICH "$new_path" 2> /dev/null`
30653 
30654   if test "x$new_path" = x; then
30655     # Oops. Which didn't find the executable.
30656     # The splitting of arguments from the executable at a space might have been incorrect,
30657     # since paths with space are more likely in Windows. Give it another try with the whole
30658     # argument.
30659     path="$complete"
30660     arguments="EOL"
30661     new_path="$path"
30662 
30663   windows_path="$new_path"
30664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30665     unix_path=`$CYGPATH -u "$windows_path"`
30666     new_path="$unix_path"
30667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30669     new_path="$unix_path"
30670   fi
30671 
30672 
30673     new_path=`$WHICH "$new_path" 2> /dev/null`
30674     # bat and cmd files are not always considered executable in MSYS causing which
30675     # to not find them
30676     if test "x$new_path" = x \
30677         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30678         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30679       new_path="$path"
30680 
30681   windows_path="$new_path"
30682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30683     unix_path=`$CYGPATH -u "$windows_path"`
30684     new_path="$unix_path"
30685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30687     new_path="$unix_path"
30688   fi
30689 
30690     fi
30691 
30692     if test "x$new_path" = x; then
30693       # It's still not found. Now this is an unrecoverable error.
30694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30695 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30696       has_space=`$ECHO "$complete" | $GREP " "`
30697       if test "x$has_space" != x; then
30698         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30699 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30700       fi
30701       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30702     fi
30703   fi
30704 
30705   # Now new_path has a complete unix path to the binary
30706   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30707     # Keep paths in /bin as-is, but remove trailing .exe if any
30708     new_path="${new_path/%.exe/}"
30709     # Do not save /bin paths to all_fixpath_prefixes!
30710   else
30711     # Not in mixed or Windows style, start by that.
30712     new_path=`cmd //c echo $new_path`
30713 
30714   input_path="$new_path"
30715   # Check if we need to convert this using DOS-style short mode. If the path
30716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30717   # take no chances and rewrite it.
30718   # Note: m4 eats our [], so we need to use [ and ] instead.
30719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30720   if test "x$has_forbidden_chars" != x; then
30721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30723   fi
30724 
30725     # Output is in $new_path
30726 
30727   windows_path="$new_path"
30728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30729     unix_path=`$CYGPATH -u "$windows_path"`
30730     new_path="$unix_path"
30731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30733     new_path="$unix_path"
30734   fi
30735 
30736     # remove trailing .exe if any
30737     new_path="${new_path/%.exe/}"
30738 
30739     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30740     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30741   fi
30742 
30743     else
30744       # We're on a unix platform. Hooray! :)
30745       # First separate the path from the arguments. This will split at the first
30746       # space.
30747       complete="$PROPER_COMPILER_CXX"
30748       path="${complete%% *}"
30749       tmp="$complete EOL"
30750       arguments="${tmp#* }"
30751 
30752       # Cannot rely on the command "which" here since it doesn't always work.
30753       is_absolute_path=`$ECHO "$path" | $GREP ^/`
30754       if test -z "$is_absolute_path"; then
30755         # Path to executable is not absolute. Find it.
30756         IFS_save="$IFS"
30757         IFS=:
30758         for p in $PATH; do
30759           if test -f "$p/$path" && test -x "$p/$path"; then
30760             new_path="$p/$path"
30761             break
30762           fi
30763         done
30764         IFS="$IFS_save"
30765       else
30766         # This is an absolute path, we can use it without further modifications.
30767         new_path="$path"
30768       fi
30769 
30770       if test "x$new_path" = x; then
30771         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30772 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30773         has_space=`$ECHO "$complete" | $GREP " "`
30774         if test "x$has_space" != x; then
30775           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30777         fi
30778         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30779       fi
30780     fi
30781 
30782     # Now join together the path and the arguments once again
30783     if test "x$arguments" != xEOL; then
30784       new_complete="$new_path ${arguments% *}"
30785     else
30786       new_complete="$new_path"
30787     fi
30788 
30789     if test "x$complete" != "x$new_complete"; then
30790       PROPER_COMPILER_CXX="$new_complete"
30791       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30792 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30793     fi
30794   fi
30795 
30796     PATH="$RETRY_COMPILER_SAVED_PATH"
30797 
30798     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30799 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30800 
30801   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30802     # Follow a chain of symbolic links. Use readlink
30803     # where it exists, else fall back to horribly
30804     # complicated shell code.
30805     if test "x$READLINK_TESTED" != yes; then
30806       # On MacOSX there is a readlink tool with a different
30807       # purpose than the GNU readlink tool. Check the found readlink.
30808       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30809       if test "x$ISGNU" = x; then
30810         # A readlink that we do not know how to use.
30811         # Are there other non-GNU readlinks out there?
30812         READLINK_TESTED=yes
30813         READLINK=
30814       fi
30815     fi
30816 
30817     if test "x$READLINK" != x; then
30818       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30819     else
30820       # Save the current directory for restoring afterwards
30821       STARTDIR=$PWD
30822       COUNTER=0
30823       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30824       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30825       cd $sym_link_dir
30826       # Use -P flag to resolve symlinks in directories.
30827       cd `$THEPWDCMD -P`
30828       sym_link_dir=`$THEPWDCMD -P`
30829       # Resolve file symlinks
30830       while test $COUNTER -lt 20; do
30831         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30832         if test "x$ISLINK" == x; then
30833           # This is not a symbolic link! We are done!
30834           break
30835         fi
30836         # Again resolve directory symlinks since the target of the just found
30837         # link could be in a different directory
30838         cd `$DIRNAME $ISLINK`
30839         sym_link_dir=`$THEPWDCMD -P`
30840         sym_link_file=`$BASENAME $ISLINK`
30841         let COUNTER=COUNTER+1
30842       done
30843       cd $STARTDIR
30844       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30845     fi
30846   fi
30847 
30848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30849 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30850     CXX="$PROPER_COMPILER_CXX"
30851   else
30852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30853 $as_echo "no, keeping CXX" >&6; }
30854   fi
30855 
30856 
30857   COMPILER=$CXX
30858   COMPILER_NAME=$COMPILER_NAME
30859 
30860   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30861     # cc -V output typically looks like
30862     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30863     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30864     # Check that this is likely to be the Solaris Studio cc.
30865     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30866     if test $? -ne 0; then
30867       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30868       { $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
30869 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30870       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30871 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30872       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30873 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30874       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30875     fi
30876     # Remove usage instructions (if present), and
30877     # collapse compiler output into a single line
30878     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30879         $SED -e 's/ *[Uu]sage:.*//'`
30880     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30881         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30882   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30883     # xlc -qversion output typically looks like
30884     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30885     #     Version: 11.01.0000.0015
30886     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30887     # Check that this is likely to be the IBM XL C compiler.
30888     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30889     if test $? -ne 0; then
30890       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30891       { $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
30892 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30893       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30894 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30895       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30896 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30897       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30898     fi
30899     # Collapse compiler output into a single line
30900     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30901     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30902         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30903   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30904     # There is no specific version flag, but all output starts with a version string.
30905     # First line typically looks something like:
30906     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30907     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30908     # Check that this is likely to be Microsoft CL.EXE.
30909     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30910     if test $? -ne 0; then
30911       { $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
30912 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30913       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30914 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30915       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30916     fi
30917     # Collapse compiler output into a single line
30918     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30919     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30920         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30921   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30922     # gcc --version output typically looks like
30923     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30924     #     Copyright (C) 2013 Free Software Foundation, Inc.
30925     #     This is free software; see the source for copying conditions.  There is NO
30926     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30927     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30928     # Check that this is likely to be GCC.
30929     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30930     if test $? -ne 0; then
30931       { $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
30932 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30933       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30934 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30935       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30936     fi
30937     # Remove Copyright and legalese from version string, and
30938     # collapse into a single line
30939     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30940         $SED -e 's/ *Copyright .*//'`
30941     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30942         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30943   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30944     # clang --version output typically looks like
30945     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30946     #    clang version 3.3 (tags/RELEASE_33/final)
30947     # or
30948     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30949     #    Target: x86_64-pc-linux-gnu
30950     #    Thread model: posix
30951     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30952     # Check that this is likely to be clang
30953     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30954     if test $? -ne 0; then
30955       { $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
30956 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30957       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30958 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30959       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30960     fi
30961     # Collapse compiler output into a single line
30962     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30963     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30964         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30965   else
30966       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30967   fi
30968   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30969   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30970   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30971   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30972 
30973   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30974 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30975 
30976 
30977   # Now that we have resolved CXX ourself, let autoconf have its go at it
30978   ac_ext=cpp
30979 ac_cpp='$CXXCPP $CPPFLAGS'
30980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30983 if test -z "$CXX"; then
30984   if test -n "$CCC"; then
30985     CXX=$CCC
30986   else
30987     if test -n "$ac_tool_prefix"; then
30988   for ac_prog in $CXX
30989   do
30990     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30991 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30993 $as_echo_n "checking for $ac_word... " >&6; }
30994 if ${ac_cv_prog_CXX+:} false; then :
30995   $as_echo_n "(cached) " >&6
30996 else
30997   if test -n "$CXX"; then
30998   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30999 else
31000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31001 for as_dir in $PATH
31002 do
31003   IFS=$as_save_IFS
31004   test -z "$as_dir" && as_dir=.
31005     for ac_exec_ext in '' $ac_executable_extensions; do
31006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31007     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31009     break 2
31010   fi
31011 done
31012   done
31013 IFS=$as_save_IFS
31014 
31015 fi
31016 fi
31017 CXX=$ac_cv_prog_CXX
31018 if test -n "$CXX"; then
31019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31020 $as_echo "$CXX" >&6; }
31021 else
31022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31023 $as_echo "no" >&6; }
31024 fi
31025 
31026 
31027     test -n "$CXX" && break
31028   done
31029 fi
31030 if test -z "$CXX"; then
31031   ac_ct_CXX=$CXX
31032   for ac_prog in $CXX
31033 do
31034   # Extract the first word of "$ac_prog", so it can be a program name with args.
31035 set dummy $ac_prog; ac_word=$2
31036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31037 $as_echo_n "checking for $ac_word... " >&6; }
31038 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31039   $as_echo_n "(cached) " >&6
31040 else
31041   if test -n "$ac_ct_CXX"; then
31042   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31043 else
31044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31045 for as_dir in $PATH
31046 do
31047   IFS=$as_save_IFS
31048   test -z "$as_dir" && as_dir=.
31049     for ac_exec_ext in '' $ac_executable_extensions; do
31050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31051     ac_cv_prog_ac_ct_CXX="$ac_prog"
31052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31053     break 2
31054   fi
31055 done
31056   done
31057 IFS=$as_save_IFS
31058 
31059 fi
31060 fi
31061 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31062 if test -n "$ac_ct_CXX"; then
31063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31064 $as_echo "$ac_ct_CXX" >&6; }
31065 else
31066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31067 $as_echo "no" >&6; }
31068 fi
31069 
31070 
31071   test -n "$ac_ct_CXX" && break
31072 done
31073 
31074   if test "x$ac_ct_CXX" = x; then
31075     CXX="g++"
31076   else
31077     case $cross_compiling:$ac_tool_warned in
31078 yes:)
31079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31080 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31081 ac_tool_warned=yes ;;
31082 esac
31083     CXX=$ac_ct_CXX
31084   fi
31085 fi
31086 
31087   fi
31088 fi
31089 # Provide some information about the compiler.
31090 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31091 set X $ac_compile
31092 ac_compiler=$2
31093 for ac_option in --version -v -V -qversion; do
31094   { { ac_try="$ac_compiler $ac_option >&5"
31095 case "(($ac_try" in
31096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31097   *) ac_try_echo=$ac_try;;
31098 esac
31099 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31100 $as_echo "$ac_try_echo"; } >&5
31101   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31102   ac_status=$?
31103   if test -s conftest.err; then
31104     sed '10a\
31105 ... rest of stderr output deleted ...
31106          10q' conftest.err >conftest.er1
31107     cat conftest.er1 >&5
31108   fi
31109   rm -f conftest.er1 conftest.err
31110   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31111   test $ac_status = 0; }
31112 done
31113 
31114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31115 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31116 if ${ac_cv_cxx_compiler_gnu+:} false; then :
31117   $as_echo_n "(cached) " >&6
31118 else
31119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31120 /* end confdefs.h.  */
31121 
31122 int
31123 main ()
31124 {
31125 #ifndef __GNUC__
31126        choke me
31127 #endif
31128 
31129   ;
31130   return 0;
31131 }
31132 _ACEOF
31133 if ac_fn_cxx_try_compile "$LINENO"; then :
31134   ac_compiler_gnu=yes
31135 else
31136   ac_compiler_gnu=no
31137 fi
31138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31139 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31140 
31141 fi
31142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31143 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31144 if test $ac_compiler_gnu = yes; then
31145   GXX=yes
31146 else
31147   GXX=
31148 fi
31149 ac_test_CXXFLAGS=${CXXFLAGS+set}
31150 ac_save_CXXFLAGS=$CXXFLAGS
31151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31152 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
31153 if ${ac_cv_prog_cxx_g+:} false; then :
31154   $as_echo_n "(cached) " >&6
31155 else
31156   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31157    ac_cxx_werror_flag=yes
31158    ac_cv_prog_cxx_g=no
31159    CXXFLAGS="-g"
31160    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31161 /* end confdefs.h.  */
31162 
31163 int
31164 main ()
31165 {
31166 
31167   ;
31168   return 0;
31169 }
31170 _ACEOF
31171 if ac_fn_cxx_try_compile "$LINENO"; then :
31172   ac_cv_prog_cxx_g=yes
31173 else
31174   CXXFLAGS=""
31175       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31176 /* end confdefs.h.  */
31177 
31178 int
31179 main ()
31180 {
31181 
31182   ;
31183   return 0;
31184 }
31185 _ACEOF
31186 if ac_fn_cxx_try_compile "$LINENO"; then :
31187 
31188 else
31189   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31190          CXXFLAGS="-g"
31191          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31192 /* end confdefs.h.  */
31193 
31194 int
31195 main ()
31196 {
31197 
31198   ;
31199   return 0;
31200 }
31201 _ACEOF
31202 if ac_fn_cxx_try_compile "$LINENO"; then :
31203   ac_cv_prog_cxx_g=yes
31204 fi
31205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31206 fi
31207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31208 fi
31209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31210    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31211 fi
31212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31213 $as_echo "$ac_cv_prog_cxx_g" >&6; }
31214 if test "$ac_test_CXXFLAGS" = set; then
31215   CXXFLAGS=$ac_save_CXXFLAGS
31216 elif test $ac_cv_prog_cxx_g = yes; then
31217   if test "$GXX" = yes; then
31218     CXXFLAGS="-g -O2"
31219   else
31220     CXXFLAGS="-g"
31221   fi
31222 else
31223   if test "$GXX" = yes; then
31224     CXXFLAGS="-O2"
31225   else
31226     CXXFLAGS=
31227   fi
31228 fi
31229 ac_ext=cpp
31230 ac_cpp='$CXXCPP $CPPFLAGS'
31231 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31232 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31233 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31234 
31235 
31236   #
31237   # Setup the preprocessor (CPP and CXXCPP)
31238   #
31239   ac_ext=c
31240 ac_cpp='$CPP $CPPFLAGS'
31241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31245 $as_echo_n "checking how to run the C preprocessor... " >&6; }
31246 # On Suns, sometimes $CPP names a directory.
31247 if test -n "$CPP" && test -d "$CPP"; then
31248   CPP=
31249 fi
31250 if test -z "$CPP"; then
31251   if ${ac_cv_prog_CPP+:} false; then :
31252   $as_echo_n "(cached) " >&6
31253 else
31254       # Double quotes because CPP needs to be expanded
31255     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31256     do
31257       ac_preproc_ok=false
31258 for ac_c_preproc_warn_flag in '' yes
31259 do
31260   # Use a header file that comes with gcc, so configuring glibc
31261   # with a fresh cross-compiler works.
31262   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31263   # <limits.h> exists even on freestanding compilers.
31264   # On the NeXT, cc -E runs the code through the compiler's parser,
31265   # not just through cpp. "Syntax error" is here to catch this case.
31266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31267 /* end confdefs.h.  */
31268 #ifdef __STDC__
31269 # include <limits.h>
31270 #else
31271 # include <assert.h>
31272 #endif
31273                      Syntax error
31274 _ACEOF
31275 if ac_fn_c_try_cpp "$LINENO"; then :
31276 
31277 else
31278   # Broken: fails on valid input.
31279 continue
31280 fi
31281 rm -f conftest.err conftest.i conftest.$ac_ext
31282 
31283   # OK, works on sane cases.  Now check whether nonexistent headers
31284   # can be detected and how.
31285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31286 /* end confdefs.h.  */
31287 #include <ac_nonexistent.h>
31288 _ACEOF
31289 if ac_fn_c_try_cpp "$LINENO"; then :
31290   # Broken: success on invalid input.
31291 continue
31292 else
31293   # Passes both tests.
31294 ac_preproc_ok=:
31295 break
31296 fi
31297 rm -f conftest.err conftest.i conftest.$ac_ext
31298 
31299 done
31300 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31301 rm -f conftest.i conftest.err conftest.$ac_ext
31302 if $ac_preproc_ok; then :
31303   break
31304 fi
31305 
31306     done
31307     ac_cv_prog_CPP=$CPP
31308 
31309 fi
31310   CPP=$ac_cv_prog_CPP
31311 else
31312   ac_cv_prog_CPP=$CPP
31313 fi
31314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31315 $as_echo "$CPP" >&6; }
31316 ac_preproc_ok=false
31317 for ac_c_preproc_warn_flag in '' yes
31318 do
31319   # Use a header file that comes with gcc, so configuring glibc
31320   # with a fresh cross-compiler works.
31321   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31322   # <limits.h> exists even on freestanding compilers.
31323   # On the NeXT, cc -E runs the code through the compiler's parser,
31324   # not just through cpp. "Syntax error" is here to catch this case.
31325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31326 /* end confdefs.h.  */
31327 #ifdef __STDC__
31328 # include <limits.h>
31329 #else
31330 # include <assert.h>
31331 #endif
31332                      Syntax error
31333 _ACEOF
31334 if ac_fn_c_try_cpp "$LINENO"; then :
31335 
31336 else
31337   # Broken: fails on valid input.
31338 continue
31339 fi
31340 rm -f conftest.err conftest.i conftest.$ac_ext
31341 
31342   # OK, works on sane cases.  Now check whether nonexistent headers
31343   # can be detected and how.
31344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31345 /* end confdefs.h.  */
31346 #include <ac_nonexistent.h>
31347 _ACEOF
31348 if ac_fn_c_try_cpp "$LINENO"; then :
31349   # Broken: success on invalid input.
31350 continue
31351 else
31352   # Passes both tests.
31353 ac_preproc_ok=:
31354 break
31355 fi
31356 rm -f conftest.err conftest.i conftest.$ac_ext
31357 
31358 done
31359 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31360 rm -f conftest.i conftest.err conftest.$ac_ext
31361 if $ac_preproc_ok; then :
31362 
31363 else
31364   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31365 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31366 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31367 See \`config.log' for more details" "$LINENO" 5; }
31368 fi
31369 
31370 ac_ext=cpp
31371 ac_cpp='$CXXCPP $CPPFLAGS'
31372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31375 
31376 
31377   # Only process if variable expands to non-empty
31378 
31379   if test "x$CPP" != x; then
31380     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31381 
31382   # First separate the path from the arguments. This will split at the first
31383   # space.
31384   complete="$CPP"
31385   path="${complete%% *}"
31386   tmp="$complete EOL"
31387   arguments="${tmp#* }"
31388 
31389   # Input might be given as Windows format, start by converting to
31390   # unix format.
31391   new_path=`$CYGPATH -u "$path"`
31392 
31393   # Now try to locate executable using which
31394   new_path=`$WHICH "$new_path" 2> /dev/null`
31395   # bat and cmd files are not always considered executable in cygwin causing which
31396   # to not find them
31397   if test "x$new_path" = x \
31398       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31399       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31400     new_path=`$CYGPATH -u "$path"`
31401   fi
31402   if test "x$new_path" = x; then
31403     # Oops. Which didn't find the executable.
31404     # The splitting of arguments from the executable at a space might have been incorrect,
31405     # since paths with space are more likely in Windows. Give it another try with the whole
31406     # argument.
31407     path="$complete"
31408     arguments="EOL"
31409     new_path=`$CYGPATH -u "$path"`
31410     new_path=`$WHICH "$new_path" 2> /dev/null`
31411     # bat and cmd files are not always considered executable in cygwin causing which
31412     # to not find them
31413     if test "x$new_path" = x \
31414         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31415         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31416       new_path=`$CYGPATH -u "$path"`
31417     fi
31418     if test "x$new_path" = x; then
31419       # It's still not found. Now this is an unrecoverable error.
31420       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31421 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31422       has_space=`$ECHO "$complete" | $GREP " "`
31423       if test "x$has_space" != x; then
31424         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31425 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31426       fi
31427       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31428     fi
31429   fi
31430 
31431   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31432   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31433   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31434   # "foo.exe" is OK but "foo" is an error.
31435   #
31436   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31437   # It is also a way to make sure we got the proper file name for the real test later on.
31438   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31439   if test "x$test_shortpath" = x; then
31440     # Short path failed, file does not exist as specified.
31441     # Try adding .exe or .cmd
31442     if test -f "${new_path}.exe"; then
31443       input_to_shortpath="${new_path}.exe"
31444     elif test -f "${new_path}.cmd"; then
31445       input_to_shortpath="${new_path}.cmd"
31446     else
31447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31448 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31449       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31450 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31451       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31452     fi
31453   else
31454     input_to_shortpath="$new_path"
31455   fi
31456 
31457   # Call helper function which possibly converts this using DOS-style short mode.
31458   # If so, the updated path is stored in $new_path.
31459   new_path="$input_to_shortpath"
31460 
31461   input_path="$input_to_shortpath"
31462   # Check if we need to convert this using DOS-style short mode. If the path
31463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31464   # take no chances and rewrite it.
31465   # Note: m4 eats our [], so we need to use [ and ] instead.
31466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31467   if test "x$has_forbidden_chars" != x; then
31468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31469     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31470     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31471     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31472       # Going to short mode and back again did indeed matter. Since short mode is
31473       # case insensitive, let's make it lowercase to improve readability.
31474       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31475       # Now convert it back to Unix-stile (cygpath)
31476       input_path=`$CYGPATH -u "$shortmode_path"`
31477       new_path="$input_path"
31478     fi
31479   fi
31480 
31481   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31482   if test "x$test_cygdrive_prefix" = x; then
31483     # As a simple fix, exclude /usr/bin since it's not a real path.
31484     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31485       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31486       # a path prefixed by /cygdrive for fixpath to work.
31487       new_path="$CYGWIN_ROOT_PATH$input_path"
31488     fi
31489   fi
31490 
31491   # remove trailing .exe if any
31492   new_path="${new_path/%.exe/}"
31493 
31494     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31495 
31496   # First separate the path from the arguments. This will split at the first
31497   # space.
31498   complete="$CPP"
31499   path="${complete%% *}"
31500   tmp="$complete EOL"
31501   arguments="${tmp#* }"
31502 
31503   # Input might be given as Windows format, start by converting to
31504   # unix format.
31505   new_path="$path"
31506 
31507   windows_path="$new_path"
31508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31509     unix_path=`$CYGPATH -u "$windows_path"`
31510     new_path="$unix_path"
31511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31513     new_path="$unix_path"
31514   fi
31515 
31516 
31517   # Now try to locate executable using which
31518   new_path=`$WHICH "$new_path" 2> /dev/null`
31519 
31520   if test "x$new_path" = x; then
31521     # Oops. Which didn't find the executable.
31522     # The splitting of arguments from the executable at a space might have been incorrect,
31523     # since paths with space are more likely in Windows. Give it another try with the whole
31524     # argument.
31525     path="$complete"
31526     arguments="EOL"
31527     new_path="$path"
31528 
31529   windows_path="$new_path"
31530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31531     unix_path=`$CYGPATH -u "$windows_path"`
31532     new_path="$unix_path"
31533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31535     new_path="$unix_path"
31536   fi
31537 
31538 
31539     new_path=`$WHICH "$new_path" 2> /dev/null`
31540     # bat and cmd files are not always considered executable in MSYS causing which
31541     # to not find them
31542     if test "x$new_path" = x \
31543         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31544         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31545       new_path="$path"
31546 
31547   windows_path="$new_path"
31548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31549     unix_path=`$CYGPATH -u "$windows_path"`
31550     new_path="$unix_path"
31551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31553     new_path="$unix_path"
31554   fi
31555 
31556     fi
31557 
31558     if test "x$new_path" = x; then
31559       # It's still not found. Now this is an unrecoverable error.
31560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31561 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31562       has_space=`$ECHO "$complete" | $GREP " "`
31563       if test "x$has_space" != x; then
31564         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31565 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31566       fi
31567       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31568     fi
31569   fi
31570 
31571   # Now new_path has a complete unix path to the binary
31572   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31573     # Keep paths in /bin as-is, but remove trailing .exe if any
31574     new_path="${new_path/%.exe/}"
31575     # Do not save /bin paths to all_fixpath_prefixes!
31576   else
31577     # Not in mixed or Windows style, start by that.
31578     new_path=`cmd //c echo $new_path`
31579 
31580   input_path="$new_path"
31581   # Check if we need to convert this using DOS-style short mode. If the path
31582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31583   # take no chances and rewrite it.
31584   # Note: m4 eats our [], so we need to use [ and ] instead.
31585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31586   if test "x$has_forbidden_chars" != x; then
31587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31588     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31589   fi
31590 
31591     # Output is in $new_path
31592 
31593   windows_path="$new_path"
31594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31595     unix_path=`$CYGPATH -u "$windows_path"`
31596     new_path="$unix_path"
31597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31599     new_path="$unix_path"
31600   fi
31601 
31602     # remove trailing .exe if any
31603     new_path="${new_path/%.exe/}"
31604 
31605     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31606     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31607   fi
31608 
31609     else
31610       # We're on a unix platform. Hooray! :)
31611       # First separate the path from the arguments. This will split at the first
31612       # space.
31613       complete="$CPP"
31614       path="${complete%% *}"
31615       tmp="$complete EOL"
31616       arguments="${tmp#* }"
31617 
31618       # Cannot rely on the command "which" here since it doesn't always work.
31619       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31620       if test -z "$is_absolute_path"; then
31621         # Path to executable is not absolute. Find it.
31622         IFS_save="$IFS"
31623         IFS=:
31624         for p in $PATH; do
31625           if test -f "$p/$path" && test -x "$p/$path"; then
31626             new_path="$p/$path"
31627             break
31628           fi
31629         done
31630         IFS="$IFS_save"
31631       else
31632         # This is an absolute path, we can use it without further modifications.
31633         new_path="$path"
31634       fi
31635 
31636       if test "x$new_path" = x; then
31637         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31638 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31639         has_space=`$ECHO "$complete" | $GREP " "`
31640         if test "x$has_space" != x; then
31641           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31642 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31643         fi
31644         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31645       fi
31646     fi
31647 
31648     # Now join together the path and the arguments once again
31649     if test "x$arguments" != xEOL; then
31650       new_complete="$new_path ${arguments% *}"
31651     else
31652       new_complete="$new_path"
31653     fi
31654 
31655     if test "x$complete" != "x$new_complete"; then
31656       CPP="$new_complete"
31657       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31658 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31659     fi
31660   fi
31661 
31662   ac_ext=cpp
31663 ac_cpp='$CXXCPP $CPPFLAGS'
31664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31665 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31668 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31669 if test -z "$CXXCPP"; then
31670   if ${ac_cv_prog_CXXCPP+:} false; then :
31671   $as_echo_n "(cached) " >&6
31672 else
31673       # Double quotes because CXXCPP needs to be expanded
31674     for CXXCPP in "$CXX -E" "/lib/cpp"
31675     do
31676       ac_preproc_ok=false
31677 for ac_cxx_preproc_warn_flag in '' yes
31678 do
31679   # Use a header file that comes with gcc, so configuring glibc
31680   # with a fresh cross-compiler works.
31681   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31682   # <limits.h> exists even on freestanding compilers.
31683   # On the NeXT, cc -E runs the code through the compiler's parser,
31684   # not just through cpp. "Syntax error" is here to catch this case.
31685   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31686 /* end confdefs.h.  */
31687 #ifdef __STDC__
31688 # include <limits.h>
31689 #else
31690 # include <assert.h>
31691 #endif
31692                      Syntax error
31693 _ACEOF
31694 if ac_fn_cxx_try_cpp "$LINENO"; then :
31695 
31696 else
31697   # Broken: fails on valid input.
31698 continue
31699 fi
31700 rm -f conftest.err conftest.i conftest.$ac_ext
31701 
31702   # OK, works on sane cases.  Now check whether nonexistent headers
31703   # can be detected and how.
31704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31705 /* end confdefs.h.  */
31706 #include <ac_nonexistent.h>
31707 _ACEOF
31708 if ac_fn_cxx_try_cpp "$LINENO"; then :
31709   # Broken: success on invalid input.
31710 continue
31711 else
31712   # Passes both tests.
31713 ac_preproc_ok=:
31714 break
31715 fi
31716 rm -f conftest.err conftest.i conftest.$ac_ext
31717 
31718 done
31719 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31720 rm -f conftest.i conftest.err conftest.$ac_ext
31721 if $ac_preproc_ok; then :
31722   break
31723 fi
31724 
31725     done
31726     ac_cv_prog_CXXCPP=$CXXCPP
31727 
31728 fi
31729   CXXCPP=$ac_cv_prog_CXXCPP
31730 else
31731   ac_cv_prog_CXXCPP=$CXXCPP
31732 fi
31733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31734 $as_echo "$CXXCPP" >&6; }
31735 ac_preproc_ok=false
31736 for ac_cxx_preproc_warn_flag in '' yes
31737 do
31738   # Use a header file that comes with gcc, so configuring glibc
31739   # with a fresh cross-compiler works.
31740   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31741   # <limits.h> exists even on freestanding compilers.
31742   # On the NeXT, cc -E runs the code through the compiler's parser,
31743   # not just through cpp. "Syntax error" is here to catch this case.
31744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31745 /* end confdefs.h.  */
31746 #ifdef __STDC__
31747 # include <limits.h>
31748 #else
31749 # include <assert.h>
31750 #endif
31751                      Syntax error
31752 _ACEOF
31753 if ac_fn_cxx_try_cpp "$LINENO"; then :
31754 
31755 else
31756   # Broken: fails on valid input.
31757 continue
31758 fi
31759 rm -f conftest.err conftest.i conftest.$ac_ext
31760 
31761   # OK, works on sane cases.  Now check whether nonexistent headers
31762   # can be detected and how.
31763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31764 /* end confdefs.h.  */
31765 #include <ac_nonexistent.h>
31766 _ACEOF
31767 if ac_fn_cxx_try_cpp "$LINENO"; then :
31768   # Broken: success on invalid input.
31769 continue
31770 else
31771   # Passes both tests.
31772 ac_preproc_ok=:
31773 break
31774 fi
31775 rm -f conftest.err conftest.i conftest.$ac_ext
31776 
31777 done
31778 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31779 rm -f conftest.i conftest.err conftest.$ac_ext
31780 if $ac_preproc_ok; then :
31781 
31782 else
31783   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31784 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31785 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31786 See \`config.log' for more details" "$LINENO" 5; }
31787 fi
31788 
31789 ac_ext=cpp
31790 ac_cpp='$CXXCPP $CPPFLAGS'
31791 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31792 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31793 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31794 
31795 
31796   # Only process if variable expands to non-empty
31797 
31798   if test "x$CXXCPP" != x; then
31799     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31800 
31801   # First separate the path from the arguments. This will split at the first
31802   # space.
31803   complete="$CXXCPP"
31804   path="${complete%% *}"
31805   tmp="$complete EOL"
31806   arguments="${tmp#* }"
31807 
31808   # Input might be given as Windows format, start by converting to
31809   # unix format.
31810   new_path=`$CYGPATH -u "$path"`
31811 
31812   # Now try to locate executable using which
31813   new_path=`$WHICH "$new_path" 2> /dev/null`
31814   # bat and cmd files are not always considered executable in cygwin causing which
31815   # to not find them
31816   if test "x$new_path" = x \
31817       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31818       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31819     new_path=`$CYGPATH -u "$path"`
31820   fi
31821   if test "x$new_path" = x; then
31822     # Oops. Which didn't find the executable.
31823     # The splitting of arguments from the executable at a space might have been incorrect,
31824     # since paths with space are more likely in Windows. Give it another try with the whole
31825     # argument.
31826     path="$complete"
31827     arguments="EOL"
31828     new_path=`$CYGPATH -u "$path"`
31829     new_path=`$WHICH "$new_path" 2> /dev/null`
31830     # bat and cmd files are not always considered executable in cygwin causing which
31831     # to not find them
31832     if test "x$new_path" = x \
31833         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31834         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31835       new_path=`$CYGPATH -u "$path"`
31836     fi
31837     if test "x$new_path" = x; then
31838       # It's still not found. Now this is an unrecoverable error.
31839       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31840 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31841       has_space=`$ECHO "$complete" | $GREP " "`
31842       if test "x$has_space" != x; then
31843         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31844 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31845       fi
31846       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31847     fi
31848   fi
31849 
31850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31853   # "foo.exe" is OK but "foo" is an error.
31854   #
31855   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31856   # It is also a way to make sure we got the proper file name for the real test later on.
31857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31858   if test "x$test_shortpath" = x; then
31859     # Short path failed, file does not exist as specified.
31860     # Try adding .exe or .cmd
31861     if test -f "${new_path}.exe"; then
31862       input_to_shortpath="${new_path}.exe"
31863     elif test -f "${new_path}.cmd"; then
31864       input_to_shortpath="${new_path}.cmd"
31865     else
31866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31867 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31868       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31869 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31870       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31871     fi
31872   else
31873     input_to_shortpath="$new_path"
31874   fi
31875 
31876   # Call helper function which possibly converts this using DOS-style short mode.
31877   # If so, the updated path is stored in $new_path.
31878   new_path="$input_to_shortpath"
31879 
31880   input_path="$input_to_shortpath"
31881   # Check if we need to convert this using DOS-style short mode. If the path
31882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31883   # take no chances and rewrite it.
31884   # Note: m4 eats our [], so we need to use [ and ] instead.
31885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31886   if test "x$has_forbidden_chars" != x; then
31887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31891       # Going to short mode and back again did indeed matter. Since short mode is
31892       # case insensitive, let's make it lowercase to improve readability.
31893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31894       # Now convert it back to Unix-stile (cygpath)
31895       input_path=`$CYGPATH -u "$shortmode_path"`
31896       new_path="$input_path"
31897     fi
31898   fi
31899 
31900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31901   if test "x$test_cygdrive_prefix" = x; then
31902     # As a simple fix, exclude /usr/bin since it's not a real path.
31903     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31905       # a path prefixed by /cygdrive for fixpath to work.
31906       new_path="$CYGWIN_ROOT_PATH$input_path"
31907     fi
31908   fi
31909 
31910   # remove trailing .exe if any
31911   new_path="${new_path/%.exe/}"
31912 
31913     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31914 
31915   # First separate the path from the arguments. This will split at the first
31916   # space.
31917   complete="$CXXCPP"
31918   path="${complete%% *}"
31919   tmp="$complete EOL"
31920   arguments="${tmp#* }"
31921 
31922   # Input might be given as Windows format, start by converting to
31923   # unix format.
31924   new_path="$path"
31925 
31926   windows_path="$new_path"
31927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31928     unix_path=`$CYGPATH -u "$windows_path"`
31929     new_path="$unix_path"
31930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31932     new_path="$unix_path"
31933   fi
31934 
31935 
31936   # Now try to locate executable using which
31937   new_path=`$WHICH "$new_path" 2> /dev/null`
31938 
31939   if test "x$new_path" = x; then
31940     # Oops. Which didn't find the executable.
31941     # The splitting of arguments from the executable at a space might have been incorrect,
31942     # since paths with space are more likely in Windows. Give it another try with the whole
31943     # argument.
31944     path="$complete"
31945     arguments="EOL"
31946     new_path="$path"
31947 
31948   windows_path="$new_path"
31949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31950     unix_path=`$CYGPATH -u "$windows_path"`
31951     new_path="$unix_path"
31952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31954     new_path="$unix_path"
31955   fi
31956 
31957 
31958     new_path=`$WHICH "$new_path" 2> /dev/null`
31959     # bat and cmd files are not always considered executable in MSYS causing which
31960     # to not find them
31961     if test "x$new_path" = x \
31962         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31963         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31964       new_path="$path"
31965 
31966   windows_path="$new_path"
31967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31968     unix_path=`$CYGPATH -u "$windows_path"`
31969     new_path="$unix_path"
31970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31972     new_path="$unix_path"
31973   fi
31974 
31975     fi
31976 
31977     if test "x$new_path" = x; then
31978       # It's still not found. Now this is an unrecoverable error.
31979       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31980 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31981       has_space=`$ECHO "$complete" | $GREP " "`
31982       if test "x$has_space" != x; then
31983         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31984 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31985       fi
31986       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31987     fi
31988   fi
31989 
31990   # Now new_path has a complete unix path to the binary
31991   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31992     # Keep paths in /bin as-is, but remove trailing .exe if any
31993     new_path="${new_path/%.exe/}"
31994     # Do not save /bin paths to all_fixpath_prefixes!
31995   else
31996     # Not in mixed or Windows style, start by that.
31997     new_path=`cmd //c echo $new_path`
31998 
31999   input_path="$new_path"
32000   # Check if we need to convert this using DOS-style short mode. If the path
32001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32002   # take no chances and rewrite it.
32003   # Note: m4 eats our [], so we need to use [ and ] instead.
32004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32005   if test "x$has_forbidden_chars" != x; then
32006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32008   fi
32009 
32010     # Output is in $new_path
32011 
32012   windows_path="$new_path"
32013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32014     unix_path=`$CYGPATH -u "$windows_path"`
32015     new_path="$unix_path"
32016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32018     new_path="$unix_path"
32019   fi
32020 
32021     # remove trailing .exe if any
32022     new_path="${new_path/%.exe/}"
32023 
32024     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32025     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32026   fi
32027 
32028     else
32029       # We're on a unix platform. Hooray! :)
32030       # First separate the path from the arguments. This will split at the first
32031       # space.
32032       complete="$CXXCPP"
32033       path="${complete%% *}"
32034       tmp="$complete EOL"
32035       arguments="${tmp#* }"
32036 
32037       # Cannot rely on the command "which" here since it doesn't always work.
32038       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32039       if test -z "$is_absolute_path"; then
32040         # Path to executable is not absolute. Find it.
32041         IFS_save="$IFS"
32042         IFS=:
32043         for p in $PATH; do
32044           if test -f "$p/$path" && test -x "$p/$path"; then
32045             new_path="$p/$path"
32046             break
32047           fi
32048         done
32049         IFS="$IFS_save"
32050       else
32051         # This is an absolute path, we can use it without further modifications.
32052         new_path="$path"
32053       fi
32054 
32055       if test "x$new_path" = x; then
32056         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32057 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32058         has_space=`$ECHO "$complete" | $GREP " "`
32059         if test "x$has_space" != x; then
32060           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32061 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32062         fi
32063         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32064       fi
32065     fi
32066 
32067     # Now join together the path and the arguments once again
32068     if test "x$arguments" != xEOL; then
32069       new_complete="$new_path ${arguments% *}"
32070     else
32071       new_complete="$new_path"
32072     fi
32073 
32074     if test "x$complete" != "x$new_complete"; then
32075       CXXCPP="$new_complete"
32076       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32077 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32078     fi
32079   fi
32080 
32081 
32082   #
32083   # Setup the linker (LD)
32084   #
32085   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32086     # In the Microsoft toolchain we have a separate LD command "link".
32087     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32088     # a cygwin program for something completely different.
32089     # Extract the first word of "link", so it can be a program name with args.
32090 set dummy link; ac_word=$2
32091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32092 $as_echo_n "checking for $ac_word... " >&6; }
32093 if ${ac_cv_prog_LD+:} false; then :
32094   $as_echo_n "(cached) " >&6
32095 else
32096   if test -n "$LD"; then
32097   ac_cv_prog_LD="$LD" # Let the user override the test.
32098 else
32099   ac_prog_rejected=no
32100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32101 for as_dir in $PATH
32102 do
32103   IFS=$as_save_IFS
32104   test -z "$as_dir" && as_dir=.
32105     for ac_exec_ext in '' $ac_executable_extensions; do
32106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32107     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32108        ac_prog_rejected=yes
32109        continue
32110      fi
32111     ac_cv_prog_LD="link"
32112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32113     break 2
32114   fi
32115 done
32116   done
32117 IFS=$as_save_IFS
32118 
32119 if test $ac_prog_rejected = yes; then
32120   # We found a bogon in the path, so make sure we never use it.
32121   set dummy $ac_cv_prog_LD
32122   shift
32123   if test $# != 0; then
32124     # We chose a different compiler from the bogus one.
32125     # However, it has the same basename, so the bogon will be chosen
32126     # first if we set LD to just the basename; use the full file name.
32127     shift
32128     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32129   fi
32130 fi
32131 fi
32132 fi
32133 LD=$ac_cv_prog_LD
32134 if test -n "$LD"; then
32135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32136 $as_echo "$LD" >&6; }
32137 else
32138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32139 $as_echo "no" >&6; }
32140 fi
32141 
32142 
32143 
32144   # Only process if variable expands to non-empty
32145 
32146   if test "x$LD" != x; then
32147     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32148 
32149   # First separate the path from the arguments. This will split at the first
32150   # space.
32151   complete="$LD"
32152   path="${complete%% *}"
32153   tmp="$complete EOL"
32154   arguments="${tmp#* }"
32155 
32156   # Input might be given as Windows format, start by converting to
32157   # unix format.
32158   new_path=`$CYGPATH -u "$path"`
32159 
32160   # Now try to locate executable using which
32161   new_path=`$WHICH "$new_path" 2> /dev/null`
32162   # bat and cmd files are not always considered executable in cygwin causing which
32163   # to not find them
32164   if test "x$new_path" = x \
32165       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32166       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32167     new_path=`$CYGPATH -u "$path"`
32168   fi
32169   if test "x$new_path" = x; then
32170     # Oops. Which didn't find the executable.
32171     # The splitting of arguments from the executable at a space might have been incorrect,
32172     # since paths with space are more likely in Windows. Give it another try with the whole
32173     # argument.
32174     path="$complete"
32175     arguments="EOL"
32176     new_path=`$CYGPATH -u "$path"`
32177     new_path=`$WHICH "$new_path" 2> /dev/null`
32178     # bat and cmd files are not always considered executable in cygwin causing which
32179     # to not find them
32180     if test "x$new_path" = x \
32181         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32182         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32183       new_path=`$CYGPATH -u "$path"`
32184     fi
32185     if test "x$new_path" = x; then
32186       # It's still not found. Now this is an unrecoverable error.
32187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32188 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32189       has_space=`$ECHO "$complete" | $GREP " "`
32190       if test "x$has_space" != x; then
32191         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32192 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32193       fi
32194       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32195     fi
32196   fi
32197 
32198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32201   # "foo.exe" is OK but "foo" is an error.
32202   #
32203   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32204   # It is also a way to make sure we got the proper file name for the real test later on.
32205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32206   if test "x$test_shortpath" = x; then
32207     # Short path failed, file does not exist as specified.
32208     # Try adding .exe or .cmd
32209     if test -f "${new_path}.exe"; then
32210       input_to_shortpath="${new_path}.exe"
32211     elif test -f "${new_path}.cmd"; then
32212       input_to_shortpath="${new_path}.cmd"
32213     else
32214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32215 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32216       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32217 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32218       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32219     fi
32220   else
32221     input_to_shortpath="$new_path"
32222   fi
32223 
32224   # Call helper function which possibly converts this using DOS-style short mode.
32225   # If so, the updated path is stored in $new_path.
32226   new_path="$input_to_shortpath"
32227 
32228   input_path="$input_to_shortpath"
32229   # Check if we need to convert this using DOS-style short mode. If the path
32230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32231   # take no chances and rewrite it.
32232   # Note: m4 eats our [], so we need to use [ and ] instead.
32233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32234   if test "x$has_forbidden_chars" != x; then
32235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32239       # Going to short mode and back again did indeed matter. Since short mode is
32240       # case insensitive, let's make it lowercase to improve readability.
32241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32242       # Now convert it back to Unix-stile (cygpath)
32243       input_path=`$CYGPATH -u "$shortmode_path"`
32244       new_path="$input_path"
32245     fi
32246   fi
32247 
32248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32249   if test "x$test_cygdrive_prefix" = x; then
32250     # As a simple fix, exclude /usr/bin since it's not a real path.
32251     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32253       # a path prefixed by /cygdrive for fixpath to work.
32254       new_path="$CYGWIN_ROOT_PATH$input_path"
32255     fi
32256   fi
32257 
32258   # remove trailing .exe if any
32259   new_path="${new_path/%.exe/}"
32260 
32261     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32262 
32263   # First separate the path from the arguments. This will split at the first
32264   # space.
32265   complete="$LD"
32266   path="${complete%% *}"
32267   tmp="$complete EOL"
32268   arguments="${tmp#* }"
32269 
32270   # Input might be given as Windows format, start by converting to
32271   # unix format.
32272   new_path="$path"
32273 
32274   windows_path="$new_path"
32275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32276     unix_path=`$CYGPATH -u "$windows_path"`
32277     new_path="$unix_path"
32278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32279     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32280     new_path="$unix_path"
32281   fi
32282 
32283 
32284   # Now try to locate executable using which
32285   new_path=`$WHICH "$new_path" 2> /dev/null`
32286 
32287   if test "x$new_path" = x; then
32288     # Oops. Which didn't find the executable.
32289     # The splitting of arguments from the executable at a space might have been incorrect,
32290     # since paths with space are more likely in Windows. Give it another try with the whole
32291     # argument.
32292     path="$complete"
32293     arguments="EOL"
32294     new_path="$path"
32295 
32296   windows_path="$new_path"
32297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32298     unix_path=`$CYGPATH -u "$windows_path"`
32299     new_path="$unix_path"
32300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32302     new_path="$unix_path"
32303   fi
32304 
32305 
32306     new_path=`$WHICH "$new_path" 2> /dev/null`
32307     # bat and cmd files are not always considered executable in MSYS causing which
32308     # to not find them
32309     if test "x$new_path" = x \
32310         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32311         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32312       new_path="$path"
32313 
32314   windows_path="$new_path"
32315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32316     unix_path=`$CYGPATH -u "$windows_path"`
32317     new_path="$unix_path"
32318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32320     new_path="$unix_path"
32321   fi
32322 
32323     fi
32324 
32325     if test "x$new_path" = x; then
32326       # It's still not found. Now this is an unrecoverable error.
32327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32328 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32329       has_space=`$ECHO "$complete" | $GREP " "`
32330       if test "x$has_space" != x; then
32331         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32332 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32333       fi
32334       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32335     fi
32336   fi
32337 
32338   # Now new_path has a complete unix path to the binary
32339   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32340     # Keep paths in /bin as-is, but remove trailing .exe if any
32341     new_path="${new_path/%.exe/}"
32342     # Do not save /bin paths to all_fixpath_prefixes!
32343   else
32344     # Not in mixed or Windows style, start by that.
32345     new_path=`cmd //c echo $new_path`
32346 
32347   input_path="$new_path"
32348   # Check if we need to convert this using DOS-style short mode. If the path
32349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32350   # take no chances and rewrite it.
32351   # Note: m4 eats our [], so we need to use [ and ] instead.
32352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32353   if test "x$has_forbidden_chars" != x; then
32354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32356   fi
32357 
32358     # Output is in $new_path
32359 
32360   windows_path="$new_path"
32361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32362     unix_path=`$CYGPATH -u "$windows_path"`
32363     new_path="$unix_path"
32364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32366     new_path="$unix_path"
32367   fi
32368 
32369     # remove trailing .exe if any
32370     new_path="${new_path/%.exe/}"
32371 
32372     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32373     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32374   fi
32375 
32376     else
32377       # We're on a unix platform. Hooray! :)
32378       # First separate the path from the arguments. This will split at the first
32379       # space.
32380       complete="$LD"
32381       path="${complete%% *}"
32382       tmp="$complete EOL"
32383       arguments="${tmp#* }"
32384 
32385       # Cannot rely on the command "which" here since it doesn't always work.
32386       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32387       if test -z "$is_absolute_path"; then
32388         # Path to executable is not absolute. Find it.
32389         IFS_save="$IFS"
32390         IFS=:
32391         for p in $PATH; do
32392           if test -f "$p/$path" && test -x "$p/$path"; then
32393             new_path="$p/$path"
32394             break
32395           fi
32396         done
32397         IFS="$IFS_save"
32398       else
32399         # This is an absolute path, we can use it without further modifications.
32400         new_path="$path"
32401       fi
32402 
32403       if test "x$new_path" = x; then
32404         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32405 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32406         has_space=`$ECHO "$complete" | $GREP " "`
32407         if test "x$has_space" != x; then
32408           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32409 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32410         fi
32411         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32412       fi
32413     fi
32414 
32415     # Now join together the path and the arguments once again
32416     if test "x$arguments" != xEOL; then
32417       new_complete="$new_path ${arguments% *}"
32418     else
32419       new_complete="$new_path"
32420     fi
32421 
32422     if test "x$complete" != "x$new_complete"; then
32423       LD="$new_complete"
32424       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32425 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32426     fi
32427   fi
32428 
32429     # Verify that we indeed succeeded with this trick.
32430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32431 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32432     "$LD" --version > /dev/null
32433     if test $? -eq 0 ; then
32434       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32435 $as_echo "no" >&6; }
32436       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32437     else
32438       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32439 $as_echo "yes" >&6; }
32440     fi
32441     LDCXX="$LD"
32442   else
32443     # All other toolchains use the compiler to link.
32444     LD="$CC"
32445     LDCXX="$CXX"
32446   fi
32447 
32448   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32449 
32450 
32451   #
32452   # Setup the assembler (AS)
32453   #
32454   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32455     # FIXME: should this really be solaris, or solstudio?
32456 
32457 
32458   # Publish this variable in the help.
32459 
32460 
32461   if test "x$AS" = x; then
32462     # The variable is not set by user, try to locate tool using the code snippet
32463     for ac_prog in as
32464 do
32465   # Extract the first word of "$ac_prog", so it can be a program name with args.
32466 set dummy $ac_prog; ac_word=$2
32467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32468 $as_echo_n "checking for $ac_word... " >&6; }
32469 if ${ac_cv_path_AS+:} false; then :
32470   $as_echo_n "(cached) " >&6
32471 else
32472   case $AS in
32473   [\\/]* | ?:[\\/]*)
32474   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32475   ;;
32476   *)
32477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32478 for as_dir in $PATH
32479 do
32480   IFS=$as_save_IFS
32481   test -z "$as_dir" && as_dir=.
32482     for ac_exec_ext in '' $ac_executable_extensions; do
32483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32484     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32486     break 2
32487   fi
32488 done
32489   done
32490 IFS=$as_save_IFS
32491 
32492   ;;
32493 esac
32494 fi
32495 AS=$ac_cv_path_AS
32496 if test -n "$AS"; then
32497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32498 $as_echo "$AS" >&6; }
32499 else
32500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32501 $as_echo "no" >&6; }
32502 fi
32503 
32504 
32505   test -n "$AS" && break
32506 done
32507 
32508   else
32509     # The variable is set, but is it from the command line or the environment?
32510 
32511     # Try to remove the string !AS! from our list.
32512     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32513     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32514       # If it failed, the variable was not from the command line. Ignore it,
32515       # but warn the user (except for BASH, which is always set by the calling BASH).
32516       if test "xAS" != xBASH; then
32517         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32518 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32519       fi
32520       # Try to locate tool using the code snippet
32521       for ac_prog in as
32522 do
32523   # Extract the first word of "$ac_prog", so it can be a program name with args.
32524 set dummy $ac_prog; ac_word=$2
32525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32526 $as_echo_n "checking for $ac_word... " >&6; }
32527 if ${ac_cv_path_AS+:} false; then :
32528   $as_echo_n "(cached) " >&6
32529 else
32530   case $AS in
32531   [\\/]* | ?:[\\/]*)
32532   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32533   ;;
32534   *)
32535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32536 for as_dir in $PATH
32537 do
32538   IFS=$as_save_IFS
32539   test -z "$as_dir" && as_dir=.
32540     for ac_exec_ext in '' $ac_executable_extensions; do
32541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32542     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32544     break 2
32545   fi
32546 done
32547   done
32548 IFS=$as_save_IFS
32549 
32550   ;;
32551 esac
32552 fi
32553 AS=$ac_cv_path_AS
32554 if test -n "$AS"; then
32555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32556 $as_echo "$AS" >&6; }
32557 else
32558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32559 $as_echo "no" >&6; }
32560 fi
32561 
32562 
32563   test -n "$AS" && break
32564 done
32565 
32566     else
32567       # If it succeeded, then it was overridden by the user. We will use it
32568       # for the tool.
32569 
32570       # First remove it from the list of overridden variables, so we can test
32571       # for unknown variables in the end.
32572       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32573 
32574       # Check if the provided tool contains a complete path.
32575       tool_specified="$AS"
32576       tool_basename="${tool_specified##*/}"
32577       if test "x$tool_basename" = "x$tool_specified"; then
32578         # A command without a complete path is provided, search $PATH.
32579         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32580 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32581         # Extract the first word of "$tool_basename", so it can be a program name with args.
32582 set dummy $tool_basename; ac_word=$2
32583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32584 $as_echo_n "checking for $ac_word... " >&6; }
32585 if ${ac_cv_path_AS+:} false; then :
32586   $as_echo_n "(cached) " >&6
32587 else
32588   case $AS in
32589   [\\/]* | ?:[\\/]*)
32590   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32591   ;;
32592   *)
32593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32594 for as_dir in $PATH
32595 do
32596   IFS=$as_save_IFS
32597   test -z "$as_dir" && as_dir=.
32598     for ac_exec_ext in '' $ac_executable_extensions; do
32599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32600     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32602     break 2
32603   fi
32604 done
32605   done
32606 IFS=$as_save_IFS
32607 
32608   ;;
32609 esac
32610 fi
32611 AS=$ac_cv_path_AS
32612 if test -n "$AS"; then
32613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32614 $as_echo "$AS" >&6; }
32615 else
32616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32617 $as_echo "no" >&6; }
32618 fi
32619 
32620 
32621         if test "x$AS" = x; then
32622           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32623         fi
32624       else
32625         # Otherwise we believe it is a complete path. Use it as it is.
32626         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32627 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32628         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32629 $as_echo_n "checking for AS... " >&6; }
32630         if test ! -x "$tool_specified"; then
32631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32632 $as_echo "not found" >&6; }
32633           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32634         fi
32635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32636 $as_echo "$tool_specified" >&6; }
32637       fi
32638     fi
32639   fi
32640 
32641 
32642 
32643   # Only process if variable expands to non-empty
32644 
32645   if test "x$AS" != x; then
32646     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32647 
32648   # First separate the path from the arguments. This will split at the first
32649   # space.
32650   complete="$AS"
32651   path="${complete%% *}"
32652   tmp="$complete EOL"
32653   arguments="${tmp#* }"
32654 
32655   # Input might be given as Windows format, start by converting to
32656   # unix format.
32657   new_path=`$CYGPATH -u "$path"`
32658 
32659   # Now try to locate executable using which
32660   new_path=`$WHICH "$new_path" 2> /dev/null`
32661   # bat and cmd files are not always considered executable in cygwin causing which
32662   # to not find them
32663   if test "x$new_path" = x \
32664       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32665       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32666     new_path=`$CYGPATH -u "$path"`
32667   fi
32668   if test "x$new_path" = x; then
32669     # Oops. Which didn't find the executable.
32670     # The splitting of arguments from the executable at a space might have been incorrect,
32671     # since paths with space are more likely in Windows. Give it another try with the whole
32672     # argument.
32673     path="$complete"
32674     arguments="EOL"
32675     new_path=`$CYGPATH -u "$path"`
32676     new_path=`$WHICH "$new_path" 2> /dev/null`
32677     # bat and cmd files are not always considered executable in cygwin causing which
32678     # to not find them
32679     if test "x$new_path" = x \
32680         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32681         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32682       new_path=`$CYGPATH -u "$path"`
32683     fi
32684     if test "x$new_path" = x; then
32685       # It's still not found. Now this is an unrecoverable error.
32686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32687 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32688       has_space=`$ECHO "$complete" | $GREP " "`
32689       if test "x$has_space" != x; then
32690         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32691 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32692       fi
32693       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32694     fi
32695   fi
32696 
32697   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32698   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32699   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32700   # "foo.exe" is OK but "foo" is an error.
32701   #
32702   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32703   # It is also a way to make sure we got the proper file name for the real test later on.
32704   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32705   if test "x$test_shortpath" = x; then
32706     # Short path failed, file does not exist as specified.
32707     # Try adding .exe or .cmd
32708     if test -f "${new_path}.exe"; then
32709       input_to_shortpath="${new_path}.exe"
32710     elif test -f "${new_path}.cmd"; then
32711       input_to_shortpath="${new_path}.cmd"
32712     else
32713       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32714 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32715       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32716 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32717       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32718     fi
32719   else
32720     input_to_shortpath="$new_path"
32721   fi
32722 
32723   # Call helper function which possibly converts this using DOS-style short mode.
32724   # If so, the updated path is stored in $new_path.
32725   new_path="$input_to_shortpath"
32726 
32727   input_path="$input_to_shortpath"
32728   # Check if we need to convert this using DOS-style short mode. If the path
32729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32730   # take no chances and rewrite it.
32731   # Note: m4 eats our [], so we need to use [ and ] instead.
32732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32733   if test "x$has_forbidden_chars" != x; then
32734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32735     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32736     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32737     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32738       # Going to short mode and back again did indeed matter. Since short mode is
32739       # case insensitive, let's make it lowercase to improve readability.
32740       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32741       # Now convert it back to Unix-stile (cygpath)
32742       input_path=`$CYGPATH -u "$shortmode_path"`
32743       new_path="$input_path"
32744     fi
32745   fi
32746 
32747   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32748   if test "x$test_cygdrive_prefix" = x; then
32749     # As a simple fix, exclude /usr/bin since it's not a real path.
32750     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32751       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32752       # a path prefixed by /cygdrive for fixpath to work.
32753       new_path="$CYGWIN_ROOT_PATH$input_path"
32754     fi
32755   fi
32756 
32757   # remove trailing .exe if any
32758   new_path="${new_path/%.exe/}"
32759 
32760     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32761 
32762   # First separate the path from the arguments. This will split at the first
32763   # space.
32764   complete="$AS"
32765   path="${complete%% *}"
32766   tmp="$complete EOL"
32767   arguments="${tmp#* }"
32768 
32769   # Input might be given as Windows format, start by converting to
32770   # unix format.
32771   new_path="$path"
32772 
32773   windows_path="$new_path"
32774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32775     unix_path=`$CYGPATH -u "$windows_path"`
32776     new_path="$unix_path"
32777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32779     new_path="$unix_path"
32780   fi
32781 
32782 
32783   # Now try to locate executable using which
32784   new_path=`$WHICH "$new_path" 2> /dev/null`
32785 
32786   if test "x$new_path" = x; then
32787     # Oops. Which didn't find the executable.
32788     # The splitting of arguments from the executable at a space might have been incorrect,
32789     # since paths with space are more likely in Windows. Give it another try with the whole
32790     # argument.
32791     path="$complete"
32792     arguments="EOL"
32793     new_path="$path"
32794 
32795   windows_path="$new_path"
32796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32797     unix_path=`$CYGPATH -u "$windows_path"`
32798     new_path="$unix_path"
32799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32801     new_path="$unix_path"
32802   fi
32803 
32804 
32805     new_path=`$WHICH "$new_path" 2> /dev/null`
32806     # bat and cmd files are not always considered executable in MSYS causing which
32807     # to not find them
32808     if test "x$new_path" = x \
32809         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32810         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32811       new_path="$path"
32812 
32813   windows_path="$new_path"
32814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815     unix_path=`$CYGPATH -u "$windows_path"`
32816     new_path="$unix_path"
32817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32819     new_path="$unix_path"
32820   fi
32821 
32822     fi
32823 
32824     if test "x$new_path" = x; then
32825       # It's still not found. Now this is an unrecoverable error.
32826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32827 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32828       has_space=`$ECHO "$complete" | $GREP " "`
32829       if test "x$has_space" != x; then
32830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32832       fi
32833       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32834     fi
32835   fi
32836 
32837   # Now new_path has a complete unix path to the binary
32838   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32839     # Keep paths in /bin as-is, but remove trailing .exe if any
32840     new_path="${new_path/%.exe/}"
32841     # Do not save /bin paths to all_fixpath_prefixes!
32842   else
32843     # Not in mixed or Windows style, start by that.
32844     new_path=`cmd //c echo $new_path`
32845 
32846   input_path="$new_path"
32847   # Check if we need to convert this using DOS-style short mode. If the path
32848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32849   # take no chances and rewrite it.
32850   # Note: m4 eats our [], so we need to use [ and ] instead.
32851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32852   if test "x$has_forbidden_chars" != x; then
32853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32855   fi
32856 
32857     # Output is in $new_path
32858 
32859   windows_path="$new_path"
32860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32861     unix_path=`$CYGPATH -u "$windows_path"`
32862     new_path="$unix_path"
32863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32865     new_path="$unix_path"
32866   fi
32867 
32868     # remove trailing .exe if any
32869     new_path="${new_path/%.exe/}"
32870 
32871     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32872     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32873   fi
32874 
32875     else
32876       # We're on a unix platform. Hooray! :)
32877       # First separate the path from the arguments. This will split at the first
32878       # space.
32879       complete="$AS"
32880       path="${complete%% *}"
32881       tmp="$complete EOL"
32882       arguments="${tmp#* }"
32883 
32884       # Cannot rely on the command "which" here since it doesn't always work.
32885       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32886       if test -z "$is_absolute_path"; then
32887         # Path to executable is not absolute. Find it.
32888         IFS_save="$IFS"
32889         IFS=:
32890         for p in $PATH; do
32891           if test -f "$p/$path" && test -x "$p/$path"; then
32892             new_path="$p/$path"
32893             break
32894           fi
32895         done
32896         IFS="$IFS_save"
32897       else
32898         # This is an absolute path, we can use it without further modifications.
32899         new_path="$path"
32900       fi
32901 
32902       if test "x$new_path" = x; then
32903         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32904 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32905         has_space=`$ECHO "$complete" | $GREP " "`
32906         if test "x$has_space" != x; then
32907           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32908 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32909         fi
32910         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32911       fi
32912     fi
32913 
32914     # Now join together the path and the arguments once again
32915     if test "x$arguments" != xEOL; then
32916       new_complete="$new_path ${arguments% *}"
32917     else
32918       new_complete="$new_path"
32919     fi
32920 
32921     if test "x$complete" != "x$new_complete"; then
32922       AS="$new_complete"
32923       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32924 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32925     fi
32926   fi
32927 
32928   else
32929     # FIXME: is this correct for microsoft?
32930     AS="$CC -c"
32931   fi
32932 
32933 
32934   #
32935   # Setup the archiver (AR)
32936   #
32937   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32938     # The corresponding ar tool is lib.exe (used to create static libraries)
32939     # Extract the first word of "lib", so it can be a program name with args.
32940 set dummy lib; ac_word=$2
32941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32942 $as_echo_n "checking for $ac_word... " >&6; }
32943 if ${ac_cv_prog_AR+:} false; then :
32944   $as_echo_n "(cached) " >&6
32945 else
32946   if test -n "$AR"; then
32947   ac_cv_prog_AR="$AR" # Let the user override the test.
32948 else
32949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32950 for as_dir in $PATH
32951 do
32952   IFS=$as_save_IFS
32953   test -z "$as_dir" && as_dir=.
32954     for ac_exec_ext in '' $ac_executable_extensions; do
32955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32956     ac_cv_prog_AR="lib"
32957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32958     break 2
32959   fi
32960 done
32961   done
32962 IFS=$as_save_IFS
32963 
32964 fi
32965 fi
32966 AR=$ac_cv_prog_AR
32967 if test -n "$AR"; then
32968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32969 $as_echo "$AR" >&6; }
32970 else
32971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32972 $as_echo "no" >&6; }
32973 fi
32974 
32975 
32976   else
32977 
32978 
32979   # Publish this variable in the help.
32980 
32981 
32982   if test "x$AR" = x; then
32983     # The variable is not set by user, try to locate tool using the code snippet
32984     if test -n "$ac_tool_prefix"; then
32985   for ac_prog in ar
32986   do
32987     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32988 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32990 $as_echo_n "checking for $ac_word... " >&6; }
32991 if ${ac_cv_prog_AR+:} false; then :
32992   $as_echo_n "(cached) " >&6
32993 else
32994   if test -n "$AR"; then
32995   ac_cv_prog_AR="$AR" # Let the user override the test.
32996 else
32997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32998 for as_dir in $PATH
32999 do
33000   IFS=$as_save_IFS
33001   test -z "$as_dir" && as_dir=.
33002     for ac_exec_ext in '' $ac_executable_extensions; do
33003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33004     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33006     break 2
33007   fi
33008 done
33009   done
33010 IFS=$as_save_IFS
33011 
33012 fi
33013 fi
33014 AR=$ac_cv_prog_AR
33015 if test -n "$AR"; then
33016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33017 $as_echo "$AR" >&6; }
33018 else
33019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33020 $as_echo "no" >&6; }
33021 fi
33022 
33023 
33024     test -n "$AR" && break
33025   done
33026 fi
33027 if test -z "$AR"; then
33028   ac_ct_AR=$AR
33029   for ac_prog in ar
33030 do
33031   # Extract the first word of "$ac_prog", so it can be a program name with args.
33032 set dummy $ac_prog; ac_word=$2
33033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33034 $as_echo_n "checking for $ac_word... " >&6; }
33035 if ${ac_cv_prog_ac_ct_AR+:} false; then :
33036   $as_echo_n "(cached) " >&6
33037 else
33038   if test -n "$ac_ct_AR"; then
33039   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33040 else
33041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33042 for as_dir in $PATH
33043 do
33044   IFS=$as_save_IFS
33045   test -z "$as_dir" && as_dir=.
33046     for ac_exec_ext in '' $ac_executable_extensions; do
33047   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33048     ac_cv_prog_ac_ct_AR="$ac_prog"
33049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33050     break 2
33051   fi
33052 done
33053   done
33054 IFS=$as_save_IFS
33055 
33056 fi
33057 fi
33058 ac_ct_AR=$ac_cv_prog_ac_ct_AR
33059 if test -n "$ac_ct_AR"; then
33060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33061 $as_echo "$ac_ct_AR" >&6; }
33062 else
33063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33064 $as_echo "no" >&6; }
33065 fi
33066 
33067 
33068   test -n "$ac_ct_AR" && break
33069 done
33070 
33071   if test "x$ac_ct_AR" = x; then
33072     AR=""
33073   else
33074     case $cross_compiling:$ac_tool_warned in
33075 yes:)
33076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33077 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33078 ac_tool_warned=yes ;;
33079 esac
33080     AR=$ac_ct_AR
33081   fi
33082 fi
33083 
33084   else
33085     # The variable is set, but is it from the command line or the environment?
33086 
33087     # Try to remove the string !AR! from our list.
33088     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33089     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33090       # If it failed, the variable was not from the command line. Ignore it,
33091       # but warn the user (except for BASH, which is always set by the calling BASH).
33092       if test "xAR" != xBASH; then
33093         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33094 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33095       fi
33096       # Try to locate tool using the code snippet
33097       if test -n "$ac_tool_prefix"; then
33098   for ac_prog in ar
33099   do
33100     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33101 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33103 $as_echo_n "checking for $ac_word... " >&6; }
33104 if ${ac_cv_prog_AR+:} false; then :
33105   $as_echo_n "(cached) " >&6
33106 else
33107   if test -n "$AR"; then
33108   ac_cv_prog_AR="$AR" # Let the user override the test.
33109 else
33110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33111 for as_dir in $PATH
33112 do
33113   IFS=$as_save_IFS
33114   test -z "$as_dir" && as_dir=.
33115     for ac_exec_ext in '' $ac_executable_extensions; do
33116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33117     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33119     break 2
33120   fi
33121 done
33122   done
33123 IFS=$as_save_IFS
33124 
33125 fi
33126 fi
33127 AR=$ac_cv_prog_AR
33128 if test -n "$AR"; then
33129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33130 $as_echo "$AR" >&6; }
33131 else
33132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33133 $as_echo "no" >&6; }
33134 fi
33135 
33136 
33137     test -n "$AR" && break
33138   done
33139 fi
33140 if test -z "$AR"; then
33141   ac_ct_AR=$AR
33142   for ac_prog in ar
33143 do
33144   # Extract the first word of "$ac_prog", so it can be a program name with args.
33145 set dummy $ac_prog; ac_word=$2
33146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33147 $as_echo_n "checking for $ac_word... " >&6; }
33148 if ${ac_cv_prog_ac_ct_AR+:} false; then :
33149   $as_echo_n "(cached) " >&6
33150 else
33151   if test -n "$ac_ct_AR"; then
33152   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33153 else
33154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33155 for as_dir in $PATH
33156 do
33157   IFS=$as_save_IFS
33158   test -z "$as_dir" && as_dir=.
33159     for ac_exec_ext in '' $ac_executable_extensions; do
33160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33161     ac_cv_prog_ac_ct_AR="$ac_prog"
33162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33163     break 2
33164   fi
33165 done
33166   done
33167 IFS=$as_save_IFS
33168 
33169 fi
33170 fi
33171 ac_ct_AR=$ac_cv_prog_ac_ct_AR
33172 if test -n "$ac_ct_AR"; then
33173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33174 $as_echo "$ac_ct_AR" >&6; }
33175 else
33176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33177 $as_echo "no" >&6; }
33178 fi
33179 
33180 
33181   test -n "$ac_ct_AR" && break
33182 done
33183 
33184   if test "x$ac_ct_AR" = x; then
33185     AR=""
33186   else
33187     case $cross_compiling:$ac_tool_warned in
33188 yes:)
33189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33190 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33191 ac_tool_warned=yes ;;
33192 esac
33193     AR=$ac_ct_AR
33194   fi
33195 fi
33196 
33197     else
33198       # If it succeeded, then it was overridden by the user. We will use it
33199       # for the tool.
33200 
33201       # First remove it from the list of overridden variables, so we can test
33202       # for unknown variables in the end.
33203       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33204 
33205       # Check if the provided tool contains a complete path.
33206       tool_specified="$AR"
33207       tool_basename="${tool_specified##*/}"
33208       if test "x$tool_basename" = "x$tool_specified"; then
33209         # A command without a complete path is provided, search $PATH.
33210         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33211 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33212         # Extract the first word of "$tool_basename", so it can be a program name with args.
33213 set dummy $tool_basename; ac_word=$2
33214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33215 $as_echo_n "checking for $ac_word... " >&6; }
33216 if ${ac_cv_path_AR+:} false; then :
33217   $as_echo_n "(cached) " >&6
33218 else
33219   case $AR in
33220   [\\/]* | ?:[\\/]*)
33221   ac_cv_path_AR="$AR" # Let the user override the test with a path.
33222   ;;
33223   *)
33224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33225 for as_dir in $PATH
33226 do
33227   IFS=$as_save_IFS
33228   test -z "$as_dir" && as_dir=.
33229     for ac_exec_ext in '' $ac_executable_extensions; do
33230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33231     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33233     break 2
33234   fi
33235 done
33236   done
33237 IFS=$as_save_IFS
33238 
33239   ;;
33240 esac
33241 fi
33242 AR=$ac_cv_path_AR
33243 if test -n "$AR"; then
33244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33245 $as_echo "$AR" >&6; }
33246 else
33247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33248 $as_echo "no" >&6; }
33249 fi
33250 
33251 
33252         if test "x$AR" = x; then
33253           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33254         fi
33255       else
33256         # Otherwise we believe it is a complete path. Use it as it is.
33257         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33258 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33259         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33260 $as_echo_n "checking for AR... " >&6; }
33261         if test ! -x "$tool_specified"; then
33262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33263 $as_echo "not found" >&6; }
33264           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33265         fi
33266         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33267 $as_echo "$tool_specified" >&6; }
33268       fi
33269     fi
33270   fi
33271 
33272 
33273   fi
33274 
33275   # Only process if variable expands to non-empty
33276 
33277   if test "x$AR" != x; then
33278     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33279 
33280   # First separate the path from the arguments. This will split at the first
33281   # space.
33282   complete="$AR"
33283   path="${complete%% *}"
33284   tmp="$complete EOL"
33285   arguments="${tmp#* }"
33286 
33287   # Input might be given as Windows format, start by converting to
33288   # unix format.
33289   new_path=`$CYGPATH -u "$path"`
33290 
33291   # Now try to locate executable using which
33292   new_path=`$WHICH "$new_path" 2> /dev/null`
33293   # bat and cmd files are not always considered executable in cygwin causing which
33294   # to not find them
33295   if test "x$new_path" = x \
33296       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33297       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33298     new_path=`$CYGPATH -u "$path"`
33299   fi
33300   if test "x$new_path" = x; then
33301     # Oops. Which didn't find the executable.
33302     # The splitting of arguments from the executable at a space might have been incorrect,
33303     # since paths with space are more likely in Windows. Give it another try with the whole
33304     # argument.
33305     path="$complete"
33306     arguments="EOL"
33307     new_path=`$CYGPATH -u "$path"`
33308     new_path=`$WHICH "$new_path" 2> /dev/null`
33309     # bat and cmd files are not always considered executable in cygwin causing which
33310     # to not find them
33311     if test "x$new_path" = x \
33312         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33313         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33314       new_path=`$CYGPATH -u "$path"`
33315     fi
33316     if test "x$new_path" = x; then
33317       # It's still not found. Now this is an unrecoverable error.
33318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33319 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33320       has_space=`$ECHO "$complete" | $GREP " "`
33321       if test "x$has_space" != x; then
33322         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33323 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33324       fi
33325       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33326     fi
33327   fi
33328 
33329   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33330   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33331   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33332   # "foo.exe" is OK but "foo" is an error.
33333   #
33334   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33335   # It is also a way to make sure we got the proper file name for the real test later on.
33336   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33337   if test "x$test_shortpath" = x; then
33338     # Short path failed, file does not exist as specified.
33339     # Try adding .exe or .cmd
33340     if test -f "${new_path}.exe"; then
33341       input_to_shortpath="${new_path}.exe"
33342     elif test -f "${new_path}.cmd"; then
33343       input_to_shortpath="${new_path}.cmd"
33344     else
33345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33346 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33347       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33348 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33349       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33350     fi
33351   else
33352     input_to_shortpath="$new_path"
33353   fi
33354 
33355   # Call helper function which possibly converts this using DOS-style short mode.
33356   # If so, the updated path is stored in $new_path.
33357   new_path="$input_to_shortpath"
33358 
33359   input_path="$input_to_shortpath"
33360   # Check if we need to convert this using DOS-style short mode. If the path
33361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33362   # take no chances and rewrite it.
33363   # Note: m4 eats our [], so we need to use [ and ] instead.
33364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33365   if test "x$has_forbidden_chars" != x; then
33366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33367     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33368     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33369     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33370       # Going to short mode and back again did indeed matter. Since short mode is
33371       # case insensitive, let's make it lowercase to improve readability.
33372       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33373       # Now convert it back to Unix-stile (cygpath)
33374       input_path=`$CYGPATH -u "$shortmode_path"`
33375       new_path="$input_path"
33376     fi
33377   fi
33378 
33379   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33380   if test "x$test_cygdrive_prefix" = x; then
33381     # As a simple fix, exclude /usr/bin since it's not a real path.
33382     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33383       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33384       # a path prefixed by /cygdrive for fixpath to work.
33385       new_path="$CYGWIN_ROOT_PATH$input_path"
33386     fi
33387   fi
33388 
33389   # remove trailing .exe if any
33390   new_path="${new_path/%.exe/}"
33391 
33392     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33393 
33394   # First separate the path from the arguments. This will split at the first
33395   # space.
33396   complete="$AR"
33397   path="${complete%% *}"
33398   tmp="$complete EOL"
33399   arguments="${tmp#* }"
33400 
33401   # Input might be given as Windows format, start by converting to
33402   # unix format.
33403   new_path="$path"
33404 
33405   windows_path="$new_path"
33406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33407     unix_path=`$CYGPATH -u "$windows_path"`
33408     new_path="$unix_path"
33409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33411     new_path="$unix_path"
33412   fi
33413 
33414 
33415   # Now try to locate executable using which
33416   new_path=`$WHICH "$new_path" 2> /dev/null`
33417 
33418   if test "x$new_path" = x; then
33419     # Oops. Which didn't find the executable.
33420     # The splitting of arguments from the executable at a space might have been incorrect,
33421     # since paths with space are more likely in Windows. Give it another try with the whole
33422     # argument.
33423     path="$complete"
33424     arguments="EOL"
33425     new_path="$path"
33426 
33427   windows_path="$new_path"
33428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33429     unix_path=`$CYGPATH -u "$windows_path"`
33430     new_path="$unix_path"
33431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33433     new_path="$unix_path"
33434   fi
33435 
33436 
33437     new_path=`$WHICH "$new_path" 2> /dev/null`
33438     # bat and cmd files are not always considered executable in MSYS causing which
33439     # to not find them
33440     if test "x$new_path" = x \
33441         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33442         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33443       new_path="$path"
33444 
33445   windows_path="$new_path"
33446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33447     unix_path=`$CYGPATH -u "$windows_path"`
33448     new_path="$unix_path"
33449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33451     new_path="$unix_path"
33452   fi
33453 
33454     fi
33455 
33456     if test "x$new_path" = x; then
33457       # It's still not found. Now this is an unrecoverable error.
33458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33459 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33460       has_space=`$ECHO "$complete" | $GREP " "`
33461       if test "x$has_space" != x; then
33462         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33463 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33464       fi
33465       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33466     fi
33467   fi
33468 
33469   # Now new_path has a complete unix path to the binary
33470   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33471     # Keep paths in /bin as-is, but remove trailing .exe if any
33472     new_path="${new_path/%.exe/}"
33473     # Do not save /bin paths to all_fixpath_prefixes!
33474   else
33475     # Not in mixed or Windows style, start by that.
33476     new_path=`cmd //c echo $new_path`
33477 
33478   input_path="$new_path"
33479   # Check if we need to convert this using DOS-style short mode. If the path
33480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33481   # take no chances and rewrite it.
33482   # Note: m4 eats our [], so we need to use [ and ] instead.
33483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33484   if test "x$has_forbidden_chars" != x; then
33485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33486     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33487   fi
33488 
33489     # Output is in $new_path
33490 
33491   windows_path="$new_path"
33492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33493     unix_path=`$CYGPATH -u "$windows_path"`
33494     new_path="$unix_path"
33495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33497     new_path="$unix_path"
33498   fi
33499 
33500     # remove trailing .exe if any
33501     new_path="${new_path/%.exe/}"
33502 
33503     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33504     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33505   fi
33506 
33507     else
33508       # We're on a unix platform. Hooray! :)
33509       # First separate the path from the arguments. This will split at the first
33510       # space.
33511       complete="$AR"
33512       path="${complete%% *}"
33513       tmp="$complete EOL"
33514       arguments="${tmp#* }"
33515 
33516       # Cannot rely on the command "which" here since it doesn't always work.
33517       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33518       if test -z "$is_absolute_path"; then
33519         # Path to executable is not absolute. Find it.
33520         IFS_save="$IFS"
33521         IFS=:
33522         for p in $PATH; do
33523           if test -f "$p/$path" && test -x "$p/$path"; then
33524             new_path="$p/$path"
33525             break
33526           fi
33527         done
33528         IFS="$IFS_save"
33529       else
33530         # This is an absolute path, we can use it without further modifications.
33531         new_path="$path"
33532       fi
33533 
33534       if test "x$new_path" = x; then
33535         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33536 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33537         has_space=`$ECHO "$complete" | $GREP " "`
33538         if test "x$has_space" != x; then
33539           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33540 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33541         fi
33542         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33543       fi
33544     fi
33545 
33546     # Now join together the path and the arguments once again
33547     if test "x$arguments" != xEOL; then
33548       new_complete="$new_path ${arguments% *}"
33549     else
33550       new_complete="$new_path"
33551     fi
33552 
33553     if test "x$complete" != "x$new_complete"; then
33554       AR="$new_complete"
33555       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33556 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33557     fi
33558   fi
33559 
33560 
33561 
33562   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33563 
33564 
33565   # Publish this variable in the help.
33566 
33567 
33568   if test "x$LIPO" = x; then
33569     # The variable is not set by user, try to locate tool using the code snippet
33570     for ac_prog in lipo
33571 do
33572   # Extract the first word of "$ac_prog", so it can be a program name with args.
33573 set dummy $ac_prog; ac_word=$2
33574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33575 $as_echo_n "checking for $ac_word... " >&6; }
33576 if ${ac_cv_path_LIPO+:} false; then :
33577   $as_echo_n "(cached) " >&6
33578 else
33579   case $LIPO in
33580   [\\/]* | ?:[\\/]*)
33581   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33582   ;;
33583   *)
33584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33585 for as_dir in $PATH
33586 do
33587   IFS=$as_save_IFS
33588   test -z "$as_dir" && as_dir=.
33589     for ac_exec_ext in '' $ac_executable_extensions; do
33590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33591     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33593     break 2
33594   fi
33595 done
33596   done
33597 IFS=$as_save_IFS
33598 
33599   ;;
33600 esac
33601 fi
33602 LIPO=$ac_cv_path_LIPO
33603 if test -n "$LIPO"; then
33604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33605 $as_echo "$LIPO" >&6; }
33606 else
33607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33608 $as_echo "no" >&6; }
33609 fi
33610 
33611 
33612   test -n "$LIPO" && break
33613 done
33614 
33615   else
33616     # The variable is set, but is it from the command line or the environment?
33617 
33618     # Try to remove the string !LIPO! from our list.
33619     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33620     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33621       # If it failed, the variable was not from the command line. Ignore it,
33622       # but warn the user (except for BASH, which is always set by the calling BASH).
33623       if test "xLIPO" != xBASH; then
33624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33625 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33626       fi
33627       # Try to locate tool using the code snippet
33628       for ac_prog in lipo
33629 do
33630   # Extract the first word of "$ac_prog", so it can be a program name with args.
33631 set dummy $ac_prog; ac_word=$2
33632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33633 $as_echo_n "checking for $ac_word... " >&6; }
33634 if ${ac_cv_path_LIPO+:} false; then :
33635   $as_echo_n "(cached) " >&6
33636 else
33637   case $LIPO in
33638   [\\/]* | ?:[\\/]*)
33639   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33640   ;;
33641   *)
33642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33643 for as_dir in $PATH
33644 do
33645   IFS=$as_save_IFS
33646   test -z "$as_dir" && as_dir=.
33647     for ac_exec_ext in '' $ac_executable_extensions; do
33648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33649     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33651     break 2
33652   fi
33653 done
33654   done
33655 IFS=$as_save_IFS
33656 
33657   ;;
33658 esac
33659 fi
33660 LIPO=$ac_cv_path_LIPO
33661 if test -n "$LIPO"; then
33662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33663 $as_echo "$LIPO" >&6; }
33664 else
33665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33666 $as_echo "no" >&6; }
33667 fi
33668 
33669 
33670   test -n "$LIPO" && break
33671 done
33672 
33673     else
33674       # If it succeeded, then it was overridden by the user. We will use it
33675       # for the tool.
33676 
33677       # First remove it from the list of overridden variables, so we can test
33678       # for unknown variables in the end.
33679       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33680 
33681       # Check if the provided tool contains a complete path.
33682       tool_specified="$LIPO"
33683       tool_basename="${tool_specified##*/}"
33684       if test "x$tool_basename" = "x$tool_specified"; then
33685         # A command without a complete path is provided, search $PATH.
33686         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33687 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33688         # Extract the first word of "$tool_basename", so it can be a program name with args.
33689 set dummy $tool_basename; ac_word=$2
33690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33691 $as_echo_n "checking for $ac_word... " >&6; }
33692 if ${ac_cv_path_LIPO+:} false; then :
33693   $as_echo_n "(cached) " >&6
33694 else
33695   case $LIPO in
33696   [\\/]* | ?:[\\/]*)
33697   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33698   ;;
33699   *)
33700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33701 for as_dir in $PATH
33702 do
33703   IFS=$as_save_IFS
33704   test -z "$as_dir" && as_dir=.
33705     for ac_exec_ext in '' $ac_executable_extensions; do
33706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33707     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33709     break 2
33710   fi
33711 done
33712   done
33713 IFS=$as_save_IFS
33714 
33715   ;;
33716 esac
33717 fi
33718 LIPO=$ac_cv_path_LIPO
33719 if test -n "$LIPO"; then
33720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33721 $as_echo "$LIPO" >&6; }
33722 else
33723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33724 $as_echo "no" >&6; }
33725 fi
33726 
33727 
33728         if test "x$LIPO" = x; then
33729           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33730         fi
33731       else
33732         # Otherwise we believe it is a complete path. Use it as it is.
33733         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33734 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33736 $as_echo_n "checking for LIPO... " >&6; }
33737         if test ! -x "$tool_specified"; then
33738           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33739 $as_echo "not found" >&6; }
33740           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33741         fi
33742         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33743 $as_echo "$tool_specified" >&6; }
33744       fi
33745     fi
33746   fi
33747 
33748 
33749 
33750   # Only process if variable expands to non-empty
33751 
33752   if test "x$LIPO" != x; then
33753     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33754 
33755   # First separate the path from the arguments. This will split at the first
33756   # space.
33757   complete="$LIPO"
33758   path="${complete%% *}"
33759   tmp="$complete EOL"
33760   arguments="${tmp#* }"
33761 
33762   # Input might be given as Windows format, start by converting to
33763   # unix format.
33764   new_path=`$CYGPATH -u "$path"`
33765 
33766   # Now try to locate executable using which
33767   new_path=`$WHICH "$new_path" 2> /dev/null`
33768   # bat and cmd files are not always considered executable in cygwin causing which
33769   # to not find them
33770   if test "x$new_path" = x \
33771       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33772       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33773     new_path=`$CYGPATH -u "$path"`
33774   fi
33775   if test "x$new_path" = x; then
33776     # Oops. Which didn't find the executable.
33777     # The splitting of arguments from the executable at a space might have been incorrect,
33778     # since paths with space are more likely in Windows. Give it another try with the whole
33779     # argument.
33780     path="$complete"
33781     arguments="EOL"
33782     new_path=`$CYGPATH -u "$path"`
33783     new_path=`$WHICH "$new_path" 2> /dev/null`
33784     # bat and cmd files are not always considered executable in cygwin causing which
33785     # to not find them
33786     if test "x$new_path" = x \
33787         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33788         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33789       new_path=`$CYGPATH -u "$path"`
33790     fi
33791     if test "x$new_path" = x; then
33792       # It's still not found. Now this is an unrecoverable error.
33793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33794 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33795       has_space=`$ECHO "$complete" | $GREP " "`
33796       if test "x$has_space" != x; then
33797         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33798 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33799       fi
33800       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33801     fi
33802   fi
33803 
33804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33807   # "foo.exe" is OK but "foo" is an error.
33808   #
33809   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33810   # It is also a way to make sure we got the proper file name for the real test later on.
33811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33812   if test "x$test_shortpath" = x; then
33813     # Short path failed, file does not exist as specified.
33814     # Try adding .exe or .cmd
33815     if test -f "${new_path}.exe"; then
33816       input_to_shortpath="${new_path}.exe"
33817     elif test -f "${new_path}.cmd"; then
33818       input_to_shortpath="${new_path}.cmd"
33819     else
33820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33821 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33822       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33823 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33824       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33825     fi
33826   else
33827     input_to_shortpath="$new_path"
33828   fi
33829 
33830   # Call helper function which possibly converts this using DOS-style short mode.
33831   # If so, the updated path is stored in $new_path.
33832   new_path="$input_to_shortpath"
33833 
33834   input_path="$input_to_shortpath"
33835   # Check if we need to convert this using DOS-style short mode. If the path
33836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33837   # take no chances and rewrite it.
33838   # Note: m4 eats our [], so we need to use [ and ] instead.
33839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33840   if test "x$has_forbidden_chars" != x; then
33841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33842     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33843     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33844     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33845       # Going to short mode and back again did indeed matter. Since short mode is
33846       # case insensitive, let's make it lowercase to improve readability.
33847       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33848       # Now convert it back to Unix-stile (cygpath)
33849       input_path=`$CYGPATH -u "$shortmode_path"`
33850       new_path="$input_path"
33851     fi
33852   fi
33853 
33854   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33855   if test "x$test_cygdrive_prefix" = x; then
33856     # As a simple fix, exclude /usr/bin since it's not a real path.
33857     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33858       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33859       # a path prefixed by /cygdrive for fixpath to work.
33860       new_path="$CYGWIN_ROOT_PATH$input_path"
33861     fi
33862   fi
33863 
33864   # remove trailing .exe if any
33865   new_path="${new_path/%.exe/}"
33866 
33867     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33868 
33869   # First separate the path from the arguments. This will split at the first
33870   # space.
33871   complete="$LIPO"
33872   path="${complete%% *}"
33873   tmp="$complete EOL"
33874   arguments="${tmp#* }"
33875 
33876   # Input might be given as Windows format, start by converting to
33877   # unix format.
33878   new_path="$path"
33879 
33880   windows_path="$new_path"
33881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33882     unix_path=`$CYGPATH -u "$windows_path"`
33883     new_path="$unix_path"
33884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33886     new_path="$unix_path"
33887   fi
33888 
33889 
33890   # Now try to locate executable using which
33891   new_path=`$WHICH "$new_path" 2> /dev/null`
33892 
33893   if test "x$new_path" = x; then
33894     # Oops. Which didn't find the executable.
33895     # The splitting of arguments from the executable at a space might have been incorrect,
33896     # since paths with space are more likely in Windows. Give it another try with the whole
33897     # argument.
33898     path="$complete"
33899     arguments="EOL"
33900     new_path="$path"
33901 
33902   windows_path="$new_path"
33903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33904     unix_path=`$CYGPATH -u "$windows_path"`
33905     new_path="$unix_path"
33906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33908     new_path="$unix_path"
33909   fi
33910 
33911 
33912     new_path=`$WHICH "$new_path" 2> /dev/null`
33913     # bat and cmd files are not always considered executable in MSYS causing which
33914     # to not find them
33915     if test "x$new_path" = x \
33916         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33917         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33918       new_path="$path"
33919 
33920   windows_path="$new_path"
33921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33922     unix_path=`$CYGPATH -u "$windows_path"`
33923     new_path="$unix_path"
33924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33925     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33926     new_path="$unix_path"
33927   fi
33928 
33929     fi
33930 
33931     if test "x$new_path" = x; then
33932       # It's still not found. Now this is an unrecoverable error.
33933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33934 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33935       has_space=`$ECHO "$complete" | $GREP " "`
33936       if test "x$has_space" != x; then
33937         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33938 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33939       fi
33940       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33941     fi
33942   fi
33943 
33944   # Now new_path has a complete unix path to the binary
33945   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33946     # Keep paths in /bin as-is, but remove trailing .exe if any
33947     new_path="${new_path/%.exe/}"
33948     # Do not save /bin paths to all_fixpath_prefixes!
33949   else
33950     # Not in mixed or Windows style, start by that.
33951     new_path=`cmd //c echo $new_path`
33952 
33953   input_path="$new_path"
33954   # Check if we need to convert this using DOS-style short mode. If the path
33955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33956   # take no chances and rewrite it.
33957   # Note: m4 eats our [], so we need to use [ and ] instead.
33958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33959   if test "x$has_forbidden_chars" != x; then
33960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33961     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33962   fi
33963 
33964     # Output is in $new_path
33965 
33966   windows_path="$new_path"
33967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33968     unix_path=`$CYGPATH -u "$windows_path"`
33969     new_path="$unix_path"
33970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33972     new_path="$unix_path"
33973   fi
33974 
33975     # remove trailing .exe if any
33976     new_path="${new_path/%.exe/}"
33977 
33978     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33979     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33980   fi
33981 
33982     else
33983       # We're on a unix platform. Hooray! :)
33984       # First separate the path from the arguments. This will split at the first
33985       # space.
33986       complete="$LIPO"
33987       path="${complete%% *}"
33988       tmp="$complete EOL"
33989       arguments="${tmp#* }"
33990 
33991       # Cannot rely on the command "which" here since it doesn't always work.
33992       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33993       if test -z "$is_absolute_path"; then
33994         # Path to executable is not absolute. Find it.
33995         IFS_save="$IFS"
33996         IFS=:
33997         for p in $PATH; do
33998           if test -f "$p/$path" && test -x "$p/$path"; then
33999             new_path="$p/$path"
34000             break
34001           fi
34002         done
34003         IFS="$IFS_save"
34004       else
34005         # This is an absolute path, we can use it without further modifications.
34006         new_path="$path"
34007       fi
34008 
34009       if test "x$new_path" = x; then
34010         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34011 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34012         has_space=`$ECHO "$complete" | $GREP " "`
34013         if test "x$has_space" != x; then
34014           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34015 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34016         fi
34017         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34018       fi
34019     fi
34020 
34021     # Now join together the path and the arguments once again
34022     if test "x$arguments" != xEOL; then
34023       new_complete="$new_path ${arguments% *}"
34024     else
34025       new_complete="$new_path"
34026     fi
34027 
34028     if test "x$complete" != "x$new_complete"; then
34029       LIPO="$new_complete"
34030       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34031 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34032     fi
34033   fi
34034 
34035   fi
34036 
34037   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34038     # Extract the first word of "mt", so it can be a program name with args.
34039 set dummy mt; ac_word=$2
34040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34041 $as_echo_n "checking for $ac_word... " >&6; }
34042 if ${ac_cv_prog_MT+:} false; then :
34043   $as_echo_n "(cached) " >&6
34044 else
34045   if test -n "$MT"; then
34046   ac_cv_prog_MT="$MT" # Let the user override the test.
34047 else
34048   ac_prog_rejected=no
34049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34050 for as_dir in $PATH
34051 do
34052   IFS=$as_save_IFS
34053   test -z "$as_dir" && as_dir=.
34054     for ac_exec_ext in '' $ac_executable_extensions; do
34055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34056     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34057        ac_prog_rejected=yes
34058        continue
34059      fi
34060     ac_cv_prog_MT="mt"
34061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34062     break 2
34063   fi
34064 done
34065   done
34066 IFS=$as_save_IFS
34067 
34068 if test $ac_prog_rejected = yes; then
34069   # We found a bogon in the path, so make sure we never use it.
34070   set dummy $ac_cv_prog_MT
34071   shift
34072   if test $# != 0; then
34073     # We chose a different compiler from the bogus one.
34074     # However, it has the same basename, so the bogon will be chosen
34075     # first if we set MT to just the basename; use the full file name.
34076     shift
34077     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34078   fi
34079 fi
34080 fi
34081 fi
34082 MT=$ac_cv_prog_MT
34083 if test -n "$MT"; then
34084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34085 $as_echo "$MT" >&6; }
34086 else
34087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34088 $as_echo "no" >&6; }
34089 fi
34090 
34091 
34092 
34093   # Only process if variable expands to non-empty
34094 
34095   if test "x$MT" != x; then
34096     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34097 
34098   # First separate the path from the arguments. This will split at the first
34099   # space.
34100   complete="$MT"
34101   path="${complete%% *}"
34102   tmp="$complete EOL"
34103   arguments="${tmp#* }"
34104 
34105   # Input might be given as Windows format, start by converting to
34106   # unix format.
34107   new_path=`$CYGPATH -u "$path"`
34108 
34109   # Now try to locate executable using which
34110   new_path=`$WHICH "$new_path" 2> /dev/null`
34111   # bat and cmd files are not always considered executable in cygwin causing which
34112   # to not find them
34113   if test "x$new_path" = x \
34114       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34115       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34116     new_path=`$CYGPATH -u "$path"`
34117   fi
34118   if test "x$new_path" = x; then
34119     # Oops. Which didn't find the executable.
34120     # The splitting of arguments from the executable at a space might have been incorrect,
34121     # since paths with space are more likely in Windows. Give it another try with the whole
34122     # argument.
34123     path="$complete"
34124     arguments="EOL"
34125     new_path=`$CYGPATH -u "$path"`
34126     new_path=`$WHICH "$new_path" 2> /dev/null`
34127     # bat and cmd files are not always considered executable in cygwin causing which
34128     # to not find them
34129     if test "x$new_path" = x \
34130         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34131         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34132       new_path=`$CYGPATH -u "$path"`
34133     fi
34134     if test "x$new_path" = x; then
34135       # It's still not found. Now this is an unrecoverable error.
34136       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34137 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34138       has_space=`$ECHO "$complete" | $GREP " "`
34139       if test "x$has_space" != x; then
34140         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34141 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34142       fi
34143       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34144     fi
34145   fi
34146 
34147   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34148   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34149   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34150   # "foo.exe" is OK but "foo" is an error.
34151   #
34152   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34153   # It is also a way to make sure we got the proper file name for the real test later on.
34154   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34155   if test "x$test_shortpath" = x; then
34156     # Short path failed, file does not exist as specified.
34157     # Try adding .exe or .cmd
34158     if test -f "${new_path}.exe"; then
34159       input_to_shortpath="${new_path}.exe"
34160     elif test -f "${new_path}.cmd"; then
34161       input_to_shortpath="${new_path}.cmd"
34162     else
34163       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34164 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34165       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34166 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34167       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34168     fi
34169   else
34170     input_to_shortpath="$new_path"
34171   fi
34172 
34173   # Call helper function which possibly converts this using DOS-style short mode.
34174   # If so, the updated path is stored in $new_path.
34175   new_path="$input_to_shortpath"
34176 
34177   input_path="$input_to_shortpath"
34178   # Check if we need to convert this using DOS-style short mode. If the path
34179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34180   # take no chances and rewrite it.
34181   # Note: m4 eats our [], so we need to use [ and ] instead.
34182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34183   if test "x$has_forbidden_chars" != x; then
34184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34185     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34186     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34187     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34188       # Going to short mode and back again did indeed matter. Since short mode is
34189       # case insensitive, let's make it lowercase to improve readability.
34190       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34191       # Now convert it back to Unix-stile (cygpath)
34192       input_path=`$CYGPATH -u "$shortmode_path"`
34193       new_path="$input_path"
34194     fi
34195   fi
34196 
34197   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34198   if test "x$test_cygdrive_prefix" = x; then
34199     # As a simple fix, exclude /usr/bin since it's not a real path.
34200     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34201       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34202       # a path prefixed by /cygdrive for fixpath to work.
34203       new_path="$CYGWIN_ROOT_PATH$input_path"
34204     fi
34205   fi
34206 
34207   # remove trailing .exe if any
34208   new_path="${new_path/%.exe/}"
34209 
34210     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34211 
34212   # First separate the path from the arguments. This will split at the first
34213   # space.
34214   complete="$MT"
34215   path="${complete%% *}"
34216   tmp="$complete EOL"
34217   arguments="${tmp#* }"
34218 
34219   # Input might be given as Windows format, start by converting to
34220   # unix format.
34221   new_path="$path"
34222 
34223   windows_path="$new_path"
34224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34225     unix_path=`$CYGPATH -u "$windows_path"`
34226     new_path="$unix_path"
34227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34229     new_path="$unix_path"
34230   fi
34231 
34232 
34233   # Now try to locate executable using which
34234   new_path=`$WHICH "$new_path" 2> /dev/null`
34235 
34236   if test "x$new_path" = x; then
34237     # Oops. Which didn't find the executable.
34238     # The splitting of arguments from the executable at a space might have been incorrect,
34239     # since paths with space are more likely in Windows. Give it another try with the whole
34240     # argument.
34241     path="$complete"
34242     arguments="EOL"
34243     new_path="$path"
34244 
34245   windows_path="$new_path"
34246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34247     unix_path=`$CYGPATH -u "$windows_path"`
34248     new_path="$unix_path"
34249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34251     new_path="$unix_path"
34252   fi
34253 
34254 
34255     new_path=`$WHICH "$new_path" 2> /dev/null`
34256     # bat and cmd files are not always considered executable in MSYS causing which
34257     # to not find them
34258     if test "x$new_path" = x \
34259         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34260         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34261       new_path="$path"
34262 
34263   windows_path="$new_path"
34264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34265     unix_path=`$CYGPATH -u "$windows_path"`
34266     new_path="$unix_path"
34267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34269     new_path="$unix_path"
34270   fi
34271 
34272     fi
34273 
34274     if test "x$new_path" = x; then
34275       # It's still not found. Now this is an unrecoverable error.
34276       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34277 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34278       has_space=`$ECHO "$complete" | $GREP " "`
34279       if test "x$has_space" != x; then
34280         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34281 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34282       fi
34283       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34284     fi
34285   fi
34286 
34287   # Now new_path has a complete unix path to the binary
34288   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34289     # Keep paths in /bin as-is, but remove trailing .exe if any
34290     new_path="${new_path/%.exe/}"
34291     # Do not save /bin paths to all_fixpath_prefixes!
34292   else
34293     # Not in mixed or Windows style, start by that.
34294     new_path=`cmd //c echo $new_path`
34295 
34296   input_path="$new_path"
34297   # Check if we need to convert this using DOS-style short mode. If the path
34298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34299   # take no chances and rewrite it.
34300   # Note: m4 eats our [], so we need to use [ and ] instead.
34301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34302   if test "x$has_forbidden_chars" != x; then
34303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34304     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34305   fi
34306 
34307     # Output is in $new_path
34308 
34309   windows_path="$new_path"
34310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34311     unix_path=`$CYGPATH -u "$windows_path"`
34312     new_path="$unix_path"
34313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34315     new_path="$unix_path"
34316   fi
34317 
34318     # remove trailing .exe if any
34319     new_path="${new_path/%.exe/}"
34320 
34321     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34322     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34323   fi
34324 
34325     else
34326       # We're on a unix platform. Hooray! :)
34327       # First separate the path from the arguments. This will split at the first
34328       # space.
34329       complete="$MT"
34330       path="${complete%% *}"
34331       tmp="$complete EOL"
34332       arguments="${tmp#* }"
34333 
34334       # Cannot rely on the command "which" here since it doesn't always work.
34335       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34336       if test -z "$is_absolute_path"; then
34337         # Path to executable is not absolute. Find it.
34338         IFS_save="$IFS"
34339         IFS=:
34340         for p in $PATH; do
34341           if test -f "$p/$path" && test -x "$p/$path"; then
34342             new_path="$p/$path"
34343             break
34344           fi
34345         done
34346         IFS="$IFS_save"
34347       else
34348         # This is an absolute path, we can use it without further modifications.
34349         new_path="$path"
34350       fi
34351 
34352       if test "x$new_path" = x; then
34353         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34354 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34355         has_space=`$ECHO "$complete" | $GREP " "`
34356         if test "x$has_space" != x; then
34357           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34358 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34359         fi
34360         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34361       fi
34362     fi
34363 
34364     # Now join together the path and the arguments once again
34365     if test "x$arguments" != xEOL; then
34366       new_complete="$new_path ${arguments% *}"
34367     else
34368       new_complete="$new_path"
34369     fi
34370 
34371     if test "x$complete" != "x$new_complete"; then
34372       MT="$new_complete"
34373       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34374 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34375     fi
34376   fi
34377 
34378     # Setup the resource compiler (RC)
34379     # Extract the first word of "rc", so it can be a program name with args.
34380 set dummy rc; ac_word=$2
34381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34382 $as_echo_n "checking for $ac_word... " >&6; }
34383 if ${ac_cv_prog_RC+:} false; then :
34384   $as_echo_n "(cached) " >&6
34385 else
34386   if test -n "$RC"; then
34387   ac_cv_prog_RC="$RC" # Let the user override the test.
34388 else
34389   ac_prog_rejected=no
34390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34391 for as_dir in $PATH
34392 do
34393   IFS=$as_save_IFS
34394   test -z "$as_dir" && as_dir=.
34395     for ac_exec_ext in '' $ac_executable_extensions; do
34396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34397     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34398        ac_prog_rejected=yes
34399        continue
34400      fi
34401     ac_cv_prog_RC="rc"
34402     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34403     break 2
34404   fi
34405 done
34406   done
34407 IFS=$as_save_IFS
34408 
34409 if test $ac_prog_rejected = yes; then
34410   # We found a bogon in the path, so make sure we never use it.
34411   set dummy $ac_cv_prog_RC
34412   shift
34413   if test $# != 0; then
34414     # We chose a different compiler from the bogus one.
34415     # However, it has the same basename, so the bogon will be chosen
34416     # first if we set RC to just the basename; use the full file name.
34417     shift
34418     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34419   fi
34420 fi
34421 fi
34422 fi
34423 RC=$ac_cv_prog_RC
34424 if test -n "$RC"; then
34425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34426 $as_echo "$RC" >&6; }
34427 else
34428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34429 $as_echo "no" >&6; }
34430 fi
34431 
34432 
34433 
34434   # Only process if variable expands to non-empty
34435 
34436   if test "x$RC" != x; then
34437     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34438 
34439   # First separate the path from the arguments. This will split at the first
34440   # space.
34441   complete="$RC"
34442   path="${complete%% *}"
34443   tmp="$complete EOL"
34444   arguments="${tmp#* }"
34445 
34446   # Input might be given as Windows format, start by converting to
34447   # unix format.
34448   new_path=`$CYGPATH -u "$path"`
34449 
34450   # Now try to locate executable using which
34451   new_path=`$WHICH "$new_path" 2> /dev/null`
34452   # bat and cmd files are not always considered executable in cygwin causing which
34453   # to not find them
34454   if test "x$new_path" = x \
34455       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34456       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34457     new_path=`$CYGPATH -u "$path"`
34458   fi
34459   if test "x$new_path" = x; then
34460     # Oops. Which didn't find the executable.
34461     # The splitting of arguments from the executable at a space might have been incorrect,
34462     # since paths with space are more likely in Windows. Give it another try with the whole
34463     # argument.
34464     path="$complete"
34465     arguments="EOL"
34466     new_path=`$CYGPATH -u "$path"`
34467     new_path=`$WHICH "$new_path" 2> /dev/null`
34468     # bat and cmd files are not always considered executable in cygwin causing which
34469     # to not find them
34470     if test "x$new_path" = x \
34471         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34472         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34473       new_path=`$CYGPATH -u "$path"`
34474     fi
34475     if test "x$new_path" = x; then
34476       # It's still not found. Now this is an unrecoverable error.
34477       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34478 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34479       has_space=`$ECHO "$complete" | $GREP " "`
34480       if test "x$has_space" != x; then
34481         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34482 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34483       fi
34484       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34485     fi
34486   fi
34487 
34488   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34489   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34490   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34491   # "foo.exe" is OK but "foo" is an error.
34492   #
34493   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34494   # It is also a way to make sure we got the proper file name for the real test later on.
34495   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34496   if test "x$test_shortpath" = x; then
34497     # Short path failed, file does not exist as specified.
34498     # Try adding .exe or .cmd
34499     if test -f "${new_path}.exe"; then
34500       input_to_shortpath="${new_path}.exe"
34501     elif test -f "${new_path}.cmd"; then
34502       input_to_shortpath="${new_path}.cmd"
34503     else
34504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34505 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34506       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34507 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34508       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34509     fi
34510   else
34511     input_to_shortpath="$new_path"
34512   fi
34513 
34514   # Call helper function which possibly converts this using DOS-style short mode.
34515   # If so, the updated path is stored in $new_path.
34516   new_path="$input_to_shortpath"
34517 
34518   input_path="$input_to_shortpath"
34519   # Check if we need to convert this using DOS-style short mode. If the path
34520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34521   # take no chances and rewrite it.
34522   # Note: m4 eats our [], so we need to use [ and ] instead.
34523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34524   if test "x$has_forbidden_chars" != x; then
34525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34529       # Going to short mode and back again did indeed matter. Since short mode is
34530       # case insensitive, let's make it lowercase to improve readability.
34531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34532       # Now convert it back to Unix-stile (cygpath)
34533       input_path=`$CYGPATH -u "$shortmode_path"`
34534       new_path="$input_path"
34535     fi
34536   fi
34537 
34538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34539   if test "x$test_cygdrive_prefix" = x; then
34540     # As a simple fix, exclude /usr/bin since it's not a real path.
34541     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34543       # a path prefixed by /cygdrive for fixpath to work.
34544       new_path="$CYGWIN_ROOT_PATH$input_path"
34545     fi
34546   fi
34547 
34548   # remove trailing .exe if any
34549   new_path="${new_path/%.exe/}"
34550 
34551     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34552 
34553   # First separate the path from the arguments. This will split at the first
34554   # space.
34555   complete="$RC"
34556   path="${complete%% *}"
34557   tmp="$complete EOL"
34558   arguments="${tmp#* }"
34559 
34560   # Input might be given as Windows format, start by converting to
34561   # unix format.
34562   new_path="$path"
34563 
34564   windows_path="$new_path"
34565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34566     unix_path=`$CYGPATH -u "$windows_path"`
34567     new_path="$unix_path"
34568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34570     new_path="$unix_path"
34571   fi
34572 
34573 
34574   # Now try to locate executable using which
34575   new_path=`$WHICH "$new_path" 2> /dev/null`
34576 
34577   if test "x$new_path" = x; then
34578     # Oops. Which didn't find the executable.
34579     # The splitting of arguments from the executable at a space might have been incorrect,
34580     # since paths with space are more likely in Windows. Give it another try with the whole
34581     # argument.
34582     path="$complete"
34583     arguments="EOL"
34584     new_path="$path"
34585 
34586   windows_path="$new_path"
34587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34588     unix_path=`$CYGPATH -u "$windows_path"`
34589     new_path="$unix_path"
34590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34592     new_path="$unix_path"
34593   fi
34594 
34595 
34596     new_path=`$WHICH "$new_path" 2> /dev/null`
34597     # bat and cmd files are not always considered executable in MSYS causing which
34598     # to not find them
34599     if test "x$new_path" = x \
34600         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34601         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34602       new_path="$path"
34603 
34604   windows_path="$new_path"
34605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34606     unix_path=`$CYGPATH -u "$windows_path"`
34607     new_path="$unix_path"
34608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34610     new_path="$unix_path"
34611   fi
34612 
34613     fi
34614 
34615     if test "x$new_path" = x; then
34616       # It's still not found. Now this is an unrecoverable error.
34617       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34618 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34619       has_space=`$ECHO "$complete" | $GREP " "`
34620       if test "x$has_space" != x; then
34621         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34622 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34623       fi
34624       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34625     fi
34626   fi
34627 
34628   # Now new_path has a complete unix path to the binary
34629   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34630     # Keep paths in /bin as-is, but remove trailing .exe if any
34631     new_path="${new_path/%.exe/}"
34632     # Do not save /bin paths to all_fixpath_prefixes!
34633   else
34634     # Not in mixed or Windows style, start by that.
34635     new_path=`cmd //c echo $new_path`
34636 
34637   input_path="$new_path"
34638   # Check if we need to convert this using DOS-style short mode. If the path
34639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34640   # take no chances and rewrite it.
34641   # Note: m4 eats our [], so we need to use [ and ] instead.
34642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34643   if test "x$has_forbidden_chars" != x; then
34644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34645     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34646   fi
34647 
34648     # Output is in $new_path
34649 
34650   windows_path="$new_path"
34651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34652     unix_path=`$CYGPATH -u "$windows_path"`
34653     new_path="$unix_path"
34654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34656     new_path="$unix_path"
34657   fi
34658 
34659     # remove trailing .exe if any
34660     new_path="${new_path/%.exe/}"
34661 
34662     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34663     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34664   fi
34665 
34666     else
34667       # We're on a unix platform. Hooray! :)
34668       # First separate the path from the arguments. This will split at the first
34669       # space.
34670       complete="$RC"
34671       path="${complete%% *}"
34672       tmp="$complete EOL"
34673       arguments="${tmp#* }"
34674 
34675       # Cannot rely on the command "which" here since it doesn't always work.
34676       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34677       if test -z "$is_absolute_path"; then
34678         # Path to executable is not absolute. Find it.
34679         IFS_save="$IFS"
34680         IFS=:
34681         for p in $PATH; do
34682           if test -f "$p/$path" && test -x "$p/$path"; then
34683             new_path="$p/$path"
34684             break
34685           fi
34686         done
34687         IFS="$IFS_save"
34688       else
34689         # This is an absolute path, we can use it without further modifications.
34690         new_path="$path"
34691       fi
34692 
34693       if test "x$new_path" = x; then
34694         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34695 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34696         has_space=`$ECHO "$complete" | $GREP " "`
34697         if test "x$has_space" != x; then
34698           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34699 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34700         fi
34701         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34702       fi
34703     fi
34704 
34705     # Now join together the path and the arguments once again
34706     if test "x$arguments" != xEOL; then
34707       new_complete="$new_path ${arguments% *}"
34708     else
34709       new_complete="$new_path"
34710     fi
34711 
34712     if test "x$complete" != "x$new_complete"; then
34713       RC="$new_complete"
34714       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34715 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34716     fi
34717   fi
34718 
34719     # Extract the first word of "dumpbin", so it can be a program name with args.
34720 set dummy dumpbin; ac_word=$2
34721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34722 $as_echo_n "checking for $ac_word... " >&6; }
34723 if ${ac_cv_prog_DUMPBIN+:} false; then :
34724   $as_echo_n "(cached) " >&6
34725 else
34726   if test -n "$DUMPBIN"; then
34727   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34728 else
34729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34730 for as_dir in $PATH
34731 do
34732   IFS=$as_save_IFS
34733   test -z "$as_dir" && as_dir=.
34734     for ac_exec_ext in '' $ac_executable_extensions; do
34735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34736     ac_cv_prog_DUMPBIN="dumpbin"
34737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34738     break 2
34739   fi
34740 done
34741   done
34742 IFS=$as_save_IFS
34743 
34744 fi
34745 fi
34746 DUMPBIN=$ac_cv_prog_DUMPBIN
34747 if test -n "$DUMPBIN"; then
34748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34749 $as_echo "$DUMPBIN" >&6; }
34750 else
34751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34752 $as_echo "no" >&6; }
34753 fi
34754 
34755 
34756 
34757   # Only process if variable expands to non-empty
34758 
34759   if test "x$DUMPBIN" != x; then
34760     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34761 
34762   # First separate the path from the arguments. This will split at the first
34763   # space.
34764   complete="$DUMPBIN"
34765   path="${complete%% *}"
34766   tmp="$complete EOL"
34767   arguments="${tmp#* }"
34768 
34769   # Input might be given as Windows format, start by converting to
34770   # unix format.
34771   new_path=`$CYGPATH -u "$path"`
34772 
34773   # Now try to locate executable using which
34774   new_path=`$WHICH "$new_path" 2> /dev/null`
34775   # bat and cmd files are not always considered executable in cygwin causing which
34776   # to not find them
34777   if test "x$new_path" = x \
34778       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34779       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34780     new_path=`$CYGPATH -u "$path"`
34781   fi
34782   if test "x$new_path" = x; then
34783     # Oops. Which didn't find the executable.
34784     # The splitting of arguments from the executable at a space might have been incorrect,
34785     # since paths with space are more likely in Windows. Give it another try with the whole
34786     # argument.
34787     path="$complete"
34788     arguments="EOL"
34789     new_path=`$CYGPATH -u "$path"`
34790     new_path=`$WHICH "$new_path" 2> /dev/null`
34791     # bat and cmd files are not always considered executable in cygwin causing which
34792     # to not find them
34793     if test "x$new_path" = x \
34794         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34795         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34796       new_path=`$CYGPATH -u "$path"`
34797     fi
34798     if test "x$new_path" = x; then
34799       # It's still not found. Now this is an unrecoverable error.
34800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34801 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34802       has_space=`$ECHO "$complete" | $GREP " "`
34803       if test "x$has_space" != x; then
34804         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34805 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34806       fi
34807       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34808     fi
34809   fi
34810 
34811   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34812   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34813   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34814   # "foo.exe" is OK but "foo" is an error.
34815   #
34816   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34817   # It is also a way to make sure we got the proper file name for the real test later on.
34818   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34819   if test "x$test_shortpath" = x; then
34820     # Short path failed, file does not exist as specified.
34821     # Try adding .exe or .cmd
34822     if test -f "${new_path}.exe"; then
34823       input_to_shortpath="${new_path}.exe"
34824     elif test -f "${new_path}.cmd"; then
34825       input_to_shortpath="${new_path}.cmd"
34826     else
34827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34828 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34829       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34830 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34831       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34832     fi
34833   else
34834     input_to_shortpath="$new_path"
34835   fi
34836 
34837   # Call helper function which possibly converts this using DOS-style short mode.
34838   # If so, the updated path is stored in $new_path.
34839   new_path="$input_to_shortpath"
34840 
34841   input_path="$input_to_shortpath"
34842   # Check if we need to convert this using DOS-style short mode. If the path
34843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34844   # take no chances and rewrite it.
34845   # Note: m4 eats our [], so we need to use [ and ] instead.
34846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34847   if test "x$has_forbidden_chars" != x; then
34848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34849     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34850     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34851     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34852       # Going to short mode and back again did indeed matter. Since short mode is
34853       # case insensitive, let's make it lowercase to improve readability.
34854       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34855       # Now convert it back to Unix-stile (cygpath)
34856       input_path=`$CYGPATH -u "$shortmode_path"`
34857       new_path="$input_path"
34858     fi
34859   fi
34860 
34861   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34862   if test "x$test_cygdrive_prefix" = x; then
34863     # As a simple fix, exclude /usr/bin since it's not a real path.
34864     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34865       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34866       # a path prefixed by /cygdrive for fixpath to work.
34867       new_path="$CYGWIN_ROOT_PATH$input_path"
34868     fi
34869   fi
34870 
34871   # remove trailing .exe if any
34872   new_path="${new_path/%.exe/}"
34873 
34874     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34875 
34876   # First separate the path from the arguments. This will split at the first
34877   # space.
34878   complete="$DUMPBIN"
34879   path="${complete%% *}"
34880   tmp="$complete EOL"
34881   arguments="${tmp#* }"
34882 
34883   # Input might be given as Windows format, start by converting to
34884   # unix format.
34885   new_path="$path"
34886 
34887   windows_path="$new_path"
34888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34889     unix_path=`$CYGPATH -u "$windows_path"`
34890     new_path="$unix_path"
34891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34893     new_path="$unix_path"
34894   fi
34895 
34896 
34897   # Now try to locate executable using which
34898   new_path=`$WHICH "$new_path" 2> /dev/null`
34899 
34900   if test "x$new_path" = x; then
34901     # Oops. Which didn't find the executable.
34902     # The splitting of arguments from the executable at a space might have been incorrect,
34903     # since paths with space are more likely in Windows. Give it another try with the whole
34904     # argument.
34905     path="$complete"
34906     arguments="EOL"
34907     new_path="$path"
34908 
34909   windows_path="$new_path"
34910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34911     unix_path=`$CYGPATH -u "$windows_path"`
34912     new_path="$unix_path"
34913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34915     new_path="$unix_path"
34916   fi
34917 
34918 
34919     new_path=`$WHICH "$new_path" 2> /dev/null`
34920     # bat and cmd files are not always considered executable in MSYS causing which
34921     # to not find them
34922     if test "x$new_path" = x \
34923         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34924         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34925       new_path="$path"
34926 
34927   windows_path="$new_path"
34928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34929     unix_path=`$CYGPATH -u "$windows_path"`
34930     new_path="$unix_path"
34931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34933     new_path="$unix_path"
34934   fi
34935 
34936     fi
34937 
34938     if test "x$new_path" = x; then
34939       # It's still not found. Now this is an unrecoverable error.
34940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34941 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34942       has_space=`$ECHO "$complete" | $GREP " "`
34943       if test "x$has_space" != x; then
34944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34946       fi
34947       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34948     fi
34949   fi
34950 
34951   # Now new_path has a complete unix path to the binary
34952   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34953     # Keep paths in /bin as-is, but remove trailing .exe if any
34954     new_path="${new_path/%.exe/}"
34955     # Do not save /bin paths to all_fixpath_prefixes!
34956   else
34957     # Not in mixed or Windows style, start by that.
34958     new_path=`cmd //c echo $new_path`
34959 
34960   input_path="$new_path"
34961   # Check if we need to convert this using DOS-style short mode. If the path
34962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34963   # take no chances and rewrite it.
34964   # Note: m4 eats our [], so we need to use [ and ] instead.
34965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34966   if test "x$has_forbidden_chars" != x; then
34967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34969   fi
34970 
34971     # Output is in $new_path
34972 
34973   windows_path="$new_path"
34974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34975     unix_path=`$CYGPATH -u "$windows_path"`
34976     new_path="$unix_path"
34977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34979     new_path="$unix_path"
34980   fi
34981 
34982     # remove trailing .exe if any
34983     new_path="${new_path/%.exe/}"
34984 
34985     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34986     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34987   fi
34988 
34989     else
34990       # We're on a unix platform. Hooray! :)
34991       # First separate the path from the arguments. This will split at the first
34992       # space.
34993       complete="$DUMPBIN"
34994       path="${complete%% *}"
34995       tmp="$complete EOL"
34996       arguments="${tmp#* }"
34997 
34998       # Cannot rely on the command "which" here since it doesn't always work.
34999       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35000       if test -z "$is_absolute_path"; then
35001         # Path to executable is not absolute. Find it.
35002         IFS_save="$IFS"
35003         IFS=:
35004         for p in $PATH; do
35005           if test -f "$p/$path" && test -x "$p/$path"; then
35006             new_path="$p/$path"
35007             break
35008           fi
35009         done
35010         IFS="$IFS_save"
35011       else
35012         # This is an absolute path, we can use it without further modifications.
35013         new_path="$path"
35014       fi
35015 
35016       if test "x$new_path" = x; then
35017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35018 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35019         has_space=`$ECHO "$complete" | $GREP " "`
35020         if test "x$has_space" != x; then
35021           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35022 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35023         fi
35024         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35025       fi
35026     fi
35027 
35028     # Now join together the path and the arguments once again
35029     if test "x$arguments" != xEOL; then
35030       new_complete="$new_path ${arguments% *}"
35031     else
35032       new_complete="$new_path"
35033     fi
35034 
35035     if test "x$complete" != "x$new_complete"; then
35036       DUMPBIN="$new_complete"
35037       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35038 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35039     fi
35040   fi
35041 
35042     # We need to check for 'msbuild.exe' because at the place where we expect to
35043     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35044     # won't find the 'msbuild.exe' executable in that case (and the
35045     # 'ac_executable_extensions' is unusable due to performance reasons).
35046     # Notice that we intentionally don't fix up the path to MSBUILD because we
35047     # will call it in a DOS shell during freetype detection on Windows (see
35048     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35049     # Extract the first word of "msbuild.exe", so it can be a program name with args.
35050 set dummy msbuild.exe; ac_word=$2
35051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35052 $as_echo_n "checking for $ac_word... " >&6; }
35053 if ${ac_cv_prog_MSBUILD+:} false; then :
35054   $as_echo_n "(cached) " >&6
35055 else
35056   if test -n "$MSBUILD"; then
35057   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35058 else
35059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35060 for as_dir in $PATH
35061 do
35062   IFS=$as_save_IFS
35063   test -z "$as_dir" && as_dir=.
35064     for ac_exec_ext in '' $ac_executable_extensions; do
35065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35066     ac_cv_prog_MSBUILD="msbuild.exe"
35067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35068     break 2
35069   fi
35070 done
35071   done
35072 IFS=$as_save_IFS
35073 
35074 fi
35075 fi
35076 MSBUILD=$ac_cv_prog_MSBUILD
35077 if test -n "$MSBUILD"; then
35078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35079 $as_echo "$MSBUILD" >&6; }
35080 else
35081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35082 $as_echo "no" >&6; }
35083 fi
35084 
35085 
35086   fi
35087 
35088   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35089 
35090 
35091   # Publish this variable in the help.
35092 
35093 
35094   if test "x$STRIP" = x; then
35095     # The variable is not set by user, try to locate tool using the code snippet
35096     for ac_prog in strip
35097 do
35098   # Extract the first word of "$ac_prog", so it can be a program name with args.
35099 set dummy $ac_prog; ac_word=$2
35100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35101 $as_echo_n "checking for $ac_word... " >&6; }
35102 if ${ac_cv_path_STRIP+:} false; then :
35103   $as_echo_n "(cached) " >&6
35104 else
35105   case $STRIP in
35106   [\\/]* | ?:[\\/]*)
35107   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35108   ;;
35109   *)
35110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35111 for as_dir in $PATH
35112 do
35113   IFS=$as_save_IFS
35114   test -z "$as_dir" && as_dir=.
35115     for ac_exec_ext in '' $ac_executable_extensions; do
35116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35117     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35119     break 2
35120   fi
35121 done
35122   done
35123 IFS=$as_save_IFS
35124 
35125   ;;
35126 esac
35127 fi
35128 STRIP=$ac_cv_path_STRIP
35129 if test -n "$STRIP"; then
35130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35131 $as_echo "$STRIP" >&6; }
35132 else
35133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35134 $as_echo "no" >&6; }
35135 fi
35136 
35137 
35138   test -n "$STRIP" && break
35139 done
35140 
35141   else
35142     # The variable is set, but is it from the command line or the environment?
35143 
35144     # Try to remove the string !STRIP! from our list.
35145     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35146     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35147       # If it failed, the variable was not from the command line. Ignore it,
35148       # but warn the user (except for BASH, which is always set by the calling BASH).
35149       if test "xSTRIP" != xBASH; then
35150         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35151 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35152       fi
35153       # Try to locate tool using the code snippet
35154       for ac_prog in strip
35155 do
35156   # Extract the first word of "$ac_prog", so it can be a program name with args.
35157 set dummy $ac_prog; ac_word=$2
35158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35159 $as_echo_n "checking for $ac_word... " >&6; }
35160 if ${ac_cv_path_STRIP+:} false; then :
35161   $as_echo_n "(cached) " >&6
35162 else
35163   case $STRIP in
35164   [\\/]* | ?:[\\/]*)
35165   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35166   ;;
35167   *)
35168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35169 for as_dir in $PATH
35170 do
35171   IFS=$as_save_IFS
35172   test -z "$as_dir" && as_dir=.
35173     for ac_exec_ext in '' $ac_executable_extensions; do
35174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35175     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35177     break 2
35178   fi
35179 done
35180   done
35181 IFS=$as_save_IFS
35182 
35183   ;;
35184 esac
35185 fi
35186 STRIP=$ac_cv_path_STRIP
35187 if test -n "$STRIP"; then
35188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35189 $as_echo "$STRIP" >&6; }
35190 else
35191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35192 $as_echo "no" >&6; }
35193 fi
35194 
35195 
35196   test -n "$STRIP" && break
35197 done
35198 
35199     else
35200       # If it succeeded, then it was overridden by the user. We will use it
35201       # for the tool.
35202 
35203       # First remove it from the list of overridden variables, so we can test
35204       # for unknown variables in the end.
35205       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35206 
35207       # Check if the provided tool contains a complete path.
35208       tool_specified="$STRIP"
35209       tool_basename="${tool_specified##*/}"
35210       if test "x$tool_basename" = "x$tool_specified"; then
35211         # A command without a complete path is provided, search $PATH.
35212         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35213 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35214         # Extract the first word of "$tool_basename", so it can be a program name with args.
35215 set dummy $tool_basename; ac_word=$2
35216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35217 $as_echo_n "checking for $ac_word... " >&6; }
35218 if ${ac_cv_path_STRIP+:} false; then :
35219   $as_echo_n "(cached) " >&6
35220 else
35221   case $STRIP in
35222   [\\/]* | ?:[\\/]*)
35223   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35224   ;;
35225   *)
35226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35227 for as_dir in $PATH
35228 do
35229   IFS=$as_save_IFS
35230   test -z "$as_dir" && as_dir=.
35231     for ac_exec_ext in '' $ac_executable_extensions; do
35232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35233     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35235     break 2
35236   fi
35237 done
35238   done
35239 IFS=$as_save_IFS
35240 
35241   ;;
35242 esac
35243 fi
35244 STRIP=$ac_cv_path_STRIP
35245 if test -n "$STRIP"; then
35246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35247 $as_echo "$STRIP" >&6; }
35248 else
35249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35250 $as_echo "no" >&6; }
35251 fi
35252 
35253 
35254         if test "x$STRIP" = x; then
35255           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35256         fi
35257       else
35258         # Otherwise we believe it is a complete path. Use it as it is.
35259         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35260 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35261         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35262 $as_echo_n "checking for STRIP... " >&6; }
35263         if test ! -x "$tool_specified"; then
35264           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35265 $as_echo "not found" >&6; }
35266           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35267         fi
35268         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35269 $as_echo "$tool_specified" >&6; }
35270       fi
35271     fi
35272   fi
35273 
35274 
35275 
35276   # Only process if variable expands to non-empty
35277 
35278   if test "x$STRIP" != x; then
35279     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35280 
35281   # First separate the path from the arguments. This will split at the first
35282   # space.
35283   complete="$STRIP"
35284   path="${complete%% *}"
35285   tmp="$complete EOL"
35286   arguments="${tmp#* }"
35287 
35288   # Input might be given as Windows format, start by converting to
35289   # unix format.
35290   new_path=`$CYGPATH -u "$path"`
35291 
35292   # Now try to locate executable using which
35293   new_path=`$WHICH "$new_path" 2> /dev/null`
35294   # bat and cmd files are not always considered executable in cygwin causing which
35295   # to not find them
35296   if test "x$new_path" = x \
35297       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35298       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35299     new_path=`$CYGPATH -u "$path"`
35300   fi
35301   if test "x$new_path" = x; then
35302     # Oops. Which didn't find the executable.
35303     # The splitting of arguments from the executable at a space might have been incorrect,
35304     # since paths with space are more likely in Windows. Give it another try with the whole
35305     # argument.
35306     path="$complete"
35307     arguments="EOL"
35308     new_path=`$CYGPATH -u "$path"`
35309     new_path=`$WHICH "$new_path" 2> /dev/null`
35310     # bat and cmd files are not always considered executable in cygwin causing which
35311     # to not find them
35312     if test "x$new_path" = x \
35313         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35314         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35315       new_path=`$CYGPATH -u "$path"`
35316     fi
35317     if test "x$new_path" = x; then
35318       # It's still not found. Now this is an unrecoverable error.
35319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35320 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35321       has_space=`$ECHO "$complete" | $GREP " "`
35322       if test "x$has_space" != x; then
35323         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35324 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35325       fi
35326       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35327     fi
35328   fi
35329 
35330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35333   # "foo.exe" is OK but "foo" is an error.
35334   #
35335   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35336   # It is also a way to make sure we got the proper file name for the real test later on.
35337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35338   if test "x$test_shortpath" = x; then
35339     # Short path failed, file does not exist as specified.
35340     # Try adding .exe or .cmd
35341     if test -f "${new_path}.exe"; then
35342       input_to_shortpath="${new_path}.exe"
35343     elif test -f "${new_path}.cmd"; then
35344       input_to_shortpath="${new_path}.cmd"
35345     else
35346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35347 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35348       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35349 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35350       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35351     fi
35352   else
35353     input_to_shortpath="$new_path"
35354   fi
35355 
35356   # Call helper function which possibly converts this using DOS-style short mode.
35357   # If so, the updated path is stored in $new_path.
35358   new_path="$input_to_shortpath"
35359 
35360   input_path="$input_to_shortpath"
35361   # Check if we need to convert this using DOS-style short mode. If the path
35362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35363   # take no chances and rewrite it.
35364   # Note: m4 eats our [], so we need to use [ and ] instead.
35365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35366   if test "x$has_forbidden_chars" != x; then
35367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35371       # Going to short mode and back again did indeed matter. Since short mode is
35372       # case insensitive, let's make it lowercase to improve readability.
35373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35374       # Now convert it back to Unix-stile (cygpath)
35375       input_path=`$CYGPATH -u "$shortmode_path"`
35376       new_path="$input_path"
35377     fi
35378   fi
35379 
35380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35381   if test "x$test_cygdrive_prefix" = x; then
35382     # As a simple fix, exclude /usr/bin since it's not a real path.
35383     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35385       # a path prefixed by /cygdrive for fixpath to work.
35386       new_path="$CYGWIN_ROOT_PATH$input_path"
35387     fi
35388   fi
35389 
35390   # remove trailing .exe if any
35391   new_path="${new_path/%.exe/}"
35392 
35393     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35394 
35395   # First separate the path from the arguments. This will split at the first
35396   # space.
35397   complete="$STRIP"
35398   path="${complete%% *}"
35399   tmp="$complete EOL"
35400   arguments="${tmp#* }"
35401 
35402   # Input might be given as Windows format, start by converting to
35403   # unix format.
35404   new_path="$path"
35405 
35406   windows_path="$new_path"
35407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35408     unix_path=`$CYGPATH -u "$windows_path"`
35409     new_path="$unix_path"
35410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35412     new_path="$unix_path"
35413   fi
35414 
35415 
35416   # Now try to locate executable using which
35417   new_path=`$WHICH "$new_path" 2> /dev/null`
35418 
35419   if test "x$new_path" = x; then
35420     # Oops. Which didn't find the executable.
35421     # The splitting of arguments from the executable at a space might have been incorrect,
35422     # since paths with space are more likely in Windows. Give it another try with the whole
35423     # argument.
35424     path="$complete"
35425     arguments="EOL"
35426     new_path="$path"
35427 
35428   windows_path="$new_path"
35429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35430     unix_path=`$CYGPATH -u "$windows_path"`
35431     new_path="$unix_path"
35432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35434     new_path="$unix_path"
35435   fi
35436 
35437 
35438     new_path=`$WHICH "$new_path" 2> /dev/null`
35439     # bat and cmd files are not always considered executable in MSYS causing which
35440     # to not find them
35441     if test "x$new_path" = x \
35442         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35443         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35444       new_path="$path"
35445 
35446   windows_path="$new_path"
35447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35448     unix_path=`$CYGPATH -u "$windows_path"`
35449     new_path="$unix_path"
35450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35452     new_path="$unix_path"
35453   fi
35454 
35455     fi
35456 
35457     if test "x$new_path" = x; then
35458       # It's still not found. Now this is an unrecoverable error.
35459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35460 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35461       has_space=`$ECHO "$complete" | $GREP " "`
35462       if test "x$has_space" != x; then
35463         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35464 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35465       fi
35466       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35467     fi
35468   fi
35469 
35470   # Now new_path has a complete unix path to the binary
35471   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35472     # Keep paths in /bin as-is, but remove trailing .exe if any
35473     new_path="${new_path/%.exe/}"
35474     # Do not save /bin paths to all_fixpath_prefixes!
35475   else
35476     # Not in mixed or Windows style, start by that.
35477     new_path=`cmd //c echo $new_path`
35478 
35479   input_path="$new_path"
35480   # Check if we need to convert this using DOS-style short mode. If the path
35481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35482   # take no chances and rewrite it.
35483   # Note: m4 eats our [], so we need to use [ and ] instead.
35484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35485   if test "x$has_forbidden_chars" != x; then
35486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35488   fi
35489 
35490     # Output is in $new_path
35491 
35492   windows_path="$new_path"
35493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35494     unix_path=`$CYGPATH -u "$windows_path"`
35495     new_path="$unix_path"
35496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35498     new_path="$unix_path"
35499   fi
35500 
35501     # remove trailing .exe if any
35502     new_path="${new_path/%.exe/}"
35503 
35504     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35505     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35506   fi
35507 
35508     else
35509       # We're on a unix platform. Hooray! :)
35510       # First separate the path from the arguments. This will split at the first
35511       # space.
35512       complete="$STRIP"
35513       path="${complete%% *}"
35514       tmp="$complete EOL"
35515       arguments="${tmp#* }"
35516 
35517       # Cannot rely on the command "which" here since it doesn't always work.
35518       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35519       if test -z "$is_absolute_path"; then
35520         # Path to executable is not absolute. Find it.
35521         IFS_save="$IFS"
35522         IFS=:
35523         for p in $PATH; do
35524           if test -f "$p/$path" && test -x "$p/$path"; then
35525             new_path="$p/$path"
35526             break
35527           fi
35528         done
35529         IFS="$IFS_save"
35530       else
35531         # This is an absolute path, we can use it without further modifications.
35532         new_path="$path"
35533       fi
35534 
35535       if test "x$new_path" = x; then
35536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35537 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35538         has_space=`$ECHO "$complete" | $GREP " "`
35539         if test "x$has_space" != x; then
35540           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35541 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35542         fi
35543         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35544       fi
35545     fi
35546 
35547     # Now join together the path and the arguments once again
35548     if test "x$arguments" != xEOL; then
35549       new_complete="$new_path ${arguments% *}"
35550     else
35551       new_complete="$new_path"
35552     fi
35553 
35554     if test "x$complete" != "x$new_complete"; then
35555       STRIP="$new_complete"
35556       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35557 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35558     fi
35559   fi
35560 
35561 
35562 
35563   # Publish this variable in the help.
35564 
35565 
35566   if test "x$NM" = x; then
35567     # The variable is not set by user, try to locate tool using the code snippet
35568     for ac_prog in nm
35569 do
35570   # Extract the first word of "$ac_prog", so it can be a program name with args.
35571 set dummy $ac_prog; ac_word=$2
35572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35573 $as_echo_n "checking for $ac_word... " >&6; }
35574 if ${ac_cv_path_NM+:} false; then :
35575   $as_echo_n "(cached) " >&6
35576 else
35577   case $NM in
35578   [\\/]* | ?:[\\/]*)
35579   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35580   ;;
35581   *)
35582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35583 for as_dir in $PATH
35584 do
35585   IFS=$as_save_IFS
35586   test -z "$as_dir" && as_dir=.
35587     for ac_exec_ext in '' $ac_executable_extensions; do
35588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35589     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35591     break 2
35592   fi
35593 done
35594   done
35595 IFS=$as_save_IFS
35596 
35597   ;;
35598 esac
35599 fi
35600 NM=$ac_cv_path_NM
35601 if test -n "$NM"; then
35602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35603 $as_echo "$NM" >&6; }
35604 else
35605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35606 $as_echo "no" >&6; }
35607 fi
35608 
35609 
35610   test -n "$NM" && break
35611 done
35612 
35613   else
35614     # The variable is set, but is it from the command line or the environment?
35615 
35616     # Try to remove the string !NM! from our list.
35617     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35618     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35619       # If it failed, the variable was not from the command line. Ignore it,
35620       # but warn the user (except for BASH, which is always set by the calling BASH).
35621       if test "xNM" != xBASH; then
35622         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35623 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35624       fi
35625       # Try to locate tool using the code snippet
35626       for ac_prog in nm
35627 do
35628   # Extract the first word of "$ac_prog", so it can be a program name with args.
35629 set dummy $ac_prog; ac_word=$2
35630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35631 $as_echo_n "checking for $ac_word... " >&6; }
35632 if ${ac_cv_path_NM+:} false; then :
35633   $as_echo_n "(cached) " >&6
35634 else
35635   case $NM in
35636   [\\/]* | ?:[\\/]*)
35637   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35638   ;;
35639   *)
35640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35641 for as_dir in $PATH
35642 do
35643   IFS=$as_save_IFS
35644   test -z "$as_dir" && as_dir=.
35645     for ac_exec_ext in '' $ac_executable_extensions; do
35646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35647     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35649     break 2
35650   fi
35651 done
35652   done
35653 IFS=$as_save_IFS
35654 
35655   ;;
35656 esac
35657 fi
35658 NM=$ac_cv_path_NM
35659 if test -n "$NM"; then
35660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35661 $as_echo "$NM" >&6; }
35662 else
35663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35664 $as_echo "no" >&6; }
35665 fi
35666 
35667 
35668   test -n "$NM" && break
35669 done
35670 
35671     else
35672       # If it succeeded, then it was overridden by the user. We will use it
35673       # for the tool.
35674 
35675       # First remove it from the list of overridden variables, so we can test
35676       # for unknown variables in the end.
35677       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35678 
35679       # Check if the provided tool contains a complete path.
35680       tool_specified="$NM"
35681       tool_basename="${tool_specified##*/}"
35682       if test "x$tool_basename" = "x$tool_specified"; then
35683         # A command without a complete path is provided, search $PATH.
35684         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35685 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35686         # Extract the first word of "$tool_basename", so it can be a program name with args.
35687 set dummy $tool_basename; ac_word=$2
35688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35689 $as_echo_n "checking for $ac_word... " >&6; }
35690 if ${ac_cv_path_NM+:} false; then :
35691   $as_echo_n "(cached) " >&6
35692 else
35693   case $NM in
35694   [\\/]* | ?:[\\/]*)
35695   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35696   ;;
35697   *)
35698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35699 for as_dir in $PATH
35700 do
35701   IFS=$as_save_IFS
35702   test -z "$as_dir" && as_dir=.
35703     for ac_exec_ext in '' $ac_executable_extensions; do
35704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35705     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35707     break 2
35708   fi
35709 done
35710   done
35711 IFS=$as_save_IFS
35712 
35713   ;;
35714 esac
35715 fi
35716 NM=$ac_cv_path_NM
35717 if test -n "$NM"; then
35718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35719 $as_echo "$NM" >&6; }
35720 else
35721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35722 $as_echo "no" >&6; }
35723 fi
35724 
35725 
35726         if test "x$NM" = x; then
35727           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35728         fi
35729       else
35730         # Otherwise we believe it is a complete path. Use it as it is.
35731         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35732 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35733         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35734 $as_echo_n "checking for NM... " >&6; }
35735         if test ! -x "$tool_specified"; then
35736           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35737 $as_echo "not found" >&6; }
35738           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35739         fi
35740         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35741 $as_echo "$tool_specified" >&6; }
35742       fi
35743     fi
35744   fi
35745 
35746 
35747 
35748   # Only process if variable expands to non-empty
35749 
35750   if test "x$NM" != x; then
35751     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35752 
35753   # First separate the path from the arguments. This will split at the first
35754   # space.
35755   complete="$NM"
35756   path="${complete%% *}"
35757   tmp="$complete EOL"
35758   arguments="${tmp#* }"
35759 
35760   # Input might be given as Windows format, start by converting to
35761   # unix format.
35762   new_path=`$CYGPATH -u "$path"`
35763 
35764   # Now try to locate executable using which
35765   new_path=`$WHICH "$new_path" 2> /dev/null`
35766   # bat and cmd files are not always considered executable in cygwin causing which
35767   # to not find them
35768   if test "x$new_path" = x \
35769       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35770       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35771     new_path=`$CYGPATH -u "$path"`
35772   fi
35773   if test "x$new_path" = x; then
35774     # Oops. Which didn't find the executable.
35775     # The splitting of arguments from the executable at a space might have been incorrect,
35776     # since paths with space are more likely in Windows. Give it another try with the whole
35777     # argument.
35778     path="$complete"
35779     arguments="EOL"
35780     new_path=`$CYGPATH -u "$path"`
35781     new_path=`$WHICH "$new_path" 2> /dev/null`
35782     # bat and cmd files are not always considered executable in cygwin causing which
35783     # to not find them
35784     if test "x$new_path" = x \
35785         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35786         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35787       new_path=`$CYGPATH -u "$path"`
35788     fi
35789     if test "x$new_path" = x; then
35790       # It's still not found. Now this is an unrecoverable error.
35791       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35792 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35793       has_space=`$ECHO "$complete" | $GREP " "`
35794       if test "x$has_space" != x; then
35795         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35796 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35797       fi
35798       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35799     fi
35800   fi
35801 
35802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35805   # "foo.exe" is OK but "foo" is an error.
35806   #
35807   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35808   # It is also a way to make sure we got the proper file name for the real test later on.
35809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35810   if test "x$test_shortpath" = x; then
35811     # Short path failed, file does not exist as specified.
35812     # Try adding .exe or .cmd
35813     if test -f "${new_path}.exe"; then
35814       input_to_shortpath="${new_path}.exe"
35815     elif test -f "${new_path}.cmd"; then
35816       input_to_shortpath="${new_path}.cmd"
35817     else
35818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35819 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35820       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35821 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35822       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35823     fi
35824   else
35825     input_to_shortpath="$new_path"
35826   fi
35827 
35828   # Call helper function which possibly converts this using DOS-style short mode.
35829   # If so, the updated path is stored in $new_path.
35830   new_path="$input_to_shortpath"
35831 
35832   input_path="$input_to_shortpath"
35833   # Check if we need to convert this using DOS-style short mode. If the path
35834   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35835   # take no chances and rewrite it.
35836   # Note: m4 eats our [], so we need to use [ and ] instead.
35837   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35838   if test "x$has_forbidden_chars" != x; then
35839     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35840     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35841     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35842     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35843       # Going to short mode and back again did indeed matter. Since short mode is
35844       # case insensitive, let's make it lowercase to improve readability.
35845       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35846       # Now convert it back to Unix-stile (cygpath)
35847       input_path=`$CYGPATH -u "$shortmode_path"`
35848       new_path="$input_path"
35849     fi
35850   fi
35851 
35852   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35853   if test "x$test_cygdrive_prefix" = x; then
35854     # As a simple fix, exclude /usr/bin since it's not a real path.
35855     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35856       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35857       # a path prefixed by /cygdrive for fixpath to work.
35858       new_path="$CYGWIN_ROOT_PATH$input_path"
35859     fi
35860   fi
35861 
35862   # remove trailing .exe if any
35863   new_path="${new_path/%.exe/}"
35864 
35865     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35866 
35867   # First separate the path from the arguments. This will split at the first
35868   # space.
35869   complete="$NM"
35870   path="${complete%% *}"
35871   tmp="$complete EOL"
35872   arguments="${tmp#* }"
35873 
35874   # Input might be given as Windows format, start by converting to
35875   # unix format.
35876   new_path="$path"
35877 
35878   windows_path="$new_path"
35879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35880     unix_path=`$CYGPATH -u "$windows_path"`
35881     new_path="$unix_path"
35882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35884     new_path="$unix_path"
35885   fi
35886 
35887 
35888   # Now try to locate executable using which
35889   new_path=`$WHICH "$new_path" 2> /dev/null`
35890 
35891   if test "x$new_path" = x; then
35892     # Oops. Which didn't find the executable.
35893     # The splitting of arguments from the executable at a space might have been incorrect,
35894     # since paths with space are more likely in Windows. Give it another try with the whole
35895     # argument.
35896     path="$complete"
35897     arguments="EOL"
35898     new_path="$path"
35899 
35900   windows_path="$new_path"
35901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35902     unix_path=`$CYGPATH -u "$windows_path"`
35903     new_path="$unix_path"
35904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35906     new_path="$unix_path"
35907   fi
35908 
35909 
35910     new_path=`$WHICH "$new_path" 2> /dev/null`
35911     # bat and cmd files are not always considered executable in MSYS causing which
35912     # to not find them
35913     if test "x$new_path" = x \
35914         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35915         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35916       new_path="$path"
35917 
35918   windows_path="$new_path"
35919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35920     unix_path=`$CYGPATH -u "$windows_path"`
35921     new_path="$unix_path"
35922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35924     new_path="$unix_path"
35925   fi
35926 
35927     fi
35928 
35929     if test "x$new_path" = x; then
35930       # It's still not found. Now this is an unrecoverable error.
35931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35932 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35933       has_space=`$ECHO "$complete" | $GREP " "`
35934       if test "x$has_space" != x; then
35935         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35936 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35937       fi
35938       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35939     fi
35940   fi
35941 
35942   # Now new_path has a complete unix path to the binary
35943   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35944     # Keep paths in /bin as-is, but remove trailing .exe if any
35945     new_path="${new_path/%.exe/}"
35946     # Do not save /bin paths to all_fixpath_prefixes!
35947   else
35948     # Not in mixed or Windows style, start by that.
35949     new_path=`cmd //c echo $new_path`
35950 
35951   input_path="$new_path"
35952   # Check if we need to convert this using DOS-style short mode. If the path
35953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35954   # take no chances and rewrite it.
35955   # Note: m4 eats our [], so we need to use [ and ] instead.
35956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35957   if test "x$has_forbidden_chars" != x; then
35958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35959     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35960   fi
35961 
35962     # Output is in $new_path
35963 
35964   windows_path="$new_path"
35965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35966     unix_path=`$CYGPATH -u "$windows_path"`
35967     new_path="$unix_path"
35968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35970     new_path="$unix_path"
35971   fi
35972 
35973     # remove trailing .exe if any
35974     new_path="${new_path/%.exe/}"
35975 
35976     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35977     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35978   fi
35979 
35980     else
35981       # We're on a unix platform. Hooray! :)
35982       # First separate the path from the arguments. This will split at the first
35983       # space.
35984       complete="$NM"
35985       path="${complete%% *}"
35986       tmp="$complete EOL"
35987       arguments="${tmp#* }"
35988 
35989       # Cannot rely on the command "which" here since it doesn't always work.
35990       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35991       if test -z "$is_absolute_path"; then
35992         # Path to executable is not absolute. Find it.
35993         IFS_save="$IFS"
35994         IFS=:
35995         for p in $PATH; do
35996           if test -f "$p/$path" && test -x "$p/$path"; then
35997             new_path="$p/$path"
35998             break
35999           fi
36000         done
36001         IFS="$IFS_save"
36002       else
36003         # This is an absolute path, we can use it without further modifications.
36004         new_path="$path"
36005       fi
36006 
36007       if test "x$new_path" = x; then
36008         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36009 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36010         has_space=`$ECHO "$complete" | $GREP " "`
36011         if test "x$has_space" != x; then
36012           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36013 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36014         fi
36015         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36016       fi
36017     fi
36018 
36019     # Now join together the path and the arguments once again
36020     if test "x$arguments" != xEOL; then
36021       new_complete="$new_path ${arguments% *}"
36022     else
36023       new_complete="$new_path"
36024     fi
36025 
36026     if test "x$complete" != "x$new_complete"; then
36027       NM="$new_complete"
36028       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36029 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36030     fi
36031   fi
36032 
36033 
36034 
36035   # Publish this variable in the help.
36036 
36037 
36038   if test "x$GNM" = x; then
36039     # The variable is not set by user, try to locate tool using the code snippet
36040     for ac_prog in gnm
36041 do
36042   # Extract the first word of "$ac_prog", so it can be a program name with args.
36043 set dummy $ac_prog; ac_word=$2
36044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36045 $as_echo_n "checking for $ac_word... " >&6; }
36046 if ${ac_cv_path_GNM+:} false; then :
36047   $as_echo_n "(cached) " >&6
36048 else
36049   case $GNM in
36050   [\\/]* | ?:[\\/]*)
36051   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36052   ;;
36053   *)
36054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36055 for as_dir in $PATH
36056 do
36057   IFS=$as_save_IFS
36058   test -z "$as_dir" && as_dir=.
36059     for ac_exec_ext in '' $ac_executable_extensions; do
36060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36061     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36063     break 2
36064   fi
36065 done
36066   done
36067 IFS=$as_save_IFS
36068 
36069   ;;
36070 esac
36071 fi
36072 GNM=$ac_cv_path_GNM
36073 if test -n "$GNM"; then
36074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36075 $as_echo "$GNM" >&6; }
36076 else
36077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36078 $as_echo "no" >&6; }
36079 fi
36080 
36081 
36082   test -n "$GNM" && break
36083 done
36084 
36085   else
36086     # The variable is set, but is it from the command line or the environment?
36087 
36088     # Try to remove the string !GNM! from our list.
36089     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36090     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36091       # If it failed, the variable was not from the command line. Ignore it,
36092       # but warn the user (except for BASH, which is always set by the calling BASH).
36093       if test "xGNM" != xBASH; then
36094         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36095 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36096       fi
36097       # Try to locate tool using the code snippet
36098       for ac_prog in gnm
36099 do
36100   # Extract the first word of "$ac_prog", so it can be a program name with args.
36101 set dummy $ac_prog; ac_word=$2
36102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36103 $as_echo_n "checking for $ac_word... " >&6; }
36104 if ${ac_cv_path_GNM+:} false; then :
36105   $as_echo_n "(cached) " >&6
36106 else
36107   case $GNM in
36108   [\\/]* | ?:[\\/]*)
36109   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36110   ;;
36111   *)
36112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36113 for as_dir in $PATH
36114 do
36115   IFS=$as_save_IFS
36116   test -z "$as_dir" && as_dir=.
36117     for ac_exec_ext in '' $ac_executable_extensions; do
36118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36119     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36121     break 2
36122   fi
36123 done
36124   done
36125 IFS=$as_save_IFS
36126 
36127   ;;
36128 esac
36129 fi
36130 GNM=$ac_cv_path_GNM
36131 if test -n "$GNM"; then
36132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36133 $as_echo "$GNM" >&6; }
36134 else
36135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36136 $as_echo "no" >&6; }
36137 fi
36138 
36139 
36140   test -n "$GNM" && break
36141 done
36142 
36143     else
36144       # If it succeeded, then it was overridden by the user. We will use it
36145       # for the tool.
36146 
36147       # First remove it from the list of overridden variables, so we can test
36148       # for unknown variables in the end.
36149       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36150 
36151       # Check if the provided tool contains a complete path.
36152       tool_specified="$GNM"
36153       tool_basename="${tool_specified##*/}"
36154       if test "x$tool_basename" = "x$tool_specified"; then
36155         # A command without a complete path is provided, search $PATH.
36156         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36157 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36158         # Extract the first word of "$tool_basename", so it can be a program name with args.
36159 set dummy $tool_basename; ac_word=$2
36160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36161 $as_echo_n "checking for $ac_word... " >&6; }
36162 if ${ac_cv_path_GNM+:} false; then :
36163   $as_echo_n "(cached) " >&6
36164 else
36165   case $GNM in
36166   [\\/]* | ?:[\\/]*)
36167   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36168   ;;
36169   *)
36170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36171 for as_dir in $PATH
36172 do
36173   IFS=$as_save_IFS
36174   test -z "$as_dir" && as_dir=.
36175     for ac_exec_ext in '' $ac_executable_extensions; do
36176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36177     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36179     break 2
36180   fi
36181 done
36182   done
36183 IFS=$as_save_IFS
36184 
36185   ;;
36186 esac
36187 fi
36188 GNM=$ac_cv_path_GNM
36189 if test -n "$GNM"; then
36190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36191 $as_echo "$GNM" >&6; }
36192 else
36193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36194 $as_echo "no" >&6; }
36195 fi
36196 
36197 
36198         if test "x$GNM" = x; then
36199           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36200         fi
36201       else
36202         # Otherwise we believe it is a complete path. Use it as it is.
36203         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36204 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36206 $as_echo_n "checking for GNM... " >&6; }
36207         if test ! -x "$tool_specified"; then
36208           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36209 $as_echo "not found" >&6; }
36210           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36211         fi
36212         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36213 $as_echo "$tool_specified" >&6; }
36214       fi
36215     fi
36216   fi
36217 
36218 
36219 
36220   # Only process if variable expands to non-empty
36221 
36222   if test "x$GNM" != x; then
36223     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36224 
36225   # First separate the path from the arguments. This will split at the first
36226   # space.
36227   complete="$GNM"
36228   path="${complete%% *}"
36229   tmp="$complete EOL"
36230   arguments="${tmp#* }"
36231 
36232   # Input might be given as Windows format, start by converting to
36233   # unix format.
36234   new_path=`$CYGPATH -u "$path"`
36235 
36236   # Now try to locate executable using which
36237   new_path=`$WHICH "$new_path" 2> /dev/null`
36238   # bat and cmd files are not always considered executable in cygwin causing which
36239   # to not find them
36240   if test "x$new_path" = x \
36241       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36242       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36243     new_path=`$CYGPATH -u "$path"`
36244   fi
36245   if test "x$new_path" = x; then
36246     # Oops. Which didn't find the executable.
36247     # The splitting of arguments from the executable at a space might have been incorrect,
36248     # since paths with space are more likely in Windows. Give it another try with the whole
36249     # argument.
36250     path="$complete"
36251     arguments="EOL"
36252     new_path=`$CYGPATH -u "$path"`
36253     new_path=`$WHICH "$new_path" 2> /dev/null`
36254     # bat and cmd files are not always considered executable in cygwin causing which
36255     # to not find them
36256     if test "x$new_path" = x \
36257         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36258         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36259       new_path=`$CYGPATH -u "$path"`
36260     fi
36261     if test "x$new_path" = x; then
36262       # It's still not found. Now this is an unrecoverable error.
36263       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36264 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36265       has_space=`$ECHO "$complete" | $GREP " "`
36266       if test "x$has_space" != x; then
36267         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36268 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36269       fi
36270       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36271     fi
36272   fi
36273 
36274   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36275   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36276   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36277   # "foo.exe" is OK but "foo" is an error.
36278   #
36279   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36280   # It is also a way to make sure we got the proper file name for the real test later on.
36281   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36282   if test "x$test_shortpath" = x; then
36283     # Short path failed, file does not exist as specified.
36284     # Try adding .exe or .cmd
36285     if test -f "${new_path}.exe"; then
36286       input_to_shortpath="${new_path}.exe"
36287     elif test -f "${new_path}.cmd"; then
36288       input_to_shortpath="${new_path}.cmd"
36289     else
36290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36291 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36292       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36293 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36294       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36295     fi
36296   else
36297     input_to_shortpath="$new_path"
36298   fi
36299 
36300   # Call helper function which possibly converts this using DOS-style short mode.
36301   # If so, the updated path is stored in $new_path.
36302   new_path="$input_to_shortpath"
36303 
36304   input_path="$input_to_shortpath"
36305   # Check if we need to convert this using DOS-style short mode. If the path
36306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36307   # take no chances and rewrite it.
36308   # Note: m4 eats our [], so we need to use [ and ] instead.
36309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36310   if test "x$has_forbidden_chars" != x; then
36311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36315       # Going to short mode and back again did indeed matter. Since short mode is
36316       # case insensitive, let's make it lowercase to improve readability.
36317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36318       # Now convert it back to Unix-stile (cygpath)
36319       input_path=`$CYGPATH -u "$shortmode_path"`
36320       new_path="$input_path"
36321     fi
36322   fi
36323 
36324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36325   if test "x$test_cygdrive_prefix" = x; then
36326     # As a simple fix, exclude /usr/bin since it's not a real path.
36327     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36329       # a path prefixed by /cygdrive for fixpath to work.
36330       new_path="$CYGWIN_ROOT_PATH$input_path"
36331     fi
36332   fi
36333 
36334   # remove trailing .exe if any
36335   new_path="${new_path/%.exe/}"
36336 
36337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36338 
36339   # First separate the path from the arguments. This will split at the first
36340   # space.
36341   complete="$GNM"
36342   path="${complete%% *}"
36343   tmp="$complete EOL"
36344   arguments="${tmp#* }"
36345 
36346   # Input might be given as Windows format, start by converting to
36347   # unix format.
36348   new_path="$path"
36349 
36350   windows_path="$new_path"
36351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36352     unix_path=`$CYGPATH -u "$windows_path"`
36353     new_path="$unix_path"
36354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36356     new_path="$unix_path"
36357   fi
36358 
36359 
36360   # Now try to locate executable using which
36361   new_path=`$WHICH "$new_path" 2> /dev/null`
36362 
36363   if test "x$new_path" = x; then
36364     # Oops. Which didn't find the executable.
36365     # The splitting of arguments from the executable at a space might have been incorrect,
36366     # since paths with space are more likely in Windows. Give it another try with the whole
36367     # argument.
36368     path="$complete"
36369     arguments="EOL"
36370     new_path="$path"
36371 
36372   windows_path="$new_path"
36373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36374     unix_path=`$CYGPATH -u "$windows_path"`
36375     new_path="$unix_path"
36376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36378     new_path="$unix_path"
36379   fi
36380 
36381 
36382     new_path=`$WHICH "$new_path" 2> /dev/null`
36383     # bat and cmd files are not always considered executable in MSYS causing which
36384     # to not find them
36385     if test "x$new_path" = x \
36386         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36387         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36388       new_path="$path"
36389 
36390   windows_path="$new_path"
36391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36392     unix_path=`$CYGPATH -u "$windows_path"`
36393     new_path="$unix_path"
36394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36396     new_path="$unix_path"
36397   fi
36398 
36399     fi
36400 
36401     if test "x$new_path" = x; then
36402       # It's still not found. Now this is an unrecoverable error.
36403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36404 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36405       has_space=`$ECHO "$complete" | $GREP " "`
36406       if test "x$has_space" != x; then
36407         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36408 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36409       fi
36410       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36411     fi
36412   fi
36413 
36414   # Now new_path has a complete unix path to the binary
36415   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36416     # Keep paths in /bin as-is, but remove trailing .exe if any
36417     new_path="${new_path/%.exe/}"
36418     # Do not save /bin paths to all_fixpath_prefixes!
36419   else
36420     # Not in mixed or Windows style, start by that.
36421     new_path=`cmd //c echo $new_path`
36422 
36423   input_path="$new_path"
36424   # Check if we need to convert this using DOS-style short mode. If the path
36425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36426   # take no chances and rewrite it.
36427   # Note: m4 eats our [], so we need to use [ and ] instead.
36428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36429   if test "x$has_forbidden_chars" != x; then
36430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36432   fi
36433 
36434     # Output is in $new_path
36435 
36436   windows_path="$new_path"
36437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36438     unix_path=`$CYGPATH -u "$windows_path"`
36439     new_path="$unix_path"
36440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36442     new_path="$unix_path"
36443   fi
36444 
36445     # remove trailing .exe if any
36446     new_path="${new_path/%.exe/}"
36447 
36448     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36449     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36450   fi
36451 
36452     else
36453       # We're on a unix platform. Hooray! :)
36454       # First separate the path from the arguments. This will split at the first
36455       # space.
36456       complete="$GNM"
36457       path="${complete%% *}"
36458       tmp="$complete EOL"
36459       arguments="${tmp#* }"
36460 
36461       # Cannot rely on the command "which" here since it doesn't always work.
36462       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36463       if test -z "$is_absolute_path"; then
36464         # Path to executable is not absolute. Find it.
36465         IFS_save="$IFS"
36466         IFS=:
36467         for p in $PATH; do
36468           if test -f "$p/$path" && test -x "$p/$path"; then
36469             new_path="$p/$path"
36470             break
36471           fi
36472         done
36473         IFS="$IFS_save"
36474       else
36475         # This is an absolute path, we can use it without further modifications.
36476         new_path="$path"
36477       fi
36478 
36479       if test "x$new_path" = x; then
36480         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36481 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36482         has_space=`$ECHO "$complete" | $GREP " "`
36483         if test "x$has_space" != x; then
36484           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36485 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36486         fi
36487         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36488       fi
36489     fi
36490 
36491     # Now join together the path and the arguments once again
36492     if test "x$arguments" != xEOL; then
36493       new_complete="$new_path ${arguments% *}"
36494     else
36495       new_complete="$new_path"
36496     fi
36497 
36498     if test "x$complete" != "x$new_complete"; then
36499       GNM="$new_complete"
36500       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36501 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36502     fi
36503   fi
36504 
36505 
36506 
36507 
36508   # Publish this variable in the help.
36509 
36510 
36511   if test "x$MCS" = x; then
36512     # The variable is not set by user, try to locate tool using the code snippet
36513     for ac_prog in mcs
36514 do
36515   # Extract the first word of "$ac_prog", so it can be a program name with args.
36516 set dummy $ac_prog; ac_word=$2
36517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36518 $as_echo_n "checking for $ac_word... " >&6; }
36519 if ${ac_cv_path_MCS+:} false; then :
36520   $as_echo_n "(cached) " >&6
36521 else
36522   case $MCS in
36523   [\\/]* | ?:[\\/]*)
36524   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36525   ;;
36526   *)
36527   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36528 for as_dir in $PATH
36529 do
36530   IFS=$as_save_IFS
36531   test -z "$as_dir" && as_dir=.
36532     for ac_exec_ext in '' $ac_executable_extensions; do
36533   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36534     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36536     break 2
36537   fi
36538 done
36539   done
36540 IFS=$as_save_IFS
36541 
36542   ;;
36543 esac
36544 fi
36545 MCS=$ac_cv_path_MCS
36546 if test -n "$MCS"; then
36547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36548 $as_echo "$MCS" >&6; }
36549 else
36550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36551 $as_echo "no" >&6; }
36552 fi
36553 
36554 
36555   test -n "$MCS" && break
36556 done
36557 
36558   else
36559     # The variable is set, but is it from the command line or the environment?
36560 
36561     # Try to remove the string !MCS! from our list.
36562     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36563     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36564       # If it failed, the variable was not from the command line. Ignore it,
36565       # but warn the user (except for BASH, which is always set by the calling BASH).
36566       if test "xMCS" != xBASH; then
36567         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36568 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36569       fi
36570       # Try to locate tool using the code snippet
36571       for ac_prog in mcs
36572 do
36573   # Extract the first word of "$ac_prog", so it can be a program name with args.
36574 set dummy $ac_prog; ac_word=$2
36575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36576 $as_echo_n "checking for $ac_word... " >&6; }
36577 if ${ac_cv_path_MCS+:} false; then :
36578   $as_echo_n "(cached) " >&6
36579 else
36580   case $MCS in
36581   [\\/]* | ?:[\\/]*)
36582   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36583   ;;
36584   *)
36585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36586 for as_dir in $PATH
36587 do
36588   IFS=$as_save_IFS
36589   test -z "$as_dir" && as_dir=.
36590     for ac_exec_ext in '' $ac_executable_extensions; do
36591   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36592     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36594     break 2
36595   fi
36596 done
36597   done
36598 IFS=$as_save_IFS
36599 
36600   ;;
36601 esac
36602 fi
36603 MCS=$ac_cv_path_MCS
36604 if test -n "$MCS"; then
36605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36606 $as_echo "$MCS" >&6; }
36607 else
36608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36609 $as_echo "no" >&6; }
36610 fi
36611 
36612 
36613   test -n "$MCS" && break
36614 done
36615 
36616     else
36617       # If it succeeded, then it was overridden by the user. We will use it
36618       # for the tool.
36619 
36620       # First remove it from the list of overridden variables, so we can test
36621       # for unknown variables in the end.
36622       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36623 
36624       # Check if the provided tool contains a complete path.
36625       tool_specified="$MCS"
36626       tool_basename="${tool_specified##*/}"
36627       if test "x$tool_basename" = "x$tool_specified"; then
36628         # A command without a complete path is provided, search $PATH.
36629         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36630 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36631         # Extract the first word of "$tool_basename", so it can be a program name with args.
36632 set dummy $tool_basename; ac_word=$2
36633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36634 $as_echo_n "checking for $ac_word... " >&6; }
36635 if ${ac_cv_path_MCS+:} false; then :
36636   $as_echo_n "(cached) " >&6
36637 else
36638   case $MCS in
36639   [\\/]* | ?:[\\/]*)
36640   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36641   ;;
36642   *)
36643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36644 for as_dir in $PATH
36645 do
36646   IFS=$as_save_IFS
36647   test -z "$as_dir" && as_dir=.
36648     for ac_exec_ext in '' $ac_executable_extensions; do
36649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36650     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36652     break 2
36653   fi
36654 done
36655   done
36656 IFS=$as_save_IFS
36657 
36658   ;;
36659 esac
36660 fi
36661 MCS=$ac_cv_path_MCS
36662 if test -n "$MCS"; then
36663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36664 $as_echo "$MCS" >&6; }
36665 else
36666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36667 $as_echo "no" >&6; }
36668 fi
36669 
36670 
36671         if test "x$MCS" = x; then
36672           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36673         fi
36674       else
36675         # Otherwise we believe it is a complete path. Use it as it is.
36676         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36677 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36678         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36679 $as_echo_n "checking for MCS... " >&6; }
36680         if test ! -x "$tool_specified"; then
36681           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36682 $as_echo "not found" >&6; }
36683           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36684         fi
36685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36686 $as_echo "$tool_specified" >&6; }
36687       fi
36688     fi
36689   fi
36690 
36691 
36692 
36693   # Only process if variable expands to non-empty
36694 
36695   if test "x$MCS" != x; then
36696     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36697 
36698   # First separate the path from the arguments. This will split at the first
36699   # space.
36700   complete="$MCS"
36701   path="${complete%% *}"
36702   tmp="$complete EOL"
36703   arguments="${tmp#* }"
36704 
36705   # Input might be given as Windows format, start by converting to
36706   # unix format.
36707   new_path=`$CYGPATH -u "$path"`
36708 
36709   # Now try to locate executable using which
36710   new_path=`$WHICH "$new_path" 2> /dev/null`
36711   # bat and cmd files are not always considered executable in cygwin causing which
36712   # to not find them
36713   if test "x$new_path" = x \
36714       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36715       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36716     new_path=`$CYGPATH -u "$path"`
36717   fi
36718   if test "x$new_path" = x; then
36719     # Oops. Which didn't find the executable.
36720     # The splitting of arguments from the executable at a space might have been incorrect,
36721     # since paths with space are more likely in Windows. Give it another try with the whole
36722     # argument.
36723     path="$complete"
36724     arguments="EOL"
36725     new_path=`$CYGPATH -u "$path"`
36726     new_path=`$WHICH "$new_path" 2> /dev/null`
36727     # bat and cmd files are not always considered executable in cygwin causing which
36728     # to not find them
36729     if test "x$new_path" = x \
36730         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36731         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36732       new_path=`$CYGPATH -u "$path"`
36733     fi
36734     if test "x$new_path" = x; then
36735       # It's still not found. Now this is an unrecoverable error.
36736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36737 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36738       has_space=`$ECHO "$complete" | $GREP " "`
36739       if test "x$has_space" != x; then
36740         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36741 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36742       fi
36743       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36744     fi
36745   fi
36746 
36747   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36748   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36749   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36750   # "foo.exe" is OK but "foo" is an error.
36751   #
36752   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36753   # It is also a way to make sure we got the proper file name for the real test later on.
36754   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36755   if test "x$test_shortpath" = x; then
36756     # Short path failed, file does not exist as specified.
36757     # Try adding .exe or .cmd
36758     if test -f "${new_path}.exe"; then
36759       input_to_shortpath="${new_path}.exe"
36760     elif test -f "${new_path}.cmd"; then
36761       input_to_shortpath="${new_path}.cmd"
36762     else
36763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36764 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36765       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36766 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36767       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36768     fi
36769   else
36770     input_to_shortpath="$new_path"
36771   fi
36772 
36773   # Call helper function which possibly converts this using DOS-style short mode.
36774   # If so, the updated path is stored in $new_path.
36775   new_path="$input_to_shortpath"
36776 
36777   input_path="$input_to_shortpath"
36778   # Check if we need to convert this using DOS-style short mode. If the path
36779   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36780   # take no chances and rewrite it.
36781   # Note: m4 eats our [], so we need to use [ and ] instead.
36782   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36783   if test "x$has_forbidden_chars" != x; then
36784     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36785     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36786     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36787     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36788       # Going to short mode and back again did indeed matter. Since short mode is
36789       # case insensitive, let's make it lowercase to improve readability.
36790       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36791       # Now convert it back to Unix-stile (cygpath)
36792       input_path=`$CYGPATH -u "$shortmode_path"`
36793       new_path="$input_path"
36794     fi
36795   fi
36796 
36797   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36798   if test "x$test_cygdrive_prefix" = x; then
36799     # As a simple fix, exclude /usr/bin since it's not a real path.
36800     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36801       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36802       # a path prefixed by /cygdrive for fixpath to work.
36803       new_path="$CYGWIN_ROOT_PATH$input_path"
36804     fi
36805   fi
36806 
36807   # remove trailing .exe if any
36808   new_path="${new_path/%.exe/}"
36809 
36810     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36811 
36812   # First separate the path from the arguments. This will split at the first
36813   # space.
36814   complete="$MCS"
36815   path="${complete%% *}"
36816   tmp="$complete EOL"
36817   arguments="${tmp#* }"
36818 
36819   # Input might be given as Windows format, start by converting to
36820   # unix format.
36821   new_path="$path"
36822 
36823   windows_path="$new_path"
36824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36825     unix_path=`$CYGPATH -u "$windows_path"`
36826     new_path="$unix_path"
36827   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36828     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36829     new_path="$unix_path"
36830   fi
36831 
36832 
36833   # Now try to locate executable using which
36834   new_path=`$WHICH "$new_path" 2> /dev/null`
36835 
36836   if test "x$new_path" = x; then
36837     # Oops. Which didn't find the executable.
36838     # The splitting of arguments from the executable at a space might have been incorrect,
36839     # since paths with space are more likely in Windows. Give it another try with the whole
36840     # argument.
36841     path="$complete"
36842     arguments="EOL"
36843     new_path="$path"
36844 
36845   windows_path="$new_path"
36846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36847     unix_path=`$CYGPATH -u "$windows_path"`
36848     new_path="$unix_path"
36849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36851     new_path="$unix_path"
36852   fi
36853 
36854 
36855     new_path=`$WHICH "$new_path" 2> /dev/null`
36856     # bat and cmd files are not always considered executable in MSYS causing which
36857     # to not find them
36858     if test "x$new_path" = x \
36859         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36860         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36861       new_path="$path"
36862 
36863   windows_path="$new_path"
36864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36865     unix_path=`$CYGPATH -u "$windows_path"`
36866     new_path="$unix_path"
36867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36869     new_path="$unix_path"
36870   fi
36871 
36872     fi
36873 
36874     if test "x$new_path" = x; then
36875       # It's still not found. Now this is an unrecoverable error.
36876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36877 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36878       has_space=`$ECHO "$complete" | $GREP " "`
36879       if test "x$has_space" != x; then
36880         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36881 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36882       fi
36883       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36884     fi
36885   fi
36886 
36887   # Now new_path has a complete unix path to the binary
36888   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36889     # Keep paths in /bin as-is, but remove trailing .exe if any
36890     new_path="${new_path/%.exe/}"
36891     # Do not save /bin paths to all_fixpath_prefixes!
36892   else
36893     # Not in mixed or Windows style, start by that.
36894     new_path=`cmd //c echo $new_path`
36895 
36896   input_path="$new_path"
36897   # Check if we need to convert this using DOS-style short mode. If the path
36898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36899   # take no chances and rewrite it.
36900   # Note: m4 eats our [], so we need to use [ and ] instead.
36901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36902   if test "x$has_forbidden_chars" != x; then
36903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36904     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36905   fi
36906 
36907     # Output is in $new_path
36908 
36909   windows_path="$new_path"
36910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36911     unix_path=`$CYGPATH -u "$windows_path"`
36912     new_path="$unix_path"
36913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36915     new_path="$unix_path"
36916   fi
36917 
36918     # remove trailing .exe if any
36919     new_path="${new_path/%.exe/}"
36920 
36921     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36922     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36923   fi
36924 
36925     else
36926       # We're on a unix platform. Hooray! :)
36927       # First separate the path from the arguments. This will split at the first
36928       # space.
36929       complete="$MCS"
36930       path="${complete%% *}"
36931       tmp="$complete EOL"
36932       arguments="${tmp#* }"
36933 
36934       # Cannot rely on the command "which" here since it doesn't always work.
36935       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36936       if test -z "$is_absolute_path"; then
36937         # Path to executable is not absolute. Find it.
36938         IFS_save="$IFS"
36939         IFS=:
36940         for p in $PATH; do
36941           if test -f "$p/$path" && test -x "$p/$path"; then
36942             new_path="$p/$path"
36943             break
36944           fi
36945         done
36946         IFS="$IFS_save"
36947       else
36948         # This is an absolute path, we can use it without further modifications.
36949         new_path="$path"
36950       fi
36951 
36952       if test "x$new_path" = x; then
36953         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36954 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36955         has_space=`$ECHO "$complete" | $GREP " "`
36956         if test "x$has_space" != x; then
36957           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36958 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36959         fi
36960         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36961       fi
36962     fi
36963 
36964     # Now join together the path and the arguments once again
36965     if test "x$arguments" != xEOL; then
36966       new_complete="$new_path ${arguments% *}"
36967     else
36968       new_complete="$new_path"
36969     fi
36970 
36971     if test "x$complete" != "x$new_complete"; then
36972       MCS="$new_complete"
36973       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36974 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36975     fi
36976   fi
36977 
36978   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36979     # FIXME: we should unify this with the solaris case above.
36980 
36981 
36982   # Publish this variable in the help.
36983 
36984 
36985   if test "x$STRIP" = x; then
36986     # The variable is not set by user, try to locate tool using the code snippet
36987     if test -n "$ac_tool_prefix"; then
36988   for ac_prog in strip
36989   do
36990     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36991 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36993 $as_echo_n "checking for $ac_word... " >&6; }
36994 if ${ac_cv_prog_STRIP+:} false; then :
36995   $as_echo_n "(cached) " >&6
36996 else
36997   if test -n "$STRIP"; then
36998   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36999 else
37000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37001 for as_dir in $PATH
37002 do
37003   IFS=$as_save_IFS
37004   test -z "$as_dir" && as_dir=.
37005     for ac_exec_ext in '' $ac_executable_extensions; do
37006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37007     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37009     break 2
37010   fi
37011 done
37012   done
37013 IFS=$as_save_IFS
37014 
37015 fi
37016 fi
37017 STRIP=$ac_cv_prog_STRIP
37018 if test -n "$STRIP"; then
37019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37020 $as_echo "$STRIP" >&6; }
37021 else
37022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37023 $as_echo "no" >&6; }
37024 fi
37025 
37026 
37027     test -n "$STRIP" && break
37028   done
37029 fi
37030 if test -z "$STRIP"; then
37031   ac_ct_STRIP=$STRIP
37032   for ac_prog in strip
37033 do
37034   # Extract the first word of "$ac_prog", so it can be a program name with args.
37035 set dummy $ac_prog; ac_word=$2
37036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37037 $as_echo_n "checking for $ac_word... " >&6; }
37038 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37039   $as_echo_n "(cached) " >&6
37040 else
37041   if test -n "$ac_ct_STRIP"; then
37042   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37043 else
37044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37045 for as_dir in $PATH
37046 do
37047   IFS=$as_save_IFS
37048   test -z "$as_dir" && as_dir=.
37049     for ac_exec_ext in '' $ac_executable_extensions; do
37050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37051     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37053     break 2
37054   fi
37055 done
37056   done
37057 IFS=$as_save_IFS
37058 
37059 fi
37060 fi
37061 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37062 if test -n "$ac_ct_STRIP"; then
37063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37064 $as_echo "$ac_ct_STRIP" >&6; }
37065 else
37066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37067 $as_echo "no" >&6; }
37068 fi
37069 
37070 
37071   test -n "$ac_ct_STRIP" && break
37072 done
37073 
37074   if test "x$ac_ct_STRIP" = x; then
37075     STRIP=""
37076   else
37077     case $cross_compiling:$ac_tool_warned in
37078 yes:)
37079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37080 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37081 ac_tool_warned=yes ;;
37082 esac
37083     STRIP=$ac_ct_STRIP
37084   fi
37085 fi
37086 
37087   else
37088     # The variable is set, but is it from the command line or the environment?
37089 
37090     # Try to remove the string !STRIP! from our list.
37091     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37092     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37093       # If it failed, the variable was not from the command line. Ignore it,
37094       # but warn the user (except for BASH, which is always set by the calling BASH).
37095       if test "xSTRIP" != xBASH; then
37096         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37097 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37098       fi
37099       # Try to locate tool using the code snippet
37100       if test -n "$ac_tool_prefix"; then
37101   for ac_prog in strip
37102   do
37103     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37104 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37106 $as_echo_n "checking for $ac_word... " >&6; }
37107 if ${ac_cv_prog_STRIP+:} false; then :
37108   $as_echo_n "(cached) " >&6
37109 else
37110   if test -n "$STRIP"; then
37111   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37112 else
37113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37114 for as_dir in $PATH
37115 do
37116   IFS=$as_save_IFS
37117   test -z "$as_dir" && as_dir=.
37118     for ac_exec_ext in '' $ac_executable_extensions; do
37119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37120     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37122     break 2
37123   fi
37124 done
37125   done
37126 IFS=$as_save_IFS
37127 
37128 fi
37129 fi
37130 STRIP=$ac_cv_prog_STRIP
37131 if test -n "$STRIP"; then
37132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37133 $as_echo "$STRIP" >&6; }
37134 else
37135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37136 $as_echo "no" >&6; }
37137 fi
37138 
37139 
37140     test -n "$STRIP" && break
37141   done
37142 fi
37143 if test -z "$STRIP"; then
37144   ac_ct_STRIP=$STRIP
37145   for ac_prog in strip
37146 do
37147   # Extract the first word of "$ac_prog", so it can be a program name with args.
37148 set dummy $ac_prog; ac_word=$2
37149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37150 $as_echo_n "checking for $ac_word... " >&6; }
37151 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37152   $as_echo_n "(cached) " >&6
37153 else
37154   if test -n "$ac_ct_STRIP"; then
37155   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37156 else
37157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37158 for as_dir in $PATH
37159 do
37160   IFS=$as_save_IFS
37161   test -z "$as_dir" && as_dir=.
37162     for ac_exec_ext in '' $ac_executable_extensions; do
37163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37164     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37166     break 2
37167   fi
37168 done
37169   done
37170 IFS=$as_save_IFS
37171 
37172 fi
37173 fi
37174 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37175 if test -n "$ac_ct_STRIP"; then
37176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37177 $as_echo "$ac_ct_STRIP" >&6; }
37178 else
37179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37180 $as_echo "no" >&6; }
37181 fi
37182 
37183 
37184   test -n "$ac_ct_STRIP" && break
37185 done
37186 
37187   if test "x$ac_ct_STRIP" = x; then
37188     STRIP=""
37189   else
37190     case $cross_compiling:$ac_tool_warned in
37191 yes:)
37192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37193 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37194 ac_tool_warned=yes ;;
37195 esac
37196     STRIP=$ac_ct_STRIP
37197   fi
37198 fi
37199 
37200     else
37201       # If it succeeded, then it was overridden by the user. We will use it
37202       # for the tool.
37203 
37204       # First remove it from the list of overridden variables, so we can test
37205       # for unknown variables in the end.
37206       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37207 
37208       # Check if the provided tool contains a complete path.
37209       tool_specified="$STRIP"
37210       tool_basename="${tool_specified##*/}"
37211       if test "x$tool_basename" = "x$tool_specified"; then
37212         # A command without a complete path is provided, search $PATH.
37213         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37214 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37215         # Extract the first word of "$tool_basename", so it can be a program name with args.
37216 set dummy $tool_basename; ac_word=$2
37217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37218 $as_echo_n "checking for $ac_word... " >&6; }
37219 if ${ac_cv_path_STRIP+:} false; then :
37220   $as_echo_n "(cached) " >&6
37221 else
37222   case $STRIP in
37223   [\\/]* | ?:[\\/]*)
37224   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37225   ;;
37226   *)
37227   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37228 for as_dir in $PATH
37229 do
37230   IFS=$as_save_IFS
37231   test -z "$as_dir" && as_dir=.
37232     for ac_exec_ext in '' $ac_executable_extensions; do
37233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37234     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37236     break 2
37237   fi
37238 done
37239   done
37240 IFS=$as_save_IFS
37241 
37242   ;;
37243 esac
37244 fi
37245 STRIP=$ac_cv_path_STRIP
37246 if test -n "$STRIP"; then
37247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37248 $as_echo "$STRIP" >&6; }
37249 else
37250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37251 $as_echo "no" >&6; }
37252 fi
37253 
37254 
37255         if test "x$STRIP" = x; then
37256           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37257         fi
37258       else
37259         # Otherwise we believe it is a complete path. Use it as it is.
37260         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37261 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37263 $as_echo_n "checking for STRIP... " >&6; }
37264         if test ! -x "$tool_specified"; then
37265           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37266 $as_echo "not found" >&6; }
37267           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37268         fi
37269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37270 $as_echo "$tool_specified" >&6; }
37271       fi
37272     fi
37273   fi
37274 
37275 
37276 
37277   # Only process if variable expands to non-empty
37278 
37279   if test "x$STRIP" != x; then
37280     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37281 
37282   # First separate the path from the arguments. This will split at the first
37283   # space.
37284   complete="$STRIP"
37285   path="${complete%% *}"
37286   tmp="$complete EOL"
37287   arguments="${tmp#* }"
37288 
37289   # Input might be given as Windows format, start by converting to
37290   # unix format.
37291   new_path=`$CYGPATH -u "$path"`
37292 
37293   # Now try to locate executable using which
37294   new_path=`$WHICH "$new_path" 2> /dev/null`
37295   # bat and cmd files are not always considered executable in cygwin causing which
37296   # to not find them
37297   if test "x$new_path" = x \
37298       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37299       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37300     new_path=`$CYGPATH -u "$path"`
37301   fi
37302   if test "x$new_path" = x; then
37303     # Oops. Which didn't find the executable.
37304     # The splitting of arguments from the executable at a space might have been incorrect,
37305     # since paths with space are more likely in Windows. Give it another try with the whole
37306     # argument.
37307     path="$complete"
37308     arguments="EOL"
37309     new_path=`$CYGPATH -u "$path"`
37310     new_path=`$WHICH "$new_path" 2> /dev/null`
37311     # bat and cmd files are not always considered executable in cygwin causing which
37312     # to not find them
37313     if test "x$new_path" = x \
37314         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37315         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37316       new_path=`$CYGPATH -u "$path"`
37317     fi
37318     if test "x$new_path" = x; then
37319       # It's still not found. Now this is an unrecoverable error.
37320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37321 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37322       has_space=`$ECHO "$complete" | $GREP " "`
37323       if test "x$has_space" != x; then
37324         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37325 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37326       fi
37327       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37328     fi
37329   fi
37330 
37331   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37332   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37333   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37334   # "foo.exe" is OK but "foo" is an error.
37335   #
37336   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37337   # It is also a way to make sure we got the proper file name for the real test later on.
37338   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37339   if test "x$test_shortpath" = x; then
37340     # Short path failed, file does not exist as specified.
37341     # Try adding .exe or .cmd
37342     if test -f "${new_path}.exe"; then
37343       input_to_shortpath="${new_path}.exe"
37344     elif test -f "${new_path}.cmd"; then
37345       input_to_shortpath="${new_path}.cmd"
37346     else
37347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37348 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37349       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37350 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37351       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37352     fi
37353   else
37354     input_to_shortpath="$new_path"
37355   fi
37356 
37357   # Call helper function which possibly converts this using DOS-style short mode.
37358   # If so, the updated path is stored in $new_path.
37359   new_path="$input_to_shortpath"
37360 
37361   input_path="$input_to_shortpath"
37362   # Check if we need to convert this using DOS-style short mode. If the path
37363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37364   # take no chances and rewrite it.
37365   # Note: m4 eats our [], so we need to use [ and ] instead.
37366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37367   if test "x$has_forbidden_chars" != x; then
37368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37369     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37370     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37371     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37372       # Going to short mode and back again did indeed matter. Since short mode is
37373       # case insensitive, let's make it lowercase to improve readability.
37374       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37375       # Now convert it back to Unix-stile (cygpath)
37376       input_path=`$CYGPATH -u "$shortmode_path"`
37377       new_path="$input_path"
37378     fi
37379   fi
37380 
37381   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37382   if test "x$test_cygdrive_prefix" = x; then
37383     # As a simple fix, exclude /usr/bin since it's not a real path.
37384     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37385       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37386       # a path prefixed by /cygdrive for fixpath to work.
37387       new_path="$CYGWIN_ROOT_PATH$input_path"
37388     fi
37389   fi
37390 
37391   # remove trailing .exe if any
37392   new_path="${new_path/%.exe/}"
37393 
37394     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37395 
37396   # First separate the path from the arguments. This will split at the first
37397   # space.
37398   complete="$STRIP"
37399   path="${complete%% *}"
37400   tmp="$complete EOL"
37401   arguments="${tmp#* }"
37402 
37403   # Input might be given as Windows format, start by converting to
37404   # unix format.
37405   new_path="$path"
37406 
37407   windows_path="$new_path"
37408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37409     unix_path=`$CYGPATH -u "$windows_path"`
37410     new_path="$unix_path"
37411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37413     new_path="$unix_path"
37414   fi
37415 
37416 
37417   # Now try to locate executable using which
37418   new_path=`$WHICH "$new_path" 2> /dev/null`
37419 
37420   if test "x$new_path" = x; then
37421     # Oops. Which didn't find the executable.
37422     # The splitting of arguments from the executable at a space might have been incorrect,
37423     # since paths with space are more likely in Windows. Give it another try with the whole
37424     # argument.
37425     path="$complete"
37426     arguments="EOL"
37427     new_path="$path"
37428 
37429   windows_path="$new_path"
37430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37431     unix_path=`$CYGPATH -u "$windows_path"`
37432     new_path="$unix_path"
37433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37435     new_path="$unix_path"
37436   fi
37437 
37438 
37439     new_path=`$WHICH "$new_path" 2> /dev/null`
37440     # bat and cmd files are not always considered executable in MSYS causing which
37441     # to not find them
37442     if test "x$new_path" = x \
37443         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37444         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37445       new_path="$path"
37446 
37447   windows_path="$new_path"
37448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37449     unix_path=`$CYGPATH -u "$windows_path"`
37450     new_path="$unix_path"
37451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37453     new_path="$unix_path"
37454   fi
37455 
37456     fi
37457 
37458     if test "x$new_path" = x; then
37459       # It's still not found. Now this is an unrecoverable error.
37460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37461 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37462       has_space=`$ECHO "$complete" | $GREP " "`
37463       if test "x$has_space" != x; then
37464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37466       fi
37467       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37468     fi
37469   fi
37470 
37471   # Now new_path has a complete unix path to the binary
37472   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37473     # Keep paths in /bin as-is, but remove trailing .exe if any
37474     new_path="${new_path/%.exe/}"
37475     # Do not save /bin paths to all_fixpath_prefixes!
37476   else
37477     # Not in mixed or Windows style, start by that.
37478     new_path=`cmd //c echo $new_path`
37479 
37480   input_path="$new_path"
37481   # Check if we need to convert this using DOS-style short mode. If the path
37482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37483   # take no chances and rewrite it.
37484   # Note: m4 eats our [], so we need to use [ and ] instead.
37485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37486   if test "x$has_forbidden_chars" != x; then
37487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37488     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37489   fi
37490 
37491     # Output is in $new_path
37492 
37493   windows_path="$new_path"
37494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37495     unix_path=`$CYGPATH -u "$windows_path"`
37496     new_path="$unix_path"
37497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37499     new_path="$unix_path"
37500   fi
37501 
37502     # remove trailing .exe if any
37503     new_path="${new_path/%.exe/}"
37504 
37505     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37506     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37507   fi
37508 
37509     else
37510       # We're on a unix platform. Hooray! :)
37511       # First separate the path from the arguments. This will split at the first
37512       # space.
37513       complete="$STRIP"
37514       path="${complete%% *}"
37515       tmp="$complete EOL"
37516       arguments="${tmp#* }"
37517 
37518       # Cannot rely on the command "which" here since it doesn't always work.
37519       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37520       if test -z "$is_absolute_path"; then
37521         # Path to executable is not absolute. Find it.
37522         IFS_save="$IFS"
37523         IFS=:
37524         for p in $PATH; do
37525           if test -f "$p/$path" && test -x "$p/$path"; then
37526             new_path="$p/$path"
37527             break
37528           fi
37529         done
37530         IFS="$IFS_save"
37531       else
37532         # This is an absolute path, we can use it without further modifications.
37533         new_path="$path"
37534       fi
37535 
37536       if test "x$new_path" = x; then
37537         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37538 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37539         has_space=`$ECHO "$complete" | $GREP " "`
37540         if test "x$has_space" != x; then
37541           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37542 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37543         fi
37544         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37545       fi
37546     fi
37547 
37548     # Now join together the path and the arguments once again
37549     if test "x$arguments" != xEOL; then
37550       new_complete="$new_path ${arguments% *}"
37551     else
37552       new_complete="$new_path"
37553     fi
37554 
37555     if test "x$complete" != "x$new_complete"; then
37556       STRIP="$new_complete"
37557       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37558 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37559     fi
37560   fi
37561 
37562 
37563 
37564   # Publish this variable in the help.
37565 
37566 
37567   if test "x$NM" = x; then
37568     # The variable is not set by user, try to locate tool using the code snippet
37569     if test -n "$ac_tool_prefix"; then
37570   for ac_prog in nm
37571   do
37572     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37573 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37575 $as_echo_n "checking for $ac_word... " >&6; }
37576 if ${ac_cv_prog_NM+:} false; then :
37577   $as_echo_n "(cached) " >&6
37578 else
37579   if test -n "$NM"; then
37580   ac_cv_prog_NM="$NM" # Let the user override the test.
37581 else
37582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37583 for as_dir in $PATH
37584 do
37585   IFS=$as_save_IFS
37586   test -z "$as_dir" && as_dir=.
37587     for ac_exec_ext in '' $ac_executable_extensions; do
37588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37589     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37591     break 2
37592   fi
37593 done
37594   done
37595 IFS=$as_save_IFS
37596 
37597 fi
37598 fi
37599 NM=$ac_cv_prog_NM
37600 if test -n "$NM"; then
37601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37602 $as_echo "$NM" >&6; }
37603 else
37604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37605 $as_echo "no" >&6; }
37606 fi
37607 
37608 
37609     test -n "$NM" && break
37610   done
37611 fi
37612 if test -z "$NM"; then
37613   ac_ct_NM=$NM
37614   for ac_prog in nm
37615 do
37616   # Extract the first word of "$ac_prog", so it can be a program name with args.
37617 set dummy $ac_prog; ac_word=$2
37618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37619 $as_echo_n "checking for $ac_word... " >&6; }
37620 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37621   $as_echo_n "(cached) " >&6
37622 else
37623   if test -n "$ac_ct_NM"; then
37624   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37625 else
37626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37627 for as_dir in $PATH
37628 do
37629   IFS=$as_save_IFS
37630   test -z "$as_dir" && as_dir=.
37631     for ac_exec_ext in '' $ac_executable_extensions; do
37632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37633     ac_cv_prog_ac_ct_NM="$ac_prog"
37634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37635     break 2
37636   fi
37637 done
37638   done
37639 IFS=$as_save_IFS
37640 
37641 fi
37642 fi
37643 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37644 if test -n "$ac_ct_NM"; then
37645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37646 $as_echo "$ac_ct_NM" >&6; }
37647 else
37648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37649 $as_echo "no" >&6; }
37650 fi
37651 
37652 
37653   test -n "$ac_ct_NM" && break
37654 done
37655 
37656   if test "x$ac_ct_NM" = x; then
37657     NM=""
37658   else
37659     case $cross_compiling:$ac_tool_warned in
37660 yes:)
37661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37663 ac_tool_warned=yes ;;
37664 esac
37665     NM=$ac_ct_NM
37666   fi
37667 fi
37668 
37669   else
37670     # The variable is set, but is it from the command line or the environment?
37671 
37672     # Try to remove the string !NM! from our list.
37673     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37674     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37675       # If it failed, the variable was not from the command line. Ignore it,
37676       # but warn the user (except for BASH, which is always set by the calling BASH).
37677       if test "xNM" != xBASH; then
37678         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37679 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37680       fi
37681       # Try to locate tool using the code snippet
37682       if test -n "$ac_tool_prefix"; then
37683   for ac_prog in nm
37684   do
37685     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37686 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37688 $as_echo_n "checking for $ac_word... " >&6; }
37689 if ${ac_cv_prog_NM+:} false; then :
37690   $as_echo_n "(cached) " >&6
37691 else
37692   if test -n "$NM"; then
37693   ac_cv_prog_NM="$NM" # Let the user override the test.
37694 else
37695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37696 for as_dir in $PATH
37697 do
37698   IFS=$as_save_IFS
37699   test -z "$as_dir" && as_dir=.
37700     for ac_exec_ext in '' $ac_executable_extensions; do
37701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37702     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37704     break 2
37705   fi
37706 done
37707   done
37708 IFS=$as_save_IFS
37709 
37710 fi
37711 fi
37712 NM=$ac_cv_prog_NM
37713 if test -n "$NM"; then
37714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37715 $as_echo "$NM" >&6; }
37716 else
37717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37718 $as_echo "no" >&6; }
37719 fi
37720 
37721 
37722     test -n "$NM" && break
37723   done
37724 fi
37725 if test -z "$NM"; then
37726   ac_ct_NM=$NM
37727   for ac_prog in nm
37728 do
37729   # Extract the first word of "$ac_prog", so it can be a program name with args.
37730 set dummy $ac_prog; ac_word=$2
37731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37732 $as_echo_n "checking for $ac_word... " >&6; }
37733 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37734   $as_echo_n "(cached) " >&6
37735 else
37736   if test -n "$ac_ct_NM"; then
37737   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37738 else
37739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37740 for as_dir in $PATH
37741 do
37742   IFS=$as_save_IFS
37743   test -z "$as_dir" && as_dir=.
37744     for ac_exec_ext in '' $ac_executable_extensions; do
37745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37746     ac_cv_prog_ac_ct_NM="$ac_prog"
37747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37748     break 2
37749   fi
37750 done
37751   done
37752 IFS=$as_save_IFS
37753 
37754 fi
37755 fi
37756 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37757 if test -n "$ac_ct_NM"; then
37758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37759 $as_echo "$ac_ct_NM" >&6; }
37760 else
37761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37762 $as_echo "no" >&6; }
37763 fi
37764 
37765 
37766   test -n "$ac_ct_NM" && break
37767 done
37768 
37769   if test "x$ac_ct_NM" = x; then
37770     NM=""
37771   else
37772     case $cross_compiling:$ac_tool_warned in
37773 yes:)
37774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37775 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37776 ac_tool_warned=yes ;;
37777 esac
37778     NM=$ac_ct_NM
37779   fi
37780 fi
37781 
37782     else
37783       # If it succeeded, then it was overridden by the user. We will use it
37784       # for the tool.
37785 
37786       # First remove it from the list of overridden variables, so we can test
37787       # for unknown variables in the end.
37788       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37789 
37790       # Check if the provided tool contains a complete path.
37791       tool_specified="$NM"
37792       tool_basename="${tool_specified##*/}"
37793       if test "x$tool_basename" = "x$tool_specified"; then
37794         # A command without a complete path is provided, search $PATH.
37795         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37796 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37797         # Extract the first word of "$tool_basename", so it can be a program name with args.
37798 set dummy $tool_basename; ac_word=$2
37799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37800 $as_echo_n "checking for $ac_word... " >&6; }
37801 if ${ac_cv_path_NM+:} false; then :
37802   $as_echo_n "(cached) " >&6
37803 else
37804   case $NM in
37805   [\\/]* | ?:[\\/]*)
37806   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37807   ;;
37808   *)
37809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37810 for as_dir in $PATH
37811 do
37812   IFS=$as_save_IFS
37813   test -z "$as_dir" && as_dir=.
37814     for ac_exec_ext in '' $ac_executable_extensions; do
37815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37816     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37818     break 2
37819   fi
37820 done
37821   done
37822 IFS=$as_save_IFS
37823 
37824   ;;
37825 esac
37826 fi
37827 NM=$ac_cv_path_NM
37828 if test -n "$NM"; then
37829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37830 $as_echo "$NM" >&6; }
37831 else
37832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37833 $as_echo "no" >&6; }
37834 fi
37835 
37836 
37837         if test "x$NM" = x; then
37838           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37839         fi
37840       else
37841         # Otherwise we believe it is a complete path. Use it as it is.
37842         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37843 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37844         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37845 $as_echo_n "checking for NM... " >&6; }
37846         if test ! -x "$tool_specified"; then
37847           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37848 $as_echo "not found" >&6; }
37849           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37850         fi
37851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37852 $as_echo "$tool_specified" >&6; }
37853       fi
37854     fi
37855   fi
37856 
37857 
37858 
37859   # Only process if variable expands to non-empty
37860 
37861   if test "x$NM" != x; then
37862     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37863 
37864   # First separate the path from the arguments. This will split at the first
37865   # space.
37866   complete="$NM"
37867   path="${complete%% *}"
37868   tmp="$complete EOL"
37869   arguments="${tmp#* }"
37870 
37871   # Input might be given as Windows format, start by converting to
37872   # unix format.
37873   new_path=`$CYGPATH -u "$path"`
37874 
37875   # Now try to locate executable using which
37876   new_path=`$WHICH "$new_path" 2> /dev/null`
37877   # bat and cmd files are not always considered executable in cygwin causing which
37878   # to not find them
37879   if test "x$new_path" = x \
37880       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37881       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37882     new_path=`$CYGPATH -u "$path"`
37883   fi
37884   if test "x$new_path" = x; then
37885     # Oops. Which didn't find the executable.
37886     # The splitting of arguments from the executable at a space might have been incorrect,
37887     # since paths with space are more likely in Windows. Give it another try with the whole
37888     # argument.
37889     path="$complete"
37890     arguments="EOL"
37891     new_path=`$CYGPATH -u "$path"`
37892     new_path=`$WHICH "$new_path" 2> /dev/null`
37893     # bat and cmd files are not always considered executable in cygwin causing which
37894     # to not find them
37895     if test "x$new_path" = x \
37896         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37897         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37898       new_path=`$CYGPATH -u "$path"`
37899     fi
37900     if test "x$new_path" = x; then
37901       # It's still not found. Now this is an unrecoverable error.
37902       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37903 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37904       has_space=`$ECHO "$complete" | $GREP " "`
37905       if test "x$has_space" != x; then
37906         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37907 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37908       fi
37909       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37910     fi
37911   fi
37912 
37913   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37914   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37915   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37916   # "foo.exe" is OK but "foo" is an error.
37917   #
37918   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37919   # It is also a way to make sure we got the proper file name for the real test later on.
37920   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37921   if test "x$test_shortpath" = x; then
37922     # Short path failed, file does not exist as specified.
37923     # Try adding .exe or .cmd
37924     if test -f "${new_path}.exe"; then
37925       input_to_shortpath="${new_path}.exe"
37926     elif test -f "${new_path}.cmd"; then
37927       input_to_shortpath="${new_path}.cmd"
37928     else
37929       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37930 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37931       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37932 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37933       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37934     fi
37935   else
37936     input_to_shortpath="$new_path"
37937   fi
37938 
37939   # Call helper function which possibly converts this using DOS-style short mode.
37940   # If so, the updated path is stored in $new_path.
37941   new_path="$input_to_shortpath"
37942 
37943   input_path="$input_to_shortpath"
37944   # Check if we need to convert this using DOS-style short mode. If the path
37945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37946   # take no chances and rewrite it.
37947   # Note: m4 eats our [], so we need to use [ and ] instead.
37948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37949   if test "x$has_forbidden_chars" != x; then
37950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37951     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37952     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37953     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37954       # Going to short mode and back again did indeed matter. Since short mode is
37955       # case insensitive, let's make it lowercase to improve readability.
37956       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37957       # Now convert it back to Unix-stile (cygpath)
37958       input_path=`$CYGPATH -u "$shortmode_path"`
37959       new_path="$input_path"
37960     fi
37961   fi
37962 
37963   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37964   if test "x$test_cygdrive_prefix" = x; then
37965     # As a simple fix, exclude /usr/bin since it's not a real path.
37966     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37967       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37968       # a path prefixed by /cygdrive for fixpath to work.
37969       new_path="$CYGWIN_ROOT_PATH$input_path"
37970     fi
37971   fi
37972 
37973   # remove trailing .exe if any
37974   new_path="${new_path/%.exe/}"
37975 
37976     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37977 
37978   # First separate the path from the arguments. This will split at the first
37979   # space.
37980   complete="$NM"
37981   path="${complete%% *}"
37982   tmp="$complete EOL"
37983   arguments="${tmp#* }"
37984 
37985   # Input might be given as Windows format, start by converting to
37986   # unix format.
37987   new_path="$path"
37988 
37989   windows_path="$new_path"
37990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37991     unix_path=`$CYGPATH -u "$windows_path"`
37992     new_path="$unix_path"
37993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37995     new_path="$unix_path"
37996   fi
37997 
37998 
37999   # Now try to locate executable using which
38000   new_path=`$WHICH "$new_path" 2> /dev/null`
38001 
38002   if test "x$new_path" = x; then
38003     # Oops. Which didn't find the executable.
38004     # The splitting of arguments from the executable at a space might have been incorrect,
38005     # since paths with space are more likely in Windows. Give it another try with the whole
38006     # argument.
38007     path="$complete"
38008     arguments="EOL"
38009     new_path="$path"
38010 
38011   windows_path="$new_path"
38012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38013     unix_path=`$CYGPATH -u "$windows_path"`
38014     new_path="$unix_path"
38015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38017     new_path="$unix_path"
38018   fi
38019 
38020 
38021     new_path=`$WHICH "$new_path" 2> /dev/null`
38022     # bat and cmd files are not always considered executable in MSYS causing which
38023     # to not find them
38024     if test "x$new_path" = x \
38025         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38026         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38027       new_path="$path"
38028 
38029   windows_path="$new_path"
38030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38031     unix_path=`$CYGPATH -u "$windows_path"`
38032     new_path="$unix_path"
38033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38035     new_path="$unix_path"
38036   fi
38037 
38038     fi
38039 
38040     if test "x$new_path" = x; then
38041       # It's still not found. Now this is an unrecoverable error.
38042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38043 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38044       has_space=`$ECHO "$complete" | $GREP " "`
38045       if test "x$has_space" != x; then
38046         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38047 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38048       fi
38049       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38050     fi
38051   fi
38052 
38053   # Now new_path has a complete unix path to the binary
38054   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38055     # Keep paths in /bin as-is, but remove trailing .exe if any
38056     new_path="${new_path/%.exe/}"
38057     # Do not save /bin paths to all_fixpath_prefixes!
38058   else
38059     # Not in mixed or Windows style, start by that.
38060     new_path=`cmd //c echo $new_path`
38061 
38062   input_path="$new_path"
38063   # Check if we need to convert this using DOS-style short mode. If the path
38064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38065   # take no chances and rewrite it.
38066   # Note: m4 eats our [], so we need to use [ and ] instead.
38067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38068   if test "x$has_forbidden_chars" != x; then
38069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38071   fi
38072 
38073     # Output is in $new_path
38074 
38075   windows_path="$new_path"
38076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38077     unix_path=`$CYGPATH -u "$windows_path"`
38078     new_path="$unix_path"
38079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38081     new_path="$unix_path"
38082   fi
38083 
38084     # remove trailing .exe if any
38085     new_path="${new_path/%.exe/}"
38086 
38087     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38088     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38089   fi
38090 
38091     else
38092       # We're on a unix platform. Hooray! :)
38093       # First separate the path from the arguments. This will split at the first
38094       # space.
38095       complete="$NM"
38096       path="${complete%% *}"
38097       tmp="$complete EOL"
38098       arguments="${tmp#* }"
38099 
38100       # Cannot rely on the command "which" here since it doesn't always work.
38101       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38102       if test -z "$is_absolute_path"; then
38103         # Path to executable is not absolute. Find it.
38104         IFS_save="$IFS"
38105         IFS=:
38106         for p in $PATH; do
38107           if test -f "$p/$path" && test -x "$p/$path"; then
38108             new_path="$p/$path"
38109             break
38110           fi
38111         done
38112         IFS="$IFS_save"
38113       else
38114         # This is an absolute path, we can use it without further modifications.
38115         new_path="$path"
38116       fi
38117 
38118       if test "x$new_path" = x; then
38119         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38120 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38121         has_space=`$ECHO "$complete" | $GREP " "`
38122         if test "x$has_space" != x; then
38123           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38124 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38125         fi
38126         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38127       fi
38128     fi
38129 
38130     # Now join together the path and the arguments once again
38131     if test "x$arguments" != xEOL; then
38132       new_complete="$new_path ${arguments% *}"
38133     else
38134       new_complete="$new_path"
38135     fi
38136 
38137     if test "x$complete" != "x$new_complete"; then
38138       NM="$new_complete"
38139       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38140 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38141     fi
38142   fi
38143 
38144     GNM="$NM"
38145 
38146   fi
38147 
38148   # objcopy is used for moving debug symbols to separate files when
38149   # full debug symbols are enabled.
38150   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38151 
38152 
38153   # Publish this variable in the help.
38154 
38155 
38156   if test "x$OBJCOPY" = x; then
38157     # The variable is not set by user, try to locate tool using the code snippet
38158     if test -n "$ac_tool_prefix"; then
38159   for ac_prog in gobjcopy objcopy
38160   do
38161     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38162 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38164 $as_echo_n "checking for $ac_word... " >&6; }
38165 if ${ac_cv_prog_OBJCOPY+:} false; then :
38166   $as_echo_n "(cached) " >&6
38167 else
38168   if test -n "$OBJCOPY"; then
38169   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38170 else
38171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38172 for as_dir in $PATH
38173 do
38174   IFS=$as_save_IFS
38175   test -z "$as_dir" && as_dir=.
38176     for ac_exec_ext in '' $ac_executable_extensions; do
38177   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38178     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38179     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38180     break 2
38181   fi
38182 done
38183   done
38184 IFS=$as_save_IFS
38185 
38186 fi
38187 fi
38188 OBJCOPY=$ac_cv_prog_OBJCOPY
38189 if test -n "$OBJCOPY"; then
38190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38191 $as_echo "$OBJCOPY" >&6; }
38192 else
38193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38194 $as_echo "no" >&6; }
38195 fi
38196 
38197 
38198     test -n "$OBJCOPY" && break
38199   done
38200 fi
38201 if test -z "$OBJCOPY"; then
38202   ac_ct_OBJCOPY=$OBJCOPY
38203   for ac_prog in gobjcopy objcopy
38204 do
38205   # Extract the first word of "$ac_prog", so it can be a program name with args.
38206 set dummy $ac_prog; ac_word=$2
38207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38208 $as_echo_n "checking for $ac_word... " >&6; }
38209 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38210   $as_echo_n "(cached) " >&6
38211 else
38212   if test -n "$ac_ct_OBJCOPY"; then
38213   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38214 else
38215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38216 for as_dir in $PATH
38217 do
38218   IFS=$as_save_IFS
38219   test -z "$as_dir" && as_dir=.
38220     for ac_exec_ext in '' $ac_executable_extensions; do
38221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38222     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38224     break 2
38225   fi
38226 done
38227   done
38228 IFS=$as_save_IFS
38229 
38230 fi
38231 fi
38232 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38233 if test -n "$ac_ct_OBJCOPY"; then
38234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38235 $as_echo "$ac_ct_OBJCOPY" >&6; }
38236 else
38237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38238 $as_echo "no" >&6; }
38239 fi
38240 
38241 
38242   test -n "$ac_ct_OBJCOPY" && break
38243 done
38244 
38245   if test "x$ac_ct_OBJCOPY" = x; then
38246     OBJCOPY=""
38247   else
38248     case $cross_compiling:$ac_tool_warned in
38249 yes:)
38250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38251 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38252 ac_tool_warned=yes ;;
38253 esac
38254     OBJCOPY=$ac_ct_OBJCOPY
38255   fi
38256 fi
38257 
38258   else
38259     # The variable is set, but is it from the command line or the environment?
38260 
38261     # Try to remove the string !OBJCOPY! from our list.
38262     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38263     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38264       # If it failed, the variable was not from the command line. Ignore it,
38265       # but warn the user (except for BASH, which is always set by the calling BASH).
38266       if test "xOBJCOPY" != xBASH; then
38267         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38268 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38269       fi
38270       # Try to locate tool using the code snippet
38271       if test -n "$ac_tool_prefix"; then
38272   for ac_prog in gobjcopy objcopy
38273   do
38274     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38275 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38277 $as_echo_n "checking for $ac_word... " >&6; }
38278 if ${ac_cv_prog_OBJCOPY+:} false; then :
38279   $as_echo_n "(cached) " >&6
38280 else
38281   if test -n "$OBJCOPY"; then
38282   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38283 else
38284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38285 for as_dir in $PATH
38286 do
38287   IFS=$as_save_IFS
38288   test -z "$as_dir" && as_dir=.
38289     for ac_exec_ext in '' $ac_executable_extensions; do
38290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38291     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38293     break 2
38294   fi
38295 done
38296   done
38297 IFS=$as_save_IFS
38298 
38299 fi
38300 fi
38301 OBJCOPY=$ac_cv_prog_OBJCOPY
38302 if test -n "$OBJCOPY"; then
38303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38304 $as_echo "$OBJCOPY" >&6; }
38305 else
38306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38307 $as_echo "no" >&6; }
38308 fi
38309 
38310 
38311     test -n "$OBJCOPY" && break
38312   done
38313 fi
38314 if test -z "$OBJCOPY"; then
38315   ac_ct_OBJCOPY=$OBJCOPY
38316   for ac_prog in gobjcopy objcopy
38317 do
38318   # Extract the first word of "$ac_prog", so it can be a program name with args.
38319 set dummy $ac_prog; ac_word=$2
38320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38321 $as_echo_n "checking for $ac_word... " >&6; }
38322 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38323   $as_echo_n "(cached) " >&6
38324 else
38325   if test -n "$ac_ct_OBJCOPY"; then
38326   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38327 else
38328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38329 for as_dir in $PATH
38330 do
38331   IFS=$as_save_IFS
38332   test -z "$as_dir" && as_dir=.
38333     for ac_exec_ext in '' $ac_executable_extensions; do
38334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38335     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38337     break 2
38338   fi
38339 done
38340   done
38341 IFS=$as_save_IFS
38342 
38343 fi
38344 fi
38345 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38346 if test -n "$ac_ct_OBJCOPY"; then
38347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38348 $as_echo "$ac_ct_OBJCOPY" >&6; }
38349 else
38350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38351 $as_echo "no" >&6; }
38352 fi
38353 
38354 
38355   test -n "$ac_ct_OBJCOPY" && break
38356 done
38357 
38358   if test "x$ac_ct_OBJCOPY" = x; then
38359     OBJCOPY=""
38360   else
38361     case $cross_compiling:$ac_tool_warned in
38362 yes:)
38363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38364 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38365 ac_tool_warned=yes ;;
38366 esac
38367     OBJCOPY=$ac_ct_OBJCOPY
38368   fi
38369 fi
38370 
38371     else
38372       # If it succeeded, then it was overridden by the user. We will use it
38373       # for the tool.
38374 
38375       # First remove it from the list of overridden variables, so we can test
38376       # for unknown variables in the end.
38377       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38378 
38379       # Check if the provided tool contains a complete path.
38380       tool_specified="$OBJCOPY"
38381       tool_basename="${tool_specified##*/}"
38382       if test "x$tool_basename" = "x$tool_specified"; then
38383         # A command without a complete path is provided, search $PATH.
38384         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38385 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38386         # Extract the first word of "$tool_basename", so it can be a program name with args.
38387 set dummy $tool_basename; ac_word=$2
38388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38389 $as_echo_n "checking for $ac_word... " >&6; }
38390 if ${ac_cv_path_OBJCOPY+:} false; then :
38391   $as_echo_n "(cached) " >&6
38392 else
38393   case $OBJCOPY in
38394   [\\/]* | ?:[\\/]*)
38395   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38396   ;;
38397   *)
38398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38399 for as_dir in $PATH
38400 do
38401   IFS=$as_save_IFS
38402   test -z "$as_dir" && as_dir=.
38403     for ac_exec_ext in '' $ac_executable_extensions; do
38404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38405     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38407     break 2
38408   fi
38409 done
38410   done
38411 IFS=$as_save_IFS
38412 
38413   ;;
38414 esac
38415 fi
38416 OBJCOPY=$ac_cv_path_OBJCOPY
38417 if test -n "$OBJCOPY"; then
38418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38419 $as_echo "$OBJCOPY" >&6; }
38420 else
38421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38422 $as_echo "no" >&6; }
38423 fi
38424 
38425 
38426         if test "x$OBJCOPY" = x; then
38427           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38428         fi
38429       else
38430         # Otherwise we believe it is a complete path. Use it as it is.
38431         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38432 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38434 $as_echo_n "checking for OBJCOPY... " >&6; }
38435         if test ! -x "$tool_specified"; then
38436           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38437 $as_echo "not found" >&6; }
38438           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38439         fi
38440         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38441 $as_echo "$tool_specified" >&6; }
38442       fi
38443     fi
38444   fi
38445 
38446 
38447     # Only call fixup if objcopy was found.
38448     if test -n "$OBJCOPY"; then
38449 
38450   # Only process if variable expands to non-empty
38451 
38452   if test "x$OBJCOPY" != x; then
38453     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38454 
38455   # First separate the path from the arguments. This will split at the first
38456   # space.
38457   complete="$OBJCOPY"
38458   path="${complete%% *}"
38459   tmp="$complete EOL"
38460   arguments="${tmp#* }"
38461 
38462   # Input might be given as Windows format, start by converting to
38463   # unix format.
38464   new_path=`$CYGPATH -u "$path"`
38465 
38466   # Now try to locate executable using which
38467   new_path=`$WHICH "$new_path" 2> /dev/null`
38468   # bat and cmd files are not always considered executable in cygwin causing which
38469   # to not find them
38470   if test "x$new_path" = x \
38471       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38472       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38473     new_path=`$CYGPATH -u "$path"`
38474   fi
38475   if test "x$new_path" = x; then
38476     # Oops. Which didn't find the executable.
38477     # The splitting of arguments from the executable at a space might have been incorrect,
38478     # since paths with space are more likely in Windows. Give it another try with the whole
38479     # argument.
38480     path="$complete"
38481     arguments="EOL"
38482     new_path=`$CYGPATH -u "$path"`
38483     new_path=`$WHICH "$new_path" 2> /dev/null`
38484     # bat and cmd files are not always considered executable in cygwin causing which
38485     # to not find them
38486     if test "x$new_path" = x \
38487         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38488         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38489       new_path=`$CYGPATH -u "$path"`
38490     fi
38491     if test "x$new_path" = x; then
38492       # It's still not found. Now this is an unrecoverable error.
38493       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38494 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38495       has_space=`$ECHO "$complete" | $GREP " "`
38496       if test "x$has_space" != x; then
38497         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38498 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38499       fi
38500       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38501     fi
38502   fi
38503 
38504   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38505   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38506   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38507   # "foo.exe" is OK but "foo" is an error.
38508   #
38509   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38510   # It is also a way to make sure we got the proper file name for the real test later on.
38511   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38512   if test "x$test_shortpath" = x; then
38513     # Short path failed, file does not exist as specified.
38514     # Try adding .exe or .cmd
38515     if test -f "${new_path}.exe"; then
38516       input_to_shortpath="${new_path}.exe"
38517     elif test -f "${new_path}.cmd"; then
38518       input_to_shortpath="${new_path}.cmd"
38519     else
38520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38521 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38522       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38523 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38524       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38525     fi
38526   else
38527     input_to_shortpath="$new_path"
38528   fi
38529 
38530   # Call helper function which possibly converts this using DOS-style short mode.
38531   # If so, the updated path is stored in $new_path.
38532   new_path="$input_to_shortpath"
38533 
38534   input_path="$input_to_shortpath"
38535   # Check if we need to convert this using DOS-style short mode. If the path
38536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38537   # take no chances and rewrite it.
38538   # Note: m4 eats our [], so we need to use [ and ] instead.
38539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38540   if test "x$has_forbidden_chars" != x; then
38541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38542     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38543     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38544     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38545       # Going to short mode and back again did indeed matter. Since short mode is
38546       # case insensitive, let's make it lowercase to improve readability.
38547       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38548       # Now convert it back to Unix-stile (cygpath)
38549       input_path=`$CYGPATH -u "$shortmode_path"`
38550       new_path="$input_path"
38551     fi
38552   fi
38553 
38554   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38555   if test "x$test_cygdrive_prefix" = x; then
38556     # As a simple fix, exclude /usr/bin since it's not a real path.
38557     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38558       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38559       # a path prefixed by /cygdrive for fixpath to work.
38560       new_path="$CYGWIN_ROOT_PATH$input_path"
38561     fi
38562   fi
38563 
38564   # remove trailing .exe if any
38565   new_path="${new_path/%.exe/}"
38566 
38567     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38568 
38569   # First separate the path from the arguments. This will split at the first
38570   # space.
38571   complete="$OBJCOPY"
38572   path="${complete%% *}"
38573   tmp="$complete EOL"
38574   arguments="${tmp#* }"
38575 
38576   # Input might be given as Windows format, start by converting to
38577   # unix format.
38578   new_path="$path"
38579 
38580   windows_path="$new_path"
38581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38582     unix_path=`$CYGPATH -u "$windows_path"`
38583     new_path="$unix_path"
38584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38586     new_path="$unix_path"
38587   fi
38588 
38589 
38590   # Now try to locate executable using which
38591   new_path=`$WHICH "$new_path" 2> /dev/null`
38592 
38593   if test "x$new_path" = x; then
38594     # Oops. Which didn't find the executable.
38595     # The splitting of arguments from the executable at a space might have been incorrect,
38596     # since paths with space are more likely in Windows. Give it another try with the whole
38597     # argument.
38598     path="$complete"
38599     arguments="EOL"
38600     new_path="$path"
38601 
38602   windows_path="$new_path"
38603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38604     unix_path=`$CYGPATH -u "$windows_path"`
38605     new_path="$unix_path"
38606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38608     new_path="$unix_path"
38609   fi
38610 
38611 
38612     new_path=`$WHICH "$new_path" 2> /dev/null`
38613     # bat and cmd files are not always considered executable in MSYS causing which
38614     # to not find them
38615     if test "x$new_path" = x \
38616         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38617         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38618       new_path="$path"
38619 
38620   windows_path="$new_path"
38621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38622     unix_path=`$CYGPATH -u "$windows_path"`
38623     new_path="$unix_path"
38624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38626     new_path="$unix_path"
38627   fi
38628 
38629     fi
38630 
38631     if test "x$new_path" = x; then
38632       # It's still not found. Now this is an unrecoverable error.
38633       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38634 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38635       has_space=`$ECHO "$complete" | $GREP " "`
38636       if test "x$has_space" != x; then
38637         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38638 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38639       fi
38640       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38641     fi
38642   fi
38643 
38644   # Now new_path has a complete unix path to the binary
38645   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38646     # Keep paths in /bin as-is, but remove trailing .exe if any
38647     new_path="${new_path/%.exe/}"
38648     # Do not save /bin paths to all_fixpath_prefixes!
38649   else
38650     # Not in mixed or Windows style, start by that.
38651     new_path=`cmd //c echo $new_path`
38652 
38653   input_path="$new_path"
38654   # Check if we need to convert this using DOS-style short mode. If the path
38655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38656   # take no chances and rewrite it.
38657   # Note: m4 eats our [], so we need to use [ and ] instead.
38658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38659   if test "x$has_forbidden_chars" != x; then
38660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38661     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38662   fi
38663 
38664     # Output is in $new_path
38665 
38666   windows_path="$new_path"
38667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38668     unix_path=`$CYGPATH -u "$windows_path"`
38669     new_path="$unix_path"
38670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38672     new_path="$unix_path"
38673   fi
38674 
38675     # remove trailing .exe if any
38676     new_path="${new_path/%.exe/}"
38677 
38678     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38679     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38680   fi
38681 
38682     else
38683       # We're on a unix platform. Hooray! :)
38684       # First separate the path from the arguments. This will split at the first
38685       # space.
38686       complete="$OBJCOPY"
38687       path="${complete%% *}"
38688       tmp="$complete EOL"
38689       arguments="${tmp#* }"
38690 
38691       # Cannot rely on the command "which" here since it doesn't always work.
38692       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38693       if test -z "$is_absolute_path"; then
38694         # Path to executable is not absolute. Find it.
38695         IFS_save="$IFS"
38696         IFS=:
38697         for p in $PATH; do
38698           if test -f "$p/$path" && test -x "$p/$path"; then
38699             new_path="$p/$path"
38700             break
38701           fi
38702         done
38703         IFS="$IFS_save"
38704       else
38705         # This is an absolute path, we can use it without further modifications.
38706         new_path="$path"
38707       fi
38708 
38709       if test "x$new_path" = x; then
38710         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38711 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38712         has_space=`$ECHO "$complete" | $GREP " "`
38713         if test "x$has_space" != x; then
38714           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38715 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38716         fi
38717         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38718       fi
38719     fi
38720 
38721     # Now join together the path and the arguments once again
38722     if test "x$arguments" != xEOL; then
38723       new_complete="$new_path ${arguments% *}"
38724     else
38725       new_complete="$new_path"
38726     fi
38727 
38728     if test "x$complete" != "x$new_complete"; then
38729       OBJCOPY="$new_complete"
38730       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38731 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38732     fi
38733   fi
38734 
38735     fi
38736   fi
38737 
38738 
38739 
38740   # Publish this variable in the help.
38741 
38742 
38743   if test "x$OBJDUMP" = x; then
38744     # The variable is not set by user, try to locate tool using the code snippet
38745     if test -n "$ac_tool_prefix"; then
38746   for ac_prog in gobjdump objdump
38747   do
38748     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38749 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38751 $as_echo_n "checking for $ac_word... " >&6; }
38752 if ${ac_cv_prog_OBJDUMP+:} false; then :
38753   $as_echo_n "(cached) " >&6
38754 else
38755   if test -n "$OBJDUMP"; then
38756   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38757 else
38758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38759 for as_dir in $PATH
38760 do
38761   IFS=$as_save_IFS
38762   test -z "$as_dir" && as_dir=.
38763     for ac_exec_ext in '' $ac_executable_extensions; do
38764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38765     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38767     break 2
38768   fi
38769 done
38770   done
38771 IFS=$as_save_IFS
38772 
38773 fi
38774 fi
38775 OBJDUMP=$ac_cv_prog_OBJDUMP
38776 if test -n "$OBJDUMP"; then
38777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38778 $as_echo "$OBJDUMP" >&6; }
38779 else
38780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38781 $as_echo "no" >&6; }
38782 fi
38783 
38784 
38785     test -n "$OBJDUMP" && break
38786   done
38787 fi
38788 if test -z "$OBJDUMP"; then
38789   ac_ct_OBJDUMP=$OBJDUMP
38790   for ac_prog in gobjdump objdump
38791 do
38792   # Extract the first word of "$ac_prog", so it can be a program name with args.
38793 set dummy $ac_prog; ac_word=$2
38794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38795 $as_echo_n "checking for $ac_word... " >&6; }
38796 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38797   $as_echo_n "(cached) " >&6
38798 else
38799   if test -n "$ac_ct_OBJDUMP"; then
38800   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38801 else
38802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38803 for as_dir in $PATH
38804 do
38805   IFS=$as_save_IFS
38806   test -z "$as_dir" && as_dir=.
38807     for ac_exec_ext in '' $ac_executable_extensions; do
38808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38809     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38811     break 2
38812   fi
38813 done
38814   done
38815 IFS=$as_save_IFS
38816 
38817 fi
38818 fi
38819 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38820 if test -n "$ac_ct_OBJDUMP"; then
38821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38822 $as_echo "$ac_ct_OBJDUMP" >&6; }
38823 else
38824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38825 $as_echo "no" >&6; }
38826 fi
38827 
38828 
38829   test -n "$ac_ct_OBJDUMP" && break
38830 done
38831 
38832   if test "x$ac_ct_OBJDUMP" = x; then
38833     OBJDUMP=""
38834   else
38835     case $cross_compiling:$ac_tool_warned in
38836 yes:)
38837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38838 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38839 ac_tool_warned=yes ;;
38840 esac
38841     OBJDUMP=$ac_ct_OBJDUMP
38842   fi
38843 fi
38844 
38845   else
38846     # The variable is set, but is it from the command line or the environment?
38847 
38848     # Try to remove the string !OBJDUMP! from our list.
38849     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38850     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38851       # If it failed, the variable was not from the command line. Ignore it,
38852       # but warn the user (except for BASH, which is always set by the calling BASH).
38853       if test "xOBJDUMP" != xBASH; then
38854         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38855 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38856       fi
38857       # Try to locate tool using the code snippet
38858       if test -n "$ac_tool_prefix"; then
38859   for ac_prog in gobjdump objdump
38860   do
38861     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38862 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38864 $as_echo_n "checking for $ac_word... " >&6; }
38865 if ${ac_cv_prog_OBJDUMP+:} false; then :
38866   $as_echo_n "(cached) " >&6
38867 else
38868   if test -n "$OBJDUMP"; then
38869   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38870 else
38871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38872 for as_dir in $PATH
38873 do
38874   IFS=$as_save_IFS
38875   test -z "$as_dir" && as_dir=.
38876     for ac_exec_ext in '' $ac_executable_extensions; do
38877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38878     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38880     break 2
38881   fi
38882 done
38883   done
38884 IFS=$as_save_IFS
38885 
38886 fi
38887 fi
38888 OBJDUMP=$ac_cv_prog_OBJDUMP
38889 if test -n "$OBJDUMP"; then
38890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38891 $as_echo "$OBJDUMP" >&6; }
38892 else
38893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38894 $as_echo "no" >&6; }
38895 fi
38896 
38897 
38898     test -n "$OBJDUMP" && break
38899   done
38900 fi
38901 if test -z "$OBJDUMP"; then
38902   ac_ct_OBJDUMP=$OBJDUMP
38903   for ac_prog in gobjdump objdump
38904 do
38905   # Extract the first word of "$ac_prog", so it can be a program name with args.
38906 set dummy $ac_prog; ac_word=$2
38907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38908 $as_echo_n "checking for $ac_word... " >&6; }
38909 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38910   $as_echo_n "(cached) " >&6
38911 else
38912   if test -n "$ac_ct_OBJDUMP"; then
38913   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38914 else
38915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38916 for as_dir in $PATH
38917 do
38918   IFS=$as_save_IFS
38919   test -z "$as_dir" && as_dir=.
38920     for ac_exec_ext in '' $ac_executable_extensions; do
38921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38922     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38924     break 2
38925   fi
38926 done
38927   done
38928 IFS=$as_save_IFS
38929 
38930 fi
38931 fi
38932 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38933 if test -n "$ac_ct_OBJDUMP"; then
38934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38935 $as_echo "$ac_ct_OBJDUMP" >&6; }
38936 else
38937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38938 $as_echo "no" >&6; }
38939 fi
38940 
38941 
38942   test -n "$ac_ct_OBJDUMP" && break
38943 done
38944 
38945   if test "x$ac_ct_OBJDUMP" = x; then
38946     OBJDUMP=""
38947   else
38948     case $cross_compiling:$ac_tool_warned in
38949 yes:)
38950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38951 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38952 ac_tool_warned=yes ;;
38953 esac
38954     OBJDUMP=$ac_ct_OBJDUMP
38955   fi
38956 fi
38957 
38958     else
38959       # If it succeeded, then it was overridden by the user. We will use it
38960       # for the tool.
38961 
38962       # First remove it from the list of overridden variables, so we can test
38963       # for unknown variables in the end.
38964       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38965 
38966       # Check if the provided tool contains a complete path.
38967       tool_specified="$OBJDUMP"
38968       tool_basename="${tool_specified##*/}"
38969       if test "x$tool_basename" = "x$tool_specified"; then
38970         # A command without a complete path is provided, search $PATH.
38971         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38972 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38973         # Extract the first word of "$tool_basename", so it can be a program name with args.
38974 set dummy $tool_basename; ac_word=$2
38975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38976 $as_echo_n "checking for $ac_word... " >&6; }
38977 if ${ac_cv_path_OBJDUMP+:} false; then :
38978   $as_echo_n "(cached) " >&6
38979 else
38980   case $OBJDUMP in
38981   [\\/]* | ?:[\\/]*)
38982   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38983   ;;
38984   *)
38985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38986 for as_dir in $PATH
38987 do
38988   IFS=$as_save_IFS
38989   test -z "$as_dir" && as_dir=.
38990     for ac_exec_ext in '' $ac_executable_extensions; do
38991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38992     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38994     break 2
38995   fi
38996 done
38997   done
38998 IFS=$as_save_IFS
38999 
39000   ;;
39001 esac
39002 fi
39003 OBJDUMP=$ac_cv_path_OBJDUMP
39004 if test -n "$OBJDUMP"; then
39005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39006 $as_echo "$OBJDUMP" >&6; }
39007 else
39008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39009 $as_echo "no" >&6; }
39010 fi
39011 
39012 
39013         if test "x$OBJDUMP" = x; then
39014           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39015         fi
39016       else
39017         # Otherwise we believe it is a complete path. Use it as it is.
39018         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39019 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39021 $as_echo_n "checking for OBJDUMP... " >&6; }
39022         if test ! -x "$tool_specified"; then
39023           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39024 $as_echo "not found" >&6; }
39025           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39026         fi
39027         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39028 $as_echo "$tool_specified" >&6; }
39029       fi
39030     fi
39031   fi
39032 
39033 
39034   if test "x$OBJDUMP" != x; then
39035     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39036     # bails if argument is missing.
39037 
39038   # Only process if variable expands to non-empty
39039 
39040   if test "x$OBJDUMP" != x; then
39041     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39042 
39043   # First separate the path from the arguments. This will split at the first
39044   # space.
39045   complete="$OBJDUMP"
39046   path="${complete%% *}"
39047   tmp="$complete EOL"
39048   arguments="${tmp#* }"
39049 
39050   # Input might be given as Windows format, start by converting to
39051   # unix format.
39052   new_path=`$CYGPATH -u "$path"`
39053 
39054   # Now try to locate executable using which
39055   new_path=`$WHICH "$new_path" 2> /dev/null`
39056   # bat and cmd files are not always considered executable in cygwin causing which
39057   # to not find them
39058   if test "x$new_path" = x \
39059       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39060       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39061     new_path=`$CYGPATH -u "$path"`
39062   fi
39063   if test "x$new_path" = x; then
39064     # Oops. Which didn't find the executable.
39065     # The splitting of arguments from the executable at a space might have been incorrect,
39066     # since paths with space are more likely in Windows. Give it another try with the whole
39067     # argument.
39068     path="$complete"
39069     arguments="EOL"
39070     new_path=`$CYGPATH -u "$path"`
39071     new_path=`$WHICH "$new_path" 2> /dev/null`
39072     # bat and cmd files are not always considered executable in cygwin causing which
39073     # to not find them
39074     if test "x$new_path" = x \
39075         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39076         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39077       new_path=`$CYGPATH -u "$path"`
39078     fi
39079     if test "x$new_path" = x; then
39080       # It's still not found. Now this is an unrecoverable error.
39081       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39082 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39083       has_space=`$ECHO "$complete" | $GREP " "`
39084       if test "x$has_space" != x; then
39085         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39086 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39087       fi
39088       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39089     fi
39090   fi
39091 
39092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39095   # "foo.exe" is OK but "foo" is an error.
39096   #
39097   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39098   # It is also a way to make sure we got the proper file name for the real test later on.
39099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39100   if test "x$test_shortpath" = x; then
39101     # Short path failed, file does not exist as specified.
39102     # Try adding .exe or .cmd
39103     if test -f "${new_path}.exe"; then
39104       input_to_shortpath="${new_path}.exe"
39105     elif test -f "${new_path}.cmd"; then
39106       input_to_shortpath="${new_path}.cmd"
39107     else
39108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39109 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39110       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39111 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39112       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39113     fi
39114   else
39115     input_to_shortpath="$new_path"
39116   fi
39117 
39118   # Call helper function which possibly converts this using DOS-style short mode.
39119   # If so, the updated path is stored in $new_path.
39120   new_path="$input_to_shortpath"
39121 
39122   input_path="$input_to_shortpath"
39123   # Check if we need to convert this using DOS-style short mode. If the path
39124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39125   # take no chances and rewrite it.
39126   # Note: m4 eats our [], so we need to use [ and ] instead.
39127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39128   if test "x$has_forbidden_chars" != x; then
39129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39130     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39131     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39132     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39133       # Going to short mode and back again did indeed matter. Since short mode is
39134       # case insensitive, let's make it lowercase to improve readability.
39135       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39136       # Now convert it back to Unix-stile (cygpath)
39137       input_path=`$CYGPATH -u "$shortmode_path"`
39138       new_path="$input_path"
39139     fi
39140   fi
39141 
39142   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39143   if test "x$test_cygdrive_prefix" = x; then
39144     # As a simple fix, exclude /usr/bin since it's not a real path.
39145     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39146       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39147       # a path prefixed by /cygdrive for fixpath to work.
39148       new_path="$CYGWIN_ROOT_PATH$input_path"
39149     fi
39150   fi
39151 
39152   # remove trailing .exe if any
39153   new_path="${new_path/%.exe/}"
39154 
39155     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39156 
39157   # First separate the path from the arguments. This will split at the first
39158   # space.
39159   complete="$OBJDUMP"
39160   path="${complete%% *}"
39161   tmp="$complete EOL"
39162   arguments="${tmp#* }"
39163 
39164   # Input might be given as Windows format, start by converting to
39165   # unix format.
39166   new_path="$path"
39167 
39168   windows_path="$new_path"
39169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39170     unix_path=`$CYGPATH -u "$windows_path"`
39171     new_path="$unix_path"
39172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39174     new_path="$unix_path"
39175   fi
39176 
39177 
39178   # Now try to locate executable using which
39179   new_path=`$WHICH "$new_path" 2> /dev/null`
39180 
39181   if test "x$new_path" = x; then
39182     # Oops. Which didn't find the executable.
39183     # The splitting of arguments from the executable at a space might have been incorrect,
39184     # since paths with space are more likely in Windows. Give it another try with the whole
39185     # argument.
39186     path="$complete"
39187     arguments="EOL"
39188     new_path="$path"
39189 
39190   windows_path="$new_path"
39191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39192     unix_path=`$CYGPATH -u "$windows_path"`
39193     new_path="$unix_path"
39194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39196     new_path="$unix_path"
39197   fi
39198 
39199 
39200     new_path=`$WHICH "$new_path" 2> /dev/null`
39201     # bat and cmd files are not always considered executable in MSYS causing which
39202     # to not find them
39203     if test "x$new_path" = x \
39204         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39205         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39206       new_path="$path"
39207 
39208   windows_path="$new_path"
39209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39210     unix_path=`$CYGPATH -u "$windows_path"`
39211     new_path="$unix_path"
39212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39214     new_path="$unix_path"
39215   fi
39216 
39217     fi
39218 
39219     if test "x$new_path" = x; then
39220       # It's still not found. Now this is an unrecoverable error.
39221       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39222 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39223       has_space=`$ECHO "$complete" | $GREP " "`
39224       if test "x$has_space" != x; then
39225         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39226 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39227       fi
39228       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39229     fi
39230   fi
39231 
39232   # Now new_path has a complete unix path to the binary
39233   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39234     # Keep paths in /bin as-is, but remove trailing .exe if any
39235     new_path="${new_path/%.exe/}"
39236     # Do not save /bin paths to all_fixpath_prefixes!
39237   else
39238     # Not in mixed or Windows style, start by that.
39239     new_path=`cmd //c echo $new_path`
39240 
39241   input_path="$new_path"
39242   # Check if we need to convert this using DOS-style short mode. If the path
39243   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39244   # take no chances and rewrite it.
39245   # Note: m4 eats our [], so we need to use [ and ] instead.
39246   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39247   if test "x$has_forbidden_chars" != x; then
39248     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39249     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39250   fi
39251 
39252     # Output is in $new_path
39253 
39254   windows_path="$new_path"
39255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39256     unix_path=`$CYGPATH -u "$windows_path"`
39257     new_path="$unix_path"
39258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39260     new_path="$unix_path"
39261   fi
39262 
39263     # remove trailing .exe if any
39264     new_path="${new_path/%.exe/}"
39265 
39266     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39267     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39268   fi
39269 
39270     else
39271       # We're on a unix platform. Hooray! :)
39272       # First separate the path from the arguments. This will split at the first
39273       # space.
39274       complete="$OBJDUMP"
39275       path="${complete%% *}"
39276       tmp="$complete EOL"
39277       arguments="${tmp#* }"
39278 
39279       # Cannot rely on the command "which" here since it doesn't always work.
39280       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39281       if test -z "$is_absolute_path"; then
39282         # Path to executable is not absolute. Find it.
39283         IFS_save="$IFS"
39284         IFS=:
39285         for p in $PATH; do
39286           if test -f "$p/$path" && test -x "$p/$path"; then
39287             new_path="$p/$path"
39288             break
39289           fi
39290         done
39291         IFS="$IFS_save"
39292       else
39293         # This is an absolute path, we can use it without further modifications.
39294         new_path="$path"
39295       fi
39296 
39297       if test "x$new_path" = x; then
39298         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39299 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39300         has_space=`$ECHO "$complete" | $GREP " "`
39301         if test "x$has_space" != x; then
39302           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39303 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39304         fi
39305         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39306       fi
39307     fi
39308 
39309     # Now join together the path and the arguments once again
39310     if test "x$arguments" != xEOL; then
39311       new_complete="$new_path ${arguments% *}"
39312     else
39313       new_complete="$new_path"
39314     fi
39315 
39316     if test "x$complete" != "x$new_complete"; then
39317       OBJDUMP="$new_complete"
39318       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39319 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39320     fi
39321   fi
39322 
39323   fi
39324 
39325 
39326   # Restore old path.
39327   PATH="$OLD_PATH"
39328 
39329   # Restore the flags to the user specified values.
39330   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39331   CFLAGS="$ORG_CFLAGS"
39332   CXXFLAGS="$ORG_CXXFLAGS"
39333 
39334 
39335 # Finally do some processing after the detection phase
39336 
39337   if test "x$COMPILE_TYPE" = "xcross"; then
39338     # Now we need to find a C/C++ compiler that can build executables for the
39339     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39340     # used once. Also, we need to do this without adding a tools dir to the
39341     # path, otherwise we might pick up cross-compilers which don't use standard
39342     # naming.
39343 
39344     # FIXME: we should list the discovered compilers as an exclude pattern!
39345     # If we do that, we can do this detection before POST_DETECTION, and still
39346     # find the build compilers in the tools dir, if needed.
39347 
39348 
39349   # Publish this variable in the help.
39350 
39351 
39352   if test "x$BUILD_CC" = x; then
39353     # The variable is not set by user, try to locate tool using the code snippet
39354     for ac_prog in cl cc gcc
39355 do
39356   # Extract the first word of "$ac_prog", so it can be a program name with args.
39357 set dummy $ac_prog; ac_word=$2
39358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39359 $as_echo_n "checking for $ac_word... " >&6; }
39360 if ${ac_cv_path_BUILD_CC+:} false; then :
39361   $as_echo_n "(cached) " >&6
39362 else
39363   case $BUILD_CC in
39364   [\\/]* | ?:[\\/]*)
39365   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39366   ;;
39367   *)
39368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39369 for as_dir in $PATH
39370 do
39371   IFS=$as_save_IFS
39372   test -z "$as_dir" && as_dir=.
39373     for ac_exec_ext in '' $ac_executable_extensions; do
39374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39375     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39377     break 2
39378   fi
39379 done
39380   done
39381 IFS=$as_save_IFS
39382 
39383   ;;
39384 esac
39385 fi
39386 BUILD_CC=$ac_cv_path_BUILD_CC
39387 if test -n "$BUILD_CC"; then
39388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39389 $as_echo "$BUILD_CC" >&6; }
39390 else
39391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39392 $as_echo "no" >&6; }
39393 fi
39394 
39395 
39396   test -n "$BUILD_CC" && break
39397 done
39398 
39399   else
39400     # The variable is set, but is it from the command line or the environment?
39401 
39402     # Try to remove the string !BUILD_CC! from our list.
39403     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39404     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39405       # If it failed, the variable was not from the command line. Ignore it,
39406       # but warn the user (except for BASH, which is always set by the calling BASH).
39407       if test "xBUILD_CC" != xBASH; then
39408         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39409 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39410       fi
39411       # Try to locate tool using the code snippet
39412       for ac_prog in cl cc gcc
39413 do
39414   # Extract the first word of "$ac_prog", so it can be a program name with args.
39415 set dummy $ac_prog; ac_word=$2
39416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39417 $as_echo_n "checking for $ac_word... " >&6; }
39418 if ${ac_cv_path_BUILD_CC+:} false; then :
39419   $as_echo_n "(cached) " >&6
39420 else
39421   case $BUILD_CC in
39422   [\\/]* | ?:[\\/]*)
39423   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39424   ;;
39425   *)
39426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39427 for as_dir in $PATH
39428 do
39429   IFS=$as_save_IFS
39430   test -z "$as_dir" && as_dir=.
39431     for ac_exec_ext in '' $ac_executable_extensions; do
39432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39433     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39435     break 2
39436   fi
39437 done
39438   done
39439 IFS=$as_save_IFS
39440 
39441   ;;
39442 esac
39443 fi
39444 BUILD_CC=$ac_cv_path_BUILD_CC
39445 if test -n "$BUILD_CC"; then
39446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39447 $as_echo "$BUILD_CC" >&6; }
39448 else
39449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39450 $as_echo "no" >&6; }
39451 fi
39452 
39453 
39454   test -n "$BUILD_CC" && break
39455 done
39456 
39457     else
39458       # If it succeeded, then it was overridden by the user. We will use it
39459       # for the tool.
39460 
39461       # First remove it from the list of overridden variables, so we can test
39462       # for unknown variables in the end.
39463       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39464 
39465       # Check if the provided tool contains a complete path.
39466       tool_specified="$BUILD_CC"
39467       tool_basename="${tool_specified##*/}"
39468       if test "x$tool_basename" = "x$tool_specified"; then
39469         # A command without a complete path is provided, search $PATH.
39470         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39471 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39472         # Extract the first word of "$tool_basename", so it can be a program name with args.
39473 set dummy $tool_basename; ac_word=$2
39474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39475 $as_echo_n "checking for $ac_word... " >&6; }
39476 if ${ac_cv_path_BUILD_CC+:} false; then :
39477   $as_echo_n "(cached) " >&6
39478 else
39479   case $BUILD_CC in
39480   [\\/]* | ?:[\\/]*)
39481   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39482   ;;
39483   *)
39484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39485 for as_dir in $PATH
39486 do
39487   IFS=$as_save_IFS
39488   test -z "$as_dir" && as_dir=.
39489     for ac_exec_ext in '' $ac_executable_extensions; do
39490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39491     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39493     break 2
39494   fi
39495 done
39496   done
39497 IFS=$as_save_IFS
39498 
39499   ;;
39500 esac
39501 fi
39502 BUILD_CC=$ac_cv_path_BUILD_CC
39503 if test -n "$BUILD_CC"; then
39504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39505 $as_echo "$BUILD_CC" >&6; }
39506 else
39507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39508 $as_echo "no" >&6; }
39509 fi
39510 
39511 
39512         if test "x$BUILD_CC" = x; then
39513           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39514         fi
39515       else
39516         # Otherwise we believe it is a complete path. Use it as it is.
39517         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39518 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39520 $as_echo_n "checking for BUILD_CC... " >&6; }
39521         if test ! -x "$tool_specified"; then
39522           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39523 $as_echo "not found" >&6; }
39524           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39525         fi
39526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39527 $as_echo "$tool_specified" >&6; }
39528       fi
39529     fi
39530   fi
39531 
39532 
39533 
39534   # Only process if variable expands to non-empty
39535 
39536   if test "x$BUILD_CC" != x; then
39537     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39538 
39539   # First separate the path from the arguments. This will split at the first
39540   # space.
39541   complete="$BUILD_CC"
39542   path="${complete%% *}"
39543   tmp="$complete EOL"
39544   arguments="${tmp#* }"
39545 
39546   # Input might be given as Windows format, start by converting to
39547   # unix format.
39548   new_path=`$CYGPATH -u "$path"`
39549 
39550   # Now try to locate executable using which
39551   new_path=`$WHICH "$new_path" 2> /dev/null`
39552   # bat and cmd files are not always considered executable in cygwin causing which
39553   # to not find them
39554   if test "x$new_path" = x \
39555       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39556       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39557     new_path=`$CYGPATH -u "$path"`
39558   fi
39559   if test "x$new_path" = x; then
39560     # Oops. Which didn't find the executable.
39561     # The splitting of arguments from the executable at a space might have been incorrect,
39562     # since paths with space are more likely in Windows. Give it another try with the whole
39563     # argument.
39564     path="$complete"
39565     arguments="EOL"
39566     new_path=`$CYGPATH -u "$path"`
39567     new_path=`$WHICH "$new_path" 2> /dev/null`
39568     # bat and cmd files are not always considered executable in cygwin causing which
39569     # to not find them
39570     if test "x$new_path" = x \
39571         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39572         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39573       new_path=`$CYGPATH -u "$path"`
39574     fi
39575     if test "x$new_path" = x; then
39576       # It's still not found. Now this is an unrecoverable error.
39577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39578 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39579       has_space=`$ECHO "$complete" | $GREP " "`
39580       if test "x$has_space" != x; then
39581         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39582 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39583       fi
39584       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39585     fi
39586   fi
39587 
39588   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39589   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39590   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39591   # "foo.exe" is OK but "foo" is an error.
39592   #
39593   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39594   # It is also a way to make sure we got the proper file name for the real test later on.
39595   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39596   if test "x$test_shortpath" = x; then
39597     # Short path failed, file does not exist as specified.
39598     # Try adding .exe or .cmd
39599     if test -f "${new_path}.exe"; then
39600       input_to_shortpath="${new_path}.exe"
39601     elif test -f "${new_path}.cmd"; then
39602       input_to_shortpath="${new_path}.cmd"
39603     else
39604       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39605 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39606       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39607 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39608       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39609     fi
39610   else
39611     input_to_shortpath="$new_path"
39612   fi
39613 
39614   # Call helper function which possibly converts this using DOS-style short mode.
39615   # If so, the updated path is stored in $new_path.
39616   new_path="$input_to_shortpath"
39617 
39618   input_path="$input_to_shortpath"
39619   # Check if we need to convert this using DOS-style short mode. If the path
39620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39621   # take no chances and rewrite it.
39622   # Note: m4 eats our [], so we need to use [ and ] instead.
39623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39624   if test "x$has_forbidden_chars" != x; then
39625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39626     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39627     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39628     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39629       # Going to short mode and back again did indeed matter. Since short mode is
39630       # case insensitive, let's make it lowercase to improve readability.
39631       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39632       # Now convert it back to Unix-stile (cygpath)
39633       input_path=`$CYGPATH -u "$shortmode_path"`
39634       new_path="$input_path"
39635     fi
39636   fi
39637 
39638   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39639   if test "x$test_cygdrive_prefix" = x; then
39640     # As a simple fix, exclude /usr/bin since it's not a real path.
39641     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39642       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39643       # a path prefixed by /cygdrive for fixpath to work.
39644       new_path="$CYGWIN_ROOT_PATH$input_path"
39645     fi
39646   fi
39647 
39648   # remove trailing .exe if any
39649   new_path="${new_path/%.exe/}"
39650 
39651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39652 
39653   # First separate the path from the arguments. This will split at the first
39654   # space.
39655   complete="$BUILD_CC"
39656   path="${complete%% *}"
39657   tmp="$complete EOL"
39658   arguments="${tmp#* }"
39659 
39660   # Input might be given as Windows format, start by converting to
39661   # unix format.
39662   new_path="$path"
39663 
39664   windows_path="$new_path"
39665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39666     unix_path=`$CYGPATH -u "$windows_path"`
39667     new_path="$unix_path"
39668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39670     new_path="$unix_path"
39671   fi
39672 
39673 
39674   # Now try to locate executable using which
39675   new_path=`$WHICH "$new_path" 2> /dev/null`
39676 
39677   if test "x$new_path" = x; then
39678     # Oops. Which didn't find the executable.
39679     # The splitting of arguments from the executable at a space might have been incorrect,
39680     # since paths with space are more likely in Windows. Give it another try with the whole
39681     # argument.
39682     path="$complete"
39683     arguments="EOL"
39684     new_path="$path"
39685 
39686   windows_path="$new_path"
39687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39688     unix_path=`$CYGPATH -u "$windows_path"`
39689     new_path="$unix_path"
39690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39692     new_path="$unix_path"
39693   fi
39694 
39695 
39696     new_path=`$WHICH "$new_path" 2> /dev/null`
39697     # bat and cmd files are not always considered executable in MSYS causing which
39698     # to not find them
39699     if test "x$new_path" = x \
39700         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39701         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39702       new_path="$path"
39703 
39704   windows_path="$new_path"
39705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39706     unix_path=`$CYGPATH -u "$windows_path"`
39707     new_path="$unix_path"
39708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39710     new_path="$unix_path"
39711   fi
39712 
39713     fi
39714 
39715     if test "x$new_path" = x; then
39716       # It's still not found. Now this is an unrecoverable error.
39717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39718 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39719       has_space=`$ECHO "$complete" | $GREP " "`
39720       if test "x$has_space" != x; then
39721         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39722 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39723       fi
39724       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39725     fi
39726   fi
39727 
39728   # Now new_path has a complete unix path to the binary
39729   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39730     # Keep paths in /bin as-is, but remove trailing .exe if any
39731     new_path="${new_path/%.exe/}"
39732     # Do not save /bin paths to all_fixpath_prefixes!
39733   else
39734     # Not in mixed or Windows style, start by that.
39735     new_path=`cmd //c echo $new_path`
39736 
39737   input_path="$new_path"
39738   # Check if we need to convert this using DOS-style short mode. If the path
39739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39740   # take no chances and rewrite it.
39741   # Note: m4 eats our [], so we need to use [ and ] instead.
39742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39743   if test "x$has_forbidden_chars" != x; then
39744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39745     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39746   fi
39747 
39748     # Output is in $new_path
39749 
39750   windows_path="$new_path"
39751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39752     unix_path=`$CYGPATH -u "$windows_path"`
39753     new_path="$unix_path"
39754   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39755     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39756     new_path="$unix_path"
39757   fi
39758 
39759     # remove trailing .exe if any
39760     new_path="${new_path/%.exe/}"
39761 
39762     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39763     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39764   fi
39765 
39766     else
39767       # We're on a unix platform. Hooray! :)
39768       # First separate the path from the arguments. This will split at the first
39769       # space.
39770       complete="$BUILD_CC"
39771       path="${complete%% *}"
39772       tmp="$complete EOL"
39773       arguments="${tmp#* }"
39774 
39775       # Cannot rely on the command "which" here since it doesn't always work.
39776       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39777       if test -z "$is_absolute_path"; then
39778         # Path to executable is not absolute. Find it.
39779         IFS_save="$IFS"
39780         IFS=:
39781         for p in $PATH; do
39782           if test -f "$p/$path" && test -x "$p/$path"; then
39783             new_path="$p/$path"
39784             break
39785           fi
39786         done
39787         IFS="$IFS_save"
39788       else
39789         # This is an absolute path, we can use it without further modifications.
39790         new_path="$path"
39791       fi
39792 
39793       if test "x$new_path" = x; then
39794         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39795 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39796         has_space=`$ECHO "$complete" | $GREP " "`
39797         if test "x$has_space" != x; then
39798           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39799 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39800         fi
39801         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39802       fi
39803     fi
39804 
39805     # Now join together the path and the arguments once again
39806     if test "x$arguments" != xEOL; then
39807       new_complete="$new_path ${arguments% *}"
39808     else
39809       new_complete="$new_path"
39810     fi
39811 
39812     if test "x$complete" != "x$new_complete"; then
39813       BUILD_CC="$new_complete"
39814       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39815 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39816     fi
39817   fi
39818 
39819 
39820 
39821   # Publish this variable in the help.
39822 
39823 
39824   if test "x$BUILD_CXX" = x; then
39825     # The variable is not set by user, try to locate tool using the code snippet
39826     for ac_prog in cl CC g++
39827 do
39828   # Extract the first word of "$ac_prog", so it can be a program name with args.
39829 set dummy $ac_prog; ac_word=$2
39830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39831 $as_echo_n "checking for $ac_word... " >&6; }
39832 if ${ac_cv_path_BUILD_CXX+:} false; then :
39833   $as_echo_n "(cached) " >&6
39834 else
39835   case $BUILD_CXX in
39836   [\\/]* | ?:[\\/]*)
39837   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39838   ;;
39839   *)
39840   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39841 for as_dir in $PATH
39842 do
39843   IFS=$as_save_IFS
39844   test -z "$as_dir" && as_dir=.
39845     for ac_exec_ext in '' $ac_executable_extensions; do
39846   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39847     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39848     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39849     break 2
39850   fi
39851 done
39852   done
39853 IFS=$as_save_IFS
39854 
39855   ;;
39856 esac
39857 fi
39858 BUILD_CXX=$ac_cv_path_BUILD_CXX
39859 if test -n "$BUILD_CXX"; then
39860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39861 $as_echo "$BUILD_CXX" >&6; }
39862 else
39863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39864 $as_echo "no" >&6; }
39865 fi
39866 
39867 
39868   test -n "$BUILD_CXX" && break
39869 done
39870 
39871   else
39872     # The variable is set, but is it from the command line or the environment?
39873 
39874     # Try to remove the string !BUILD_CXX! from our list.
39875     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39876     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39877       # If it failed, the variable was not from the command line. Ignore it,
39878       # but warn the user (except for BASH, which is always set by the calling BASH).
39879       if test "xBUILD_CXX" != xBASH; then
39880         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39881 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39882       fi
39883       # Try to locate tool using the code snippet
39884       for ac_prog in cl CC g++
39885 do
39886   # Extract the first word of "$ac_prog", so it can be a program name with args.
39887 set dummy $ac_prog; ac_word=$2
39888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39889 $as_echo_n "checking for $ac_word... " >&6; }
39890 if ${ac_cv_path_BUILD_CXX+:} false; then :
39891   $as_echo_n "(cached) " >&6
39892 else
39893   case $BUILD_CXX in
39894   [\\/]* | ?:[\\/]*)
39895   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39896   ;;
39897   *)
39898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39899 for as_dir in $PATH
39900 do
39901   IFS=$as_save_IFS
39902   test -z "$as_dir" && as_dir=.
39903     for ac_exec_ext in '' $ac_executable_extensions; do
39904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39905     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39907     break 2
39908   fi
39909 done
39910   done
39911 IFS=$as_save_IFS
39912 
39913   ;;
39914 esac
39915 fi
39916 BUILD_CXX=$ac_cv_path_BUILD_CXX
39917 if test -n "$BUILD_CXX"; then
39918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39919 $as_echo "$BUILD_CXX" >&6; }
39920 else
39921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39922 $as_echo "no" >&6; }
39923 fi
39924 
39925 
39926   test -n "$BUILD_CXX" && break
39927 done
39928 
39929     else
39930       # If it succeeded, then it was overridden by the user. We will use it
39931       # for the tool.
39932 
39933       # First remove it from the list of overridden variables, so we can test
39934       # for unknown variables in the end.
39935       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39936 
39937       # Check if the provided tool contains a complete path.
39938       tool_specified="$BUILD_CXX"
39939       tool_basename="${tool_specified##*/}"
39940       if test "x$tool_basename" = "x$tool_specified"; then
39941         # A command without a complete path is provided, search $PATH.
39942         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39943 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39944         # Extract the first word of "$tool_basename", so it can be a program name with args.
39945 set dummy $tool_basename; ac_word=$2
39946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39947 $as_echo_n "checking for $ac_word... " >&6; }
39948 if ${ac_cv_path_BUILD_CXX+:} false; then :
39949   $as_echo_n "(cached) " >&6
39950 else
39951   case $BUILD_CXX in
39952   [\\/]* | ?:[\\/]*)
39953   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39954   ;;
39955   *)
39956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39957 for as_dir in $PATH
39958 do
39959   IFS=$as_save_IFS
39960   test -z "$as_dir" && as_dir=.
39961     for ac_exec_ext in '' $ac_executable_extensions; do
39962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39963     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39965     break 2
39966   fi
39967 done
39968   done
39969 IFS=$as_save_IFS
39970 
39971   ;;
39972 esac
39973 fi
39974 BUILD_CXX=$ac_cv_path_BUILD_CXX
39975 if test -n "$BUILD_CXX"; then
39976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39977 $as_echo "$BUILD_CXX" >&6; }
39978 else
39979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39980 $as_echo "no" >&6; }
39981 fi
39982 
39983 
39984         if test "x$BUILD_CXX" = x; then
39985           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39986         fi
39987       else
39988         # Otherwise we believe it is a complete path. Use it as it is.
39989         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39990 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39991         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39992 $as_echo_n "checking for BUILD_CXX... " >&6; }
39993         if test ! -x "$tool_specified"; then
39994           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39995 $as_echo "not found" >&6; }
39996           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39997         fi
39998         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39999 $as_echo "$tool_specified" >&6; }
40000       fi
40001     fi
40002   fi
40003 
40004 
40005 
40006   # Only process if variable expands to non-empty
40007 
40008   if test "x$BUILD_CXX" != x; then
40009     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40010 
40011   # First separate the path from the arguments. This will split at the first
40012   # space.
40013   complete="$BUILD_CXX"
40014   path="${complete%% *}"
40015   tmp="$complete EOL"
40016   arguments="${tmp#* }"
40017 
40018   # Input might be given as Windows format, start by converting to
40019   # unix format.
40020   new_path=`$CYGPATH -u "$path"`
40021 
40022   # Now try to locate executable using which
40023   new_path=`$WHICH "$new_path" 2> /dev/null`
40024   # bat and cmd files are not always considered executable in cygwin causing which
40025   # to not find them
40026   if test "x$new_path" = x \
40027       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40028       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40029     new_path=`$CYGPATH -u "$path"`
40030   fi
40031   if test "x$new_path" = x; then
40032     # Oops. Which didn't find the executable.
40033     # The splitting of arguments from the executable at a space might have been incorrect,
40034     # since paths with space are more likely in Windows. Give it another try with the whole
40035     # argument.
40036     path="$complete"
40037     arguments="EOL"
40038     new_path=`$CYGPATH -u "$path"`
40039     new_path=`$WHICH "$new_path" 2> /dev/null`
40040     # bat and cmd files are not always considered executable in cygwin causing which
40041     # to not find them
40042     if test "x$new_path" = x \
40043         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40044         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40045       new_path=`$CYGPATH -u "$path"`
40046     fi
40047     if test "x$new_path" = x; then
40048       # It's still not found. Now this is an unrecoverable error.
40049       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40050 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40051       has_space=`$ECHO "$complete" | $GREP " "`
40052       if test "x$has_space" != x; then
40053         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40054 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40055       fi
40056       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40057     fi
40058   fi
40059 
40060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40063   # "foo.exe" is OK but "foo" is an error.
40064   #
40065   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40066   # It is also a way to make sure we got the proper file name for the real test later on.
40067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40068   if test "x$test_shortpath" = x; then
40069     # Short path failed, file does not exist as specified.
40070     # Try adding .exe or .cmd
40071     if test -f "${new_path}.exe"; then
40072       input_to_shortpath="${new_path}.exe"
40073     elif test -f "${new_path}.cmd"; then
40074       input_to_shortpath="${new_path}.cmd"
40075     else
40076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40077 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40078       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40079 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40080       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40081     fi
40082   else
40083     input_to_shortpath="$new_path"
40084   fi
40085 
40086   # Call helper function which possibly converts this using DOS-style short mode.
40087   # If so, the updated path is stored in $new_path.
40088   new_path="$input_to_shortpath"
40089 
40090   input_path="$input_to_shortpath"
40091   # Check if we need to convert this using DOS-style short mode. If the path
40092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40093   # take no chances and rewrite it.
40094   # Note: m4 eats our [], so we need to use [ and ] instead.
40095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40096   if test "x$has_forbidden_chars" != x; then
40097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40098     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40099     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40100     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40101       # Going to short mode and back again did indeed matter. Since short mode is
40102       # case insensitive, let's make it lowercase to improve readability.
40103       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40104       # Now convert it back to Unix-stile (cygpath)
40105       input_path=`$CYGPATH -u "$shortmode_path"`
40106       new_path="$input_path"
40107     fi
40108   fi
40109 
40110   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40111   if test "x$test_cygdrive_prefix" = x; then
40112     # As a simple fix, exclude /usr/bin since it's not a real path.
40113     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40114       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40115       # a path prefixed by /cygdrive for fixpath to work.
40116       new_path="$CYGWIN_ROOT_PATH$input_path"
40117     fi
40118   fi
40119 
40120   # remove trailing .exe if any
40121   new_path="${new_path/%.exe/}"
40122 
40123     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40124 
40125   # First separate the path from the arguments. This will split at the first
40126   # space.
40127   complete="$BUILD_CXX"
40128   path="${complete%% *}"
40129   tmp="$complete EOL"
40130   arguments="${tmp#* }"
40131 
40132   # Input might be given as Windows format, start by converting to
40133   # unix format.
40134   new_path="$path"
40135 
40136   windows_path="$new_path"
40137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40138     unix_path=`$CYGPATH -u "$windows_path"`
40139     new_path="$unix_path"
40140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40141     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40142     new_path="$unix_path"
40143   fi
40144 
40145 
40146   # Now try to locate executable using which
40147   new_path=`$WHICH "$new_path" 2> /dev/null`
40148 
40149   if test "x$new_path" = x; then
40150     # Oops. Which didn't find the executable.
40151     # The splitting of arguments from the executable at a space might have been incorrect,
40152     # since paths with space are more likely in Windows. Give it another try with the whole
40153     # argument.
40154     path="$complete"
40155     arguments="EOL"
40156     new_path="$path"
40157 
40158   windows_path="$new_path"
40159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40160     unix_path=`$CYGPATH -u "$windows_path"`
40161     new_path="$unix_path"
40162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40164     new_path="$unix_path"
40165   fi
40166 
40167 
40168     new_path=`$WHICH "$new_path" 2> /dev/null`
40169     # bat and cmd files are not always considered executable in MSYS causing which
40170     # to not find them
40171     if test "x$new_path" = x \
40172         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40173         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40174       new_path="$path"
40175 
40176   windows_path="$new_path"
40177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40178     unix_path=`$CYGPATH -u "$windows_path"`
40179     new_path="$unix_path"
40180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40182     new_path="$unix_path"
40183   fi
40184 
40185     fi
40186 
40187     if test "x$new_path" = x; then
40188       # It's still not found. Now this is an unrecoverable error.
40189       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40190 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40191       has_space=`$ECHO "$complete" | $GREP " "`
40192       if test "x$has_space" != x; then
40193         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40194 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40195       fi
40196       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40197     fi
40198   fi
40199 
40200   # Now new_path has a complete unix path to the binary
40201   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40202     # Keep paths in /bin as-is, but remove trailing .exe if any
40203     new_path="${new_path/%.exe/}"
40204     # Do not save /bin paths to all_fixpath_prefixes!
40205   else
40206     # Not in mixed or Windows style, start by that.
40207     new_path=`cmd //c echo $new_path`
40208 
40209   input_path="$new_path"
40210   # Check if we need to convert this using DOS-style short mode. If the path
40211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40212   # take no chances and rewrite it.
40213   # Note: m4 eats our [], so we need to use [ and ] instead.
40214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40215   if test "x$has_forbidden_chars" != x; then
40216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40217     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40218   fi
40219 
40220     # Output is in $new_path
40221 
40222   windows_path="$new_path"
40223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40224     unix_path=`$CYGPATH -u "$windows_path"`
40225     new_path="$unix_path"
40226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40228     new_path="$unix_path"
40229   fi
40230 
40231     # remove trailing .exe if any
40232     new_path="${new_path/%.exe/}"
40233 
40234     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40235     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40236   fi
40237 
40238     else
40239       # We're on a unix platform. Hooray! :)
40240       # First separate the path from the arguments. This will split at the first
40241       # space.
40242       complete="$BUILD_CXX"
40243       path="${complete%% *}"
40244       tmp="$complete EOL"
40245       arguments="${tmp#* }"
40246 
40247       # Cannot rely on the command "which" here since it doesn't always work.
40248       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40249       if test -z "$is_absolute_path"; then
40250         # Path to executable is not absolute. Find it.
40251         IFS_save="$IFS"
40252         IFS=:
40253         for p in $PATH; do
40254           if test -f "$p/$path" && test -x "$p/$path"; then
40255             new_path="$p/$path"
40256             break
40257           fi
40258         done
40259         IFS="$IFS_save"
40260       else
40261         # This is an absolute path, we can use it without further modifications.
40262         new_path="$path"
40263       fi
40264 
40265       if test "x$new_path" = x; then
40266         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40267 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40268         has_space=`$ECHO "$complete" | $GREP " "`
40269         if test "x$has_space" != x; then
40270           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40271 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40272         fi
40273         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40274       fi
40275     fi
40276 
40277     # Now join together the path and the arguments once again
40278     if test "x$arguments" != xEOL; then
40279       new_complete="$new_path ${arguments% *}"
40280     else
40281       new_complete="$new_path"
40282     fi
40283 
40284     if test "x$complete" != "x$new_complete"; then
40285       BUILD_CXX="$new_complete"
40286       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40287 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40288     fi
40289   fi
40290 
40291 
40292 
40293   # Publish this variable in the help.
40294 
40295 
40296   if test "x$BUILD_LD" = x; then
40297     # The variable is not set by user, try to locate tool using the code snippet
40298     for ac_prog in ld
40299 do
40300   # Extract the first word of "$ac_prog", so it can be a program name with args.
40301 set dummy $ac_prog; ac_word=$2
40302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40303 $as_echo_n "checking for $ac_word... " >&6; }
40304 if ${ac_cv_path_BUILD_LD+:} false; then :
40305   $as_echo_n "(cached) " >&6
40306 else
40307   case $BUILD_LD in
40308   [\\/]* | ?:[\\/]*)
40309   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40310   ;;
40311   *)
40312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40313 for as_dir in $PATH
40314 do
40315   IFS=$as_save_IFS
40316   test -z "$as_dir" && as_dir=.
40317     for ac_exec_ext in '' $ac_executable_extensions; do
40318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40319     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40321     break 2
40322   fi
40323 done
40324   done
40325 IFS=$as_save_IFS
40326 
40327   ;;
40328 esac
40329 fi
40330 BUILD_LD=$ac_cv_path_BUILD_LD
40331 if test -n "$BUILD_LD"; then
40332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40333 $as_echo "$BUILD_LD" >&6; }
40334 else
40335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40336 $as_echo "no" >&6; }
40337 fi
40338 
40339 
40340   test -n "$BUILD_LD" && break
40341 done
40342 
40343   else
40344     # The variable is set, but is it from the command line or the environment?
40345 
40346     # Try to remove the string !BUILD_LD! from our list.
40347     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40348     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40349       # If it failed, the variable was not from the command line. Ignore it,
40350       # but warn the user (except for BASH, which is always set by the calling BASH).
40351       if test "xBUILD_LD" != xBASH; then
40352         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40353 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40354       fi
40355       # Try to locate tool using the code snippet
40356       for ac_prog in ld
40357 do
40358   # Extract the first word of "$ac_prog", so it can be a program name with args.
40359 set dummy $ac_prog; ac_word=$2
40360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40361 $as_echo_n "checking for $ac_word... " >&6; }
40362 if ${ac_cv_path_BUILD_LD+:} false; then :
40363   $as_echo_n "(cached) " >&6
40364 else
40365   case $BUILD_LD in
40366   [\\/]* | ?:[\\/]*)
40367   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40368   ;;
40369   *)
40370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40371 for as_dir in $PATH
40372 do
40373   IFS=$as_save_IFS
40374   test -z "$as_dir" && as_dir=.
40375     for ac_exec_ext in '' $ac_executable_extensions; do
40376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40377     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40379     break 2
40380   fi
40381 done
40382   done
40383 IFS=$as_save_IFS
40384 
40385   ;;
40386 esac
40387 fi
40388 BUILD_LD=$ac_cv_path_BUILD_LD
40389 if test -n "$BUILD_LD"; then
40390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40391 $as_echo "$BUILD_LD" >&6; }
40392 else
40393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40394 $as_echo "no" >&6; }
40395 fi
40396 
40397 
40398   test -n "$BUILD_LD" && break
40399 done
40400 
40401     else
40402       # If it succeeded, then it was overridden by the user. We will use it
40403       # for the tool.
40404 
40405       # First remove it from the list of overridden variables, so we can test
40406       # for unknown variables in the end.
40407       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40408 
40409       # Check if the provided tool contains a complete path.
40410       tool_specified="$BUILD_LD"
40411       tool_basename="${tool_specified##*/}"
40412       if test "x$tool_basename" = "x$tool_specified"; then
40413         # A command without a complete path is provided, search $PATH.
40414         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40415 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40416         # Extract the first word of "$tool_basename", so it can be a program name with args.
40417 set dummy $tool_basename; ac_word=$2
40418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40419 $as_echo_n "checking for $ac_word... " >&6; }
40420 if ${ac_cv_path_BUILD_LD+:} false; then :
40421   $as_echo_n "(cached) " >&6
40422 else
40423   case $BUILD_LD in
40424   [\\/]* | ?:[\\/]*)
40425   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40426   ;;
40427   *)
40428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40429 for as_dir in $PATH
40430 do
40431   IFS=$as_save_IFS
40432   test -z "$as_dir" && as_dir=.
40433     for ac_exec_ext in '' $ac_executable_extensions; do
40434   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40435     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40437     break 2
40438   fi
40439 done
40440   done
40441 IFS=$as_save_IFS
40442 
40443   ;;
40444 esac
40445 fi
40446 BUILD_LD=$ac_cv_path_BUILD_LD
40447 if test -n "$BUILD_LD"; then
40448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40449 $as_echo "$BUILD_LD" >&6; }
40450 else
40451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40452 $as_echo "no" >&6; }
40453 fi
40454 
40455 
40456         if test "x$BUILD_LD" = x; then
40457           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40458         fi
40459       else
40460         # Otherwise we believe it is a complete path. Use it as it is.
40461         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40462 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40463         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40464 $as_echo_n "checking for BUILD_LD... " >&6; }
40465         if test ! -x "$tool_specified"; then
40466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40467 $as_echo "not found" >&6; }
40468           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40469         fi
40470         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40471 $as_echo "$tool_specified" >&6; }
40472       fi
40473     fi
40474   fi
40475 
40476 
40477 
40478   # Only process if variable expands to non-empty
40479 
40480   if test "x$BUILD_LD" != x; then
40481     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40482 
40483   # First separate the path from the arguments. This will split at the first
40484   # space.
40485   complete="$BUILD_LD"
40486   path="${complete%% *}"
40487   tmp="$complete EOL"
40488   arguments="${tmp#* }"
40489 
40490   # Input might be given as Windows format, start by converting to
40491   # unix format.
40492   new_path=`$CYGPATH -u "$path"`
40493 
40494   # Now try to locate executable using which
40495   new_path=`$WHICH "$new_path" 2> /dev/null`
40496   # bat and cmd files are not always considered executable in cygwin causing which
40497   # to not find them
40498   if test "x$new_path" = x \
40499       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40500       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40501     new_path=`$CYGPATH -u "$path"`
40502   fi
40503   if test "x$new_path" = x; then
40504     # Oops. Which didn't find the executable.
40505     # The splitting of arguments from the executable at a space might have been incorrect,
40506     # since paths with space are more likely in Windows. Give it another try with the whole
40507     # argument.
40508     path="$complete"
40509     arguments="EOL"
40510     new_path=`$CYGPATH -u "$path"`
40511     new_path=`$WHICH "$new_path" 2> /dev/null`
40512     # bat and cmd files are not always considered executable in cygwin causing which
40513     # to not find them
40514     if test "x$new_path" = x \
40515         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40516         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40517       new_path=`$CYGPATH -u "$path"`
40518     fi
40519     if test "x$new_path" = x; then
40520       # It's still not found. Now this is an unrecoverable error.
40521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40522 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40523       has_space=`$ECHO "$complete" | $GREP " "`
40524       if test "x$has_space" != x; then
40525         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40526 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40527       fi
40528       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40529     fi
40530   fi
40531 
40532   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40533   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40534   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40535   # "foo.exe" is OK but "foo" is an error.
40536   #
40537   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40538   # It is also a way to make sure we got the proper file name for the real test later on.
40539   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40540   if test "x$test_shortpath" = x; then
40541     # Short path failed, file does not exist as specified.
40542     # Try adding .exe or .cmd
40543     if test -f "${new_path}.exe"; then
40544       input_to_shortpath="${new_path}.exe"
40545     elif test -f "${new_path}.cmd"; then
40546       input_to_shortpath="${new_path}.cmd"
40547     else
40548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40549 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40550       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40551 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40552       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40553     fi
40554   else
40555     input_to_shortpath="$new_path"
40556   fi
40557 
40558   # Call helper function which possibly converts this using DOS-style short mode.
40559   # If so, the updated path is stored in $new_path.
40560   new_path="$input_to_shortpath"
40561 
40562   input_path="$input_to_shortpath"
40563   # Check if we need to convert this using DOS-style short mode. If the path
40564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40565   # take no chances and rewrite it.
40566   # Note: m4 eats our [], so we need to use [ and ] instead.
40567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40568   if test "x$has_forbidden_chars" != x; then
40569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40570     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40571     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40572     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40573       # Going to short mode and back again did indeed matter. Since short mode is
40574       # case insensitive, let's make it lowercase to improve readability.
40575       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40576       # Now convert it back to Unix-stile (cygpath)
40577       input_path=`$CYGPATH -u "$shortmode_path"`
40578       new_path="$input_path"
40579     fi
40580   fi
40581 
40582   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40583   if test "x$test_cygdrive_prefix" = x; then
40584     # As a simple fix, exclude /usr/bin since it's not a real path.
40585     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40586       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40587       # a path prefixed by /cygdrive for fixpath to work.
40588       new_path="$CYGWIN_ROOT_PATH$input_path"
40589     fi
40590   fi
40591 
40592   # remove trailing .exe if any
40593   new_path="${new_path/%.exe/}"
40594 
40595     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40596 
40597   # First separate the path from the arguments. This will split at the first
40598   # space.
40599   complete="$BUILD_LD"
40600   path="${complete%% *}"
40601   tmp="$complete EOL"
40602   arguments="${tmp#* }"
40603 
40604   # Input might be given as Windows format, start by converting to
40605   # unix format.
40606   new_path="$path"
40607 
40608   windows_path="$new_path"
40609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40610     unix_path=`$CYGPATH -u "$windows_path"`
40611     new_path="$unix_path"
40612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40613     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40614     new_path="$unix_path"
40615   fi
40616 
40617 
40618   # Now try to locate executable using which
40619   new_path=`$WHICH "$new_path" 2> /dev/null`
40620 
40621   if test "x$new_path" = x; then
40622     # Oops. Which didn't find the executable.
40623     # The splitting of arguments from the executable at a space might have been incorrect,
40624     # since paths with space are more likely in Windows. Give it another try with the whole
40625     # argument.
40626     path="$complete"
40627     arguments="EOL"
40628     new_path="$path"
40629 
40630   windows_path="$new_path"
40631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40632     unix_path=`$CYGPATH -u "$windows_path"`
40633     new_path="$unix_path"
40634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40636     new_path="$unix_path"
40637   fi
40638 
40639 
40640     new_path=`$WHICH "$new_path" 2> /dev/null`
40641     # bat and cmd files are not always considered executable in MSYS causing which
40642     # to not find them
40643     if test "x$new_path" = x \
40644         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40645         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40646       new_path="$path"
40647 
40648   windows_path="$new_path"
40649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40650     unix_path=`$CYGPATH -u "$windows_path"`
40651     new_path="$unix_path"
40652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40654     new_path="$unix_path"
40655   fi
40656 
40657     fi
40658 
40659     if test "x$new_path" = x; then
40660       # It's still not found. Now this is an unrecoverable error.
40661       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40662 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40663       has_space=`$ECHO "$complete" | $GREP " "`
40664       if test "x$has_space" != x; then
40665         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40666 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40667       fi
40668       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40669     fi
40670   fi
40671 
40672   # Now new_path has a complete unix path to the binary
40673   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40674     # Keep paths in /bin as-is, but remove trailing .exe if any
40675     new_path="${new_path/%.exe/}"
40676     # Do not save /bin paths to all_fixpath_prefixes!
40677   else
40678     # Not in mixed or Windows style, start by that.
40679     new_path=`cmd //c echo $new_path`
40680 
40681   input_path="$new_path"
40682   # Check if we need to convert this using DOS-style short mode. If the path
40683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40684   # take no chances and rewrite it.
40685   # Note: m4 eats our [], so we need to use [ and ] instead.
40686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40687   if test "x$has_forbidden_chars" != x; then
40688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40689     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40690   fi
40691 
40692     # Output is in $new_path
40693 
40694   windows_path="$new_path"
40695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40696     unix_path=`$CYGPATH -u "$windows_path"`
40697     new_path="$unix_path"
40698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40700     new_path="$unix_path"
40701   fi
40702 
40703     # remove trailing .exe if any
40704     new_path="${new_path/%.exe/}"
40705 
40706     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40707     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40708   fi
40709 
40710     else
40711       # We're on a unix platform. Hooray! :)
40712       # First separate the path from the arguments. This will split at the first
40713       # space.
40714       complete="$BUILD_LD"
40715       path="${complete%% *}"
40716       tmp="$complete EOL"
40717       arguments="${tmp#* }"
40718 
40719       # Cannot rely on the command "which" here since it doesn't always work.
40720       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40721       if test -z "$is_absolute_path"; then
40722         # Path to executable is not absolute. Find it.
40723         IFS_save="$IFS"
40724         IFS=:
40725         for p in $PATH; do
40726           if test -f "$p/$path" && test -x "$p/$path"; then
40727             new_path="$p/$path"
40728             break
40729           fi
40730         done
40731         IFS="$IFS_save"
40732       else
40733         # This is an absolute path, we can use it without further modifications.
40734         new_path="$path"
40735       fi
40736 
40737       if test "x$new_path" = x; then
40738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40739 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40740         has_space=`$ECHO "$complete" | $GREP " "`
40741         if test "x$has_space" != x; then
40742           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40743 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40744         fi
40745         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40746       fi
40747     fi
40748 
40749     # Now join together the path and the arguments once again
40750     if test "x$arguments" != xEOL; then
40751       new_complete="$new_path ${arguments% *}"
40752     else
40753       new_complete="$new_path"
40754     fi
40755 
40756     if test "x$complete" != "x$new_complete"; then
40757       BUILD_LD="$new_complete"
40758       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40759 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40760     fi
40761   fi
40762 
40763   else
40764     # If we are not cross compiling, use the normal target compilers for
40765     # building the build platform executables.
40766     BUILD_CC="$CC"
40767     BUILD_CXX="$CXX"
40768     BUILD_LD="$LD"
40769   fi
40770 
40771 
40772 
40773 
40774 
40775 
40776   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40777     # For hotspot, we need these in Windows mixed path,
40778     # so rewrite them all. Need added .exe suffix.
40779     HOTSPOT_CXX="$CXX.exe"
40780     HOTSPOT_LD="$LD.exe"
40781     HOTSPOT_MT="$MT.exe"
40782     HOTSPOT_RC="$RC.exe"
40783 
40784   unix_path="$HOTSPOT_CXX"
40785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40786     windows_path=`$CYGPATH -m "$unix_path"`
40787     HOTSPOT_CXX="$windows_path"
40788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40789     windows_path=`cmd //c echo $unix_path`
40790     HOTSPOT_CXX="$windows_path"
40791   fi
40792 
40793 
40794   unix_path="$HOTSPOT_LD"
40795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40796     windows_path=`$CYGPATH -m "$unix_path"`
40797     HOTSPOT_LD="$windows_path"
40798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40799     windows_path=`cmd //c echo $unix_path`
40800     HOTSPOT_LD="$windows_path"
40801   fi
40802 
40803 
40804   unix_path="$HOTSPOT_MT"
40805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40806     windows_path=`$CYGPATH -m "$unix_path"`
40807     HOTSPOT_MT="$windows_path"
40808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40809     windows_path=`cmd //c echo $unix_path`
40810     HOTSPOT_MT="$windows_path"
40811   fi
40812 
40813 
40814   unix_path="$HOTSPOT_RC"
40815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40816     windows_path=`$CYGPATH -m "$unix_path"`
40817     HOTSPOT_RC="$windows_path"
40818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40819     windows_path=`cmd //c echo $unix_path`
40820     HOTSPOT_RC="$windows_path"
40821   fi
40822 
40823 
40824 
40825   else
40826     HOTSPOT_CXX="$CXX"
40827     HOTSPOT_LD="$LD"
40828   fi
40829 
40830 
40831 
40832   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40833     USE_CLANG=true
40834   fi
40835 
40836 
40837   # LDEXE is the linker to use, when creating executables. Not really used.
40838   # FIXME: These should just be removed!
40839   LDEXE="$LD"
40840   LDEXECXX="$LDCXX"
40841 
40842 
40843 
40844 
40845 
40846 
40847   # The package path is used only on macosx?
40848   # FIXME: clean this up, and/or move it elsewhere.
40849   PACKAGE_PATH=/opt/local
40850 
40851 
40852   # Check for extra potential brokenness.
40853   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40854     # On Windows, double-check that we got the right compiler.
40855     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40856     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40857     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40858       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40859         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40860       fi
40861     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40862       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40863         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40864       fi
40865     fi
40866   fi
40867 
40868   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40869     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40870     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40871     # This is later checked when setting flags.
40872 
40873     # "-Og" suppported for GCC 4.8 and later
40874     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40875 
40876   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40877 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40878   supports=yes
40879 
40880   saved_cflags="$CFLAGS"
40881   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40882   ac_ext=c
40883 ac_cpp='$CPP $CPPFLAGS'
40884 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40885 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40886 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40887 
40888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40889 /* end confdefs.h.  */
40890 int i;
40891 _ACEOF
40892 if ac_fn_c_try_compile "$LINENO"; then :
40893 
40894 else
40895   supports=no
40896 fi
40897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40898   ac_ext=cpp
40899 ac_cpp='$CXXCPP $CPPFLAGS'
40900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40903 
40904   CFLAGS="$saved_cflags"
40905 
40906   saved_cxxflags="$CXXFLAGS"
40907   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40908   ac_ext=cpp
40909 ac_cpp='$CXXCPP $CPPFLAGS'
40910 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40911 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40912 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40913 
40914   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40915 /* end confdefs.h.  */
40916 int i;
40917 _ACEOF
40918 if ac_fn_cxx_try_compile "$LINENO"; then :
40919 
40920 else
40921   supports=no
40922 fi
40923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40924   ac_ext=cpp
40925 ac_cpp='$CXXCPP $CPPFLAGS'
40926 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40927 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40928 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40929 
40930   CXXFLAGS="$saved_cxxflags"
40931 
40932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40933 $as_echo "$supports" >&6; }
40934   if test "x$supports" = "xyes" ; then
40935     HAS_CFLAG_OPTIMIZE_DEBUG=true
40936   else
40937     HAS_CFLAG_OPTIMIZE_DEBUG=false
40938   fi
40939 
40940 
40941     # "-z relro" supported in GNU binutils 2.17 and later
40942     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40943 
40944   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40945 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40946   supports=yes
40947 
40948   saved_ldflags="$LDFLAGS"
40949   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40950   ac_ext=c
40951 ac_cpp='$CPP $CPPFLAGS'
40952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40955 
40956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40957 /* end confdefs.h.  */
40958 
40959 int
40960 main ()
40961 {
40962 
40963   ;
40964   return 0;
40965 }
40966 _ACEOF
40967 if ac_fn_c_try_link "$LINENO"; then :
40968 
40969 else
40970   supports=no
40971 fi
40972 rm -f core conftest.err conftest.$ac_objext \
40973     conftest$ac_exeext conftest.$ac_ext
40974   ac_ext=cpp
40975 ac_cpp='$CXXCPP $CPPFLAGS'
40976 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40977 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40978 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40979 
40980   LDFLAGS="$saved_ldflags"
40981 
40982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40983 $as_echo "$supports" >&6; }
40984   if test "x$supports" = "xyes" ; then
40985     HAS_LINKER_RELRO=true
40986   else
40987     HAS_LINKER_RELRO=false
40988   fi
40989 
40990 
40991     # "-z now" supported in GNU binutils 2.11 and later
40992     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40993 
40994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40995 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40996   supports=yes
40997 
40998   saved_ldflags="$LDFLAGS"
40999   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41000   ac_ext=c
41001 ac_cpp='$CPP $CPPFLAGS'
41002 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41003 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41004 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41005 
41006   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41007 /* end confdefs.h.  */
41008 
41009 int
41010 main ()
41011 {
41012 
41013   ;
41014   return 0;
41015 }
41016 _ACEOF
41017 if ac_fn_c_try_link "$LINENO"; then :
41018 
41019 else
41020   supports=no
41021 fi
41022 rm -f core conftest.err conftest.$ac_objext \
41023     conftest$ac_exeext conftest.$ac_ext
41024   ac_ext=cpp
41025 ac_cpp='$CXXCPP $CPPFLAGS'
41026 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41027 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41028 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41029 
41030   LDFLAGS="$saved_ldflags"
41031 
41032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41033 $as_echo "$supports" >&6; }
41034   if test "x$supports" = "xyes" ; then
41035     HAS_LINKER_NOW=true
41036   else
41037     HAS_LINKER_NOW=false
41038   fi
41039 
41040   fi
41041 
41042   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41043   # in executable.'
41044   USING_BROKEN_SUSE_LD=no
41045   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41047 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41048     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41049     $ECHO "int main() { }" > main.c
41050     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41051       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41052 $as_echo "no" >&6; }
41053       USING_BROKEN_SUSE_LD=no
41054     else
41055       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41056 $as_echo "yes" >&6; }
41057       USING_BROKEN_SUSE_LD=yes
41058     fi
41059     rm -rf version-script.map main.c a.out
41060   fi
41061 
41062 
41063 
41064 # Setup the JTReg Regression Test Harness.
41065 
41066 
41067 # Check whether --with-jtreg was given.
41068 if test "${with_jtreg+set}" = set; then :
41069   withval=$with_jtreg;
41070 else
41071   with_jtreg=no
41072 fi
41073 
41074 
41075   if test "x$with_jtreg" = xno; then
41076     # jtreg disabled
41077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41078 $as_echo_n "checking for jtreg... " >&6; }
41079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41080 $as_echo "no" >&6; }
41081   else
41082     if test "x$with_jtreg" != xyes; then
41083       # with path specified.
41084       JT_HOME="$with_jtreg"
41085     fi
41086 
41087     if test "x$JT_HOME" != x; then
41088       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41089 $as_echo_n "checking for jtreg... " >&6; }
41090 
41091       # use JT_HOME enviroment var.
41092 
41093   # Only process if variable expands to non-empty
41094 
41095   if test "x$JT_HOME" != x; then
41096     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41097 
41098   # Input might be given as Windows format, start by converting to
41099   # unix format.
41100   path="$JT_HOME"
41101   new_path=`$CYGPATH -u "$path"`
41102 
41103   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41104   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41105   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41106   # "foo.exe" is OK but "foo" is an error.
41107   #
41108   # This test is therefore slightly more accurate than "test -f" to check for file precense.
41109   # It is also a way to make sure we got the proper file name for the real test later on.
41110   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41111   if test "x$test_shortpath" = x; then
41112     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41113 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41114     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41115   fi
41116 
41117   # Call helper function which possibly converts this using DOS-style short mode.
41118   # If so, the updated path is stored in $new_path.
41119 
41120   input_path="$new_path"
41121   # Check if we need to convert this using DOS-style short mode. If the path
41122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41123   # take no chances and rewrite it.
41124   # Note: m4 eats our [], so we need to use [ and ] instead.
41125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41126   if test "x$has_forbidden_chars" != x; then
41127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41128     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41129     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41130     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41131       # Going to short mode and back again did indeed matter. Since short mode is
41132       # case insensitive, let's make it lowercase to improve readability.
41133       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41134       # Now convert it back to Unix-stile (cygpath)
41135       input_path=`$CYGPATH -u "$shortmode_path"`
41136       new_path="$input_path"
41137     fi
41138   fi
41139 
41140   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41141   if test "x$test_cygdrive_prefix" = x; then
41142     # As a simple fix, exclude /usr/bin since it's not a real path.
41143     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41144       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41145       # a path prefixed by /cygdrive for fixpath to work.
41146       new_path="$CYGWIN_ROOT_PATH$input_path"
41147     fi
41148   fi
41149 
41150 
41151   if test "x$path" != "x$new_path"; then
41152     JT_HOME="$new_path"
41153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41154 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41155   fi
41156 
41157     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41158 
41159   path="$JT_HOME"
41160   has_colon=`$ECHO $path | $GREP ^.:`
41161   new_path="$path"
41162   if test "x$has_colon" = x; then
41163     # Not in mixed or Windows style, start by that.
41164     new_path=`cmd //c echo $path`
41165   fi
41166 
41167 
41168   input_path="$new_path"
41169   # Check if we need to convert this using DOS-style short mode. If the path
41170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41171   # take no chances and rewrite it.
41172   # Note: m4 eats our [], so we need to use [ and ] instead.
41173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41174   if test "x$has_forbidden_chars" != x; then
41175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41176     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41177   fi
41178 
41179 
41180   windows_path="$new_path"
41181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41182     unix_path=`$CYGPATH -u "$windows_path"`
41183     new_path="$unix_path"
41184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41186     new_path="$unix_path"
41187   fi
41188 
41189   if test "x$path" != "x$new_path"; then
41190     JT_HOME="$new_path"
41191     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41192 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41193   fi
41194 
41195   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41196   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41197 
41198     else
41199       # We're on a unix platform. Hooray! :)
41200       path="$JT_HOME"
41201       has_space=`$ECHO "$path" | $GREP " "`
41202       if test "x$has_space" != x; then
41203         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41204 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41205         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41206       fi
41207 
41208       # Use eval to expand a potential ~
41209       eval path="$path"
41210       if test ! -f "$path" && test ! -d "$path"; then
41211         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41212       fi
41213 
41214       JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41215     fi
41216   fi
41217 
41218 
41219       # jtreg win32 script works for everybody
41220       JTREGEXE="$JT_HOME/bin/jtreg"
41221 
41222       if test ! -f "$JTREGEXE"; then
41223         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41224       fi
41225 
41226       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41227 $as_echo "$JTREGEXE" >&6; }
41228     else
41229       # try to find jtreg on path
41230 
41231 
41232 
41233   # Publish this variable in the help.
41234 
41235 
41236   if test "x$JTREGEXE" = x; then
41237     # The variable is not set by user, try to locate tool using the code snippet
41238     for ac_prog in jtreg
41239 do
41240   # Extract the first word of "$ac_prog", so it can be a program name with args.
41241 set dummy $ac_prog; ac_word=$2
41242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41243 $as_echo_n "checking for $ac_word... " >&6; }
41244 if ${ac_cv_path_JTREGEXE+:} false; then :
41245   $as_echo_n "(cached) " >&6
41246 else
41247   case $JTREGEXE in
41248   [\\/]* | ?:[\\/]*)
41249   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41250   ;;
41251   *)
41252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41253 for as_dir in $PATH
41254 do
41255   IFS=$as_save_IFS
41256   test -z "$as_dir" && as_dir=.
41257     for ac_exec_ext in '' $ac_executable_extensions; do
41258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41259     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41261     break 2
41262   fi
41263 done
41264   done
41265 IFS=$as_save_IFS
41266 
41267   ;;
41268 esac
41269 fi
41270 JTREGEXE=$ac_cv_path_JTREGEXE
41271 if test -n "$JTREGEXE"; then
41272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41273 $as_echo "$JTREGEXE" >&6; }
41274 else
41275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41276 $as_echo "no" >&6; }
41277 fi
41278 
41279 
41280   test -n "$JTREGEXE" && break
41281 done
41282 
41283   else
41284     # The variable is set, but is it from the command line or the environment?
41285 
41286     # Try to remove the string !JTREGEXE! from our list.
41287     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41288     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41289       # If it failed, the variable was not from the command line. Ignore it,
41290       # but warn the user (except for BASH, which is always set by the calling BASH).
41291       if test "xJTREGEXE" != xBASH; then
41292         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41293 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41294       fi
41295       # Try to locate tool using the code snippet
41296       for ac_prog in jtreg
41297 do
41298   # Extract the first word of "$ac_prog", so it can be a program name with args.
41299 set dummy $ac_prog; ac_word=$2
41300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41301 $as_echo_n "checking for $ac_word... " >&6; }
41302 if ${ac_cv_path_JTREGEXE+:} false; then :
41303   $as_echo_n "(cached) " >&6
41304 else
41305   case $JTREGEXE in
41306   [\\/]* | ?:[\\/]*)
41307   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41308   ;;
41309   *)
41310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41311 for as_dir in $PATH
41312 do
41313   IFS=$as_save_IFS
41314   test -z "$as_dir" && as_dir=.
41315     for ac_exec_ext in '' $ac_executable_extensions; do
41316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41317     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41319     break 2
41320   fi
41321 done
41322   done
41323 IFS=$as_save_IFS
41324 
41325   ;;
41326 esac
41327 fi
41328 JTREGEXE=$ac_cv_path_JTREGEXE
41329 if test -n "$JTREGEXE"; then
41330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41331 $as_echo "$JTREGEXE" >&6; }
41332 else
41333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41334 $as_echo "no" >&6; }
41335 fi
41336 
41337 
41338   test -n "$JTREGEXE" && break
41339 done
41340 
41341     else
41342       # If it succeeded, then it was overridden by the user. We will use it
41343       # for the tool.
41344 
41345       # First remove it from the list of overridden variables, so we can test
41346       # for unknown variables in the end.
41347       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41348 
41349       # Check if the provided tool contains a complete path.
41350       tool_specified="$JTREGEXE"
41351       tool_basename="${tool_specified##*/}"
41352       if test "x$tool_basename" = "x$tool_specified"; then
41353         # A command without a complete path is provided, search $PATH.
41354         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41355 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41356         # Extract the first word of "$tool_basename", so it can be a program name with args.
41357 set dummy $tool_basename; ac_word=$2
41358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41359 $as_echo_n "checking for $ac_word... " >&6; }
41360 if ${ac_cv_path_JTREGEXE+:} false; then :
41361   $as_echo_n "(cached) " >&6
41362 else
41363   case $JTREGEXE in
41364   [\\/]* | ?:[\\/]*)
41365   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41366   ;;
41367   *)
41368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41369 for as_dir in $PATH
41370 do
41371   IFS=$as_save_IFS
41372   test -z "$as_dir" && as_dir=.
41373     for ac_exec_ext in '' $ac_executable_extensions; do
41374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41375     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41377     break 2
41378   fi
41379 done
41380   done
41381 IFS=$as_save_IFS
41382 
41383   ;;
41384 esac
41385 fi
41386 JTREGEXE=$ac_cv_path_JTREGEXE
41387 if test -n "$JTREGEXE"; then
41388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41389 $as_echo "$JTREGEXE" >&6; }
41390 else
41391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41392 $as_echo "no" >&6; }
41393 fi
41394 
41395 
41396         if test "x$JTREGEXE" = x; then
41397           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41398         fi
41399       else
41400         # Otherwise we believe it is a complete path. Use it as it is.
41401         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41402 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41403         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41404 $as_echo_n "checking for JTREGEXE... " >&6; }
41405         if test ! -x "$tool_specified"; then
41406           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41407 $as_echo "not found" >&6; }
41408           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41409         fi
41410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41411 $as_echo "$tool_specified" >&6; }
41412       fi
41413     fi
41414   fi
41415 
41416 
41417 
41418   if test "x$JTREGEXE" = x; then
41419     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41420   fi
41421 
41422 
41423       JT_HOME="`$DIRNAME $JTREGEXE`"
41424     fi
41425   fi
41426 
41427 
41428 
41429 
41430 
41431 
41432   # Option used to tell the compiler whether to create 32- or 64-bit executables
41433   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41434     COMPILER_TARGET_BITS_FLAG="-q"
41435   else
41436     COMPILER_TARGET_BITS_FLAG="-m"
41437   fi
41438 
41439 
41440   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41441   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41442     ARFLAGS="-r"
41443   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41444     ARFLAGS="-X64"
41445   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41446     # lib.exe is used as AR to create static libraries.
41447     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41448   else
41449     ARFLAGS=""
41450   fi
41451 
41452 
41453   ## Setup strip.
41454   # FIXME: should this really be per platform, or should it be per toolchain type?
41455   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41456   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41457   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41458     STRIPFLAGS="-g"
41459   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41460     STRIPFLAGS="-x"
41461   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41462     STRIPFLAGS="-S"
41463   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41464     STRIPFLAGS="-X32_64"
41465   fi
41466 
41467   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41468     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41469   fi
41470 
41471 
41472   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41473     # FIXME: break out into MCSFLAGS
41474     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41475   fi
41476 
41477 
41478   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41479     CC_OUT_OPTION=-Fo
41480     EXE_OUT_OPTION=-out:
41481     LD_OUT_OPTION=-out:
41482     AR_OUT_OPTION=-out:
41483   else
41484     # The option used to specify the target .o,.a or .so file.
41485     # When compiling, how to specify the to be created object file.
41486     CC_OUT_OPTION='-o$(SPACE)'
41487     # When linking, how to specify the to be created executable.
41488     EXE_OUT_OPTION='-o$(SPACE)'
41489     # When linking, how to specify the to be created dynamically linkable library.
41490     LD_OUT_OPTION='-o$(SPACE)'
41491     # When archiving, how to specify the to be create static archive for object files.
41492     AR_OUT_OPTION='rcs$(SPACE)'
41493   fi
41494 
41495 
41496 
41497 
41498 
41499   # On Windows, we need to set RC flags.
41500   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41501     RC_FLAGS="-nologo -l0x409"
41502     if test "x$VARIANT" = xOPT; then
41503       RC_FLAGS="$RC_FLAGS -DNDEBUG"
41504     fi
41505 
41506     # The version variables used to create RC_FLAGS may be overridden
41507     # in a custom configure script, or possibly the command line.
41508     # Let those variables be expanded at make time in spec.gmk.
41509     # The \$ are escaped to the shell, and the $(...) variables
41510     # are evaluated by make.
41511     RC_FLAGS="$RC_FLAGS \
41512         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41513         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41514         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41515         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41516         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41517         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41518         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41519   fi
41520 
41521 
41522   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41523     # silence copyright notice and other headers.
41524     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41525   fi
41526 
41527   if test "x$SYSROOT" != "x"; then
41528     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41529       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41530         # Solaris Studio does not have a concept of sysroot. Instead we must
41531         # make sure the default include and lib dirs are appended to each
41532         # compile and link command line.
41533         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41534         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41535             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41536             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41537       fi
41538     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41539       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41540       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41541       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41542     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41543       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41544       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41545     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41546       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41547       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41548     fi
41549     # Propagate the sysroot args to hotspot
41550     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41551     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41552     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41553   fi
41554 
41555   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41556   # set this here so it doesn't have to be peppered throughout the forest
41557   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41558     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41559     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41560   fi
41561 
41562 
41563 
41564 
41565 
41566 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41567 
41568 # Now we can test some aspects on the target using configure macros.
41569 
41570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41571 $as_echo_n "checking for ANSI C header files... " >&6; }
41572 if ${ac_cv_header_stdc+:} false; then :
41573   $as_echo_n "(cached) " >&6
41574 else
41575   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41576 /* end confdefs.h.  */
41577 #include <stdlib.h>
41578 #include <stdarg.h>
41579 #include <string.h>
41580 #include <float.h>
41581 
41582 int
41583 main ()
41584 {
41585 
41586   ;
41587   return 0;
41588 }
41589 _ACEOF
41590 if ac_fn_cxx_try_compile "$LINENO"; then :
41591   ac_cv_header_stdc=yes
41592 else
41593   ac_cv_header_stdc=no
41594 fi
41595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41596 
41597 if test $ac_cv_header_stdc = yes; then
41598   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41600 /* end confdefs.h.  */
41601 #include <string.h>
41602 
41603 _ACEOF
41604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41605   $EGREP "memchr" >/dev/null 2>&1; then :
41606 
41607 else
41608   ac_cv_header_stdc=no
41609 fi
41610 rm -f conftest*
41611 
41612 fi
41613 
41614 if test $ac_cv_header_stdc = yes; then
41615   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41617 /* end confdefs.h.  */
41618 #include <stdlib.h>
41619 
41620 _ACEOF
41621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41622   $EGREP "free" >/dev/null 2>&1; then :
41623 
41624 else
41625   ac_cv_header_stdc=no
41626 fi
41627 rm -f conftest*
41628 
41629 fi
41630 
41631 if test $ac_cv_header_stdc = yes; then
41632   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41633   if test "$cross_compiling" = yes; then :
41634   :
41635 else
41636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41637 /* end confdefs.h.  */
41638 #include <ctype.h>
41639 #include <stdlib.h>
41640 #if ((' ' & 0x0FF) == 0x020)
41641 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41642 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41643 #else
41644 # define ISLOWER(c) \
41645                    (('a' <= (c) && (c) <= 'i') \
41646                      || ('j' <= (c) && (c) <= 'r') \
41647                      || ('s' <= (c) && (c) <= 'z'))
41648 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41649 #endif
41650 
41651 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41652 int
41653 main ()
41654 {
41655   int i;
41656   for (i = 0; i < 256; i++)
41657     if (XOR (islower (i), ISLOWER (i))
41658         || toupper (i) != TOUPPER (i))
41659       return 2;
41660   return 0;
41661 }
41662 _ACEOF
41663 if ac_fn_cxx_try_run "$LINENO"; then :
41664 
41665 else
41666   ac_cv_header_stdc=no
41667 fi
41668 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41669   conftest.$ac_objext conftest.beam conftest.$ac_ext
41670 fi
41671 
41672 fi
41673 fi
41674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41675 $as_echo "$ac_cv_header_stdc" >&6; }
41676 if test $ac_cv_header_stdc = yes; then
41677 
41678 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41679 
41680 fi
41681 
41682 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41683 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41684                   inttypes.h stdint.h unistd.h
41685 do :
41686   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41687 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41688 "
41689 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41690   cat >>confdefs.h <<_ACEOF
41691 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41692 _ACEOF
41693 
41694 fi
41695 
41696 done
41697 
41698 
41699 
41700   ###############################################################################
41701   #
41702   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41703   # (The JVM can use 32 or 64 bit Java pointers but that decision
41704   # is made at runtime.)
41705   #
41706 
41707   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41708     # Always specify -m flag on Solaris
41709     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41710 
41711   # When we add flags to the "official" CFLAGS etc, we need to
41712   # keep track of these additions in ADDED_CFLAGS etc. These
41713   # will later be checked to make sure only controlled additions
41714   # have been made to CFLAGS etc.
41715   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41716   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41717   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41718 
41719   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41720   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41721   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41722 
41723   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41724   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41725   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41726 
41727   elif test "x$COMPILE_TYPE" = xreduced; then
41728     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41729       # Specify -m if running reduced on unix platforms
41730 
41731   # When we add flags to the "official" CFLAGS etc, we need to
41732   # keep track of these additions in ADDED_CFLAGS etc. These
41733   # will later be checked to make sure only controlled additions
41734   # have been made to CFLAGS etc.
41735   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41736   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41737   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41738 
41739   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41740   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41741   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41742 
41743   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41744   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41745   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41746 
41747     fi
41748   fi
41749 
41750   # Make compilation sanity check
41751   for ac_header in stdio.h
41752 do :
41753   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41754 if test "x$ac_cv_header_stdio_h" = xyes; then :
41755   cat >>confdefs.h <<_ACEOF
41756 #define HAVE_STDIO_H 1
41757 _ACEOF
41758 
41759 else
41760 
41761     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41762 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41763     if test "x$COMPILE_TYPE" = xreduced; then
41764       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41765 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41766     elif test "x$COMPILE_TYPE" = xcross; then
41767       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41768 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41769     fi
41770     as_fn_error $? "Cannot continue." "$LINENO" 5
41771 
41772 fi
41773 
41774 done
41775 
41776 
41777   # The cast to long int works around a bug in the HP C Compiler
41778 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41779 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41780 # This bug is HP SR number 8606223364.
41781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41782 $as_echo_n "checking size of int *... " >&6; }
41783 if ${ac_cv_sizeof_int_p+:} false; then :
41784   $as_echo_n "(cached) " >&6
41785 else
41786   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41787 
41788 else
41789   if test "$ac_cv_type_int_p" = yes; then
41790      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41791 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41792 as_fn_error 77 "cannot compute sizeof (int *)
41793 See \`config.log' for more details" "$LINENO" 5; }
41794    else
41795      ac_cv_sizeof_int_p=0
41796    fi
41797 fi
41798 
41799 fi
41800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41801 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41802 
41803 
41804 
41805 cat >>confdefs.h <<_ACEOF
41806 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41807 _ACEOF
41808 
41809 
41810 
41811   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41812   if test "x$ac_cv_sizeof_int_p" = x; then
41813     # The test failed, lets stick to the assumed value.
41814     { $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
41815 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41816   else
41817     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41818 
41819     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41820       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41821       # Let's try to implicitely set the compilers target architecture and retry the test
41822       { $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
41823 $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;}
41824       { $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
41825 $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;}
41826 
41827   # When we add flags to the "official" CFLAGS etc, we need to
41828   # keep track of these additions in ADDED_CFLAGS etc. These
41829   # will later be checked to make sure only controlled additions
41830   # have been made to CFLAGS etc.
41831   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41832   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41833   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41834 
41835   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41836   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41837   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41838 
41839   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41840   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41841   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41842 
41843 
41844       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41845       unset ac_cv_sizeof_int_p
41846       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41847       cat >>confdefs.h <<_ACEOF
41848 #undef SIZEOF_INT_P
41849 _ACEOF
41850 
41851       # The cast to long int works around a bug in the HP C Compiler
41852 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41853 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41854 # This bug is HP SR number 8606223364.
41855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41856 $as_echo_n "checking size of int *... " >&6; }
41857 if ${ac_cv_sizeof_int_p+:} false; then :
41858   $as_echo_n "(cached) " >&6
41859 else
41860   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41861 
41862 else
41863   if test "$ac_cv_type_int_p" = yes; then
41864      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41866 as_fn_error 77 "cannot compute sizeof (int *)
41867 See \`config.log' for more details" "$LINENO" 5; }
41868    else
41869      ac_cv_sizeof_int_p=0
41870    fi
41871 fi
41872 
41873 fi
41874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41875 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41876 
41877 
41878 
41879 cat >>confdefs.h <<_ACEOF
41880 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41881 _ACEOF
41882 
41883 
41884 
41885       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41886 
41887       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41888         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
41889       fi
41890     fi
41891   fi
41892 
41893   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41894 $as_echo_n "checking for target address size... " >&6; }
41895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41896 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41897 
41898 
41899   ###############################################################################
41900   #
41901   # Is the target little of big endian?
41902   #
41903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41904 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41905 if ${ac_cv_c_bigendian+:} false; then :
41906   $as_echo_n "(cached) " >&6
41907 else
41908   ac_cv_c_bigendian=unknown
41909     # See if we're dealing with a universal compiler.
41910     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41911 /* end confdefs.h.  */
41912 #ifndef __APPLE_CC__
41913                not a universal capable compiler
41914              #endif
41915              typedef int dummy;
41916 
41917 _ACEOF
41918 if ac_fn_cxx_try_compile "$LINENO"; then :
41919 
41920         # Check for potential -arch flags.  It is not universal unless
41921         # there are at least two -arch flags with different values.
41922         ac_arch=
41923         ac_prev=
41924         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41925          if test -n "$ac_prev"; then
41926            case $ac_word in
41927              i?86 | x86_64 | ppc | ppc64)
41928                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41929                  ac_arch=$ac_word
41930                else
41931                  ac_cv_c_bigendian=universal
41932                  break
41933                fi
41934                ;;
41935            esac
41936            ac_prev=
41937          elif test "x$ac_word" = "x-arch"; then
41938            ac_prev=arch
41939          fi
41940        done
41941 fi
41942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41943     if test $ac_cv_c_bigendian = unknown; then
41944       # See if sys/param.h defines the BYTE_ORDER macro.
41945       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41946 /* end confdefs.h.  */
41947 #include <sys/types.h>
41948              #include <sys/param.h>
41949 
41950 int
41951 main ()
41952 {
41953 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41954                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41955                      && LITTLE_ENDIAN)
41956               bogus endian macros
41957              #endif
41958 
41959   ;
41960   return 0;
41961 }
41962 _ACEOF
41963 if ac_fn_cxx_try_compile "$LINENO"; then :
41964   # It does; now see whether it defined to BIG_ENDIAN or not.
41965          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41966 /* end confdefs.h.  */
41967 #include <sys/types.h>
41968                 #include <sys/param.h>
41969 
41970 int
41971 main ()
41972 {
41973 #if BYTE_ORDER != BIG_ENDIAN
41974                  not big endian
41975                 #endif
41976 
41977   ;
41978   return 0;
41979 }
41980 _ACEOF
41981 if ac_fn_cxx_try_compile "$LINENO"; then :
41982   ac_cv_c_bigendian=yes
41983 else
41984   ac_cv_c_bigendian=no
41985 fi
41986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41987 fi
41988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41989     fi
41990     if test $ac_cv_c_bigendian = unknown; then
41991       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41992       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41993 /* end confdefs.h.  */
41994 #include <limits.h>
41995 
41996 int
41997 main ()
41998 {
41999 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42000               bogus endian macros
42001              #endif
42002 
42003   ;
42004   return 0;
42005 }
42006 _ACEOF
42007 if ac_fn_cxx_try_compile "$LINENO"; then :
42008   # It does; now see whether it defined to _BIG_ENDIAN or not.
42009          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42010 /* end confdefs.h.  */
42011 #include <limits.h>
42012 
42013 int
42014 main ()
42015 {
42016 #ifndef _BIG_ENDIAN
42017                  not big endian
42018                 #endif
42019 
42020   ;
42021   return 0;
42022 }
42023 _ACEOF
42024 if ac_fn_cxx_try_compile "$LINENO"; then :
42025   ac_cv_c_bigendian=yes
42026 else
42027   ac_cv_c_bigendian=no
42028 fi
42029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42030 fi
42031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42032     fi
42033     if test $ac_cv_c_bigendian = unknown; then
42034       # Compile a test program.
42035       if test "$cross_compiling" = yes; then :
42036   # Try to guess by grepping values from an object file.
42037          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42038 /* end confdefs.h.  */
42039 short int ascii_mm[] =
42040                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42041                 short int ascii_ii[] =
42042                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42043                 int use_ascii (int i) {
42044                   return ascii_mm[i] + ascii_ii[i];
42045                 }
42046                 short int ebcdic_ii[] =
42047                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42048                 short int ebcdic_mm[] =
42049                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42050                 int use_ebcdic (int i) {
42051                   return ebcdic_mm[i] + ebcdic_ii[i];
42052                 }
42053                 extern int foo;
42054 
42055 int
42056 main ()
42057 {
42058 return use_ascii (foo) == use_ebcdic (foo);
42059   ;
42060   return 0;
42061 }
42062 _ACEOF
42063 if ac_fn_cxx_try_compile "$LINENO"; then :
42064   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42065               ac_cv_c_bigendian=yes
42066             fi
42067             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42068               if test "$ac_cv_c_bigendian" = unknown; then
42069                 ac_cv_c_bigendian=no
42070               else
42071                 # finding both strings is unlikely to happen, but who knows?
42072                 ac_cv_c_bigendian=unknown
42073               fi
42074             fi
42075 fi
42076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42077 else
42078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42079 /* end confdefs.h.  */
42080 $ac_includes_default
42081 int
42082 main ()
42083 {
42084 
42085              /* Are we little or big endian?  From Harbison&Steele.  */
42086              union
42087              {
42088                long int l;
42089                char c[sizeof (long int)];
42090              } u;
42091              u.l = 1;
42092              return u.c[sizeof (long int) - 1] == 1;
42093 
42094   ;
42095   return 0;
42096 }
42097 _ACEOF
42098 if ac_fn_cxx_try_run "$LINENO"; then :
42099   ac_cv_c_bigendian=no
42100 else
42101   ac_cv_c_bigendian=yes
42102 fi
42103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42104   conftest.$ac_objext conftest.beam conftest.$ac_ext
42105 fi
42106 
42107     fi
42108 fi
42109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42110 $as_echo "$ac_cv_c_bigendian" >&6; }
42111  case $ac_cv_c_bigendian in #(
42112    yes)
42113      ENDIAN="big";; #(
42114    no)
42115      ENDIAN="little" ;; #(
42116    universal)
42117      ENDIAN="universal_endianness"
42118      ;; #(
42119    *)
42120      ENDIAN="unknown" ;;
42121  esac
42122 
42123 
42124   if test "x$ENDIAN" = xuniversal_endianness; then
42125     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42126   fi
42127   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42128     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
42129   fi
42130 
42131 
42132 # Configure flags for the tools
42133 
42134   ###############################################################################
42135   #
42136   # How to compile shared libraries.
42137   #
42138 
42139   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42140     PICFLAG="-fPIC"
42141     C_FLAG_REORDER=''
42142     CXX_FLAG_REORDER=''
42143 
42144     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42145       # Linking is different on MacOSX
42146       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42147       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42148       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42149       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42150       SET_SHARED_LIBRARY_MAPFILE=''
42151     else
42152       # Default works for linux, might work on other platforms as well.
42153       SHARED_LIBRARY_FLAGS='-shared'
42154       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42155       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42156       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42157       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42158     fi
42159   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42160     PICFLAG=''
42161     C_FLAG_REORDER=''
42162     CXX_FLAG_REORDER=''
42163 
42164     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42165       # Linking is different on MacOSX
42166       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42167       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42168       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42169       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42170       SET_SHARED_LIBRARY_MAPFILE=''
42171     else
42172       # Default works for linux, might work on other platforms as well.
42173       SHARED_LIBRARY_FLAGS='-shared'
42174       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42175       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42176       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42177       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42178     fi
42179   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42180     PICFLAG="-KPIC"
42181     C_FLAG_REORDER='-xF'
42182     CXX_FLAG_REORDER='-xF'
42183     SHARED_LIBRARY_FLAGS="-G"
42184     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42185     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42186     SET_SHARED_LIBRARY_NAME=''
42187     SET_SHARED_LIBRARY_MAPFILE='-M$1'
42188   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42189     PICFLAG="-qpic=large"
42190     C_FLAG_REORDER=''
42191     CXX_FLAG_REORDER=''
42192     SHARED_LIBRARY_FLAGS="-qmkshrobj"
42193     SET_EXECUTABLE_ORIGIN=""
42194     SET_SHARED_LIBRARY_ORIGIN=''
42195     SET_SHARED_LIBRARY_NAME=''
42196     SET_SHARED_LIBRARY_MAPFILE=''
42197   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42198     PICFLAG=""
42199     C_FLAG_REORDER=''
42200     CXX_FLAG_REORDER=''
42201     SHARED_LIBRARY_FLAGS="-LD"
42202     SET_EXECUTABLE_ORIGIN=''
42203     SET_SHARED_LIBRARY_ORIGIN=''
42204     SET_SHARED_LIBRARY_NAME=''
42205     SET_SHARED_LIBRARY_MAPFILE=''
42206   fi
42207 
42208 
42209 
42210 
42211 
42212 
42213 
42214 
42215 
42216   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42217     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42218     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42219     CFLAGS_JDKLIB_EXTRA='-xstrconst'
42220   fi
42221   # The (cross) compiler is now configured, we can now test capabilities
42222   # of the target platform.
42223 
42224 
42225 
42226   ###############################################################################
42227   #
42228   # Setup the opt flags for different compilers
42229   # and different operating systems.
42230   #
42231 
42232   # FIXME: this was indirectly the old default, but just inherited.
42233   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42234   #   C_FLAG_DEPS="-MMD -MF"
42235   # fi
42236 
42237   # Generate make dependency files
42238   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42239     C_FLAG_DEPS="-MMD -MF"
42240   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42241     C_FLAG_DEPS="-MMD -MF"
42242   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42243     C_FLAG_DEPS="-xMMD -xMF"
42244   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42245     C_FLAG_DEPS="-qmakedep=gcc -MF"
42246   fi
42247   CXX_FLAG_DEPS="$C_FLAG_DEPS"
42248 
42249 
42250 
42251   # Debug symbols
42252   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42253     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42254       # reduce from default "-g2" option to save space
42255       CFLAGS_DEBUG_SYMBOLS="-g1"
42256       CXXFLAGS_DEBUG_SYMBOLS="-g1"
42257     else
42258       CFLAGS_DEBUG_SYMBOLS="-g"
42259       CXXFLAGS_DEBUG_SYMBOLS="-g"
42260     fi
42261   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42262     CFLAGS_DEBUG_SYMBOLS="-g"
42263     CXXFLAGS_DEBUG_SYMBOLS="-g"
42264   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42265     CFLAGS_DEBUG_SYMBOLS="-g -xs"
42266     # FIXME: likely a bug, this disables debug symbols rather than enables them
42267     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42268   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42269     CFLAGS_DEBUG_SYMBOLS="-g"
42270     CXXFLAGS_DEBUG_SYMBOLS="-g"
42271   fi
42272 
42273 
42274 
42275   # bounds, memory and behavior checking options
42276   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42277     case $DEBUG_LEVEL in
42278     release )
42279       # no adjustment
42280       ;;
42281     fastdebug )
42282       # no adjustment
42283       ;;
42284     slowdebug )
42285       # Add runtime stack smashing and undefined behavior checks
42286       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42287       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42288       ;;
42289     esac
42290   fi
42291 
42292 
42293 
42294   # Optimization levels
42295   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42296     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42297 
42298     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42299       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42300       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42301       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42302       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42303       C_O_FLAG_DEBUG="-xregs=no%frameptr"
42304       C_O_FLAG_NONE="-xregs=no%frameptr"
42305       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42306       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42307       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42308       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42309       CXX_O_FLAG_NONE="-xregs=no%frameptr"
42310       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42311         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42312         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42313       fi
42314     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42315       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42316       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42317       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42318       C_O_FLAG_DEBUG=""
42319       C_O_FLAG_NONE=""
42320       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42321       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42322       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42323       C_O_FLAG_DEBUG=""
42324       CXX_O_FLAG_NONE=""
42325     fi
42326   else
42327     # The remaining toolchains share opt flags between CC and CXX;
42328     # setup for C and duplicate afterwards.
42329     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42330       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42331         # On MacOSX we optimize for size, something
42332         # we should do for all platforms?
42333         C_O_FLAG_HIGHEST="-Os"
42334         C_O_FLAG_HI="-Os"
42335         C_O_FLAG_NORM="-Os"
42336       else
42337         C_O_FLAG_HIGHEST="-O3"
42338         C_O_FLAG_HI="-O3"
42339         C_O_FLAG_NORM="-O2"
42340       fi
42341       C_O_FLAG_DEBUG="-O0"
42342       C_O_FLAG_NONE="-O0"
42343     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42344       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42345         # On MacOSX we optimize for size, something
42346         # we should do for all platforms?
42347         C_O_FLAG_HIGHEST="-Os"
42348         C_O_FLAG_HI="-Os"
42349         C_O_FLAG_NORM="-Os"
42350       else
42351         C_O_FLAG_HIGHEST="-O3"
42352         C_O_FLAG_HI="-O3"
42353         C_O_FLAG_NORM="-O2"
42354       fi
42355       C_O_FLAG_DEBUG="-O0"
42356       C_O_FLAG_NONE="-O0"
42357     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42358       C_O_FLAG_HIGHEST="-O3"
42359       C_O_FLAG_HI="-O3 -qstrict"
42360       C_O_FLAG_NORM="-O2"
42361       C_O_FLAG_DEBUG="-qnoopt"
42362       C_O_FLAG_NONE="-qnoop"
42363     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42364       C_O_FLAG_HIGHEST="-O2"
42365       C_O_FLAG_HI="-O1"
42366       C_O_FLAG_NORM="-O1"
42367       C_O_FLAG_DEBUG="-Od"
42368       C_O_FLAG_NONE="-Od"
42369     fi
42370     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42371     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42372     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42373     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42374     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42375   fi
42376 
42377   # Adjust optimization flags according to debug level.
42378   case $DEBUG_LEVEL in
42379     release )
42380       # no adjustment
42381       ;;
42382     fastdebug )
42383       # Not quite so much optimization
42384       C_O_FLAG_HI="$C_O_FLAG_NORM"
42385       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42386       ;;
42387     slowdebug )
42388       # Disable optimization
42389       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42390       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42391       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42392       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42393       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42394       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42395       ;;
42396   esac
42397 
42398 
42399 
42400 
42401 
42402 
42403 
42404 
42405 
42406 
42407 
42408 
42409 
42410   # Special extras...
42411   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42412     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42413       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42414       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42415     fi
42416     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42417     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42418   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42419     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42420     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42421   fi
42422 
42423   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42424     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42425 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42426   fi
42427 
42428   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42429     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42430 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42431   fi
42432 
42433   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42434     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42435 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42436   fi
42437 
42438 
42439 # Check whether --with-extra-cflags was given.
42440 if test "${with_extra_cflags+set}" = set; then :
42441   withval=$with_extra_cflags;
42442 fi
42443 
42444 
42445 
42446 # Check whether --with-extra-cxxflags was given.
42447 if test "${with_extra_cxxflags+set}" = set; then :
42448   withval=$with_extra_cxxflags;
42449 fi
42450 
42451 
42452 
42453 # Check whether --with-extra-ldflags was given.
42454 if test "${with_extra_ldflags+set}" = set; then :
42455   withval=$with_extra_ldflags;
42456 fi
42457 
42458 
42459   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42460   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42461   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42462 
42463   # Hotspot needs these set in their legacy form
42464   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42465   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42466   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42467 
42468 
42469 
42470 
42471 
42472   ###############################################################################
42473   #
42474   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42475   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42476   #
42477 
42478   # Setup compiler/platform specific flags into
42479   #    CFLAGS_JDK    - C Compiler flags
42480   #    CXXFLAGS_JDK  - C++ Compiler flags
42481   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42482   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42483     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42484         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42485     case $OPENJDK_TARGET_CPU_ARCH in
42486       arm )
42487         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42488         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42489         ;;
42490       ppc )
42491         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42492         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42493         ;;
42494       * )
42495         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42496         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42497         ;;
42498     esac
42499   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42500     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42501     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42502       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42503     fi
42504 
42505     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42506     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42507   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42508     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42509     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42510   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42511     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42512         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42513         -DWIN32_LEAN_AND_MEAN \
42514         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42515         -DWIN32 -DIAL"
42516     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42517       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42518     else
42519       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42520     fi
42521     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42522     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42523     # studio.
42524     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42525       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42526           -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42527     fi
42528   fi
42529 
42530   ###############################################################################
42531 
42532   # Adjust flags according to debug level.
42533   case $DEBUG_LEVEL in
42534     fastdebug | slowdebug )
42535       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42536       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42537       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42538       ;;
42539     release )
42540       ;;
42541     * )
42542       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42543       ;;
42544   esac
42545 
42546   # Setup LP64
42547   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42548 
42549   # Set some common defines. These works for all compilers, but assume
42550   # -D is universally accepted.
42551 
42552   # Setup endianness
42553   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42554     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42555     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42556     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42557     #   Note: -Dmacro         is the same as    #define macro 1
42558     #         -Dmacro=        is the same as    #define macro
42559     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42560       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42561     else
42562       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42563     fi
42564   else
42565     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42566     # are defined in the system?
42567     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42568       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42569     else
42570       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42571     fi
42572   fi
42573 
42574   # Setup target OS define. Use OS target name but in upper case.
42575   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42576   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42577 
42578   # Setup target CPU
42579   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42580 
42581   # Setup debug/release defines
42582   if test "x$DEBUG_LEVEL" = xrelease; then
42583     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42584     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42585       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42586     fi
42587   else
42588     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42589   fi
42590 
42591   # Setup release name
42592   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42593 
42594 
42595   # Set some additional per-OS defines.
42596   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42597     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42598   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42599     # FIXME: PPC64 should not be here.
42600     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42601   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42602     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42603   fi
42604 
42605   # Additional macosx handling
42606   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42607     # Setting these parameters makes it an error to link to macosx APIs that are
42608     # newer than the given OS version and makes the linked binaries compatible
42609     # even if built on a newer version of the OS.
42610     # The expected format is X.Y.Z
42611     MACOSX_VERSION_MIN=10.7.0
42612 
42613 
42614     # The macro takes the version with no dots, ex: 1070
42615     # Let the flags variables get resolved in make for easier override on make
42616     # command line.
42617     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42618     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42619   fi
42620 
42621   # Setup some hard coded includes
42622   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42623       -I${JDK_TOPDIR}/src/java.base/share/native/include \
42624       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42625       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42626 
42627   # The shared libraries are compiled using the picflag.
42628   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42629   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42630 
42631   # Executable flags
42632   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42633   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42634 
42635 
42636 
42637 
42638 
42639 
42640   # Flags for compiling test libraries
42641   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42642   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42643 
42644   # Flags for compiling test executables
42645   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42646   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42647 
42648 
42649 
42650 
42651 
42652 
42653   # Setup LDFLAGS et al.
42654   #
42655 
42656   # Now this is odd. The JDK native libraries have to link against libjvm.so
42657   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42658   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42659   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42660   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42661   # libraries will link to whatever is in memory. Yuck.
42662   #
42663   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42664   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42665     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42666     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42667       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42668     fi
42669     # TODO: make -debug optional "--disable-full-debug-symbols"
42670     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42671   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42672     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42673     # We have previously set HAS_GNU_HASH if this is the case
42674     if test -n "$HAS_GNU_HASH"; then
42675       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42676     fi
42677     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42678       # And since we now know that the linker is gnu, then add -z defs, to forbid
42679       # undefined symbols in object files.
42680       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42681       case $DEBUG_LEVEL in
42682         release )
42683           # tell linker to optimize libraries.
42684           # Should this be supplied to the OSS linker as well?
42685           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42686           ;;
42687         slowdebug )
42688           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42689             # do relocations at load
42690             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42691             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42692           fi
42693           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42694             # mark relocations read only
42695             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42696             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42697           fi
42698           ;;
42699         fastdebug )
42700           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42701             # mark relocations read only
42702             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42703             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42704           fi
42705           ;;
42706         * )
42707           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42708           ;;
42709         esac
42710     fi
42711   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42712     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42713     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42714   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42715     LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42716   fi
42717 
42718   # Customize LDFLAGS for executables
42719 
42720   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42721 
42722   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42723     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42724       LDFLAGS_STACK_SIZE=1048576
42725     else
42726       LDFLAGS_STACK_SIZE=327680
42727     fi
42728     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42729   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42730     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42731   fi
42732 
42733   # Customize LDFLAGS for libs
42734   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42735 
42736   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42737     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42738     LDFLAGS_JDKLIB_SUFFIX=""
42739   else
42740     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42741         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42742 
42743     # On some platforms (mac) the linker warns about non existing -L dirs.
42744     # Add server first if available. Linking aginst client does not always produce the same results.
42745     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42746     # Default to server for other variants.
42747     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42748       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42749     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42750       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42751     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42752       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42753     else
42754       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42755     fi
42756 
42757     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42758     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42759       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42760     fi
42761   fi
42762 
42763 
42764 
42765 
42766 
42767 
42768 
42769   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42770   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42771   LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42772   LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42773 
42774 
42775 
42776 
42777 
42778 
42779 
42780   # Some Zero and Shark settings.
42781   # ZERO_ARCHFLAG tells the compiler which mode to build for
42782   case "${OPENJDK_TARGET_CPU}" in
42783     s390)
42784       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42785       ;;
42786     *)
42787       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42788   esac
42789 
42790   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42791 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42792   supports=yes
42793 
42794   saved_cflags="$CFLAGS"
42795   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42796   ac_ext=c
42797 ac_cpp='$CPP $CPPFLAGS'
42798 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42799 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42800 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42801 
42802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42803 /* end confdefs.h.  */
42804 int i;
42805 _ACEOF
42806 if ac_fn_c_try_compile "$LINENO"; then :
42807 
42808 else
42809   supports=no
42810 fi
42811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42812   ac_ext=cpp
42813 ac_cpp='$CXXCPP $CPPFLAGS'
42814 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42815 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42816 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42817 
42818   CFLAGS="$saved_cflags"
42819 
42820   saved_cxxflags="$CXXFLAGS"
42821   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42822   ac_ext=cpp
42823 ac_cpp='$CXXCPP $CPPFLAGS'
42824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42827 
42828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42829 /* end confdefs.h.  */
42830 int i;
42831 _ACEOF
42832 if ac_fn_cxx_try_compile "$LINENO"; then :
42833 
42834 else
42835   supports=no
42836 fi
42837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42838   ac_ext=cpp
42839 ac_cpp='$CXXCPP $CPPFLAGS'
42840 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42841 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42842 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42843 
42844   CXXFLAGS="$saved_cxxflags"
42845 
42846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42847 $as_echo "$supports" >&6; }
42848   if test "x$supports" = "xyes" ; then
42849     :
42850   else
42851     ZERO_ARCHFLAG=""
42852   fi
42853 
42854 
42855 
42856   # Check that the compiler supports -mX (or -qX on AIX) flags
42857   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42858 
42859   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42860 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42861   supports=yes
42862 
42863   saved_cflags="$CFLAGS"
42864   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42865   ac_ext=c
42866 ac_cpp='$CPP $CPPFLAGS'
42867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42870 
42871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42872 /* end confdefs.h.  */
42873 int i;
42874 _ACEOF
42875 if ac_fn_c_try_compile "$LINENO"; then :
42876 
42877 else
42878   supports=no
42879 fi
42880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42881   ac_ext=cpp
42882 ac_cpp='$CXXCPP $CPPFLAGS'
42883 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42884 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42885 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42886 
42887   CFLAGS="$saved_cflags"
42888 
42889   saved_cxxflags="$CXXFLAGS"
42890   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42891   ac_ext=cpp
42892 ac_cpp='$CXXCPP $CPPFLAGS'
42893 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42894 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42895 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42896 
42897   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42898 /* end confdefs.h.  */
42899 int i;
42900 _ACEOF
42901 if ac_fn_cxx_try_compile "$LINENO"; then :
42902 
42903 else
42904   supports=no
42905 fi
42906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42907   ac_ext=cpp
42908 ac_cpp='$CXXCPP $CPPFLAGS'
42909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42912 
42913   CXXFLAGS="$saved_cxxflags"
42914 
42915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42916 $as_echo "$supports" >&6; }
42917   if test "x$supports" = "xyes" ; then
42918     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42919   else
42920     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42921   fi
42922 
42923 
42924 
42925   case "${TOOLCHAIN_TYPE}" in
42926     microsoft)
42927       DISABLE_WARNING_PREFIX="-wd"
42928       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42929       ;;
42930     solstudio)
42931       DISABLE_WARNING_PREFIX="-erroff="
42932       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42933       ;;
42934     gcc)
42935       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42936 
42937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42938 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42939   supports=yes
42940 
42941   saved_cflags="$CFLAGS"
42942   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42943   ac_ext=c
42944 ac_cpp='$CPP $CPPFLAGS'
42945 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42946 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42947 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42948 
42949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42950 /* end confdefs.h.  */
42951 int i;
42952 _ACEOF
42953 if ac_fn_c_try_compile "$LINENO"; then :
42954 
42955 else
42956   supports=no
42957 fi
42958 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42959   ac_ext=cpp
42960 ac_cpp='$CXXCPP $CPPFLAGS'
42961 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42962 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42963 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42964 
42965   CFLAGS="$saved_cflags"
42966 
42967   saved_cxxflags="$CXXFLAGS"
42968   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42969   ac_ext=cpp
42970 ac_cpp='$CXXCPP $CPPFLAGS'
42971 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42972 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42973 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42974 
42975   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42976 /* end confdefs.h.  */
42977 int i;
42978 _ACEOF
42979 if ac_fn_cxx_try_compile "$LINENO"; then :
42980 
42981 else
42982   supports=no
42983 fi
42984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42985   ac_ext=cpp
42986 ac_cpp='$CXXCPP $CPPFLAGS'
42987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42990 
42991   CXXFLAGS="$saved_cxxflags"
42992 
42993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42994 $as_echo "$supports" >&6; }
42995   if test "x$supports" = "xyes" ; then
42996     GCC_CAN_DISABLE_WARNINGS=true
42997   else
42998     GCC_CAN_DISABLE_WARNINGS=false
42999 
43000   fi
43001 
43002       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43003         DISABLE_WARNING_PREFIX="-Wno-"
43004       else
43005         DISABLE_WARNING_PREFIX=
43006       fi
43007       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43008       ;;
43009     clang)
43010       DISABLE_WARNING_PREFIX="-Wno-"
43011       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43012       ;;
43013   esac
43014 
43015 
43016 
43017 
43018 # Setup debug symbols (need objcopy from the toolchain for that)
43019 
43020   #
43021   # ENABLE_DEBUG_SYMBOLS
43022   # This must be done after the toolchain is setup, since we're looking at objcopy.
43023   #
43024   # Check whether --enable-debug-symbols was given.
43025 if test "${enable_debug_symbols+set}" = set; then :
43026   enableval=$enable_debug_symbols;
43027 fi
43028 
43029 
43030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43031 $as_echo_n "checking if we should generate debug symbols... " >&6; }
43032 
43033   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43034     # explicit enabling of enable-debug-symbols and can't find objcopy
43035     #   this is an error
43036     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43037   fi
43038 
43039   if test "x$enable_debug_symbols" = "xyes"; then
43040     ENABLE_DEBUG_SYMBOLS=true
43041   elif test "x$enable_debug_symbols" = "xno"; then
43042     ENABLE_DEBUG_SYMBOLS=false
43043   else
43044     # Default is on if objcopy is found
43045     if test "x$OBJCOPY" != x; then
43046       ENABLE_DEBUG_SYMBOLS=true
43047     # MacOS X and Windows don't use objcopy but default is on for those OSes
43048     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43049       ENABLE_DEBUG_SYMBOLS=true
43050     else
43051       ENABLE_DEBUG_SYMBOLS=false
43052     fi
43053   fi
43054 
43055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43056 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43057 
43058   #
43059   # ZIP_DEBUGINFO_FILES
43060   #
43061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43062 $as_echo_n "checking if we should zip debug-info files... " >&6; }
43063   # Check whether --enable-zip-debug-info was given.
43064 if test "${enable_zip_debug_info+set}" = set; then :
43065   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43066 else
43067   enable_zip_debug_info="yes"
43068 fi
43069 
43070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43071 $as_echo "${enable_zip_debug_info}" >&6; }
43072 
43073   if test "x${enable_zip_debug_info}" = "xno"; then
43074     ZIP_DEBUGINFO_FILES=false
43075   else
43076     ZIP_DEBUGINFO_FILES=true
43077   fi
43078 
43079 
43080 
43081 
43082 
43083   # Check whether --enable-native-coverage was given.
43084 if test "${enable_native_coverage+set}" = set; then :
43085   enableval=$enable_native_coverage;
43086 fi
43087 
43088   GCOV_ENABLED="false"
43089   if test "x$enable_native_coverage" = "xyes"; then
43090     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43091       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43092 $as_echo_n "checking if native coverage is enabled... " >&6; }
43093       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43094 $as_echo "yes" >&6; }
43095       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43096       GCOV_LDFLAGS="-fprofile-arcs"
43097       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43098       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43099       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43100       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43101       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43102       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43103       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43104       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43105       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43106       GCOV_ENABLED="true"
43107     else
43108       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43109     fi
43110   elif test "x$enable_native_coverage" = "xno"; then
43111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43112 $as_echo_n "checking if native coverage is enabled... " >&6; }
43113     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43114 $as_echo "no" >&6; }
43115   elif test "x$enable_native_coverage" != "x"; then
43116     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43117   fi
43118 
43119 
43120 
43121 
43122 ###############################################################################
43123 #
43124 # Check dependencies for external and internal libraries.
43125 #
43126 ###############################################################################
43127 
43128 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43129 
43130   # When using cygwin or msys, we need a wrapper binary that renames
43131   # /cygdrive/c/ arguments into c:/ arguments and peeks into
43132   # @files and rewrites these too! This wrapper binary is
43133   # called fixpath.
43134   FIXPATH=
43135   if test "x$OPENJDK_BUILD_OS" = xwindows; then
43136     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43137 $as_echo_n "checking if fixpath can be created... " >&6; }
43138     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43139     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43140     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43141       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43142       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43143       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43144       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43145     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43146       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43147       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43148 
43149       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43150       # @ was chosen as separator to minimize risk of other tools messing around with it
43151       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43152       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43153 
43154       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43155     fi
43156     rm -f $OUTPUT_ROOT/fixpath*
43157     cd $OUTPUT_ROOT
43158     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43159     cd $CURDIR
43160 
43161     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43162       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43163 $as_echo "no" >&6; }
43164       cat $OUTPUT_ROOT/fixpath1.log
43165       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43166     fi
43167     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43168 $as_echo "yes" >&6; }
43169     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43170 $as_echo_n "checking if fixpath.exe works... " >&6; }
43171     cd $OUTPUT_ROOT
43172     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43173     cd $CURDIR
43174     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43175       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43176 $as_echo "no" >&6; }
43177       cat $OUTPUT_ROOT/fixpath2.log
43178       as_fn_error $? "fixpath did not work!" "$LINENO" 5
43179     fi
43180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43181 $as_echo "yes" >&6; }
43182     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43183   fi
43184 
43185 
43186 
43187 
43188 
43189 
43190   ###############################################################################
43191   #
43192   # OS specific settings that we never will need to probe.
43193   #
43194   if test "x$OPENJDK_TARGET_OS" = xlinux; then
43195     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43196 $as_echo_n "checking what is not needed on Linux?... " >&6; }
43197     PULSE_NOT_NEEDED=yes
43198     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43199 $as_echo "pulse" >&6; }
43200   fi
43201 
43202   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43204 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
43205     ALSA_NOT_NEEDED=yes
43206     PULSE_NOT_NEEDED=yes
43207     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43208 $as_echo "alsa pulse" >&6; }
43209   fi
43210 
43211   if test "x$OPENJDK_TARGET_OS" = xaix; then
43212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43213 $as_echo_n "checking what is not needed on AIX?... " >&6; }
43214     ALSA_NOT_NEEDED=yes
43215     PULSE_NOT_NEEDED=yes
43216     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43217 $as_echo "alsa pulse" >&6; }
43218   fi
43219 
43220 
43221   if test "x$OPENJDK_TARGET_OS" = xwindows; then
43222     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43223 $as_echo_n "checking what is not needed on Windows?... " >&6; }
43224     CUPS_NOT_NEEDED=yes
43225     ALSA_NOT_NEEDED=yes
43226     PULSE_NOT_NEEDED=yes
43227     X11_NOT_NEEDED=yes
43228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43229 $as_echo "alsa cups pulse x11" >&6; }
43230   fi
43231 
43232   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43234 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43235     ALSA_NOT_NEEDED=yes
43236     PULSE_NOT_NEEDED=yes
43237     X11_NOT_NEEDED=yes
43238     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43239 $as_echo "alsa pulse x11" >&6; }
43240   fi
43241 
43242   if test "x$OPENJDK_TARGET_OS" = xbsd; then
43243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43244 $as_echo_n "checking what is not needed on bsd?... " >&6; }
43245     ALSA_NOT_NEEDED=yes
43246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43247 $as_echo "alsa" >&6; }
43248   fi
43249 
43250   if test "x$OPENJDK" = "xfalse"; then
43251     FREETYPE_NOT_NEEDED=yes
43252   fi
43253 
43254   if test "x$SUPPORT_HEADFUL" = xno; then
43255     X11_NOT_NEEDED=yes
43256   fi
43257 
43258 
43259 
43260   ###############################################################################
43261   #
43262   # Check for X Windows
43263   #
43264 
43265   if test "x$X11_NOT_NEEDED" = xyes; then
43266     if test "x${with_x}" != x; then
43267       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43268 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43269     fi
43270     X_CFLAGS=
43271     X_LIBS=
43272   else
43273     # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43274     # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43275     # --x-libraries for the sysroot, if that seems to be correct.
43276     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43277       if test "x$SYSROOT" != "x"; then
43278         if test "x$x_includes" = xNONE; then
43279           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43280             x_includes="$SYSROOT/usr/X11R6/include"
43281           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43282             x_includes="$SYSROOT/usr/include"
43283           fi
43284         fi
43285         if test "x$x_libraries" = xNONE; then
43286           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43287             x_libraries="$SYSROOT/usr/X11R6/lib"
43288           elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43289             x_libraries="$SYSROOT/usr/lib64"
43290           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43291             x_libraries="$SYSROOT/usr/lib"
43292           fi
43293         fi
43294       fi
43295     fi
43296 
43297     # Now let autoconf do it's magic
43298     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43299 $as_echo_n "checking for X... " >&6; }
43300 
43301 
43302 # Check whether --with-x was given.
43303 if test "${with_x+set}" = set; then :
43304   withval=$with_x;
43305 fi
43306 
43307 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43308 if test "x$with_x" = xno; then
43309   # The user explicitly disabled X.
43310   have_x=disabled
43311 else
43312   case $x_includes,$x_libraries in #(
43313     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43314     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43315   $as_echo_n "(cached) " >&6
43316 else
43317   # One or both of the vars are not set, and there is no cached value.
43318 ac_x_includes=no ac_x_libraries=no
43319 rm -f -r conftest.dir
43320 if mkdir conftest.dir; then
43321   cd conftest.dir
43322   cat >Imakefile <<'_ACEOF'
43323 incroot:
43324         @echo incroot='${INCROOT}'
43325 usrlibdir:
43326         @echo usrlibdir='${USRLIBDIR}'
43327 libdir:
43328         @echo libdir='${LIBDIR}'
43329 _ACEOF
43330   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43331     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43332     for ac_var in incroot usrlibdir libdir; do
43333       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43334     done
43335     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43336     for ac_extension in a so sl dylib la dll; do
43337       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43338          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43339         ac_im_usrlibdir=$ac_im_libdir; break
43340       fi
43341     done
43342     # Screen out bogus values from the imake configuration.  They are
43343     # bogus both because they are the default anyway, and because
43344     # using them would break gcc on systems where it needs fixed includes.
43345     case $ac_im_incroot in
43346         /usr/include) ac_x_includes= ;;
43347         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43348     esac
43349     case $ac_im_usrlibdir in
43350         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43351         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43352     esac
43353   fi
43354   cd ..
43355   rm -f -r conftest.dir
43356 fi
43357 
43358 # Standard set of common directories for X headers.
43359 # Check X11 before X11Rn because it is often a symlink to the current release.
43360 ac_x_header_dirs='
43361 /usr/X11/include
43362 /usr/X11R7/include
43363 /usr/X11R6/include
43364 /usr/X11R5/include
43365 /usr/X11R4/include
43366 
43367 /usr/include/X11
43368 /usr/include/X11R7
43369 /usr/include/X11R6
43370 /usr/include/X11R5
43371 /usr/include/X11R4
43372 
43373 /usr/local/X11/include
43374 /usr/local/X11R7/include
43375 /usr/local/X11R6/include
43376 /usr/local/X11R5/include
43377 /usr/local/X11R4/include
43378 
43379 /usr/local/include/X11
43380 /usr/local/include/X11R7
43381 /usr/local/include/X11R6
43382 /usr/local/include/X11R5
43383 /usr/local/include/X11R4
43384 
43385 /usr/X386/include
43386 /usr/x386/include
43387 /usr/XFree86/include/X11
43388 
43389 /usr/include
43390 /usr/local/include
43391 /usr/unsupported/include
43392 /usr/athena/include
43393 /usr/local/x11r5/include
43394 /usr/lpp/Xamples/include
43395 
43396 /usr/openwin/include
43397 /usr/openwin/share/include'
43398 
43399 if test "$ac_x_includes" = no; then
43400   # Guess where to find include files, by looking for Xlib.h.
43401   # First, try using that file with no special directory specified.
43402   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43403 /* end confdefs.h.  */
43404 #include <X11/Xlib.h>
43405 _ACEOF
43406 if ac_fn_cxx_try_cpp "$LINENO"; then :
43407   # We can compile using X headers with no special include directory.
43408 ac_x_includes=
43409 else
43410   for ac_dir in $ac_x_header_dirs; do
43411   if test -r "$ac_dir/X11/Xlib.h"; then
43412     ac_x_includes=$ac_dir
43413     break
43414   fi
43415 done
43416 fi
43417 rm -f conftest.err conftest.i conftest.$ac_ext
43418 fi # $ac_x_includes = no
43419 
43420 if test "$ac_x_libraries" = no; then
43421   # Check for the libraries.
43422   # See if we find them without any special options.
43423   # Don't add to $LIBS permanently.
43424   ac_save_LIBS=$LIBS
43425   LIBS="-lX11 $LIBS"
43426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43427 /* end confdefs.h.  */
43428 #include <X11/Xlib.h>
43429 int
43430 main ()
43431 {
43432 XrmInitialize ()
43433   ;
43434   return 0;
43435 }
43436 _ACEOF
43437 if ac_fn_cxx_try_link "$LINENO"; then :
43438   LIBS=$ac_save_LIBS
43439 # We can link X programs with no special library path.
43440 ac_x_libraries=
43441 else
43442   LIBS=$ac_save_LIBS
43443 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43444 do
43445   # Don't even attempt the hair of trying to link an X program!
43446   for ac_extension in a so sl dylib la dll; do
43447     if test -r "$ac_dir/libX11.$ac_extension"; then
43448       ac_x_libraries=$ac_dir
43449       break 2
43450     fi
43451   done
43452 done
43453 fi
43454 rm -f core conftest.err conftest.$ac_objext \
43455     conftest$ac_exeext conftest.$ac_ext
43456 fi # $ac_x_libraries = no
43457 
43458 case $ac_x_includes,$ac_x_libraries in #(
43459   no,* | *,no | *\'*)
43460     # Didn't find X, or a directory has "'" in its name.
43461     ac_cv_have_x="have_x=no";; #(
43462   *)
43463     # Record where we found X for the cache.
43464     ac_cv_have_x="have_x=yes\
43465         ac_x_includes='$ac_x_includes'\
43466         ac_x_libraries='$ac_x_libraries'"
43467 esac
43468 fi
43469 ;; #(
43470     *) have_x=yes;;
43471   esac
43472   eval "$ac_cv_have_x"
43473 fi # $with_x != no
43474 
43475 if test "$have_x" != yes; then
43476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43477 $as_echo "$have_x" >&6; }
43478   no_x=yes
43479 else
43480   # If each of the values was on the command line, it overrides each guess.
43481   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43482   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43483   # Update the cache value to reflect the command line values.
43484   ac_cv_have_x="have_x=yes\
43485         ac_x_includes='$x_includes'\
43486         ac_x_libraries='$x_libraries'"
43487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43488 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43489 fi
43490 
43491     if test "$no_x" = yes; then
43492   # Not all programs may use this symbol, but it does not hurt to define it.
43493 
43494 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43495 
43496   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43497 else
43498   if test -n "$x_includes"; then
43499     X_CFLAGS="$X_CFLAGS -I$x_includes"
43500   fi
43501 
43502   # It would also be nice to do this for all -L options, not just this one.
43503   if test -n "$x_libraries"; then
43504     X_LIBS="$X_LIBS -L$x_libraries"
43505     # For Solaris; some versions of Sun CC require a space after -R and
43506     # others require no space.  Words are not sufficient . . . .
43507     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43508 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43509     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43510     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43511     ac_cxx_werror_flag=yes
43512     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43513 /* end confdefs.h.  */
43514 
43515 int
43516 main ()
43517 {
43518 
43519   ;
43520   return 0;
43521 }
43522 _ACEOF
43523 if ac_fn_cxx_try_link "$LINENO"; then :
43524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43525 $as_echo "no" >&6; }
43526        X_LIBS="$X_LIBS -R$x_libraries"
43527 else
43528   LIBS="$ac_xsave_LIBS -R $x_libraries"
43529        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43530 /* end confdefs.h.  */
43531 
43532 int
43533 main ()
43534 {
43535 
43536   ;
43537   return 0;
43538 }
43539 _ACEOF
43540 if ac_fn_cxx_try_link "$LINENO"; then :
43541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43542 $as_echo "yes" >&6; }
43543           X_LIBS="$X_LIBS -R $x_libraries"
43544 else
43545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43546 $as_echo "neither works" >&6; }
43547 fi
43548 rm -f core conftest.err conftest.$ac_objext \
43549     conftest$ac_exeext conftest.$ac_ext
43550 fi
43551 rm -f core conftest.err conftest.$ac_objext \
43552     conftest$ac_exeext conftest.$ac_ext
43553     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43554     LIBS=$ac_xsave_LIBS
43555   fi
43556 
43557   # Check for system-dependent libraries X programs must link with.
43558   # Do this before checking for the system-independent R6 libraries
43559   # (-lICE), since we may need -lsocket or whatever for X linking.
43560 
43561   if test "$ISC" = yes; then
43562     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43563   else
43564     # Martyn Johnson says this is needed for Ultrix, if the X
43565     # libraries were built with DECnet support.  And Karl Berry says
43566     # the Alpha needs dnet_stub (dnet does not exist).
43567     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43568     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43569 /* end confdefs.h.  */
43570 
43571 /* Override any GCC internal prototype to avoid an error.
43572    Use char because int might match the return type of a GCC
43573    builtin and then its argument prototype would still apply.  */
43574 #ifdef __cplusplus
43575 extern "C"
43576 #endif
43577 char XOpenDisplay ();
43578 int
43579 main ()
43580 {
43581 return XOpenDisplay ();
43582   ;
43583   return 0;
43584 }
43585 _ACEOF
43586 if ac_fn_cxx_try_link "$LINENO"; then :
43587 
43588 else
43589   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43590 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43591 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43592   $as_echo_n "(cached) " >&6
43593 else
43594   ac_check_lib_save_LIBS=$LIBS
43595 LIBS="-ldnet  $LIBS"
43596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43597 /* end confdefs.h.  */
43598 
43599 /* Override any GCC internal prototype to avoid an error.
43600    Use char because int might match the return type of a GCC
43601    builtin and then its argument prototype would still apply.  */
43602 #ifdef __cplusplus
43603 extern "C"
43604 #endif
43605 char dnet_ntoa ();
43606 int
43607 main ()
43608 {
43609 return dnet_ntoa ();
43610   ;
43611   return 0;
43612 }
43613 _ACEOF
43614 if ac_fn_cxx_try_link "$LINENO"; then :
43615   ac_cv_lib_dnet_dnet_ntoa=yes
43616 else
43617   ac_cv_lib_dnet_dnet_ntoa=no
43618 fi
43619 rm -f core conftest.err conftest.$ac_objext \
43620     conftest$ac_exeext conftest.$ac_ext
43621 LIBS=$ac_check_lib_save_LIBS
43622 fi
43623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43624 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43625 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43626   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43627 fi
43628 
43629     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43630       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43631 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43632 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43633   $as_echo_n "(cached) " >&6
43634 else
43635   ac_check_lib_save_LIBS=$LIBS
43636 LIBS="-ldnet_stub  $LIBS"
43637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43638 /* end confdefs.h.  */
43639 
43640 /* Override any GCC internal prototype to avoid an error.
43641    Use char because int might match the return type of a GCC
43642    builtin and then its argument prototype would still apply.  */
43643 #ifdef __cplusplus
43644 extern "C"
43645 #endif
43646 char dnet_ntoa ();
43647 int
43648 main ()
43649 {
43650 return dnet_ntoa ();
43651   ;
43652   return 0;
43653 }
43654 _ACEOF
43655 if ac_fn_cxx_try_link "$LINENO"; then :
43656   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43657 else
43658   ac_cv_lib_dnet_stub_dnet_ntoa=no
43659 fi
43660 rm -f core conftest.err conftest.$ac_objext \
43661     conftest$ac_exeext conftest.$ac_ext
43662 LIBS=$ac_check_lib_save_LIBS
43663 fi
43664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43665 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43666 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43667   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43668 fi
43669 
43670     fi
43671 fi
43672 rm -f core conftest.err conftest.$ac_objext \
43673     conftest$ac_exeext conftest.$ac_ext
43674     LIBS="$ac_xsave_LIBS"
43675 
43676     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43677     # to get the SysV transport functions.
43678     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43679     # needs -lnsl.
43680     # The nsl library prevents programs from opening the X display
43681     # on Irix 5.2, according to T.E. Dickey.
43682     # The functions gethostbyname, getservbyname, and inet_addr are
43683     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43684     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43685 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43686 
43687 fi
43688 
43689     if test $ac_cv_func_gethostbyname = no; then
43690       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43691 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43692 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43693   $as_echo_n "(cached) " >&6
43694 else
43695   ac_check_lib_save_LIBS=$LIBS
43696 LIBS="-lnsl  $LIBS"
43697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43698 /* end confdefs.h.  */
43699 
43700 /* Override any GCC internal prototype to avoid an error.
43701    Use char because int might match the return type of a GCC
43702    builtin and then its argument prototype would still apply.  */
43703 #ifdef __cplusplus
43704 extern "C"
43705 #endif
43706 char gethostbyname ();
43707 int
43708 main ()
43709 {
43710 return gethostbyname ();
43711   ;
43712   return 0;
43713 }
43714 _ACEOF
43715 if ac_fn_cxx_try_link "$LINENO"; then :
43716   ac_cv_lib_nsl_gethostbyname=yes
43717 else
43718   ac_cv_lib_nsl_gethostbyname=no
43719 fi
43720 rm -f core conftest.err conftest.$ac_objext \
43721     conftest$ac_exeext conftest.$ac_ext
43722 LIBS=$ac_check_lib_save_LIBS
43723 fi
43724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43725 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43726 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43727   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43728 fi
43729 
43730       if test $ac_cv_lib_nsl_gethostbyname = no; then
43731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43732 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43733 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43734   $as_echo_n "(cached) " >&6
43735 else
43736   ac_check_lib_save_LIBS=$LIBS
43737 LIBS="-lbsd  $LIBS"
43738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43739 /* end confdefs.h.  */
43740 
43741 /* Override any GCC internal prototype to avoid an error.
43742    Use char because int might match the return type of a GCC
43743    builtin and then its argument prototype would still apply.  */
43744 #ifdef __cplusplus
43745 extern "C"
43746 #endif
43747 char gethostbyname ();
43748 int
43749 main ()
43750 {
43751 return gethostbyname ();
43752   ;
43753   return 0;
43754 }
43755 _ACEOF
43756 if ac_fn_cxx_try_link "$LINENO"; then :
43757   ac_cv_lib_bsd_gethostbyname=yes
43758 else
43759   ac_cv_lib_bsd_gethostbyname=no
43760 fi
43761 rm -f core conftest.err conftest.$ac_objext \
43762     conftest$ac_exeext conftest.$ac_ext
43763 LIBS=$ac_check_lib_save_LIBS
43764 fi
43765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43766 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43767 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43768   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43769 fi
43770 
43771       fi
43772     fi
43773 
43774     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43775     # socket/setsockopt and other routines are undefined under SCO ODT
43776     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43777     # on later versions), says Simon Leinen: it contains gethostby*
43778     # variants that don't use the name server (or something).  -lsocket
43779     # must be given before -lnsl if both are needed.  We assume that
43780     # if connect needs -lnsl, so does gethostbyname.
43781     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43782 if test "x$ac_cv_func_connect" = xyes; then :
43783 
43784 fi
43785 
43786     if test $ac_cv_func_connect = no; then
43787       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43788 $as_echo_n "checking for connect in -lsocket... " >&6; }
43789 if ${ac_cv_lib_socket_connect+:} false; then :
43790   $as_echo_n "(cached) " >&6
43791 else
43792   ac_check_lib_save_LIBS=$LIBS
43793 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43795 /* end confdefs.h.  */
43796 
43797 /* Override any GCC internal prototype to avoid an error.
43798    Use char because int might match the return type of a GCC
43799    builtin and then its argument prototype would still apply.  */
43800 #ifdef __cplusplus
43801 extern "C"
43802 #endif
43803 char connect ();
43804 int
43805 main ()
43806 {
43807 return connect ();
43808   ;
43809   return 0;
43810 }
43811 _ACEOF
43812 if ac_fn_cxx_try_link "$LINENO"; then :
43813   ac_cv_lib_socket_connect=yes
43814 else
43815   ac_cv_lib_socket_connect=no
43816 fi
43817 rm -f core conftest.err conftest.$ac_objext \
43818     conftest$ac_exeext conftest.$ac_ext
43819 LIBS=$ac_check_lib_save_LIBS
43820 fi
43821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43822 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43823 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43824   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43825 fi
43826 
43827     fi
43828 
43829     # Guillermo Gomez says -lposix is necessary on A/UX.
43830     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43831 if test "x$ac_cv_func_remove" = xyes; then :
43832 
43833 fi
43834 
43835     if test $ac_cv_func_remove = no; then
43836       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43837 $as_echo_n "checking for remove in -lposix... " >&6; }
43838 if ${ac_cv_lib_posix_remove+:} false; then :
43839   $as_echo_n "(cached) " >&6
43840 else
43841   ac_check_lib_save_LIBS=$LIBS
43842 LIBS="-lposix  $LIBS"
43843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43844 /* end confdefs.h.  */
43845 
43846 /* Override any GCC internal prototype to avoid an error.
43847    Use char because int might match the return type of a GCC
43848    builtin and then its argument prototype would still apply.  */
43849 #ifdef __cplusplus
43850 extern "C"
43851 #endif
43852 char remove ();
43853 int
43854 main ()
43855 {
43856 return remove ();
43857   ;
43858   return 0;
43859 }
43860 _ACEOF
43861 if ac_fn_cxx_try_link "$LINENO"; then :
43862   ac_cv_lib_posix_remove=yes
43863 else
43864   ac_cv_lib_posix_remove=no
43865 fi
43866 rm -f core conftest.err conftest.$ac_objext \
43867     conftest$ac_exeext conftest.$ac_ext
43868 LIBS=$ac_check_lib_save_LIBS
43869 fi
43870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43871 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43872 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43873   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43874 fi
43875 
43876     fi
43877 
43878     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43879     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43880 if test "x$ac_cv_func_shmat" = xyes; then :
43881 
43882 fi
43883 
43884     if test $ac_cv_func_shmat = no; then
43885       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43886 $as_echo_n "checking for shmat in -lipc... " >&6; }
43887 if ${ac_cv_lib_ipc_shmat+:} false; then :
43888   $as_echo_n "(cached) " >&6
43889 else
43890   ac_check_lib_save_LIBS=$LIBS
43891 LIBS="-lipc  $LIBS"
43892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43893 /* end confdefs.h.  */
43894 
43895 /* Override any GCC internal prototype to avoid an error.
43896    Use char because int might match the return type of a GCC
43897    builtin and then its argument prototype would still apply.  */
43898 #ifdef __cplusplus
43899 extern "C"
43900 #endif
43901 char shmat ();
43902 int
43903 main ()
43904 {
43905 return shmat ();
43906   ;
43907   return 0;
43908 }
43909 _ACEOF
43910 if ac_fn_cxx_try_link "$LINENO"; then :
43911   ac_cv_lib_ipc_shmat=yes
43912 else
43913   ac_cv_lib_ipc_shmat=no
43914 fi
43915 rm -f core conftest.err conftest.$ac_objext \
43916     conftest$ac_exeext conftest.$ac_ext
43917 LIBS=$ac_check_lib_save_LIBS
43918 fi
43919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43920 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43921 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43922   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43923 fi
43924 
43925     fi
43926   fi
43927 
43928   # Check for libraries that X11R6 Xt/Xaw programs need.
43929   ac_save_LDFLAGS=$LDFLAGS
43930   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43931   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43932   # check for ICE first), but we must link in the order -lSM -lICE or
43933   # we get undefined symbols.  So assume we have SM if we have ICE.
43934   # These have to be linked with before -lX11, unlike the other
43935   # libraries we check for below, so use a different variable.
43936   # John Interrante, Karl Berry
43937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43938 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43939 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43940   $as_echo_n "(cached) " >&6
43941 else
43942   ac_check_lib_save_LIBS=$LIBS
43943 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43945 /* end confdefs.h.  */
43946 
43947 /* Override any GCC internal prototype to avoid an error.
43948    Use char because int might match the return type of a GCC
43949    builtin and then its argument prototype would still apply.  */
43950 #ifdef __cplusplus
43951 extern "C"
43952 #endif
43953 char IceConnectionNumber ();
43954 int
43955 main ()
43956 {
43957 return IceConnectionNumber ();
43958   ;
43959   return 0;
43960 }
43961 _ACEOF
43962 if ac_fn_cxx_try_link "$LINENO"; then :
43963   ac_cv_lib_ICE_IceConnectionNumber=yes
43964 else
43965   ac_cv_lib_ICE_IceConnectionNumber=no
43966 fi
43967 rm -f core conftest.err conftest.$ac_objext \
43968     conftest$ac_exeext conftest.$ac_ext
43969 LIBS=$ac_check_lib_save_LIBS
43970 fi
43971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43972 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43973 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43974   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43975 fi
43976 
43977   LDFLAGS=$ac_save_LDFLAGS
43978 
43979 fi
43980 
43981 
43982     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43983     # this doesn't make sense so we remove it.
43984     if test "x$COMPILE_TYPE" = xcross; then
43985       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43986     fi
43987 
43988     if test "x$no_x" = xyes; then
43989 
43990   # Print a helpful message on how to acquire the necessary build dependency.
43991   # x11 is the help tag: freetype, cups, pulse, alsa etc
43992   MISSING_DEPENDENCY=x11
43993 
43994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43995     cygwin_help $MISSING_DEPENDENCY
43996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43997     msys_help $MISSING_DEPENDENCY
43998   else
43999     PKGHANDLER_COMMAND=
44000 
44001     case $PKGHANDLER in
44002       apt-get)
44003         apt_help     $MISSING_DEPENDENCY ;;
44004       yum)
44005         yum_help     $MISSING_DEPENDENCY ;;
44006       port)
44007         port_help    $MISSING_DEPENDENCY ;;
44008       pkgutil)
44009         pkgutil_help $MISSING_DEPENDENCY ;;
44010       pkgadd)
44011         pkgadd_help  $MISSING_DEPENDENCY ;;
44012     esac
44013 
44014     if test "x$PKGHANDLER_COMMAND" != x; then
44015       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44016     fi
44017   fi
44018 
44019       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44020     fi
44021 
44022     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44023       OPENWIN_HOME="/usr/openwin"
44024       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44025       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44026           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44027           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44028           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44029     fi
44030 
44031     ac_ext=c
44032 ac_cpp='$CPP $CPPFLAGS'
44033 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44034 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44035 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44036 
44037     OLD_CFLAGS="$CFLAGS"
44038     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44039 
44040     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44041     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44042 do :
44043   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44044 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44045           # include <X11/Xlib.h>
44046           # include <X11/Xutil.h>
44047 
44048 
44049 "
44050 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44051   cat >>confdefs.h <<_ACEOF
44052 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44053 _ACEOF
44054  X11_HEADERS_OK=yes
44055 else
44056   X11_HEADERS_OK=no; break
44057 fi
44058 
44059 done
44060 
44061 
44062     if test "x$X11_HEADERS_OK" = xno; then
44063 
44064   # Print a helpful message on how to acquire the necessary build dependency.
44065   # x11 is the help tag: freetype, cups, pulse, alsa etc
44066   MISSING_DEPENDENCY=x11
44067 
44068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44069     cygwin_help $MISSING_DEPENDENCY
44070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44071     msys_help $MISSING_DEPENDENCY
44072   else
44073     PKGHANDLER_COMMAND=
44074 
44075     case $PKGHANDLER in
44076       apt-get)
44077         apt_help     $MISSING_DEPENDENCY ;;
44078       yum)
44079         yum_help     $MISSING_DEPENDENCY ;;
44080       port)
44081         port_help    $MISSING_DEPENDENCY ;;
44082       pkgutil)
44083         pkgutil_help $MISSING_DEPENDENCY ;;
44084       pkgadd)
44085         pkgadd_help  $MISSING_DEPENDENCY ;;
44086     esac
44087 
44088     if test "x$PKGHANDLER_COMMAND" != x; then
44089       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44090     fi
44091   fi
44092 
44093       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44094     fi
44095 
44096     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44097     # defined in libawt_xawt.
44098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44099 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44100     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44101 /* end confdefs.h.  */
44102 #include <X11/extensions/Xrender.h>
44103 int
44104 main ()
44105 {
44106 XLinearGradient x;
44107   ;
44108   return 0;
44109 }
44110 _ACEOF
44111 if ac_fn_c_try_compile "$LINENO"; then :
44112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44113 $as_echo "yes" >&6; }
44114 else
44115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44116 $as_echo "no" >&6; }
44117          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44118 fi
44119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44120 
44121     CFLAGS="$OLD_CFLAGS"
44122     ac_ext=cpp
44123 ac_cpp='$CXXCPP $CPPFLAGS'
44124 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44125 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44126 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44127 
44128   fi # X11_NOT_NEEDED
44129 
44130 
44131 
44132 
44133 
44134 
44135   ###############################################################################
44136   #
44137   # The common unix printing system cups is used to print from java.
44138   #
44139 
44140 # Check whether --with-cups was given.
44141 if test "${with_cups+set}" = set; then :
44142   withval=$with_cups;
44143 fi
44144 
44145 
44146 # Check whether --with-cups-include was given.
44147 if test "${with_cups_include+set}" = set; then :
44148   withval=$with_cups_include;
44149 fi
44150 
44151 
44152   if test "x$CUPS_NOT_NEEDED" = xyes; then
44153     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44154       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44155 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44156     fi
44157     CUPS_CFLAGS=
44158   else
44159     CUPS_FOUND=no
44160 
44161     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44162       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44163     fi
44164 
44165     if test "x${with_cups}" != x; then
44166       CUPS_CFLAGS="-I${with_cups}/include"
44167       CUPS_FOUND=yes
44168     fi
44169     if test "x${with_cups_include}" != x; then
44170       CUPS_CFLAGS="-I${with_cups_include}"
44171       CUPS_FOUND=yes
44172     fi
44173     if test "x$CUPS_FOUND" = xno; then
44174 
44175 
44176   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44177     # Source the builddeps file again, to make sure it uses the latest variables!
44178     . $builddepsfile
44179     # Look for a target and build machine specific resource!
44180     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44181     if test "x$resource" = x; then
44182       # Ok, lets instead look for a target specific resource
44183       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44184     fi
44185     if test "x$resource" = x; then
44186       # Ok, lets instead look for a build specific resource
44187       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44188     fi
44189     if test "x$resource" = x; then
44190       # Ok, lets instead look for a generic resource
44191       # (The cups comes from M4 and not the shell, thus no need for eval here.)
44192       resource=${builddep_cups}
44193     fi
44194     if test "x$resource" != x; then
44195       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44196 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44197       # If the resource in the builddeps.conf file is an existing directory,
44198       # for example /java/linux/cups
44199       if test -d ${resource}; then
44200         depdir=${resource}
44201       else
44202 
44203   # cups is for example mymodule
44204   # $resource is for example libs/general/libmymod_1_2_3.zip
44205   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44206   # $with_builddeps_dir is for example /localhome/builddeps
44207   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44208   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44209   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44210   filename=`basename $resource`
44211   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44212   filebase=${filename%%.*}
44213   extension=${filename#*.}
44214   installdir=$with_builddeps_dir/$filebase
44215   if test ! -f $installdir/$filename.unpacked; then
44216     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44217 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44218     if test ! -d $installdir; then
44219       mkdir -p $installdir
44220     fi
44221     if test ! -d $installdir; then
44222       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44223     fi
44224     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44225     touch $tmpfile
44226     if test ! -f $tmpfile; then
44227       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44228     fi
44229 
44230   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44231   # $tmpfile is the local file name for the downloaded file.
44232   VALID_TOOL=no
44233   if test "x$BDEPS_FTP" = xwget; then
44234     VALID_TOOL=yes
44235     wget -O $tmpfile $with_builddeps_server/$resource
44236   fi
44237   if test "x$BDEPS_FTP" = xlftp; then
44238     VALID_TOOL=yes
44239     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44240   fi
44241   if test "x$BDEPS_FTP" = xftp; then
44242     VALID_TOOL=yes
44243     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44244     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44245     FTPUSERPWD=${FTPSERVER%%@*}
44246     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44247       FTPUSER=${userpwd%%:*}
44248       FTPPWD=${userpwd#*@}
44249       FTPSERVER=${FTPSERVER#*@}
44250     else
44251       FTPUSER=ftp
44252       FTPPWD=ftp
44253     fi
44254     # the "pass" command does not work on some
44255     # ftp clients (read ftp.exe) but if it works,
44256     # passive mode is better!
44257     ( \
44258         echo "user $FTPUSER $FTPPWD"        ; \
44259         echo "pass"                         ; \
44260         echo "bin"                          ; \
44261         echo "get $FTPPATH $tmpfile"              ; \
44262     ) | ftp -in $FTPSERVER
44263   fi
44264   if test "x$VALID_TOOL" != xyes; then
44265     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44266   fi
44267 
44268     mv $tmpfile $installdir/$filename
44269     if test ! -s $installdir/$filename; then
44270       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44271     fi
44272     case "$extension" in
44273       zip)  echo "Unzipping $installdir/$filename..."
44274         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44275         ;;
44276       tar.gz) echo "Untaring $installdir/$filename..."
44277         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44278         ;;
44279       tgz) echo "Untaring $installdir/$filename..."
44280         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44281         ;;
44282       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44283         ;;
44284     esac
44285   fi
44286   if test -f $installdir/$filename.unpacked; then
44287     depdir=$installdir
44288   fi
44289 
44290       fi
44291       # Source the builddeps file again, because in the previous command, the depdir
44292       # was updated to point at the current build dependency install directory.
44293       . $builddepsfile
44294       # Now extract variables from the builddeps.conf files.
44295       theroot=${builddep_cups_ROOT}
44296       thecflags=${builddep_cups_CFLAGS}
44297       thelibs=${builddep_cups_LIBS}
44298       if test "x$depdir" = x; then
44299         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44300       fi
44301       CUPS=$depdir
44302       if test "x$theroot" != x; then
44303         CUPS="$theroot"
44304       fi
44305       if test "x$thecflags" != x; then
44306         CUPS_CFLAGS="$thecflags"
44307       fi
44308       if test "x$thelibs" != x; then
44309         CUPS_LIBS="$thelibs"
44310       fi
44311       CUPS_FOUND=yes
44312 
44313     fi
44314 
44315   fi
44316 
44317     fi
44318     if test "x$CUPS_FOUND" = xno; then
44319       # Are the cups headers installed in the default /usr/include location?
44320       for ac_header in cups/cups.h cups/ppd.h
44321 do :
44322   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44323 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44324 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44325   cat >>confdefs.h <<_ACEOF
44326 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44327 _ACEOF
44328 
44329             CUPS_FOUND=yes
44330             CUPS_CFLAGS=
44331             DEFAULT_CUPS=yes
44332 
44333 
44334 fi
44335 
44336 done
44337 
44338     fi
44339     if test "x$CUPS_FOUND" = xno; then
44340       # Getting nervous now? Lets poke around for standard Solaris third-party
44341       # package installation locations.
44342       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44343 $as_echo_n "checking for cups headers... " >&6; }
44344       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44345         # An SFW package seems to be installed!
44346         CUPS_FOUND=yes
44347         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44348       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44349         # A CSW package seems to be installed!
44350         CUPS_FOUND=yes
44351         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44352       fi
44353       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44354 $as_echo "$CUPS_FOUND" >&6; }
44355     fi
44356     if test "x$CUPS_FOUND" = xno; then
44357 
44358   # Print a helpful message on how to acquire the necessary build dependency.
44359   # cups is the help tag: freetype, cups, pulse, alsa etc
44360   MISSING_DEPENDENCY=cups
44361 
44362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44363     cygwin_help $MISSING_DEPENDENCY
44364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44365     msys_help $MISSING_DEPENDENCY
44366   else
44367     PKGHANDLER_COMMAND=
44368 
44369     case $PKGHANDLER in
44370       apt-get)
44371         apt_help     $MISSING_DEPENDENCY ;;
44372       yum)
44373         yum_help     $MISSING_DEPENDENCY ;;
44374       port)
44375         port_help    $MISSING_DEPENDENCY ;;
44376       pkgutil)
44377         pkgutil_help $MISSING_DEPENDENCY ;;
44378       pkgadd)
44379         pkgadd_help  $MISSING_DEPENDENCY ;;
44380     esac
44381 
44382     if test "x$PKGHANDLER_COMMAND" != x; then
44383       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44384     fi
44385   fi
44386 
44387       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44388     fi
44389   fi
44390 
44391 
44392 
44393 
44394 
44395 
44396   ###############################################################################
44397   #
44398   # The ubiquitous freetype library is used to render fonts.
44399   #
44400 
44401 # Check whether --with-freetype was given.
44402 if test "${with_freetype+set}" = set; then :
44403   withval=$with_freetype;
44404 fi
44405 
44406 
44407 # Check whether --with-freetype-include was given.
44408 if test "${with_freetype_include+set}" = set; then :
44409   withval=$with_freetype_include;
44410 fi
44411 
44412 
44413 # Check whether --with-freetype-lib was given.
44414 if test "${with_freetype_lib+set}" = set; then :
44415   withval=$with_freetype_lib;
44416 fi
44417 
44418 
44419 # Check whether --with-freetype-src was given.
44420 if test "${with_freetype_src+set}" = set; then :
44421   withval=$with_freetype_src;
44422 fi
44423 
44424   # Check whether --enable-freetype-bundling was given.
44425 if test "${enable_freetype_bundling+set}" = set; then :
44426   enableval=$enable_freetype_bundling;
44427 fi
44428 
44429 
44430   # Need to specify explicitly since it needs to be overridden on some versions of macosx
44431   FREETYPE_BASE_NAME=freetype
44432   FREETYPE_CFLAGS=
44433   FREETYPE_LIBS=
44434   FREETYPE_BUNDLE_LIB_PATH=
44435 
44436   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44437     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44438       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44439 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44440     fi
44441     if test "x$enable_freetype_bundling" != x; then
44442       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44443 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44444     fi
44445   else
44446     # freetype is needed to build; go get it!
44447 
44448     BUNDLE_FREETYPE="$enable_freetype_bundling"
44449 
44450     if  test "x$with_freetype_src" != x; then
44451       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44452         # Try to build freetype if --with-freetype-src was given on Windows
44453 
44454   FREETYPE_SRC_PATH="$with_freetype_src"
44455   BUILD_FREETYPE=yes
44456 
44457   # Check if the freetype sources are acessible..
44458   if ! test -d $FREETYPE_SRC_PATH; then
44459     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44460 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44461     BUILD_FREETYPE=no
44462   fi
44463   # ..and contain a vc2010 project file
44464   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44465   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44466     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44467 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44468     BUILD_FREETYPE=no
44469   fi
44470   # Now check if configure found a version of 'msbuild.exe'
44471   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44472     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44473 $as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44474     BUILD_FREETYPE=no
44475   fi
44476 
44477   # Ready to go..
44478   if test "x$BUILD_FREETYPE" = xyes; then
44479 
44480     # msbuild requires trailing slashes for output directories
44481     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44482     freetype_lib_path_unix="$freetype_lib_path"
44483     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44484 
44485   unix_path="$vcxproj_path"
44486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44487     windows_path=`$CYGPATH -m "$unix_path"`
44488     vcxproj_path="$windows_path"
44489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44490     windows_path=`cmd //c echo $unix_path`
44491     vcxproj_path="$windows_path"
44492   fi
44493 
44494 
44495   unix_path="$freetype_lib_path"
44496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44497     windows_path=`$CYGPATH -m "$unix_path"`
44498     freetype_lib_path="$windows_path"
44499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44500     windows_path=`cmd //c echo $unix_path`
44501     freetype_lib_path="$windows_path"
44502   fi
44503 
44504 
44505   unix_path="$freetype_obj_path"
44506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44507     windows_path=`$CYGPATH -m "$unix_path"`
44508     freetype_obj_path="$windows_path"
44509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44510     windows_path=`cmd //c echo $unix_path`
44511     freetype_obj_path="$windows_path"
44512   fi
44513 
44514     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44515       freetype_platform=x64
44516     else
44517       freetype_platform=win32
44518     fi
44519 
44520     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44521     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44522     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44523     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44524     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44525 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44526 
44527     # First we try to build the freetype.dll
44528     $ECHO -e "@echo off\n"\
44529              "$MSBUILD $vcxproj_path "\
44530                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44531                        "/p:Configuration=\"Release Multithreaded\" "\
44532                        "/p:Platform=$freetype_platform "\
44533                        "/p:ConfigurationType=DynamicLibrary "\
44534                        "/p:TargetName=freetype "\
44535                        "/p:OutDir=\"$freetype_lib_path\" "\
44536                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44537     cmd /c freetype.bat
44538 
44539     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44540       # If that succeeds we also build freetype.lib
44541       $ECHO -e "@echo off\n"\
44542                "$MSBUILD $vcxproj_path "\
44543                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44544                          "/p:Configuration=\"Release Multithreaded\" "\
44545                          "/p:Platform=$freetype_platform "\
44546                          "/p:ConfigurationType=StaticLibrary "\
44547                          "/p:TargetName=freetype "\
44548                          "/p:OutDir=\"$freetype_lib_path\" "\
44549                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44550       cmd /c freetype.bat
44551 
44552       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44553         # Once we build both, lib and dll, set freetype lib and include path appropriately
44554         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44555         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44556         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44557 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44558       else
44559         BUILD_FREETYPE=no
44560       fi
44561     else
44562       BUILD_FREETYPE=no
44563     fi
44564   fi
44565 
44566         if test "x$BUILD_FREETYPE" = xyes; then
44567           # Okay, we built it. Check that it works.
44568 
44569   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44570   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44571   METHOD="--with-freetype-src"
44572 
44573   # Let's start with an optimistic view of the world :-)
44574   FOUND_FREETYPE=yes
44575 
44576   # First look for the canonical freetype main include file ft2build.h.
44577   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44578     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44579     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44580     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44581       # Fail.
44582       FOUND_FREETYPE=no
44583     fi
44584   fi
44585 
44586   if test "x$FOUND_FREETYPE" = xyes; then
44587     # Include file found, let's continue the sanity check.
44588     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44589 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44590 
44591     # Reset to default value
44592     FREETYPE_BASE_NAME=freetype
44593     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44594     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44595       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44596           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44597         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44598         # for the .6 version explicitly.
44599         FREETYPE_BASE_NAME=freetype.6
44600         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44601         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44602 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44603       else
44604         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44605 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44606         FOUND_FREETYPE=no
44607       fi
44608     else
44609       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44610         # On Windows, we will need both .lib and .dll file.
44611         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44612           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44613 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44614           FOUND_FREETYPE=no
44615         fi
44616       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44617           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44618         # Found lib in isa dir, use that instead.
44619         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44620         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44621 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44622       fi
44623     fi
44624   fi
44625 
44626   if test "x$FOUND_FREETYPE" = xyes; then
44627 
44628   # Only process if variable expands to non-empty
44629 
44630   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44631     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44632 
44633   # Input might be given as Windows format, start by converting to
44634   # unix format.
44635   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44636   new_path=`$CYGPATH -u "$path"`
44637 
44638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44641   # "foo.exe" is OK but "foo" is an error.
44642   #
44643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44644   # It is also a way to make sure we got the proper file name for the real test later on.
44645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44646   if test "x$test_shortpath" = x; then
44647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44648 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44649     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44650   fi
44651 
44652   # Call helper function which possibly converts this using DOS-style short mode.
44653   # If so, the updated path is stored in $new_path.
44654 
44655   input_path="$new_path"
44656   # Check if we need to convert this using DOS-style short mode. If the path
44657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44658   # take no chances and rewrite it.
44659   # Note: m4 eats our [], so we need to use [ and ] instead.
44660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44661   if test "x$has_forbidden_chars" != x; then
44662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44666       # Going to short mode and back again did indeed matter. Since short mode is
44667       # case insensitive, let's make it lowercase to improve readability.
44668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44669       # Now convert it back to Unix-stile (cygpath)
44670       input_path=`$CYGPATH -u "$shortmode_path"`
44671       new_path="$input_path"
44672     fi
44673   fi
44674 
44675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44676   if test "x$test_cygdrive_prefix" = x; then
44677     # As a simple fix, exclude /usr/bin since it's not a real path.
44678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44680       # a path prefixed by /cygdrive for fixpath to work.
44681       new_path="$CYGWIN_ROOT_PATH$input_path"
44682     fi
44683   fi
44684 
44685 
44686   if test "x$path" != "x$new_path"; then
44687     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44689 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44690   fi
44691 
44692     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44693 
44694   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44695   has_colon=`$ECHO $path | $GREP ^.:`
44696   new_path="$path"
44697   if test "x$has_colon" = x; then
44698     # Not in mixed or Windows style, start by that.
44699     new_path=`cmd //c echo $path`
44700   fi
44701 
44702 
44703   input_path="$new_path"
44704   # Check if we need to convert this using DOS-style short mode. If the path
44705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44706   # take no chances and rewrite it.
44707   # Note: m4 eats our [], so we need to use [ and ] instead.
44708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44709   if test "x$has_forbidden_chars" != x; then
44710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44712   fi
44713 
44714 
44715   windows_path="$new_path"
44716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44717     unix_path=`$CYGPATH -u "$windows_path"`
44718     new_path="$unix_path"
44719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44721     new_path="$unix_path"
44722   fi
44723 
44724   if test "x$path" != "x$new_path"; then
44725     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44727 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44728   fi
44729 
44730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44732 
44733     else
44734       # We're on a unix platform. Hooray! :)
44735       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44736       has_space=`$ECHO "$path" | $GREP " "`
44737       if test "x$has_space" != x; then
44738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44739 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44740         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44741       fi
44742 
44743       # Use eval to expand a potential ~
44744       eval path="$path"
44745       if test ! -f "$path" && test ! -d "$path"; then
44746         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44747       fi
44748 
44749       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44750     fi
44751   fi
44752 
44753 
44754   # Only process if variable expands to non-empty
44755 
44756   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44757     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44758 
44759   # Input might be given as Windows format, start by converting to
44760   # unix format.
44761   path="$POTENTIAL_FREETYPE_LIB_PATH"
44762   new_path=`$CYGPATH -u "$path"`
44763 
44764   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44765   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44766   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44767   # "foo.exe" is OK but "foo" is an error.
44768   #
44769   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44770   # It is also a way to make sure we got the proper file name for the real test later on.
44771   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44772   if test "x$test_shortpath" = x; then
44773     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44774 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44775     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44776   fi
44777 
44778   # Call helper function which possibly converts this using DOS-style short mode.
44779   # If so, the updated path is stored in $new_path.
44780 
44781   input_path="$new_path"
44782   # Check if we need to convert this using DOS-style short mode. If the path
44783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44784   # take no chances and rewrite it.
44785   # Note: m4 eats our [], so we need to use [ and ] instead.
44786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44787   if test "x$has_forbidden_chars" != x; then
44788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44792       # Going to short mode and back again did indeed matter. Since short mode is
44793       # case insensitive, let's make it lowercase to improve readability.
44794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44795       # Now convert it back to Unix-stile (cygpath)
44796       input_path=`$CYGPATH -u "$shortmode_path"`
44797       new_path="$input_path"
44798     fi
44799   fi
44800 
44801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44802   if test "x$test_cygdrive_prefix" = x; then
44803     # As a simple fix, exclude /usr/bin since it's not a real path.
44804     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44806       # a path prefixed by /cygdrive for fixpath to work.
44807       new_path="$CYGWIN_ROOT_PATH$input_path"
44808     fi
44809   fi
44810 
44811 
44812   if test "x$path" != "x$new_path"; then
44813     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44815 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44816   fi
44817 
44818     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44819 
44820   path="$POTENTIAL_FREETYPE_LIB_PATH"
44821   has_colon=`$ECHO $path | $GREP ^.:`
44822   new_path="$path"
44823   if test "x$has_colon" = x; then
44824     # Not in mixed or Windows style, start by that.
44825     new_path=`cmd //c echo $path`
44826   fi
44827 
44828 
44829   input_path="$new_path"
44830   # Check if we need to convert this using DOS-style short mode. If the path
44831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44832   # take no chances and rewrite it.
44833   # Note: m4 eats our [], so we need to use [ and ] instead.
44834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44835   if test "x$has_forbidden_chars" != x; then
44836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44837     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44838   fi
44839 
44840 
44841   windows_path="$new_path"
44842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44843     unix_path=`$CYGPATH -u "$windows_path"`
44844     new_path="$unix_path"
44845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44847     new_path="$unix_path"
44848   fi
44849 
44850   if test "x$path" != "x$new_path"; then
44851     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44853 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44854   fi
44855 
44856   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44857   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44858 
44859     else
44860       # We're on a unix platform. Hooray! :)
44861       path="$POTENTIAL_FREETYPE_LIB_PATH"
44862       has_space=`$ECHO "$path" | $GREP " "`
44863       if test "x$has_space" != x; then
44864         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44865 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44866         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44867       fi
44868 
44869       # Use eval to expand a potential ~
44870       eval path="$path"
44871       if test ! -f "$path" && test ! -d "$path"; then
44872         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44873       fi
44874 
44875       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44876     fi
44877   fi
44878 
44879 
44880     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44881     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44882 $as_echo_n "checking for freetype includes... " >&6; }
44883     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44884 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44885     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44886     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44887 $as_echo_n "checking for freetype libraries... " >&6; }
44888     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44889 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44890   fi
44891 
44892           if test "x$FOUND_FREETYPE" != xyes; then
44893             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44894           fi
44895         else
44896           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44897 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44898           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44899         fi
44900       else
44901         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44902 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44903       fi
44904     fi
44905 
44906     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44907       # User has specified settings
44908 
44909       if test "x$BUNDLE_FREETYPE" = x; then
44910         # If not specified, default is to bundle freetype
44911         BUNDLE_FREETYPE=yes
44912       fi
44913 
44914       if test "x$with_freetype" != x; then
44915         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44916         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44917       fi
44918 
44919       # Allow --with-freetype-lib and --with-freetype-include to override
44920       if test "x$with_freetype_include" != x; then
44921         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44922       fi
44923       if test "x$with_freetype_lib" != x; then
44924         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44925       fi
44926 
44927       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44928         # Okay, we got it. Check that it works.
44929 
44930   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44931   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44932   METHOD="--with-freetype"
44933 
44934   # Let's start with an optimistic view of the world :-)
44935   FOUND_FREETYPE=yes
44936 
44937   # First look for the canonical freetype main include file ft2build.h.
44938   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44939     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44940     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44941     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44942       # Fail.
44943       FOUND_FREETYPE=no
44944     fi
44945   fi
44946 
44947   if test "x$FOUND_FREETYPE" = xyes; then
44948     # Include file found, let's continue the sanity check.
44949     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44950 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44951 
44952     # Reset to default value
44953     FREETYPE_BASE_NAME=freetype
44954     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44955     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44956       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44957           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44958         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44959         # for the .6 version explicitly.
44960         FREETYPE_BASE_NAME=freetype.6
44961         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44962         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44963 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44964       else
44965         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44966 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44967         FOUND_FREETYPE=no
44968       fi
44969     else
44970       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44971         # On Windows, we will need both .lib and .dll file.
44972         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44973           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44974 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44975           FOUND_FREETYPE=no
44976         fi
44977       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44978           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44979         # Found lib in isa dir, use that instead.
44980         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44981         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44982 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44983       fi
44984     fi
44985   fi
44986 
44987   if test "x$FOUND_FREETYPE" = xyes; then
44988 
44989   # Only process if variable expands to non-empty
44990 
44991   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44992     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44993 
44994   # Input might be given as Windows format, start by converting to
44995   # unix format.
44996   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44997   new_path=`$CYGPATH -u "$path"`
44998 
44999   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45000   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45001   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45002   # "foo.exe" is OK but "foo" is an error.
45003   #
45004   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45005   # It is also a way to make sure we got the proper file name for the real test later on.
45006   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45007   if test "x$test_shortpath" = x; then
45008     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45009 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45010     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45011   fi
45012 
45013   # Call helper function which possibly converts this using DOS-style short mode.
45014   # If so, the updated path is stored in $new_path.
45015 
45016   input_path="$new_path"
45017   # Check if we need to convert this using DOS-style short mode. If the path
45018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45019   # take no chances and rewrite it.
45020   # Note: m4 eats our [], so we need to use [ and ] instead.
45021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45022   if test "x$has_forbidden_chars" != x; then
45023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45024     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45025     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45026     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45027       # Going to short mode and back again did indeed matter. Since short mode is
45028       # case insensitive, let's make it lowercase to improve readability.
45029       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45030       # Now convert it back to Unix-stile (cygpath)
45031       input_path=`$CYGPATH -u "$shortmode_path"`
45032       new_path="$input_path"
45033     fi
45034   fi
45035 
45036   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45037   if test "x$test_cygdrive_prefix" = x; then
45038     # As a simple fix, exclude /usr/bin since it's not a real path.
45039     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45040       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45041       # a path prefixed by /cygdrive for fixpath to work.
45042       new_path="$CYGWIN_ROOT_PATH$input_path"
45043     fi
45044   fi
45045 
45046 
45047   if test "x$path" != "x$new_path"; then
45048     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45049     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45050 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45051   fi
45052 
45053     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45054 
45055   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45056   has_colon=`$ECHO $path | $GREP ^.:`
45057   new_path="$path"
45058   if test "x$has_colon" = x; then
45059     # Not in mixed or Windows style, start by that.
45060     new_path=`cmd //c echo $path`
45061   fi
45062 
45063 
45064   input_path="$new_path"
45065   # Check if we need to convert this using DOS-style short mode. If the path
45066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45067   # take no chances and rewrite it.
45068   # Note: m4 eats our [], so we need to use [ and ] instead.
45069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45070   if test "x$has_forbidden_chars" != x; then
45071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45072     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45073   fi
45074 
45075 
45076   windows_path="$new_path"
45077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45078     unix_path=`$CYGPATH -u "$windows_path"`
45079     new_path="$unix_path"
45080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45082     new_path="$unix_path"
45083   fi
45084 
45085   if test "x$path" != "x$new_path"; then
45086     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45087     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45088 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45089   fi
45090 
45091   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45092   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45093 
45094     else
45095       # We're on a unix platform. Hooray! :)
45096       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45097       has_space=`$ECHO "$path" | $GREP " "`
45098       if test "x$has_space" != x; then
45099         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45100 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45101         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45102       fi
45103 
45104       # Use eval to expand a potential ~
45105       eval path="$path"
45106       if test ! -f "$path" && test ! -d "$path"; then
45107         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45108       fi
45109 
45110       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45111     fi
45112   fi
45113 
45114 
45115   # Only process if variable expands to non-empty
45116 
45117   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45118     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45119 
45120   # Input might be given as Windows format, start by converting to
45121   # unix format.
45122   path="$POTENTIAL_FREETYPE_LIB_PATH"
45123   new_path=`$CYGPATH -u "$path"`
45124 
45125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45128   # "foo.exe" is OK but "foo" is an error.
45129   #
45130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45131   # It is also a way to make sure we got the proper file name for the real test later on.
45132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45133   if test "x$test_shortpath" = x; then
45134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45135 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45136     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45137   fi
45138 
45139   # Call helper function which possibly converts this using DOS-style short mode.
45140   # If so, the updated path is stored in $new_path.
45141 
45142   input_path="$new_path"
45143   # Check if we need to convert this using DOS-style short mode. If the path
45144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45145   # take no chances and rewrite it.
45146   # Note: m4 eats our [], so we need to use [ and ] instead.
45147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45148   if test "x$has_forbidden_chars" != x; then
45149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45153       # Going to short mode and back again did indeed matter. Since short mode is
45154       # case insensitive, let's make it lowercase to improve readability.
45155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45156       # Now convert it back to Unix-stile (cygpath)
45157       input_path=`$CYGPATH -u "$shortmode_path"`
45158       new_path="$input_path"
45159     fi
45160   fi
45161 
45162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45163   if test "x$test_cygdrive_prefix" = x; then
45164     # As a simple fix, exclude /usr/bin since it's not a real path.
45165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45167       # a path prefixed by /cygdrive for fixpath to work.
45168       new_path="$CYGWIN_ROOT_PATH$input_path"
45169     fi
45170   fi
45171 
45172 
45173   if test "x$path" != "x$new_path"; then
45174     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45176 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45177   fi
45178 
45179     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45180 
45181   path="$POTENTIAL_FREETYPE_LIB_PATH"
45182   has_colon=`$ECHO $path | $GREP ^.:`
45183   new_path="$path"
45184   if test "x$has_colon" = x; then
45185     # Not in mixed or Windows style, start by that.
45186     new_path=`cmd //c echo $path`
45187   fi
45188 
45189 
45190   input_path="$new_path"
45191   # Check if we need to convert this using DOS-style short mode. If the path
45192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45193   # take no chances and rewrite it.
45194   # Note: m4 eats our [], so we need to use [ and ] instead.
45195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45196   if test "x$has_forbidden_chars" != x; then
45197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45199   fi
45200 
45201 
45202   windows_path="$new_path"
45203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45204     unix_path=`$CYGPATH -u "$windows_path"`
45205     new_path="$unix_path"
45206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45208     new_path="$unix_path"
45209   fi
45210 
45211   if test "x$path" != "x$new_path"; then
45212     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45214 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45215   fi
45216 
45217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45219 
45220     else
45221       # We're on a unix platform. Hooray! :)
45222       path="$POTENTIAL_FREETYPE_LIB_PATH"
45223       has_space=`$ECHO "$path" | $GREP " "`
45224       if test "x$has_space" != x; then
45225         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45226 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45227         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45228       fi
45229 
45230       # Use eval to expand a potential ~
45231       eval path="$path"
45232       if test ! -f "$path" && test ! -d "$path"; then
45233         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45234       fi
45235 
45236       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45237     fi
45238   fi
45239 
45240 
45241     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45242     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45243 $as_echo_n "checking for freetype includes... " >&6; }
45244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45245 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45246     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45248 $as_echo_n "checking for freetype libraries... " >&6; }
45249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45250 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45251   fi
45252 
45253         if test "x$FOUND_FREETYPE" != xyes; then
45254           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45255         fi
45256       else
45257         # User specified only one of lib or include. This is an error.
45258         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45259           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45260 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45261           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45262         else
45263           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45264 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45265           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45266         fi
45267       fi
45268     else
45269       # User did not specify settings, but we need freetype. Try to locate it.
45270 
45271       if test "x$BUNDLE_FREETYPE" = x; then
45272         # If not specified, default is to bundle freetype only on windows
45273         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45274           BUNDLE_FREETYPE=yes
45275         else
45276           BUNDLE_FREETYPE=no
45277         fi
45278       fi
45279 
45280       if test "x$FOUND_FREETYPE" != xyes; then
45281         # Check builddeps
45282 
45283 
45284   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45285     # Source the builddeps file again, to make sure it uses the latest variables!
45286     . $builddepsfile
45287     # Look for a target and build machine specific resource!
45288     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45289     if test "x$resource" = x; then
45290       # Ok, lets instead look for a target specific resource
45291       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45292     fi
45293     if test "x$resource" = x; then
45294       # Ok, lets instead look for a build specific resource
45295       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45296     fi
45297     if test "x$resource" = x; then
45298       # Ok, lets instead look for a generic resource
45299       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45300       resource=${builddep_freetype2}
45301     fi
45302     if test "x$resource" != x; then
45303       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45304 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45305       # If the resource in the builddeps.conf file is an existing directory,
45306       # for example /java/linux/cups
45307       if test -d ${resource}; then
45308         depdir=${resource}
45309       else
45310 
45311   # freetype2 is for example mymodule
45312   # $resource is for example libs/general/libmymod_1_2_3.zip
45313   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45314   # $with_builddeps_dir is for example /localhome/builddeps
45315   # depdir is the name of the variable into which we store the depdir, eg MYMOD
45316   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45317   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45318   filename=`basename $resource`
45319   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45320   filebase=${filename%%.*}
45321   extension=${filename#*.}
45322   installdir=$with_builddeps_dir/$filebase
45323   if test ! -f $installdir/$filename.unpacked; then
45324     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45325 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45326     if test ! -d $installdir; then
45327       mkdir -p $installdir
45328     fi
45329     if test ! -d $installdir; then
45330       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45331     fi
45332     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45333     touch $tmpfile
45334     if test ! -f $tmpfile; then
45335       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45336     fi
45337 
45338   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45339   # $tmpfile is the local file name for the downloaded file.
45340   VALID_TOOL=no
45341   if test "x$BDEPS_FTP" = xwget; then
45342     VALID_TOOL=yes
45343     wget -O $tmpfile $with_builddeps_server/$resource
45344   fi
45345   if test "x$BDEPS_FTP" = xlftp; then
45346     VALID_TOOL=yes
45347     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45348   fi
45349   if test "x$BDEPS_FTP" = xftp; then
45350     VALID_TOOL=yes
45351     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45352     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45353     FTPUSERPWD=${FTPSERVER%%@*}
45354     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45355       FTPUSER=${userpwd%%:*}
45356       FTPPWD=${userpwd#*@}
45357       FTPSERVER=${FTPSERVER#*@}
45358     else
45359       FTPUSER=ftp
45360       FTPPWD=ftp
45361     fi
45362     # the "pass" command does not work on some
45363     # ftp clients (read ftp.exe) but if it works,
45364     # passive mode is better!
45365     ( \
45366         echo "user $FTPUSER $FTPPWD"        ; \
45367         echo "pass"                         ; \
45368         echo "bin"                          ; \
45369         echo "get $FTPPATH $tmpfile"              ; \
45370     ) | ftp -in $FTPSERVER
45371   fi
45372   if test "x$VALID_TOOL" != xyes; then
45373     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45374   fi
45375 
45376     mv $tmpfile $installdir/$filename
45377     if test ! -s $installdir/$filename; then
45378       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45379     fi
45380     case "$extension" in
45381       zip)  echo "Unzipping $installdir/$filename..."
45382         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45383         ;;
45384       tar.gz) echo "Untaring $installdir/$filename..."
45385         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45386         ;;
45387       tgz) echo "Untaring $installdir/$filename..."
45388         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45389         ;;
45390       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45391         ;;
45392     esac
45393   fi
45394   if test -f $installdir/$filename.unpacked; then
45395     depdir=$installdir
45396   fi
45397 
45398       fi
45399       # Source the builddeps file again, because in the previous command, the depdir
45400       # was updated to point at the current build dependency install directory.
45401       . $builddepsfile
45402       # Now extract variables from the builddeps.conf files.
45403       theroot=${builddep_freetype2_ROOT}
45404       thecflags=${builddep_freetype2_CFLAGS}
45405       thelibs=${builddep_freetype2_LIBS}
45406       if test "x$depdir" = x; then
45407         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45408       fi
45409       FREETYPE=$depdir
45410       if test "x$theroot" != x; then
45411         FREETYPE="$theroot"
45412       fi
45413       if test "x$thecflags" != x; then
45414         FREETYPE_CFLAGS="$thecflags"
45415       fi
45416       if test "x$thelibs" != x; then
45417         FREETYPE_LIBS="$thelibs"
45418       fi
45419       FOUND_FREETYPE=yes
45420       else FOUND_FREETYPE=no
45421 
45422     fi
45423     else FOUND_FREETYPE=no
45424 
45425   fi
45426 
45427         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45428         if test "x$FOUND_FREETYPE" = xyes; then
45429           if test "x$BUNDLE_FREETYPE" = xyes; then
45430             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45431 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45432             FOUND_FREETYPE=no
45433           else
45434             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45435 $as_echo_n "checking for freetype... " >&6; }
45436             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45437 $as_echo "yes (using builddeps)" >&6; }
45438           fi
45439         fi
45440       fi
45441 
45442       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45443       if test "x$SYSROOT" = x; then
45444         if test "x$FOUND_FREETYPE" != xyes; then
45445           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45446           if test "x$PKG_CONFIG" != x; then
45447 
45448 pkg_failed=no
45449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45450 $as_echo_n "checking for FREETYPE... " >&6; }
45451 
45452 if test -n "$FREETYPE_CFLAGS"; then
45453     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45454  elif test -n "$PKG_CONFIG"; then
45455     if test -n "$PKG_CONFIG" && \
45456     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45457   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45458   ac_status=$?
45459   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45460   test $ac_status = 0; }; then
45461   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45462 else
45463   pkg_failed=yes
45464 fi
45465  else
45466     pkg_failed=untried
45467 fi
45468 if test -n "$FREETYPE_LIBS"; then
45469     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45470  elif test -n "$PKG_CONFIG"; then
45471     if test -n "$PKG_CONFIG" && \
45472     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45473   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45474   ac_status=$?
45475   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45476   test $ac_status = 0; }; then
45477   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45478 else
45479   pkg_failed=yes
45480 fi
45481  else
45482     pkg_failed=untried
45483 fi
45484 
45485 
45486 
45487 if test $pkg_failed = yes; then
45488 
45489 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45490         _pkg_short_errors_supported=yes
45491 else
45492         _pkg_short_errors_supported=no
45493 fi
45494         if test $_pkg_short_errors_supported = yes; then
45495                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45496         else
45497                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45498         fi
45499         # Put the nasty error message in config.log where it belongs
45500         echo "$FREETYPE_PKG_ERRORS" >&5
45501 
45502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45503 $as_echo "no" >&6; }
45504                 FOUND_FREETYPE=no
45505 elif test $pkg_failed = untried; then
45506         FOUND_FREETYPE=no
45507 else
45508         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45509         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45510         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45511 $as_echo "yes" >&6; }
45512         FOUND_FREETYPE=yes
45513 fi
45514             if test "x$FOUND_FREETYPE" = xyes; then
45515               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45516               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45517               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45518               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45519                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45520               fi
45521               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45522               if test "x$BUNDLE_FREETYPE" = xyes; then
45523                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45524 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45525                 FOUND_FREETYPE=no
45526               else
45527                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45528 $as_echo_n "checking for freetype... " >&6; }
45529                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45530 $as_echo "yes (using pkg-config)" >&6; }
45531               fi
45532             fi
45533           fi
45534         fi
45535       fi
45536 
45537       if test "x$FOUND_FREETYPE" != xyes; then
45538         # Check in well-known locations
45539         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45540           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45541 
45542   windows_path="$FREETYPE_BASE_DIR"
45543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45544     unix_path=`$CYGPATH -u "$windows_path"`
45545     FREETYPE_BASE_DIR="$unix_path"
45546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45548     FREETYPE_BASE_DIR="$unix_path"
45549   fi
45550 
45551 
45552   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45553   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45554   METHOD="well-known location"
45555 
45556   # Let's start with an optimistic view of the world :-)
45557   FOUND_FREETYPE=yes
45558 
45559   # First look for the canonical freetype main include file ft2build.h.
45560   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45561     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45562     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45563     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45564       # Fail.
45565       FOUND_FREETYPE=no
45566     fi
45567   fi
45568 
45569   if test "x$FOUND_FREETYPE" = xyes; then
45570     # Include file found, let's continue the sanity check.
45571     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45572 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45573 
45574     # Reset to default value
45575     FREETYPE_BASE_NAME=freetype
45576     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45577     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45578       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45579           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45580         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45581         # for the .6 version explicitly.
45582         FREETYPE_BASE_NAME=freetype.6
45583         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45584         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45585 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45586       else
45587         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45588 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45589         FOUND_FREETYPE=no
45590       fi
45591     else
45592       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45593         # On Windows, we will need both .lib and .dll file.
45594         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45595           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45596 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45597           FOUND_FREETYPE=no
45598         fi
45599       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45600           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45601         # Found lib in isa dir, use that instead.
45602         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45603         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45604 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45605       fi
45606     fi
45607   fi
45608 
45609   if test "x$FOUND_FREETYPE" = xyes; then
45610 
45611   # Only process if variable expands to non-empty
45612 
45613   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45614     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45615 
45616   # Input might be given as Windows format, start by converting to
45617   # unix format.
45618   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45619   new_path=`$CYGPATH -u "$path"`
45620 
45621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45624   # "foo.exe" is OK but "foo" is an error.
45625   #
45626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45627   # It is also a way to make sure we got the proper file name for the real test later on.
45628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45629   if test "x$test_shortpath" = x; then
45630     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45631 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45632     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45633   fi
45634 
45635   # Call helper function which possibly converts this using DOS-style short mode.
45636   # If so, the updated path is stored in $new_path.
45637 
45638   input_path="$new_path"
45639   # Check if we need to convert this using DOS-style short mode. If the path
45640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45641   # take no chances and rewrite it.
45642   # Note: m4 eats our [], so we need to use [ and ] instead.
45643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45644   if test "x$has_forbidden_chars" != x; then
45645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45649       # Going to short mode and back again did indeed matter. Since short mode is
45650       # case insensitive, let's make it lowercase to improve readability.
45651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45652       # Now convert it back to Unix-stile (cygpath)
45653       input_path=`$CYGPATH -u "$shortmode_path"`
45654       new_path="$input_path"
45655     fi
45656   fi
45657 
45658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45659   if test "x$test_cygdrive_prefix" = x; then
45660     # As a simple fix, exclude /usr/bin since it's not a real path.
45661     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45663       # a path prefixed by /cygdrive for fixpath to work.
45664       new_path="$CYGWIN_ROOT_PATH$input_path"
45665     fi
45666   fi
45667 
45668 
45669   if test "x$path" != "x$new_path"; then
45670     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45671     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45672 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45673   fi
45674 
45675     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45676 
45677   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45678   has_colon=`$ECHO $path | $GREP ^.:`
45679   new_path="$path"
45680   if test "x$has_colon" = x; then
45681     # Not in mixed or Windows style, start by that.
45682     new_path=`cmd //c echo $path`
45683   fi
45684 
45685 
45686   input_path="$new_path"
45687   # Check if we need to convert this using DOS-style short mode. If the path
45688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45689   # take no chances and rewrite it.
45690   # Note: m4 eats our [], so we need to use [ and ] instead.
45691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45692   if test "x$has_forbidden_chars" != x; then
45693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45695   fi
45696 
45697 
45698   windows_path="$new_path"
45699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45700     unix_path=`$CYGPATH -u "$windows_path"`
45701     new_path="$unix_path"
45702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45704     new_path="$unix_path"
45705   fi
45706 
45707   if test "x$path" != "x$new_path"; then
45708     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45710 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45711   fi
45712 
45713   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45714   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45715 
45716     else
45717       # We're on a unix platform. Hooray! :)
45718       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45719       has_space=`$ECHO "$path" | $GREP " "`
45720       if test "x$has_space" != x; then
45721         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45722 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45723         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45724       fi
45725 
45726       # Use eval to expand a potential ~
45727       eval path="$path"
45728       if test ! -f "$path" && test ! -d "$path"; then
45729         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45730       fi
45731 
45732       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45733     fi
45734   fi
45735 
45736 
45737   # Only process if variable expands to non-empty
45738 
45739   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45740     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45741 
45742   # Input might be given as Windows format, start by converting to
45743   # unix format.
45744   path="$POTENTIAL_FREETYPE_LIB_PATH"
45745   new_path=`$CYGPATH -u "$path"`
45746 
45747   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45748   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45749   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45750   # "foo.exe" is OK but "foo" is an error.
45751   #
45752   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45753   # It is also a way to make sure we got the proper file name for the real test later on.
45754   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45755   if test "x$test_shortpath" = x; then
45756     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45757 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45758     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45759   fi
45760 
45761   # Call helper function which possibly converts this using DOS-style short mode.
45762   # If so, the updated path is stored in $new_path.
45763 
45764   input_path="$new_path"
45765   # Check if we need to convert this using DOS-style short mode. If the path
45766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45767   # take no chances and rewrite it.
45768   # Note: m4 eats our [], so we need to use [ and ] instead.
45769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45770   if test "x$has_forbidden_chars" != x; then
45771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45772     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45773     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45774     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45775       # Going to short mode and back again did indeed matter. Since short mode is
45776       # case insensitive, let's make it lowercase to improve readability.
45777       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45778       # Now convert it back to Unix-stile (cygpath)
45779       input_path=`$CYGPATH -u "$shortmode_path"`
45780       new_path="$input_path"
45781     fi
45782   fi
45783 
45784   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45785   if test "x$test_cygdrive_prefix" = x; then
45786     # As a simple fix, exclude /usr/bin since it's not a real path.
45787     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45788       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45789       # a path prefixed by /cygdrive for fixpath to work.
45790       new_path="$CYGWIN_ROOT_PATH$input_path"
45791     fi
45792   fi
45793 
45794 
45795   if test "x$path" != "x$new_path"; then
45796     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45797     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45798 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45799   fi
45800 
45801     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45802 
45803   path="$POTENTIAL_FREETYPE_LIB_PATH"
45804   has_colon=`$ECHO $path | $GREP ^.:`
45805   new_path="$path"
45806   if test "x$has_colon" = x; then
45807     # Not in mixed or Windows style, start by that.
45808     new_path=`cmd //c echo $path`
45809   fi
45810 
45811 
45812   input_path="$new_path"
45813   # Check if we need to convert this using DOS-style short mode. If the path
45814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45815   # take no chances and rewrite it.
45816   # Note: m4 eats our [], so we need to use [ and ] instead.
45817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45818   if test "x$has_forbidden_chars" != x; then
45819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45820     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45821   fi
45822 
45823 
45824   windows_path="$new_path"
45825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45826     unix_path=`$CYGPATH -u "$windows_path"`
45827     new_path="$unix_path"
45828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45830     new_path="$unix_path"
45831   fi
45832 
45833   if test "x$path" != "x$new_path"; then
45834     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45836 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45837   fi
45838 
45839   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45840   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45841 
45842     else
45843       # We're on a unix platform. Hooray! :)
45844       path="$POTENTIAL_FREETYPE_LIB_PATH"
45845       has_space=`$ECHO "$path" | $GREP " "`
45846       if test "x$has_space" != x; then
45847         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45848 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45849         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45850       fi
45851 
45852       # Use eval to expand a potential ~
45853       eval path="$path"
45854       if test ! -f "$path" && test ! -d "$path"; then
45855         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45856       fi
45857 
45858       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45859     fi
45860   fi
45861 
45862 
45863     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45864     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45865 $as_echo_n "checking for freetype includes... " >&6; }
45866     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45867 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45868     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45869     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45870 $as_echo_n "checking for freetype libraries... " >&6; }
45871     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45872 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45873   fi
45874 
45875           if test "x$FOUND_FREETYPE" != xyes; then
45876             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45877 
45878   windows_path="$FREETYPE_BASE_DIR"
45879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45880     unix_path=`$CYGPATH -u "$windows_path"`
45881     FREETYPE_BASE_DIR="$unix_path"
45882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45884     FREETYPE_BASE_DIR="$unix_path"
45885   fi
45886 
45887 
45888   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45889   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45890   METHOD="well-known location"
45891 
45892   # Let's start with an optimistic view of the world :-)
45893   FOUND_FREETYPE=yes
45894 
45895   # First look for the canonical freetype main include file ft2build.h.
45896   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45897     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45898     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45899     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45900       # Fail.
45901       FOUND_FREETYPE=no
45902     fi
45903   fi
45904 
45905   if test "x$FOUND_FREETYPE" = xyes; then
45906     # Include file found, let's continue the sanity check.
45907     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45908 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45909 
45910     # Reset to default value
45911     FREETYPE_BASE_NAME=freetype
45912     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45913     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45914       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45915           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45916         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45917         # for the .6 version explicitly.
45918         FREETYPE_BASE_NAME=freetype.6
45919         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45920         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45921 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45922       else
45923         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45924 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45925         FOUND_FREETYPE=no
45926       fi
45927     else
45928       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45929         # On Windows, we will need both .lib and .dll file.
45930         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45931           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45932 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45933           FOUND_FREETYPE=no
45934         fi
45935       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45936           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45937         # Found lib in isa dir, use that instead.
45938         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45939         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45940 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45941       fi
45942     fi
45943   fi
45944 
45945   if test "x$FOUND_FREETYPE" = xyes; then
45946 
45947   # Only process if variable expands to non-empty
45948 
45949   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45950     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45951 
45952   # Input might be given as Windows format, start by converting to
45953   # unix format.
45954   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45955   new_path=`$CYGPATH -u "$path"`
45956 
45957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45960   # "foo.exe" is OK but "foo" is an error.
45961   #
45962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45963   # It is also a way to make sure we got the proper file name for the real test later on.
45964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45965   if test "x$test_shortpath" = x; then
45966     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45967 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45968     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45969   fi
45970 
45971   # Call helper function which possibly converts this using DOS-style short mode.
45972   # If so, the updated path is stored in $new_path.
45973 
45974   input_path="$new_path"
45975   # Check if we need to convert this using DOS-style short mode. If the path
45976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45977   # take no chances and rewrite it.
45978   # Note: m4 eats our [], so we need to use [ and ] instead.
45979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45980   if test "x$has_forbidden_chars" != x; then
45981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45985       # Going to short mode and back again did indeed matter. Since short mode is
45986       # case insensitive, let's make it lowercase to improve readability.
45987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45988       # Now convert it back to Unix-stile (cygpath)
45989       input_path=`$CYGPATH -u "$shortmode_path"`
45990       new_path="$input_path"
45991     fi
45992   fi
45993 
45994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45995   if test "x$test_cygdrive_prefix" = x; then
45996     # As a simple fix, exclude /usr/bin since it's not a real path.
45997     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45999       # a path prefixed by /cygdrive for fixpath to work.
46000       new_path="$CYGWIN_ROOT_PATH$input_path"
46001     fi
46002   fi
46003 
46004 
46005   if test "x$path" != "x$new_path"; then
46006     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46008 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46009   fi
46010 
46011     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46012 
46013   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46014   has_colon=`$ECHO $path | $GREP ^.:`
46015   new_path="$path"
46016   if test "x$has_colon" = x; then
46017     # Not in mixed or Windows style, start by that.
46018     new_path=`cmd //c echo $path`
46019   fi
46020 
46021 
46022   input_path="$new_path"
46023   # Check if we need to convert this using DOS-style short mode. If the path
46024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46025   # take no chances and rewrite it.
46026   # Note: m4 eats our [], so we need to use [ and ] instead.
46027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46028   if test "x$has_forbidden_chars" != x; then
46029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46030     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46031   fi
46032 
46033 
46034   windows_path="$new_path"
46035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46036     unix_path=`$CYGPATH -u "$windows_path"`
46037     new_path="$unix_path"
46038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46040     new_path="$unix_path"
46041   fi
46042 
46043   if test "x$path" != "x$new_path"; then
46044     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46046 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46047   fi
46048 
46049   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46050   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46051 
46052     else
46053       # We're on a unix platform. Hooray! :)
46054       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46055       has_space=`$ECHO "$path" | $GREP " "`
46056       if test "x$has_space" != x; then
46057         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46058 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46059         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46060       fi
46061 
46062       # Use eval to expand a potential ~
46063       eval path="$path"
46064       if test ! -f "$path" && test ! -d "$path"; then
46065         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46066       fi
46067 
46068       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46069     fi
46070   fi
46071 
46072 
46073   # Only process if variable expands to non-empty
46074 
46075   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46076     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46077 
46078   # Input might be given as Windows format, start by converting to
46079   # unix format.
46080   path="$POTENTIAL_FREETYPE_LIB_PATH"
46081   new_path=`$CYGPATH -u "$path"`
46082 
46083   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46084   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46085   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46086   # "foo.exe" is OK but "foo" is an error.
46087   #
46088   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46089   # It is also a way to make sure we got the proper file name for the real test later on.
46090   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46091   if test "x$test_shortpath" = x; then
46092     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46093 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46094     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46095   fi
46096 
46097   # Call helper function which possibly converts this using DOS-style short mode.
46098   # If so, the updated path is stored in $new_path.
46099 
46100   input_path="$new_path"
46101   # Check if we need to convert this using DOS-style short mode. If the path
46102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46103   # take no chances and rewrite it.
46104   # Note: m4 eats our [], so we need to use [ and ] instead.
46105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46106   if test "x$has_forbidden_chars" != x; then
46107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46111       # Going to short mode and back again did indeed matter. Since short mode is
46112       # case insensitive, let's make it lowercase to improve readability.
46113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46114       # Now convert it back to Unix-stile (cygpath)
46115       input_path=`$CYGPATH -u "$shortmode_path"`
46116       new_path="$input_path"
46117     fi
46118   fi
46119 
46120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46121   if test "x$test_cygdrive_prefix" = x; then
46122     # As a simple fix, exclude /usr/bin since it's not a real path.
46123     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46125       # a path prefixed by /cygdrive for fixpath to work.
46126       new_path="$CYGWIN_ROOT_PATH$input_path"
46127     fi
46128   fi
46129 
46130 
46131   if test "x$path" != "x$new_path"; then
46132     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46134 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46135   fi
46136 
46137     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46138 
46139   path="$POTENTIAL_FREETYPE_LIB_PATH"
46140   has_colon=`$ECHO $path | $GREP ^.:`
46141   new_path="$path"
46142   if test "x$has_colon" = x; then
46143     # Not in mixed or Windows style, start by that.
46144     new_path=`cmd //c echo $path`
46145   fi
46146 
46147 
46148   input_path="$new_path"
46149   # Check if we need to convert this using DOS-style short mode. If the path
46150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46151   # take no chances and rewrite it.
46152   # Note: m4 eats our [], so we need to use [ and ] instead.
46153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46154   if test "x$has_forbidden_chars" != x; then
46155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46156     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46157   fi
46158 
46159 
46160   windows_path="$new_path"
46161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46162     unix_path=`$CYGPATH -u "$windows_path"`
46163     new_path="$unix_path"
46164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46166     new_path="$unix_path"
46167   fi
46168 
46169   if test "x$path" != "x$new_path"; then
46170     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46171     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46172 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46173   fi
46174 
46175   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46176   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46177 
46178     else
46179       # We're on a unix platform. Hooray! :)
46180       path="$POTENTIAL_FREETYPE_LIB_PATH"
46181       has_space=`$ECHO "$path" | $GREP " "`
46182       if test "x$has_space" != x; then
46183         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46184 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46185         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46186       fi
46187 
46188       # Use eval to expand a potential ~
46189       eval path="$path"
46190       if test ! -f "$path" && test ! -d "$path"; then
46191         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46192       fi
46193 
46194       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46195     fi
46196   fi
46197 
46198 
46199     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46201 $as_echo_n "checking for freetype includes... " >&6; }
46202     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46203 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46204     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46205     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46206 $as_echo_n "checking for freetype libraries... " >&6; }
46207     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46208 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46209   fi
46210 
46211           fi
46212         else
46213           FREETYPE_BASE_DIR="$SYSROOT/usr"
46214 
46215   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46216   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46217   METHOD="well-known location"
46218 
46219   # Let's start with an optimistic view of the world :-)
46220   FOUND_FREETYPE=yes
46221 
46222   # First look for the canonical freetype main include file ft2build.h.
46223   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46224     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46225     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46226     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46227       # Fail.
46228       FOUND_FREETYPE=no
46229     fi
46230   fi
46231 
46232   if test "x$FOUND_FREETYPE" = xyes; then
46233     # Include file found, let's continue the sanity check.
46234     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46235 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46236 
46237     # Reset to default value
46238     FREETYPE_BASE_NAME=freetype
46239     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46240     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46241       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46242           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46243         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46244         # for the .6 version explicitly.
46245         FREETYPE_BASE_NAME=freetype.6
46246         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46247         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46248 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46249       else
46250         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46251 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46252         FOUND_FREETYPE=no
46253       fi
46254     else
46255       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46256         # On Windows, we will need both .lib and .dll file.
46257         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46258           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46259 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46260           FOUND_FREETYPE=no
46261         fi
46262       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46263           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46264         # Found lib in isa dir, use that instead.
46265         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46266         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46267 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46268       fi
46269     fi
46270   fi
46271 
46272   if test "x$FOUND_FREETYPE" = xyes; then
46273 
46274   # Only process if variable expands to non-empty
46275 
46276   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46277     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46278 
46279   # Input might be given as Windows format, start by converting to
46280   # unix format.
46281   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46282   new_path=`$CYGPATH -u "$path"`
46283 
46284   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46285   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46286   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46287   # "foo.exe" is OK but "foo" is an error.
46288   #
46289   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46290   # It is also a way to make sure we got the proper file name for the real test later on.
46291   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46292   if test "x$test_shortpath" = x; then
46293     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46294 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46295     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46296   fi
46297 
46298   # Call helper function which possibly converts this using DOS-style short mode.
46299   # If so, the updated path is stored in $new_path.
46300 
46301   input_path="$new_path"
46302   # Check if we need to convert this using DOS-style short mode. If the path
46303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46304   # take no chances and rewrite it.
46305   # Note: m4 eats our [], so we need to use [ and ] instead.
46306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46307   if test "x$has_forbidden_chars" != x; then
46308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46309     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46310     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46311     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46312       # Going to short mode and back again did indeed matter. Since short mode is
46313       # case insensitive, let's make it lowercase to improve readability.
46314       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46315       # Now convert it back to Unix-stile (cygpath)
46316       input_path=`$CYGPATH -u "$shortmode_path"`
46317       new_path="$input_path"
46318     fi
46319   fi
46320 
46321   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46322   if test "x$test_cygdrive_prefix" = x; then
46323     # As a simple fix, exclude /usr/bin since it's not a real path.
46324     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46325       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46326       # a path prefixed by /cygdrive for fixpath to work.
46327       new_path="$CYGWIN_ROOT_PATH$input_path"
46328     fi
46329   fi
46330 
46331 
46332   if test "x$path" != "x$new_path"; then
46333     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46334     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46335 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46336   fi
46337 
46338     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46339 
46340   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46341   has_colon=`$ECHO $path | $GREP ^.:`
46342   new_path="$path"
46343   if test "x$has_colon" = x; then
46344     # Not in mixed or Windows style, start by that.
46345     new_path=`cmd //c echo $path`
46346   fi
46347 
46348 
46349   input_path="$new_path"
46350   # Check if we need to convert this using DOS-style short mode. If the path
46351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46352   # take no chances and rewrite it.
46353   # Note: m4 eats our [], so we need to use [ and ] instead.
46354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46355   if test "x$has_forbidden_chars" != x; then
46356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46357     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46358   fi
46359 
46360 
46361   windows_path="$new_path"
46362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46363     unix_path=`$CYGPATH -u "$windows_path"`
46364     new_path="$unix_path"
46365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46367     new_path="$unix_path"
46368   fi
46369 
46370   if test "x$path" != "x$new_path"; then
46371     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46373 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46374   fi
46375 
46376   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46377   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46378 
46379     else
46380       # We're on a unix platform. Hooray! :)
46381       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46382       has_space=`$ECHO "$path" | $GREP " "`
46383       if test "x$has_space" != x; then
46384         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46385 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46386         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46387       fi
46388 
46389       # Use eval to expand a potential ~
46390       eval path="$path"
46391       if test ! -f "$path" && test ! -d "$path"; then
46392         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46393       fi
46394 
46395       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46396     fi
46397   fi
46398 
46399 
46400   # Only process if variable expands to non-empty
46401 
46402   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46403     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46404 
46405   # Input might be given as Windows format, start by converting to
46406   # unix format.
46407   path="$POTENTIAL_FREETYPE_LIB_PATH"
46408   new_path=`$CYGPATH -u "$path"`
46409 
46410   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46411   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46412   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46413   # "foo.exe" is OK but "foo" is an error.
46414   #
46415   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46416   # It is also a way to make sure we got the proper file name for the real test later on.
46417   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46418   if test "x$test_shortpath" = x; then
46419     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46420 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46421     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46422   fi
46423 
46424   # Call helper function which possibly converts this using DOS-style short mode.
46425   # If so, the updated path is stored in $new_path.
46426 
46427   input_path="$new_path"
46428   # Check if we need to convert this using DOS-style short mode. If the path
46429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46430   # take no chances and rewrite it.
46431   # Note: m4 eats our [], so we need to use [ and ] instead.
46432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46433   if test "x$has_forbidden_chars" != x; then
46434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46435     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46436     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46437     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46438       # Going to short mode and back again did indeed matter. Since short mode is
46439       # case insensitive, let's make it lowercase to improve readability.
46440       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46441       # Now convert it back to Unix-stile (cygpath)
46442       input_path=`$CYGPATH -u "$shortmode_path"`
46443       new_path="$input_path"
46444     fi
46445   fi
46446 
46447   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46448   if test "x$test_cygdrive_prefix" = x; then
46449     # As a simple fix, exclude /usr/bin since it's not a real path.
46450     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46451       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46452       # a path prefixed by /cygdrive for fixpath to work.
46453       new_path="$CYGWIN_ROOT_PATH$input_path"
46454     fi
46455   fi
46456 
46457 
46458   if test "x$path" != "x$new_path"; then
46459     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46460     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46461 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46462   fi
46463 
46464     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46465 
46466   path="$POTENTIAL_FREETYPE_LIB_PATH"
46467   has_colon=`$ECHO $path | $GREP ^.:`
46468   new_path="$path"
46469   if test "x$has_colon" = x; then
46470     # Not in mixed or Windows style, start by that.
46471     new_path=`cmd //c echo $path`
46472   fi
46473 
46474 
46475   input_path="$new_path"
46476   # Check if we need to convert this using DOS-style short mode. If the path
46477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46478   # take no chances and rewrite it.
46479   # Note: m4 eats our [], so we need to use [ and ] instead.
46480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46481   if test "x$has_forbidden_chars" != x; then
46482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46483     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46484   fi
46485 
46486 
46487   windows_path="$new_path"
46488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46489     unix_path=`$CYGPATH -u "$windows_path"`
46490     new_path="$unix_path"
46491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46493     new_path="$unix_path"
46494   fi
46495 
46496   if test "x$path" != "x$new_path"; then
46497     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46499 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46500   fi
46501 
46502   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46503   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46504 
46505     else
46506       # We're on a unix platform. Hooray! :)
46507       path="$POTENTIAL_FREETYPE_LIB_PATH"
46508       has_space=`$ECHO "$path" | $GREP " "`
46509       if test "x$has_space" != x; then
46510         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46511 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46512         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46513       fi
46514 
46515       # Use eval to expand a potential ~
46516       eval path="$path"
46517       if test ! -f "$path" && test ! -d "$path"; then
46518         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46519       fi
46520 
46521       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46522     fi
46523   fi
46524 
46525 
46526     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46527     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46528 $as_echo_n "checking for freetype includes... " >&6; }
46529     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46530 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46531     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46533 $as_echo_n "checking for freetype libraries... " >&6; }
46534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46535 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46536   fi
46537 
46538 
46539           if test "x$FOUND_FREETYPE" != xyes; then
46540             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46541 
46542   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46543   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46544   METHOD="well-known location"
46545 
46546   # Let's start with an optimistic view of the world :-)
46547   FOUND_FREETYPE=yes
46548 
46549   # First look for the canonical freetype main include file ft2build.h.
46550   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46551     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46552     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46553     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46554       # Fail.
46555       FOUND_FREETYPE=no
46556     fi
46557   fi
46558 
46559   if test "x$FOUND_FREETYPE" = xyes; then
46560     # Include file found, let's continue the sanity check.
46561     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46562 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46563 
46564     # Reset to default value
46565     FREETYPE_BASE_NAME=freetype
46566     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46567     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46568       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46569           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46570         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46571         # for the .6 version explicitly.
46572         FREETYPE_BASE_NAME=freetype.6
46573         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46574         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46575 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46576       else
46577         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46578 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46579         FOUND_FREETYPE=no
46580       fi
46581     else
46582       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46583         # On Windows, we will need both .lib and .dll file.
46584         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46585           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46586 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46587           FOUND_FREETYPE=no
46588         fi
46589       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46590           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46591         # Found lib in isa dir, use that instead.
46592         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46593         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46594 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46595       fi
46596     fi
46597   fi
46598 
46599   if test "x$FOUND_FREETYPE" = xyes; then
46600 
46601   # Only process if variable expands to non-empty
46602 
46603   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46604     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46605 
46606   # Input might be given as Windows format, start by converting to
46607   # unix format.
46608   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46609   new_path=`$CYGPATH -u "$path"`
46610 
46611   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46612   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46613   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46614   # "foo.exe" is OK but "foo" is an error.
46615   #
46616   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46617   # It is also a way to make sure we got the proper file name for the real test later on.
46618   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46619   if test "x$test_shortpath" = x; then
46620     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46621 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46622     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46623   fi
46624 
46625   # Call helper function which possibly converts this using DOS-style short mode.
46626   # If so, the updated path is stored in $new_path.
46627 
46628   input_path="$new_path"
46629   # Check if we need to convert this using DOS-style short mode. If the path
46630   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46631   # take no chances and rewrite it.
46632   # Note: m4 eats our [], so we need to use [ and ] instead.
46633   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46634   if test "x$has_forbidden_chars" != x; then
46635     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46636     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46637     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46638     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46639       # Going to short mode and back again did indeed matter. Since short mode is
46640       # case insensitive, let's make it lowercase to improve readability.
46641       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46642       # Now convert it back to Unix-stile (cygpath)
46643       input_path=`$CYGPATH -u "$shortmode_path"`
46644       new_path="$input_path"
46645     fi
46646   fi
46647 
46648   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46649   if test "x$test_cygdrive_prefix" = x; then
46650     # As a simple fix, exclude /usr/bin since it's not a real path.
46651     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46652       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46653       # a path prefixed by /cygdrive for fixpath to work.
46654       new_path="$CYGWIN_ROOT_PATH$input_path"
46655     fi
46656   fi
46657 
46658 
46659   if test "x$path" != "x$new_path"; then
46660     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46662 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46663   fi
46664 
46665     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46666 
46667   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46668   has_colon=`$ECHO $path | $GREP ^.:`
46669   new_path="$path"
46670   if test "x$has_colon" = x; then
46671     # Not in mixed or Windows style, start by that.
46672     new_path=`cmd //c echo $path`
46673   fi
46674 
46675 
46676   input_path="$new_path"
46677   # Check if we need to convert this using DOS-style short mode. If the path
46678   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46679   # take no chances and rewrite it.
46680   # Note: m4 eats our [], so we need to use [ and ] instead.
46681   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46682   if test "x$has_forbidden_chars" != x; then
46683     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46684     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46685   fi
46686 
46687 
46688   windows_path="$new_path"
46689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46690     unix_path=`$CYGPATH -u "$windows_path"`
46691     new_path="$unix_path"
46692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46694     new_path="$unix_path"
46695   fi
46696 
46697   if test "x$path" != "x$new_path"; then
46698     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46699     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46700 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46701   fi
46702 
46703   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46704   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46705 
46706     else
46707       # We're on a unix platform. Hooray! :)
46708       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46709       has_space=`$ECHO "$path" | $GREP " "`
46710       if test "x$has_space" != x; then
46711         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46712 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46713         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46714       fi
46715 
46716       # Use eval to expand a potential ~
46717       eval path="$path"
46718       if test ! -f "$path" && test ! -d "$path"; then
46719         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46720       fi
46721 
46722       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46723     fi
46724   fi
46725 
46726 
46727   # Only process if variable expands to non-empty
46728 
46729   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46730     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46731 
46732   # Input might be given as Windows format, start by converting to
46733   # unix format.
46734   path="$POTENTIAL_FREETYPE_LIB_PATH"
46735   new_path=`$CYGPATH -u "$path"`
46736 
46737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46740   # "foo.exe" is OK but "foo" is an error.
46741   #
46742   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46743   # It is also a way to make sure we got the proper file name for the real test later on.
46744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46745   if test "x$test_shortpath" = x; then
46746     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46747 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46748     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46749   fi
46750 
46751   # Call helper function which possibly converts this using DOS-style short mode.
46752   # If so, the updated path is stored in $new_path.
46753 
46754   input_path="$new_path"
46755   # Check if we need to convert this using DOS-style short mode. If the path
46756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46757   # take no chances and rewrite it.
46758   # Note: m4 eats our [], so we need to use [ and ] instead.
46759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46760   if test "x$has_forbidden_chars" != x; then
46761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46762     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46763     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46764     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46765       # Going to short mode and back again did indeed matter. Since short mode is
46766       # case insensitive, let's make it lowercase to improve readability.
46767       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46768       # Now convert it back to Unix-stile (cygpath)
46769       input_path=`$CYGPATH -u "$shortmode_path"`
46770       new_path="$input_path"
46771     fi
46772   fi
46773 
46774   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46775   if test "x$test_cygdrive_prefix" = x; then
46776     # As a simple fix, exclude /usr/bin since it's not a real path.
46777     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46778       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46779       # a path prefixed by /cygdrive for fixpath to work.
46780       new_path="$CYGWIN_ROOT_PATH$input_path"
46781     fi
46782   fi
46783 
46784 
46785   if test "x$path" != "x$new_path"; then
46786     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46788 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46789   fi
46790 
46791     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46792 
46793   path="$POTENTIAL_FREETYPE_LIB_PATH"
46794   has_colon=`$ECHO $path | $GREP ^.:`
46795   new_path="$path"
46796   if test "x$has_colon" = x; then
46797     # Not in mixed or Windows style, start by that.
46798     new_path=`cmd //c echo $path`
46799   fi
46800 
46801 
46802   input_path="$new_path"
46803   # Check if we need to convert this using DOS-style short mode. If the path
46804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46805   # take no chances and rewrite it.
46806   # Note: m4 eats our [], so we need to use [ and ] instead.
46807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46808   if test "x$has_forbidden_chars" != x; then
46809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46810     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46811   fi
46812 
46813 
46814   windows_path="$new_path"
46815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46816     unix_path=`$CYGPATH -u "$windows_path"`
46817     new_path="$unix_path"
46818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46820     new_path="$unix_path"
46821   fi
46822 
46823   if test "x$path" != "x$new_path"; then
46824     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46826 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46827   fi
46828 
46829   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46830   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46831 
46832     else
46833       # We're on a unix platform. Hooray! :)
46834       path="$POTENTIAL_FREETYPE_LIB_PATH"
46835       has_space=`$ECHO "$path" | $GREP " "`
46836       if test "x$has_space" != x; then
46837         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46838 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46839         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46840       fi
46841 
46842       # Use eval to expand a potential ~
46843       eval path="$path"
46844       if test ! -f "$path" && test ! -d "$path"; then
46845         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46846       fi
46847 
46848       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46849     fi
46850   fi
46851 
46852 
46853     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46854     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46855 $as_echo_n "checking for freetype includes... " >&6; }
46856     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46857 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46858     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46860 $as_echo_n "checking for freetype libraries... " >&6; }
46861     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46862 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46863   fi
46864 
46865           fi
46866 
46867           if test "x$FOUND_FREETYPE" != xyes; then
46868             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46869 
46870   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46871   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46872   METHOD="well-known location"
46873 
46874   # Let's start with an optimistic view of the world :-)
46875   FOUND_FREETYPE=yes
46876 
46877   # First look for the canonical freetype main include file ft2build.h.
46878   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46879     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46880     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46881     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46882       # Fail.
46883       FOUND_FREETYPE=no
46884     fi
46885   fi
46886 
46887   if test "x$FOUND_FREETYPE" = xyes; then
46888     # Include file found, let's continue the sanity check.
46889     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46890 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46891 
46892     # Reset to default value
46893     FREETYPE_BASE_NAME=freetype
46894     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46895     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46896       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46897           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46898         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46899         # for the .6 version explicitly.
46900         FREETYPE_BASE_NAME=freetype.6
46901         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46902         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46903 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46904       else
46905         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46906 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46907         FOUND_FREETYPE=no
46908       fi
46909     else
46910       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46911         # On Windows, we will need both .lib and .dll file.
46912         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46913           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46914 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46915           FOUND_FREETYPE=no
46916         fi
46917       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46918           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46919         # Found lib in isa dir, use that instead.
46920         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46921         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46922 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46923       fi
46924     fi
46925   fi
46926 
46927   if test "x$FOUND_FREETYPE" = xyes; then
46928 
46929   # Only process if variable expands to non-empty
46930 
46931   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46932     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46933 
46934   # Input might be given as Windows format, start by converting to
46935   # unix format.
46936   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46937   new_path=`$CYGPATH -u "$path"`
46938 
46939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46942   # "foo.exe" is OK but "foo" is an error.
46943   #
46944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46945   # It is also a way to make sure we got the proper file name for the real test later on.
46946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46947   if test "x$test_shortpath" = x; then
46948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46949 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46950     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46951   fi
46952 
46953   # Call helper function which possibly converts this using DOS-style short mode.
46954   # If so, the updated path is stored in $new_path.
46955 
46956   input_path="$new_path"
46957   # Check if we need to convert this using DOS-style short mode. If the path
46958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46959   # take no chances and rewrite it.
46960   # Note: m4 eats our [], so we need to use [ and ] instead.
46961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46962   if test "x$has_forbidden_chars" != x; then
46963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46967       # Going to short mode and back again did indeed matter. Since short mode is
46968       # case insensitive, let's make it lowercase to improve readability.
46969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46970       # Now convert it back to Unix-stile (cygpath)
46971       input_path=`$CYGPATH -u "$shortmode_path"`
46972       new_path="$input_path"
46973     fi
46974   fi
46975 
46976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46977   if test "x$test_cygdrive_prefix" = x; then
46978     # As a simple fix, exclude /usr/bin since it's not a real path.
46979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46981       # a path prefixed by /cygdrive for fixpath to work.
46982       new_path="$CYGWIN_ROOT_PATH$input_path"
46983     fi
46984   fi
46985 
46986 
46987   if test "x$path" != "x$new_path"; then
46988     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46991   fi
46992 
46993     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46994 
46995   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46996   has_colon=`$ECHO $path | $GREP ^.:`
46997   new_path="$path"
46998   if test "x$has_colon" = x; then
46999     # Not in mixed or Windows style, start by that.
47000     new_path=`cmd //c echo $path`
47001   fi
47002 
47003 
47004   input_path="$new_path"
47005   # Check if we need to convert this using DOS-style short mode. If the path
47006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47007   # take no chances and rewrite it.
47008   # Note: m4 eats our [], so we need to use [ and ] instead.
47009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47010   if test "x$has_forbidden_chars" != x; then
47011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47013   fi
47014 
47015 
47016   windows_path="$new_path"
47017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47018     unix_path=`$CYGPATH -u "$windows_path"`
47019     new_path="$unix_path"
47020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47022     new_path="$unix_path"
47023   fi
47024 
47025   if test "x$path" != "x$new_path"; then
47026     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47028 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47029   fi
47030 
47031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47033 
47034     else
47035       # We're on a unix platform. Hooray! :)
47036       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47037       has_space=`$ECHO "$path" | $GREP " "`
47038       if test "x$has_space" != x; then
47039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47040 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47041         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47042       fi
47043 
47044       # Use eval to expand a potential ~
47045       eval path="$path"
47046       if test ! -f "$path" && test ! -d "$path"; then
47047         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47048       fi
47049 
47050       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47051     fi
47052   fi
47053 
47054 
47055   # Only process if variable expands to non-empty
47056 
47057   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47058     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47059 
47060   # Input might be given as Windows format, start by converting to
47061   # unix format.
47062   path="$POTENTIAL_FREETYPE_LIB_PATH"
47063   new_path=`$CYGPATH -u "$path"`
47064 
47065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47068   # "foo.exe" is OK but "foo" is an error.
47069   #
47070   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47071   # It is also a way to make sure we got the proper file name for the real test later on.
47072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47073   if test "x$test_shortpath" = x; then
47074     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47075 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47076     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47077   fi
47078 
47079   # Call helper function which possibly converts this using DOS-style short mode.
47080   # If so, the updated path is stored in $new_path.
47081 
47082   input_path="$new_path"
47083   # Check if we need to convert this using DOS-style short mode. If the path
47084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47085   # take no chances and rewrite it.
47086   # Note: m4 eats our [], so we need to use [ and ] instead.
47087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47088   if test "x$has_forbidden_chars" != x; then
47089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47093       # Going to short mode and back again did indeed matter. Since short mode is
47094       # case insensitive, let's make it lowercase to improve readability.
47095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47096       # Now convert it back to Unix-stile (cygpath)
47097       input_path=`$CYGPATH -u "$shortmode_path"`
47098       new_path="$input_path"
47099     fi
47100   fi
47101 
47102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47103   if test "x$test_cygdrive_prefix" = x; then
47104     # As a simple fix, exclude /usr/bin since it's not a real path.
47105     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47107       # a path prefixed by /cygdrive for fixpath to work.
47108       new_path="$CYGWIN_ROOT_PATH$input_path"
47109     fi
47110   fi
47111 
47112 
47113   if test "x$path" != "x$new_path"; then
47114     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47115     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47116 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47117   fi
47118 
47119     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47120 
47121   path="$POTENTIAL_FREETYPE_LIB_PATH"
47122   has_colon=`$ECHO $path | $GREP ^.:`
47123   new_path="$path"
47124   if test "x$has_colon" = x; then
47125     # Not in mixed or Windows style, start by that.
47126     new_path=`cmd //c echo $path`
47127   fi
47128 
47129 
47130   input_path="$new_path"
47131   # Check if we need to convert this using DOS-style short mode. If the path
47132   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47133   # take no chances and rewrite it.
47134   # Note: m4 eats our [], so we need to use [ and ] instead.
47135   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47136   if test "x$has_forbidden_chars" != x; then
47137     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47138     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47139   fi
47140 
47141 
47142   windows_path="$new_path"
47143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47144     unix_path=`$CYGPATH -u "$windows_path"`
47145     new_path="$unix_path"
47146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47148     new_path="$unix_path"
47149   fi
47150 
47151   if test "x$path" != "x$new_path"; then
47152     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47154 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47155   fi
47156 
47157   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47158   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47159 
47160     else
47161       # We're on a unix platform. Hooray! :)
47162       path="$POTENTIAL_FREETYPE_LIB_PATH"
47163       has_space=`$ECHO "$path" | $GREP " "`
47164       if test "x$has_space" != x; then
47165         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47166 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47167         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47168       fi
47169 
47170       # Use eval to expand a potential ~
47171       eval path="$path"
47172       if test ! -f "$path" && test ! -d "$path"; then
47173         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47174       fi
47175 
47176       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47177     fi
47178   fi
47179 
47180 
47181     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47182     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47183 $as_echo_n "checking for freetype includes... " >&6; }
47184     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47185 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47186     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47187     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47188 $as_echo_n "checking for freetype libraries... " >&6; }
47189     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47190 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47191   fi
47192 
47193           fi
47194 
47195           if test "x$FOUND_FREETYPE" != xyes; then
47196             FREETYPE_BASE_DIR="$SYSROOT/usr"
47197             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47198 
47199   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47200   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47201   METHOD="well-known location"
47202 
47203   # Let's start with an optimistic view of the world :-)
47204   FOUND_FREETYPE=yes
47205 
47206   # First look for the canonical freetype main include file ft2build.h.
47207   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47208     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47209     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47210     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47211       # Fail.
47212       FOUND_FREETYPE=no
47213     fi
47214   fi
47215 
47216   if test "x$FOUND_FREETYPE" = xyes; then
47217     # Include file found, let's continue the sanity check.
47218     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47219 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47220 
47221     # Reset to default value
47222     FREETYPE_BASE_NAME=freetype
47223     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47224     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47225       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47226           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47227         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47228         # for the .6 version explicitly.
47229         FREETYPE_BASE_NAME=freetype.6
47230         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47231         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47232 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47233       else
47234         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47235 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47236         FOUND_FREETYPE=no
47237       fi
47238     else
47239       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47240         # On Windows, we will need both .lib and .dll file.
47241         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47242           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47243 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47244           FOUND_FREETYPE=no
47245         fi
47246       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47247           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47248         # Found lib in isa dir, use that instead.
47249         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47250         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47251 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47252       fi
47253     fi
47254   fi
47255 
47256   if test "x$FOUND_FREETYPE" = xyes; then
47257 
47258   # Only process if variable expands to non-empty
47259 
47260   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47261     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47262 
47263   # Input might be given as Windows format, start by converting to
47264   # unix format.
47265   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47266   new_path=`$CYGPATH -u "$path"`
47267 
47268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47271   # "foo.exe" is OK but "foo" is an error.
47272   #
47273   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47274   # It is also a way to make sure we got the proper file name for the real test later on.
47275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47276   if test "x$test_shortpath" = x; then
47277     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47278 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47279     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47280   fi
47281 
47282   # Call helper function which possibly converts this using DOS-style short mode.
47283   # If so, the updated path is stored in $new_path.
47284 
47285   input_path="$new_path"
47286   # Check if we need to convert this using DOS-style short mode. If the path
47287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47288   # take no chances and rewrite it.
47289   # Note: m4 eats our [], so we need to use [ and ] instead.
47290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47291   if test "x$has_forbidden_chars" != x; then
47292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47296       # Going to short mode and back again did indeed matter. Since short mode is
47297       # case insensitive, let's make it lowercase to improve readability.
47298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47299       # Now convert it back to Unix-stile (cygpath)
47300       input_path=`$CYGPATH -u "$shortmode_path"`
47301       new_path="$input_path"
47302     fi
47303   fi
47304 
47305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47306   if test "x$test_cygdrive_prefix" = x; then
47307     # As a simple fix, exclude /usr/bin since it's not a real path.
47308     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47310       # a path prefixed by /cygdrive for fixpath to work.
47311       new_path="$CYGWIN_ROOT_PATH$input_path"
47312     fi
47313   fi
47314 
47315 
47316   if test "x$path" != "x$new_path"; then
47317     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47319 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47320   fi
47321 
47322     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47323 
47324   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47325   has_colon=`$ECHO $path | $GREP ^.:`
47326   new_path="$path"
47327   if test "x$has_colon" = x; then
47328     # Not in mixed or Windows style, start by that.
47329     new_path=`cmd //c echo $path`
47330   fi
47331 
47332 
47333   input_path="$new_path"
47334   # Check if we need to convert this using DOS-style short mode. If the path
47335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47336   # take no chances and rewrite it.
47337   # Note: m4 eats our [], so we need to use [ and ] instead.
47338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47339   if test "x$has_forbidden_chars" != x; then
47340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47342   fi
47343 
47344 
47345   windows_path="$new_path"
47346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47347     unix_path=`$CYGPATH -u "$windows_path"`
47348     new_path="$unix_path"
47349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47351     new_path="$unix_path"
47352   fi
47353 
47354   if test "x$path" != "x$new_path"; then
47355     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47357 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47358   fi
47359 
47360   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47361   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47362 
47363     else
47364       # We're on a unix platform. Hooray! :)
47365       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47366       has_space=`$ECHO "$path" | $GREP " "`
47367       if test "x$has_space" != x; then
47368         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47369 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47370         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47371       fi
47372 
47373       # Use eval to expand a potential ~
47374       eval path="$path"
47375       if test ! -f "$path" && test ! -d "$path"; then
47376         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47377       fi
47378 
47379       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47380     fi
47381   fi
47382 
47383 
47384   # Only process if variable expands to non-empty
47385 
47386   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47387     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47388 
47389   # Input might be given as Windows format, start by converting to
47390   # unix format.
47391   path="$POTENTIAL_FREETYPE_LIB_PATH"
47392   new_path=`$CYGPATH -u "$path"`
47393 
47394   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47395   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47396   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47397   # "foo.exe" is OK but "foo" is an error.
47398   #
47399   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47400   # It is also a way to make sure we got the proper file name for the real test later on.
47401   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47402   if test "x$test_shortpath" = x; then
47403     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47404 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47405     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47406   fi
47407 
47408   # Call helper function which possibly converts this using DOS-style short mode.
47409   # If so, the updated path is stored in $new_path.
47410 
47411   input_path="$new_path"
47412   # Check if we need to convert this using DOS-style short mode. If the path
47413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47414   # take no chances and rewrite it.
47415   # Note: m4 eats our [], so we need to use [ and ] instead.
47416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47417   if test "x$has_forbidden_chars" != x; then
47418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47419     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47420     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47421     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47422       # Going to short mode and back again did indeed matter. Since short mode is
47423       # case insensitive, let's make it lowercase to improve readability.
47424       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47425       # Now convert it back to Unix-stile (cygpath)
47426       input_path=`$CYGPATH -u "$shortmode_path"`
47427       new_path="$input_path"
47428     fi
47429   fi
47430 
47431   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47432   if test "x$test_cygdrive_prefix" = x; then
47433     # As a simple fix, exclude /usr/bin since it's not a real path.
47434     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47435       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47436       # a path prefixed by /cygdrive for fixpath to work.
47437       new_path="$CYGWIN_ROOT_PATH$input_path"
47438     fi
47439   fi
47440 
47441 
47442   if test "x$path" != "x$new_path"; then
47443     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47444     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47445 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47446   fi
47447 
47448     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47449 
47450   path="$POTENTIAL_FREETYPE_LIB_PATH"
47451   has_colon=`$ECHO $path | $GREP ^.:`
47452   new_path="$path"
47453   if test "x$has_colon" = x; then
47454     # Not in mixed or Windows style, start by that.
47455     new_path=`cmd //c echo $path`
47456   fi
47457 
47458 
47459   input_path="$new_path"
47460   # Check if we need to convert this using DOS-style short mode. If the path
47461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47462   # take no chances and rewrite it.
47463   # Note: m4 eats our [], so we need to use [ and ] instead.
47464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47465   if test "x$has_forbidden_chars" != x; then
47466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47468   fi
47469 
47470 
47471   windows_path="$new_path"
47472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47473     unix_path=`$CYGPATH -u "$windows_path"`
47474     new_path="$unix_path"
47475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47477     new_path="$unix_path"
47478   fi
47479 
47480   if test "x$path" != "x$new_path"; then
47481     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47483 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47484   fi
47485 
47486   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47487   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47488 
47489     else
47490       # We're on a unix platform. Hooray! :)
47491       path="$POTENTIAL_FREETYPE_LIB_PATH"
47492       has_space=`$ECHO "$path" | $GREP " "`
47493       if test "x$has_space" != x; then
47494         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47495 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47496         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47497       fi
47498 
47499       # Use eval to expand a potential ~
47500       eval path="$path"
47501       if test ! -f "$path" && test ! -d "$path"; then
47502         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47503       fi
47504 
47505       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47506     fi
47507   fi
47508 
47509 
47510     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47511     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47512 $as_echo_n "checking for freetype includes... " >&6; }
47513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47514 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47515     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47517 $as_echo_n "checking for freetype libraries... " >&6; }
47518     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47519 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47520   fi
47521 
47522             else
47523 
47524   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47525   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47526   METHOD="well-known location"
47527 
47528   # Let's start with an optimistic view of the world :-)
47529   FOUND_FREETYPE=yes
47530 
47531   # First look for the canonical freetype main include file ft2build.h.
47532   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47533     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47534     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47535     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47536       # Fail.
47537       FOUND_FREETYPE=no
47538     fi
47539   fi
47540 
47541   if test "x$FOUND_FREETYPE" = xyes; then
47542     # Include file found, let's continue the sanity check.
47543     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47544 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47545 
47546     # Reset to default value
47547     FREETYPE_BASE_NAME=freetype
47548     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47549     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47550       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47551           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47552         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47553         # for the .6 version explicitly.
47554         FREETYPE_BASE_NAME=freetype.6
47555         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47556         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47557 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47558       else
47559         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47560 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47561         FOUND_FREETYPE=no
47562       fi
47563     else
47564       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47565         # On Windows, we will need both .lib and .dll file.
47566         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47567           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47568 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47569           FOUND_FREETYPE=no
47570         fi
47571       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47572           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47573         # Found lib in isa dir, use that instead.
47574         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47575         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47576 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47577       fi
47578     fi
47579   fi
47580 
47581   if test "x$FOUND_FREETYPE" = xyes; then
47582 
47583   # Only process if variable expands to non-empty
47584 
47585   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47586     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47587 
47588   # Input might be given as Windows format, start by converting to
47589   # unix format.
47590   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47591   new_path=`$CYGPATH -u "$path"`
47592 
47593   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47594   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47595   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47596   # "foo.exe" is OK but "foo" is an error.
47597   #
47598   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47599   # It is also a way to make sure we got the proper file name for the real test later on.
47600   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47601   if test "x$test_shortpath" = x; then
47602     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47603 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47604     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47605   fi
47606 
47607   # Call helper function which possibly converts this using DOS-style short mode.
47608   # If so, the updated path is stored in $new_path.
47609 
47610   input_path="$new_path"
47611   # Check if we need to convert this using DOS-style short mode. If the path
47612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47613   # take no chances and rewrite it.
47614   # Note: m4 eats our [], so we need to use [ and ] instead.
47615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47616   if test "x$has_forbidden_chars" != x; then
47617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47618     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47619     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47620     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47621       # Going to short mode and back again did indeed matter. Since short mode is
47622       # case insensitive, let's make it lowercase to improve readability.
47623       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47624       # Now convert it back to Unix-stile (cygpath)
47625       input_path=`$CYGPATH -u "$shortmode_path"`
47626       new_path="$input_path"
47627     fi
47628   fi
47629 
47630   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47631   if test "x$test_cygdrive_prefix" = x; then
47632     # As a simple fix, exclude /usr/bin since it's not a real path.
47633     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47634       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47635       # a path prefixed by /cygdrive for fixpath to work.
47636       new_path="$CYGWIN_ROOT_PATH$input_path"
47637     fi
47638   fi
47639 
47640 
47641   if test "x$path" != "x$new_path"; then
47642     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47644 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47645   fi
47646 
47647     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47648 
47649   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47650   has_colon=`$ECHO $path | $GREP ^.:`
47651   new_path="$path"
47652   if test "x$has_colon" = x; then
47653     # Not in mixed or Windows style, start by that.
47654     new_path=`cmd //c echo $path`
47655   fi
47656 
47657 
47658   input_path="$new_path"
47659   # Check if we need to convert this using DOS-style short mode. If the path
47660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47661   # take no chances and rewrite it.
47662   # Note: m4 eats our [], so we need to use [ and ] instead.
47663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47664   if test "x$has_forbidden_chars" != x; then
47665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47667   fi
47668 
47669 
47670   windows_path="$new_path"
47671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47672     unix_path=`$CYGPATH -u "$windows_path"`
47673     new_path="$unix_path"
47674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47676     new_path="$unix_path"
47677   fi
47678 
47679   if test "x$path" != "x$new_path"; then
47680     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47681     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47682 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47683   fi
47684 
47685   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47686   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47687 
47688     else
47689       # We're on a unix platform. Hooray! :)
47690       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47691       has_space=`$ECHO "$path" | $GREP " "`
47692       if test "x$has_space" != x; then
47693         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47694 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47695         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47696       fi
47697 
47698       # Use eval to expand a potential ~
47699       eval path="$path"
47700       if test ! -f "$path" && test ! -d "$path"; then
47701         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47702       fi
47703 
47704       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47705     fi
47706   fi
47707 
47708 
47709   # Only process if variable expands to non-empty
47710 
47711   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47712     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47713 
47714   # Input might be given as Windows format, start by converting to
47715   # unix format.
47716   path="$POTENTIAL_FREETYPE_LIB_PATH"
47717   new_path=`$CYGPATH -u "$path"`
47718 
47719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47722   # "foo.exe" is OK but "foo" is an error.
47723   #
47724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47725   # It is also a way to make sure we got the proper file name for the real test later on.
47726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47727   if test "x$test_shortpath" = x; then
47728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47729 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47730     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47731   fi
47732 
47733   # Call helper function which possibly converts this using DOS-style short mode.
47734   # If so, the updated path is stored in $new_path.
47735 
47736   input_path="$new_path"
47737   # Check if we need to convert this using DOS-style short mode. If the path
47738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47739   # take no chances and rewrite it.
47740   # Note: m4 eats our [], so we need to use [ and ] instead.
47741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47742   if test "x$has_forbidden_chars" != x; then
47743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47747       # Going to short mode and back again did indeed matter. Since short mode is
47748       # case insensitive, let's make it lowercase to improve readability.
47749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47750       # Now convert it back to Unix-stile (cygpath)
47751       input_path=`$CYGPATH -u "$shortmode_path"`
47752       new_path="$input_path"
47753     fi
47754   fi
47755 
47756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47757   if test "x$test_cygdrive_prefix" = x; then
47758     # As a simple fix, exclude /usr/bin since it's not a real path.
47759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47761       # a path prefixed by /cygdrive for fixpath to work.
47762       new_path="$CYGWIN_ROOT_PATH$input_path"
47763     fi
47764   fi
47765 
47766 
47767   if test "x$path" != "x$new_path"; then
47768     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47770 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47771   fi
47772 
47773     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47774 
47775   path="$POTENTIAL_FREETYPE_LIB_PATH"
47776   has_colon=`$ECHO $path | $GREP ^.:`
47777   new_path="$path"
47778   if test "x$has_colon" = x; then
47779     # Not in mixed or Windows style, start by that.
47780     new_path=`cmd //c echo $path`
47781   fi
47782 
47783 
47784   input_path="$new_path"
47785   # Check if we need to convert this using DOS-style short mode. If the path
47786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47787   # take no chances and rewrite it.
47788   # Note: m4 eats our [], so we need to use [ and ] instead.
47789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47790   if test "x$has_forbidden_chars" != x; then
47791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47793   fi
47794 
47795 
47796   windows_path="$new_path"
47797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47798     unix_path=`$CYGPATH -u "$windows_path"`
47799     new_path="$unix_path"
47800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47802     new_path="$unix_path"
47803   fi
47804 
47805   if test "x$path" != "x$new_path"; then
47806     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47808 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47809   fi
47810 
47811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47813 
47814     else
47815       # We're on a unix platform. Hooray! :)
47816       path="$POTENTIAL_FREETYPE_LIB_PATH"
47817       has_space=`$ECHO "$path" | $GREP " "`
47818       if test "x$has_space" != x; then
47819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47820 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47821         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47822       fi
47823 
47824       # Use eval to expand a potential ~
47825       eval path="$path"
47826       if test ! -f "$path" && test ! -d "$path"; then
47827         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47828       fi
47829 
47830       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47831     fi
47832   fi
47833 
47834 
47835     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47836     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47837 $as_echo_n "checking for freetype includes... " >&6; }
47838     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47839 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47840     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47841     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47842 $as_echo_n "checking for freetype libraries... " >&6; }
47843     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47844 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47845   fi
47846 
47847               if test "x$FOUND_FREETYPE" != xyes; then
47848 
47849   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47850   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47851   METHOD="well-known location"
47852 
47853   # Let's start with an optimistic view of the world :-)
47854   FOUND_FREETYPE=yes
47855 
47856   # First look for the canonical freetype main include file ft2build.h.
47857   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47858     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47859     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47860     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47861       # Fail.
47862       FOUND_FREETYPE=no
47863     fi
47864   fi
47865 
47866   if test "x$FOUND_FREETYPE" = xyes; then
47867     # Include file found, let's continue the sanity check.
47868     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47869 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47870 
47871     # Reset to default value
47872     FREETYPE_BASE_NAME=freetype
47873     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47874     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47875       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47876           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47877         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47878         # for the .6 version explicitly.
47879         FREETYPE_BASE_NAME=freetype.6
47880         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47881         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47882 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47883       else
47884         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47885 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47886         FOUND_FREETYPE=no
47887       fi
47888     else
47889       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47890         # On Windows, we will need both .lib and .dll file.
47891         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47892           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47893 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47894           FOUND_FREETYPE=no
47895         fi
47896       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47897           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47898         # Found lib in isa dir, use that instead.
47899         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47900         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47901 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47902       fi
47903     fi
47904   fi
47905 
47906   if test "x$FOUND_FREETYPE" = xyes; then
47907 
47908   # Only process if variable expands to non-empty
47909 
47910   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47911     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47912 
47913   # Input might be given as Windows format, start by converting to
47914   # unix format.
47915   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47916   new_path=`$CYGPATH -u "$path"`
47917 
47918   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47919   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47920   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47921   # "foo.exe" is OK but "foo" is an error.
47922   #
47923   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47924   # It is also a way to make sure we got the proper file name for the real test later on.
47925   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47926   if test "x$test_shortpath" = x; then
47927     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47928 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47929     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47930   fi
47931 
47932   # Call helper function which possibly converts this using DOS-style short mode.
47933   # If so, the updated path is stored in $new_path.
47934 
47935   input_path="$new_path"
47936   # Check if we need to convert this using DOS-style short mode. If the path
47937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47938   # take no chances and rewrite it.
47939   # Note: m4 eats our [], so we need to use [ and ] instead.
47940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47941   if test "x$has_forbidden_chars" != x; then
47942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47946       # Going to short mode and back again did indeed matter. Since short mode is
47947       # case insensitive, let's make it lowercase to improve readability.
47948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47949       # Now convert it back to Unix-stile (cygpath)
47950       input_path=`$CYGPATH -u "$shortmode_path"`
47951       new_path="$input_path"
47952     fi
47953   fi
47954 
47955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47956   if test "x$test_cygdrive_prefix" = x; then
47957     # As a simple fix, exclude /usr/bin since it's not a real path.
47958     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47960       # a path prefixed by /cygdrive for fixpath to work.
47961       new_path="$CYGWIN_ROOT_PATH$input_path"
47962     fi
47963   fi
47964 
47965 
47966   if test "x$path" != "x$new_path"; then
47967     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47969 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47970   fi
47971 
47972     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47973 
47974   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47975   has_colon=`$ECHO $path | $GREP ^.:`
47976   new_path="$path"
47977   if test "x$has_colon" = x; then
47978     # Not in mixed or Windows style, start by that.
47979     new_path=`cmd //c echo $path`
47980   fi
47981 
47982 
47983   input_path="$new_path"
47984   # Check if we need to convert this using DOS-style short mode. If the path
47985   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47986   # take no chances and rewrite it.
47987   # Note: m4 eats our [], so we need to use [ and ] instead.
47988   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47989   if test "x$has_forbidden_chars" != x; then
47990     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47991     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47992   fi
47993 
47994 
47995   windows_path="$new_path"
47996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47997     unix_path=`$CYGPATH -u "$windows_path"`
47998     new_path="$unix_path"
47999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48001     new_path="$unix_path"
48002   fi
48003 
48004   if test "x$path" != "x$new_path"; then
48005     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48007 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48008   fi
48009 
48010   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48011   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48012 
48013     else
48014       # We're on a unix platform. Hooray! :)
48015       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48016       has_space=`$ECHO "$path" | $GREP " "`
48017       if test "x$has_space" != x; then
48018         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48019 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48020         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48021       fi
48022 
48023       # Use eval to expand a potential ~
48024       eval path="$path"
48025       if test ! -f "$path" && test ! -d "$path"; then
48026         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48027       fi
48028 
48029       POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48030     fi
48031   fi
48032 
48033 
48034   # Only process if variable expands to non-empty
48035 
48036   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48037     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48038 
48039   # Input might be given as Windows format, start by converting to
48040   # unix format.
48041   path="$POTENTIAL_FREETYPE_LIB_PATH"
48042   new_path=`$CYGPATH -u "$path"`
48043 
48044   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48045   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48046   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48047   # "foo.exe" is OK but "foo" is an error.
48048   #
48049   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48050   # It is also a way to make sure we got the proper file name for the real test later on.
48051   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48052   if test "x$test_shortpath" = x; then
48053     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48054 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48055     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48056   fi
48057 
48058   # Call helper function which possibly converts this using DOS-style short mode.
48059   # If so, the updated path is stored in $new_path.
48060 
48061   input_path="$new_path"
48062   # Check if we need to convert this using DOS-style short mode. If the path
48063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48064   # take no chances and rewrite it.
48065   # Note: m4 eats our [], so we need to use [ and ] instead.
48066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48067   if test "x$has_forbidden_chars" != x; then
48068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48069     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48070     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48071     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48072       # Going to short mode and back again did indeed matter. Since short mode is
48073       # case insensitive, let's make it lowercase to improve readability.
48074       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48075       # Now convert it back to Unix-stile (cygpath)
48076       input_path=`$CYGPATH -u "$shortmode_path"`
48077       new_path="$input_path"
48078     fi
48079   fi
48080 
48081   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48082   if test "x$test_cygdrive_prefix" = x; then
48083     # As a simple fix, exclude /usr/bin since it's not a real path.
48084     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48085       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48086       # a path prefixed by /cygdrive for fixpath to work.
48087       new_path="$CYGWIN_ROOT_PATH$input_path"
48088     fi
48089   fi
48090 
48091 
48092   if test "x$path" != "x$new_path"; then
48093     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48094     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48095 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48096   fi
48097 
48098     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48099 
48100   path="$POTENTIAL_FREETYPE_LIB_PATH"
48101   has_colon=`$ECHO $path | $GREP ^.:`
48102   new_path="$path"
48103   if test "x$has_colon" = x; then
48104     # Not in mixed or Windows style, start by that.
48105     new_path=`cmd //c echo $path`
48106   fi
48107 
48108 
48109   input_path="$new_path"
48110   # Check if we need to convert this using DOS-style short mode. If the path
48111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48112   # take no chances and rewrite it.
48113   # Note: m4 eats our [], so we need to use [ and ] instead.
48114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48115   if test "x$has_forbidden_chars" != x; then
48116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48117     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48118   fi
48119 
48120 
48121   windows_path="$new_path"
48122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48123     unix_path=`$CYGPATH -u "$windows_path"`
48124     new_path="$unix_path"
48125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48126     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48127     new_path="$unix_path"
48128   fi
48129 
48130   if test "x$path" != "x$new_path"; then
48131     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48133 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48134   fi
48135 
48136   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48137   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48138 
48139     else
48140       # We're on a unix platform. Hooray! :)
48141       path="$POTENTIAL_FREETYPE_LIB_PATH"
48142       has_space=`$ECHO "$path" | $GREP " "`
48143       if test "x$has_space" != x; then
48144         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48145 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48146         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48147       fi
48148 
48149       # Use eval to expand a potential ~
48150       eval path="$path"
48151       if test ! -f "$path" && test ! -d "$path"; then
48152         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48153       fi
48154 
48155       POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48156     fi
48157   fi
48158 
48159 
48160     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48161     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48162 $as_echo_n "checking for freetype includes... " >&6; }
48163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48164 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48165     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48167 $as_echo_n "checking for freetype libraries... " >&6; }
48168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48169 $as_echo "$FREETYPE_LIB_PATH" >&6; }
48170   fi
48171 
48172               fi
48173             fi
48174           fi
48175         fi
48176       fi # end check in well-known locations
48177 
48178       if test "x$FOUND_FREETYPE" != xyes; then
48179 
48180   # Print a helpful message on how to acquire the necessary build dependency.
48181   # freetype is the help tag: freetype, cups, pulse, alsa etc
48182   MISSING_DEPENDENCY=freetype
48183 
48184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48185     cygwin_help $MISSING_DEPENDENCY
48186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48187     msys_help $MISSING_DEPENDENCY
48188   else
48189     PKGHANDLER_COMMAND=
48190 
48191     case $PKGHANDLER in
48192       apt-get)
48193         apt_help     $MISSING_DEPENDENCY ;;
48194       yum)
48195         yum_help     $MISSING_DEPENDENCY ;;
48196       port)
48197         port_help    $MISSING_DEPENDENCY ;;
48198       pkgutil)
48199         pkgutil_help $MISSING_DEPENDENCY ;;
48200       pkgadd)
48201         pkgadd_help  $MISSING_DEPENDENCY ;;
48202     esac
48203 
48204     if test "x$PKGHANDLER_COMMAND" != x; then
48205       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48206     fi
48207   fi
48208 
48209         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48210       fi
48211     fi # end user specified settings
48212 
48213     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48214     if test "x$FREETYPE_CFLAGS" = x; then
48215 
48216   # Only process if variable expands to non-empty
48217 
48218   if test "x$FREETYPE_INCLUDE_PATH" != x; then
48219     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48220 
48221   # Input might be given as Windows format, start by converting to
48222   # unix format.
48223   path="$FREETYPE_INCLUDE_PATH"
48224   new_path=`$CYGPATH -u "$path"`
48225 
48226   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48227   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48228   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48229   # "foo.exe" is OK but "foo" is an error.
48230   #
48231   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48232   # It is also a way to make sure we got the proper file name for the real test later on.
48233   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48234   if test "x$test_shortpath" = x; then
48235     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48236 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48237     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48238   fi
48239 
48240   # Call helper function which possibly converts this using DOS-style short mode.
48241   # If so, the updated path is stored in $new_path.
48242 
48243   input_path="$new_path"
48244   # Check if we need to convert this using DOS-style short mode. If the path
48245   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48246   # take no chances and rewrite it.
48247   # Note: m4 eats our [], so we need to use [ and ] instead.
48248   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48249   if test "x$has_forbidden_chars" != x; then
48250     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48251     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48252     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48253     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48254       # Going to short mode and back again did indeed matter. Since short mode is
48255       # case insensitive, let's make it lowercase to improve readability.
48256       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48257       # Now convert it back to Unix-stile (cygpath)
48258       input_path=`$CYGPATH -u "$shortmode_path"`
48259       new_path="$input_path"
48260     fi
48261   fi
48262 
48263   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48264   if test "x$test_cygdrive_prefix" = x; then
48265     # As a simple fix, exclude /usr/bin since it's not a real path.
48266     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48267       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48268       # a path prefixed by /cygdrive for fixpath to work.
48269       new_path="$CYGWIN_ROOT_PATH$input_path"
48270     fi
48271   fi
48272 
48273 
48274   if test "x$path" != "x$new_path"; then
48275     FREETYPE_INCLUDE_PATH="$new_path"
48276     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48277 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48278   fi
48279 
48280     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48281 
48282   path="$FREETYPE_INCLUDE_PATH"
48283   has_colon=`$ECHO $path | $GREP ^.:`
48284   new_path="$path"
48285   if test "x$has_colon" = x; then
48286     # Not in mixed or Windows style, start by that.
48287     new_path=`cmd //c echo $path`
48288   fi
48289 
48290 
48291   input_path="$new_path"
48292   # Check if we need to convert this using DOS-style short mode. If the path
48293   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48294   # take no chances and rewrite it.
48295   # Note: m4 eats our [], so we need to use [ and ] instead.
48296   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48297   if test "x$has_forbidden_chars" != x; then
48298     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48299     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48300   fi
48301 
48302 
48303   windows_path="$new_path"
48304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48305     unix_path=`$CYGPATH -u "$windows_path"`
48306     new_path="$unix_path"
48307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48309     new_path="$unix_path"
48310   fi
48311 
48312   if test "x$path" != "x$new_path"; then
48313     FREETYPE_INCLUDE_PATH="$new_path"
48314     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48315 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48316   fi
48317 
48318   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48319   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48320 
48321     else
48322       # We're on a unix platform. Hooray! :)
48323       path="$FREETYPE_INCLUDE_PATH"
48324       has_space=`$ECHO "$path" | $GREP " "`
48325       if test "x$has_space" != x; then
48326         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48327 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48328         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48329       fi
48330 
48331       # Use eval to expand a potential ~
48332       eval path="$path"
48333       if test ! -f "$path" && test ! -d "$path"; then
48334         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48335       fi
48336 
48337       FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48338     fi
48339   fi
48340 
48341       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48342         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48343       else
48344         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48345       fi
48346     fi
48347 
48348     if test "x$FREETYPE_LIBS" = x; then
48349 
48350   # Only process if variable expands to non-empty
48351 
48352   if test "x$FREETYPE_LIB_PATH" != x; then
48353     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48354 
48355   # Input might be given as Windows format, start by converting to
48356   # unix format.
48357   path="$FREETYPE_LIB_PATH"
48358   new_path=`$CYGPATH -u "$path"`
48359 
48360   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48361   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48362   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48363   # "foo.exe" is OK but "foo" is an error.
48364   #
48365   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48366   # It is also a way to make sure we got the proper file name for the real test later on.
48367   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48368   if test "x$test_shortpath" = x; then
48369     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48370 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48371     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48372   fi
48373 
48374   # Call helper function which possibly converts this using DOS-style short mode.
48375   # If so, the updated path is stored in $new_path.
48376 
48377   input_path="$new_path"
48378   # Check if we need to convert this using DOS-style short mode. If the path
48379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48380   # take no chances and rewrite it.
48381   # Note: m4 eats our [], so we need to use [ and ] instead.
48382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48383   if test "x$has_forbidden_chars" != x; then
48384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48385     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48386     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48387     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48388       # Going to short mode and back again did indeed matter. Since short mode is
48389       # case insensitive, let's make it lowercase to improve readability.
48390       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48391       # Now convert it back to Unix-stile (cygpath)
48392       input_path=`$CYGPATH -u "$shortmode_path"`
48393       new_path="$input_path"
48394     fi
48395   fi
48396 
48397   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48398   if test "x$test_cygdrive_prefix" = x; then
48399     # As a simple fix, exclude /usr/bin since it's not a real path.
48400     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48401       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48402       # a path prefixed by /cygdrive for fixpath to work.
48403       new_path="$CYGWIN_ROOT_PATH$input_path"
48404     fi
48405   fi
48406 
48407 
48408   if test "x$path" != "x$new_path"; then
48409     FREETYPE_LIB_PATH="$new_path"
48410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48411 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48412   fi
48413 
48414     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48415 
48416   path="$FREETYPE_LIB_PATH"
48417   has_colon=`$ECHO $path | $GREP ^.:`
48418   new_path="$path"
48419   if test "x$has_colon" = x; then
48420     # Not in mixed or Windows style, start by that.
48421     new_path=`cmd //c echo $path`
48422   fi
48423 
48424 
48425   input_path="$new_path"
48426   # Check if we need to convert this using DOS-style short mode. If the path
48427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48428   # take no chances and rewrite it.
48429   # Note: m4 eats our [], so we need to use [ and ] instead.
48430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48431   if test "x$has_forbidden_chars" != x; then
48432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48433     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48434   fi
48435 
48436 
48437   windows_path="$new_path"
48438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48439     unix_path=`$CYGPATH -u "$windows_path"`
48440     new_path="$unix_path"
48441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48443     new_path="$unix_path"
48444   fi
48445 
48446   if test "x$path" != "x$new_path"; then
48447     FREETYPE_LIB_PATH="$new_path"
48448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48449 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48450   fi
48451 
48452   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48453   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48454 
48455     else
48456       # We're on a unix platform. Hooray! :)
48457       path="$FREETYPE_LIB_PATH"
48458       has_space=`$ECHO "$path" | $GREP " "`
48459       if test "x$has_space" != x; then
48460         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48461 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48462         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48463       fi
48464 
48465       # Use eval to expand a potential ~
48466       eval path="$path"
48467       if test ! -f "$path" && test ! -d "$path"; then
48468         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48469       fi
48470 
48471       FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48472     fi
48473   fi
48474 
48475       if test "x$OPENJDK_TARGET_OS" = xwindows; then
48476         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48477       else
48478         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48479       fi
48480     fi
48481 
48482     # Try to compile it
48483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48484 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48485     ac_ext=cpp
48486 ac_cpp='$CXXCPP $CPPFLAGS'
48487 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48488 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48489 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48490 
48491     PREV_CXXCFLAGS="$CXXFLAGS"
48492     PREV_LIBS="$LIBS"
48493     PREV_CXX="$CXX"
48494     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48495     LIBS="$LIBS $FREETYPE_LIBS"
48496     CXX="$FIXPATH $CXX"
48497     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48498 /* end confdefs.h.  */
48499 
48500           #include<ft2build.h>
48501           #include FT_FREETYPE_H
48502           int main () {
48503             FT_Init_FreeType(NULL);
48504             return 0;
48505           }
48506 
48507 _ACEOF
48508 if ac_fn_cxx_try_link "$LINENO"; then :
48509 
48510           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48511 $as_echo "yes" >&6; }
48512 
48513 else
48514 
48515           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48516 $as_echo "no" >&6; }
48517           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48518 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48519           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48520 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48521 
48522 
48523   # Print a helpful message on how to acquire the necessary build dependency.
48524   # freetype is the help tag: freetype, cups, pulse, alsa etc
48525   MISSING_DEPENDENCY=freetype
48526 
48527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48528     cygwin_help $MISSING_DEPENDENCY
48529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48530     msys_help $MISSING_DEPENDENCY
48531   else
48532     PKGHANDLER_COMMAND=
48533 
48534     case $PKGHANDLER in
48535       apt-get)
48536         apt_help     $MISSING_DEPENDENCY ;;
48537       yum)
48538         yum_help     $MISSING_DEPENDENCY ;;
48539       port)
48540         port_help    $MISSING_DEPENDENCY ;;
48541       pkgutil)
48542         pkgutil_help $MISSING_DEPENDENCY ;;
48543       pkgadd)
48544         pkgadd_help  $MISSING_DEPENDENCY ;;
48545     esac
48546 
48547     if test "x$PKGHANDLER_COMMAND" != x; then
48548       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48549     fi
48550   fi
48551 
48552 
48553           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48554 
48555 
48556 fi
48557 rm -f core conftest.err conftest.$ac_objext \
48558     conftest$ac_exeext conftest.$ac_ext
48559     CXXCFLAGS="$PREV_CXXFLAGS"
48560     LIBS="$PREV_LIBS"
48561     CXX="$PREV_CXX"
48562     ac_ext=cpp
48563 ac_cpp='$CXXCPP $CPPFLAGS'
48564 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48565 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48566 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48567 
48568 
48569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48570 $as_echo_n "checking if we should bundle freetype... " >&6; }
48571     if test "x$BUNDLE_FREETYPE" = xyes; then
48572       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48573     fi
48574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48575 $as_echo "$BUNDLE_FREETYPE" >&6; }
48576 
48577   fi # end freetype needed
48578 
48579 
48580 
48581 
48582 
48583 
48584 
48585   ###############################################################################
48586   #
48587   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48588   #
48589 
48590 # Check whether --with-alsa was given.
48591 if test "${with_alsa+set}" = set; then :
48592   withval=$with_alsa;
48593 fi
48594 
48595 
48596 # Check whether --with-alsa-include was given.
48597 if test "${with_alsa_include+set}" = set; then :
48598   withval=$with_alsa_include;
48599 fi
48600 
48601 
48602 # Check whether --with-alsa-lib was given.
48603 if test "${with_alsa_lib+set}" = set; then :
48604   withval=$with_alsa_lib;
48605 fi
48606 
48607 
48608   if test "x$ALSA_NOT_NEEDED" = xyes; then
48609     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48610       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48611 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48612     fi
48613     ALSA_CFLAGS=
48614     ALSA_LIBS=
48615   else
48616     ALSA_FOUND=no
48617 
48618     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48619       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48620     fi
48621 
48622     if test "x${with_alsa}" != x; then
48623       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48624       ALSA_CFLAGS="-I${with_alsa}/include"
48625       ALSA_FOUND=yes
48626     fi
48627     if test "x${with_alsa_include}" != x; then
48628       ALSA_CFLAGS="-I${with_alsa_include}"
48629       ALSA_FOUND=yes
48630     fi
48631     if test "x${with_alsa_lib}" != x; then
48632       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48633       ALSA_FOUND=yes
48634     fi
48635     if test "x$ALSA_FOUND" = xno; then
48636 
48637 
48638   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48639     # Source the builddeps file again, to make sure it uses the latest variables!
48640     . $builddepsfile
48641     # Look for a target and build machine specific resource!
48642     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48643     if test "x$resource" = x; then
48644       # Ok, lets instead look for a target specific resource
48645       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48646     fi
48647     if test "x$resource" = x; then
48648       # Ok, lets instead look for a build specific resource
48649       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48650     fi
48651     if test "x$resource" = x; then
48652       # Ok, lets instead look for a generic resource
48653       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48654       resource=${builddep_alsa}
48655     fi
48656     if test "x$resource" != x; then
48657       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48658 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48659       # If the resource in the builddeps.conf file is an existing directory,
48660       # for example /java/linux/cups
48661       if test -d ${resource}; then
48662         depdir=${resource}
48663       else
48664 
48665   # alsa is for example mymodule
48666   # $resource is for example libs/general/libmymod_1_2_3.zip
48667   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48668   # $with_builddeps_dir is for example /localhome/builddeps
48669   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48670   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48671   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48672   filename=`basename $resource`
48673   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48674   filebase=${filename%%.*}
48675   extension=${filename#*.}
48676   installdir=$with_builddeps_dir/$filebase
48677   if test ! -f $installdir/$filename.unpacked; then
48678     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48679 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48680     if test ! -d $installdir; then
48681       mkdir -p $installdir
48682     fi
48683     if test ! -d $installdir; then
48684       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48685     fi
48686     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48687     touch $tmpfile
48688     if test ! -f $tmpfile; then
48689       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48690     fi
48691 
48692   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48693   # $tmpfile is the local file name for the downloaded file.
48694   VALID_TOOL=no
48695   if test "x$BDEPS_FTP" = xwget; then
48696     VALID_TOOL=yes
48697     wget -O $tmpfile $with_builddeps_server/$resource
48698   fi
48699   if test "x$BDEPS_FTP" = xlftp; then
48700     VALID_TOOL=yes
48701     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48702   fi
48703   if test "x$BDEPS_FTP" = xftp; then
48704     VALID_TOOL=yes
48705     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48706     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48707     FTPUSERPWD=${FTPSERVER%%@*}
48708     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48709       FTPUSER=${userpwd%%:*}
48710       FTPPWD=${userpwd#*@}
48711       FTPSERVER=${FTPSERVER#*@}
48712     else
48713       FTPUSER=ftp
48714       FTPPWD=ftp
48715     fi
48716     # the "pass" command does not work on some
48717     # ftp clients (read ftp.exe) but if it works,
48718     # passive mode is better!
48719     ( \
48720         echo "user $FTPUSER $FTPPWD"        ; \
48721         echo "pass"                         ; \
48722         echo "bin"                          ; \
48723         echo "get $FTPPATH $tmpfile"              ; \
48724     ) | ftp -in $FTPSERVER
48725   fi
48726   if test "x$VALID_TOOL" != xyes; then
48727     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48728   fi
48729 
48730     mv $tmpfile $installdir/$filename
48731     if test ! -s $installdir/$filename; then
48732       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48733     fi
48734     case "$extension" in
48735       zip)  echo "Unzipping $installdir/$filename..."
48736         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48737         ;;
48738       tar.gz) echo "Untaring $installdir/$filename..."
48739         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48740         ;;
48741       tgz) echo "Untaring $installdir/$filename..."
48742         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48743         ;;
48744       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48745         ;;
48746     esac
48747   fi
48748   if test -f $installdir/$filename.unpacked; then
48749     depdir=$installdir
48750   fi
48751 
48752       fi
48753       # Source the builddeps file again, because in the previous command, the depdir
48754       # was updated to point at the current build dependency install directory.
48755       . $builddepsfile
48756       # Now extract variables from the builddeps.conf files.
48757       theroot=${builddep_alsa_ROOT}
48758       thecflags=${builddep_alsa_CFLAGS}
48759       thelibs=${builddep_alsa_LIBS}
48760       if test "x$depdir" = x; then
48761         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48762       fi
48763       ALSA=$depdir
48764       if test "x$theroot" != x; then
48765         ALSA="$theroot"
48766       fi
48767       if test "x$thecflags" != x; then
48768         ALSA_CFLAGS="$thecflags"
48769       fi
48770       if test "x$thelibs" != x; then
48771         ALSA_LIBS="$thelibs"
48772       fi
48773       ALSA_FOUND=yes
48774       else ALSA_FOUND=no
48775 
48776     fi
48777     else ALSA_FOUND=no
48778 
48779   fi
48780 
48781     fi
48782     # Do not try pkg-config if we have a sysroot set.
48783     if test "x$SYSROOT" = x; then
48784       if test "x$ALSA_FOUND" = xno; then
48785 
48786 pkg_failed=no
48787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48788 $as_echo_n "checking for ALSA... " >&6; }
48789 
48790 if test -n "$ALSA_CFLAGS"; then
48791     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48792  elif test -n "$PKG_CONFIG"; then
48793     if test -n "$PKG_CONFIG" && \
48794     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48795   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48796   ac_status=$?
48797   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48798   test $ac_status = 0; }; then
48799   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48800 else
48801   pkg_failed=yes
48802 fi
48803  else
48804     pkg_failed=untried
48805 fi
48806 if test -n "$ALSA_LIBS"; then
48807     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48808  elif test -n "$PKG_CONFIG"; then
48809     if test -n "$PKG_CONFIG" && \
48810     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48811   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48812   ac_status=$?
48813   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48814   test $ac_status = 0; }; then
48815   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48816 else
48817   pkg_failed=yes
48818 fi
48819  else
48820     pkg_failed=untried
48821 fi
48822 
48823 
48824 
48825 if test $pkg_failed = yes; then
48826 
48827 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48828         _pkg_short_errors_supported=yes
48829 else
48830         _pkg_short_errors_supported=no
48831 fi
48832         if test $_pkg_short_errors_supported = yes; then
48833                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48834         else
48835                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48836         fi
48837         # Put the nasty error message in config.log where it belongs
48838         echo "$ALSA_PKG_ERRORS" >&5
48839 
48840         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48841 $as_echo "no" >&6; }
48842                 ALSA_FOUND=no
48843 elif test $pkg_failed = untried; then
48844         ALSA_FOUND=no
48845 else
48846         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48847         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48848         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48849 $as_echo "yes" >&6; }
48850         ALSA_FOUND=yes
48851 fi
48852       fi
48853     fi
48854     if test "x$ALSA_FOUND" = xno; then
48855       for ac_header in alsa/asoundlib.h
48856 do :
48857   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48858 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48859   cat >>confdefs.h <<_ACEOF
48860 #define HAVE_ALSA_ASOUNDLIB_H 1
48861 _ACEOF
48862 
48863             ALSA_FOUND=yes
48864             ALSA_CFLAGS=-Iignoreme
48865             ALSA_LIBS=-lasound
48866             DEFAULT_ALSA=yes
48867 
48868 else
48869   ALSA_FOUND=no
48870 fi
48871 
48872 done
48873 
48874     fi
48875     if test "x$ALSA_FOUND" = xno; then
48876 
48877   # Print a helpful message on how to acquire the necessary build dependency.
48878   # alsa is the help tag: freetype, cups, pulse, alsa etc
48879   MISSING_DEPENDENCY=alsa
48880 
48881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48882     cygwin_help $MISSING_DEPENDENCY
48883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48884     msys_help $MISSING_DEPENDENCY
48885   else
48886     PKGHANDLER_COMMAND=
48887 
48888     case $PKGHANDLER in
48889       apt-get)
48890         apt_help     $MISSING_DEPENDENCY ;;
48891       yum)
48892         yum_help     $MISSING_DEPENDENCY ;;
48893       port)
48894         port_help    $MISSING_DEPENDENCY ;;
48895       pkgutil)
48896         pkgutil_help $MISSING_DEPENDENCY ;;
48897       pkgadd)
48898         pkgadd_help  $MISSING_DEPENDENCY ;;
48899     esac
48900 
48901     if test "x$PKGHANDLER_COMMAND" != x; then
48902       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48903     fi
48904   fi
48905 
48906       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48907     fi
48908   fi
48909 
48910 
48911 
48912 
48913 
48914 
48915   ###############################################################################
48916   #
48917   # Check for the jpeg library
48918   #
48919 
48920 
48921 # Check whether --with-libjpeg was given.
48922 if test "${with_libjpeg+set}" = set; then :
48923   withval=$with_libjpeg;
48924 fi
48925 
48926 
48927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48928 $as_echo_n "checking for which libjpeg to use... " >&6; }
48929 
48930   # default is bundled
48931   DEFAULT_LIBJPEG=bundled
48932 
48933   #
48934   # if user didn't specify, use DEFAULT_LIBJPEG
48935   #
48936   if test "x${with_libjpeg}" = "x"; then
48937     with_libjpeg=${DEFAULT_LIBJPEG}
48938   fi
48939 
48940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48941 $as_echo "${with_libjpeg}" >&6; }
48942 
48943   if test "x${with_libjpeg}" = "xbundled"; then
48944     USE_EXTERNAL_LIBJPEG=false
48945   elif test "x${with_libjpeg}" = "xsystem"; then
48946     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48947 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48948 
48949 else
48950    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48951 fi
48952 
48953 
48954     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48955 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48956 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48957   $as_echo_n "(cached) " >&6
48958 else
48959   ac_check_lib_save_LIBS=$LIBS
48960 LIBS="-ljpeg  $LIBS"
48961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48962 /* end confdefs.h.  */
48963 
48964 /* Override any GCC internal prototype to avoid an error.
48965    Use char because int might match the return type of a GCC
48966    builtin and then its argument prototype would still apply.  */
48967 #ifdef __cplusplus
48968 extern "C"
48969 #endif
48970 char jpeg_CreateDecompress ();
48971 int
48972 main ()
48973 {
48974 return jpeg_CreateDecompress ();
48975   ;
48976   return 0;
48977 }
48978 _ACEOF
48979 if ac_fn_cxx_try_link "$LINENO"; then :
48980   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48981 else
48982   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48983 fi
48984 rm -f core conftest.err conftest.$ac_objext \
48985     conftest$ac_exeext conftest.$ac_ext
48986 LIBS=$ac_check_lib_save_LIBS
48987 fi
48988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48989 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48990 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48991   cat >>confdefs.h <<_ACEOF
48992 #define HAVE_LIBJPEG 1
48993 _ACEOF
48994 
48995   LIBS="-ljpeg $LIBS"
48996 
48997 else
48998    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48999 fi
49000 
49001 
49002     USE_EXTERNAL_LIBJPEG=true
49003   else
49004     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49005   fi
49006 
49007 
49008 
49009   ###############################################################################
49010   #
49011   # Check for the gif library
49012   #
49013 
49014 
49015 # Check whether --with-giflib was given.
49016 if test "${with_giflib+set}" = set; then :
49017   withval=$with_giflib;
49018 fi
49019 
49020 
49021 
49022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49023 $as_echo_n "checking for which giflib to use... " >&6; }
49024 
49025   # default is bundled
49026   DEFAULT_GIFLIB=bundled
49027 
49028   #
49029   # if user didn't specify, use DEFAULT_GIFLIB
49030   #
49031   if test "x${with_giflib}" = "x"; then
49032     with_giflib=${DEFAULT_GIFLIB}
49033   fi
49034 
49035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49036 $as_echo "${with_giflib}" >&6; }
49037 
49038   if test "x${with_giflib}" = "xbundled"; then
49039     USE_EXTERNAL_LIBGIF=false
49040   elif test "x${with_giflib}" = "xsystem"; then
49041     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49042 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49043 
49044 else
49045    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49046 fi
49047 
49048 
49049     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49050 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49051 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49052   $as_echo_n "(cached) " >&6
49053 else
49054   ac_check_lib_save_LIBS=$LIBS
49055 LIBS="-lgif  $LIBS"
49056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49057 /* end confdefs.h.  */
49058 
49059 /* Override any GCC internal prototype to avoid an error.
49060    Use char because int might match the return type of a GCC
49061    builtin and then its argument prototype would still apply.  */
49062 #ifdef __cplusplus
49063 extern "C"
49064 #endif
49065 char DGifGetCode ();
49066 int
49067 main ()
49068 {
49069 return DGifGetCode ();
49070   ;
49071   return 0;
49072 }
49073 _ACEOF
49074 if ac_fn_cxx_try_link "$LINENO"; then :
49075   ac_cv_lib_gif_DGifGetCode=yes
49076 else
49077   ac_cv_lib_gif_DGifGetCode=no
49078 fi
49079 rm -f core conftest.err conftest.$ac_objext \
49080     conftest$ac_exeext conftest.$ac_ext
49081 LIBS=$ac_check_lib_save_LIBS
49082 fi
49083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49084 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49085 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49086   cat >>confdefs.h <<_ACEOF
49087 #define HAVE_LIBGIF 1
49088 _ACEOF
49089 
49090   LIBS="-lgif $LIBS"
49091 
49092 else
49093    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49094 fi
49095 
49096 
49097     USE_EXTERNAL_LIBGIF=true
49098   else
49099     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49100   fi
49101 
49102 
49103   ###############################################################################
49104   #
49105   # Check for the lcms2 library
49106   #
49107 
49108 
49109 # Check whether --with-lcms was given.
49110 if test "${with_lcms+set}" = set; then :
49111   withval=$with_lcms;
49112 fi
49113 
49114 
49115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49116 $as_echo_n "checking for which lcms to use... " >&6; }
49117 
49118   DEFAULT_LCMS=bundled
49119 
49120   #
49121   # If user didn't specify, use DEFAULT_LCMS
49122   #
49123   if test "x${with_lcms}" = "x"; then
49124       with_lcms=${DEFAULT_LCMS}
49125   fi
49126 
49127   if test "x${with_lcms}" = "xbundled"; then
49128     USE_EXTERNAL_LCMS=false
49129     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49130 $as_echo "bundled" >&6; }
49131   elif test "x${with_lcms}" = "xsystem"; then
49132     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49133 $as_echo "system" >&6; }
49134 
49135 pkg_failed=no
49136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49137 $as_echo_n "checking for LCMS... " >&6; }
49138 
49139 if test -n "$LCMS_CFLAGS"; then
49140     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49141  elif test -n "$PKG_CONFIG"; then
49142     if test -n "$PKG_CONFIG" && \
49143     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49144   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49145   ac_status=$?
49146   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49147   test $ac_status = 0; }; then
49148   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49149 else
49150   pkg_failed=yes
49151 fi
49152  else
49153     pkg_failed=untried
49154 fi
49155 if test -n "$LCMS_LIBS"; then
49156     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49157  elif test -n "$PKG_CONFIG"; then
49158     if test -n "$PKG_CONFIG" && \
49159     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49160   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49161   ac_status=$?
49162   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49163   test $ac_status = 0; }; then
49164   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49165 else
49166   pkg_failed=yes
49167 fi
49168  else
49169     pkg_failed=untried
49170 fi
49171 
49172 
49173 
49174 if test $pkg_failed = yes; then
49175 
49176 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49177         _pkg_short_errors_supported=yes
49178 else
49179         _pkg_short_errors_supported=no
49180 fi
49181         if test $_pkg_short_errors_supported = yes; then
49182                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49183         else
49184                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49185         fi
49186         # Put the nasty error message in config.log where it belongs
49187         echo "$LCMS_PKG_ERRORS" >&5
49188 
49189         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49190 $as_echo "no" >&6; }
49191                 LCMS_FOUND=no
49192 elif test $pkg_failed = untried; then
49193         LCMS_FOUND=no
49194 else
49195         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49196         LCMS_LIBS=$pkg_cv_LCMS_LIBS
49197         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49198 $as_echo "yes" >&6; }
49199         LCMS_FOUND=yes
49200 fi
49201     if test "x${LCMS_FOUND}" = "xyes"; then
49202       USE_EXTERNAL_LCMS=true
49203     else
49204       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49205     fi
49206   else
49207     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49208   fi
49209 
49210 
49211 
49212   ###############################################################################
49213   #
49214   # Check for the png library
49215   #
49216 
49217 
49218 # Check whether --with-libpng was given.
49219 if test "${with_libpng+set}" = set; then :
49220   withval=$with_libpng;
49221 fi
49222 
49223 
49224 
49225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49226 $as_echo_n "checking for which libpng to use... " >&6; }
49227 
49228   # default is bundled
49229   DEFAULT_LIBPNG=bundled
49230 
49231   #
49232   # if user didn't specify, use DEFAULT_LIBPNG
49233   #
49234   if test "x${with_libpng}" = "x"; then
49235       with_libpng=${DEFAULT_LIBPNG}
49236   fi
49237 
49238   if test "x${with_libpng}" = "xbundled"; then
49239       USE_EXTERNAL_LIBPNG=false
49240       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49241 $as_echo "bundled" >&6; }
49242   elif test "x${with_libpng}" = "xsystem"; then
49243 
49244 pkg_failed=no
49245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49246 $as_echo_n "checking for PNG... " >&6; }
49247 
49248 if test -n "$PNG_CFLAGS"; then
49249     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49250  elif test -n "$PKG_CONFIG"; then
49251     if test -n "$PKG_CONFIG" && \
49252     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49253   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49254   ac_status=$?
49255   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49256   test $ac_status = 0; }; then
49257   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49258 else
49259   pkg_failed=yes
49260 fi
49261  else
49262     pkg_failed=untried
49263 fi
49264 if test -n "$PNG_LIBS"; then
49265     pkg_cv_PNG_LIBS="$PNG_LIBS"
49266  elif test -n "$PKG_CONFIG"; then
49267     if test -n "$PKG_CONFIG" && \
49268     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49269   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49270   ac_status=$?
49271   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49272   test $ac_status = 0; }; then
49273   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49274 else
49275   pkg_failed=yes
49276 fi
49277  else
49278     pkg_failed=untried
49279 fi
49280 
49281 
49282 
49283 if test $pkg_failed = yes; then
49284 
49285 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49286         _pkg_short_errors_supported=yes
49287 else
49288         _pkg_short_errors_supported=no
49289 fi
49290         if test $_pkg_short_errors_supported = yes; then
49291                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49292         else
49293                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49294         fi
49295         # Put the nasty error message in config.log where it belongs
49296         echo "$PNG_PKG_ERRORS" >&5
49297 
49298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49299 $as_echo "no" >&6; }
49300                  LIBPNG_FOUND=no
49301 elif test $pkg_failed = untried; then
49302          LIBPNG_FOUND=no
49303 else
49304         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49305         PNG_LIBS=$pkg_cv_PNG_LIBS
49306         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49307 $as_echo "yes" >&6; }
49308          LIBPNG_FOUND=yes
49309 fi
49310       if test "x${LIBPNG_FOUND}" = "xyes"; then
49311           USE_EXTERNAL_LIBPNG=true
49312           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49313 $as_echo "system" >&6; }
49314       else
49315           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49316 $as_echo "system not found" >&6; }
49317           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49318       fi
49319   else
49320       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49321   fi
49322 
49323 
49324   ###############################################################################
49325   #
49326   # Check for the zlib library
49327   #
49328 
49329 
49330 # Check whether --with-zlib was given.
49331 if test "${with_zlib+set}" = set; then :
49332   withval=$with_zlib;
49333 fi
49334 
49335 
49336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49337 $as_echo_n "checking for compress in -lz... " >&6; }
49338 if ${ac_cv_lib_z_compress+:} false; then :
49339   $as_echo_n "(cached) " >&6
49340 else
49341   ac_check_lib_save_LIBS=$LIBS
49342 LIBS="-lz  $LIBS"
49343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49344 /* end confdefs.h.  */
49345 
49346 /* Override any GCC internal prototype to avoid an error.
49347    Use char because int might match the return type of a GCC
49348    builtin and then its argument prototype would still apply.  */
49349 #ifdef __cplusplus
49350 extern "C"
49351 #endif
49352 char compress ();
49353 int
49354 main ()
49355 {
49356 return compress ();
49357   ;
49358   return 0;
49359 }
49360 _ACEOF
49361 if ac_fn_cxx_try_link "$LINENO"; then :
49362   ac_cv_lib_z_compress=yes
49363 else
49364   ac_cv_lib_z_compress=no
49365 fi
49366 rm -f core conftest.err conftest.$ac_objext \
49367     conftest$ac_exeext conftest.$ac_ext
49368 LIBS=$ac_check_lib_save_LIBS
49369 fi
49370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49371 $as_echo "$ac_cv_lib_z_compress" >&6; }
49372 if test "x$ac_cv_lib_z_compress" = xyes; then :
49373    ZLIB_FOUND=yes
49374 else
49375    ZLIB_FOUND=no
49376 fi
49377 
49378 
49379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49380 $as_echo_n "checking for which zlib to use... " >&6; }
49381 
49382   DEFAULT_ZLIB=bundled
49383   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49384     #
49385     # On macosx default is system...on others default is
49386     #
49387     DEFAULT_ZLIB=system
49388   fi
49389 
49390   if test "x${ZLIB_FOUND}" != "xyes"; then
49391     #
49392     # If we don't find any system...set default to bundled
49393     #
49394     DEFAULT_ZLIB=bundled
49395   fi
49396 
49397   #
49398   # If user didn't specify, use DEFAULT_ZLIB
49399   #
49400   if test "x${with_zlib}" = "x"; then
49401     with_zlib=${DEFAULT_ZLIB}
49402   fi
49403 
49404   if test "x${with_zlib}" = "xbundled"; then
49405     USE_EXTERNAL_LIBZ=false
49406     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49407 $as_echo "bundled" >&6; }
49408   elif test "x${with_zlib}" = "xsystem"; then
49409     if test "x${ZLIB_FOUND}" = "xyes"; then
49410       USE_EXTERNAL_LIBZ=true
49411       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49412 $as_echo "system" >&6; }
49413     else
49414       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49415 $as_echo "system not found" >&6; }
49416       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49417     fi
49418   else
49419     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49420   fi
49421 
49422 
49423 
49424   ###############################################################################
49425   LIBZIP_CAN_USE_MMAP=true
49426 
49427 
49428 
49429   ###############################################################################
49430   #
49431   # Check if altzone exists in time.h
49432   #
49433 
49434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49435 /* end confdefs.h.  */
49436 #include <time.h>
49437 int
49438 main ()
49439 {
49440 return (int)altzone;
49441   ;
49442   return 0;
49443 }
49444 _ACEOF
49445 if ac_fn_cxx_try_link "$LINENO"; then :
49446   has_altzone=yes
49447 else
49448   has_altzone=no
49449 fi
49450 rm -f core conftest.err conftest.$ac_objext \
49451     conftest$ac_exeext conftest.$ac_ext
49452   if test "x$has_altzone" = xyes; then
49453 
49454 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49455 
49456   fi
49457 
49458   ###############################################################################
49459   #
49460   # Check the maths library
49461   #
49462 
49463   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49464 $as_echo_n "checking for cos in -lm... " >&6; }
49465 if ${ac_cv_lib_m_cos+:} false; then :
49466   $as_echo_n "(cached) " >&6
49467 else
49468   ac_check_lib_save_LIBS=$LIBS
49469 LIBS="-lm  $LIBS"
49470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49471 /* end confdefs.h.  */
49472 
49473 /* Override any GCC internal prototype to avoid an error.
49474    Use char because int might match the return type of a GCC
49475    builtin and then its argument prototype would still apply.  */
49476 #ifdef __cplusplus
49477 extern "C"
49478 #endif
49479 char cos ();
49480 int
49481 main ()
49482 {
49483 return cos ();
49484   ;
49485   return 0;
49486 }
49487 _ACEOF
49488 if ac_fn_cxx_try_link "$LINENO"; then :
49489   ac_cv_lib_m_cos=yes
49490 else
49491   ac_cv_lib_m_cos=no
49492 fi
49493 rm -f core conftest.err conftest.$ac_objext \
49494     conftest$ac_exeext conftest.$ac_ext
49495 LIBS=$ac_check_lib_save_LIBS
49496 fi
49497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49498 $as_echo "$ac_cv_lib_m_cos" >&6; }
49499 if test "x$ac_cv_lib_m_cos" = xyes; then :
49500   cat >>confdefs.h <<_ACEOF
49501 #define HAVE_LIBM 1
49502 _ACEOF
49503 
49504   LIBS="-lm $LIBS"
49505 
49506 else
49507 
49508         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49509 $as_echo "$as_me: Maths library was not found" >&6;}
49510 
49511 
49512 fi
49513 
49514 
49515 
49516   ###############################################################################
49517   #
49518   # Check for libdl.so
49519 
49520   save_LIBS="$LIBS"
49521   LIBS=""
49522   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49523 $as_echo_n "checking for dlopen in -ldl... " >&6; }
49524 if ${ac_cv_lib_dl_dlopen+:} false; then :
49525   $as_echo_n "(cached) " >&6
49526 else
49527   ac_check_lib_save_LIBS=$LIBS
49528 LIBS="-ldl  $LIBS"
49529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49530 /* end confdefs.h.  */
49531 
49532 /* Override any GCC internal prototype to avoid an error.
49533    Use char because int might match the return type of a GCC
49534    builtin and then its argument prototype would still apply.  */
49535 #ifdef __cplusplus
49536 extern "C"
49537 #endif
49538 char dlopen ();
49539 int
49540 main ()
49541 {
49542 return dlopen ();
49543   ;
49544   return 0;
49545 }
49546 _ACEOF
49547 if ac_fn_cxx_try_link "$LINENO"; then :
49548   ac_cv_lib_dl_dlopen=yes
49549 else
49550   ac_cv_lib_dl_dlopen=no
49551 fi
49552 rm -f core conftest.err conftest.$ac_objext \
49553     conftest$ac_exeext conftest.$ac_ext
49554 LIBS=$ac_check_lib_save_LIBS
49555 fi
49556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49557 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49558 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49559   cat >>confdefs.h <<_ACEOF
49560 #define HAVE_LIBDL 1
49561 _ACEOF
49562 
49563   LIBS="-ldl $LIBS"
49564 
49565 fi
49566 
49567   LIBDL="$LIBS"
49568 
49569   LIBS="$save_LIBS"
49570 
49571 
49572   ###############################################################################
49573   #
49574   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49575   # dynamic build is configured on command line.
49576   #
49577 
49578 # Check whether --with-stdc++lib was given.
49579 if test "${with_stdc__lib+set}" = set; then :
49580   withval=$with_stdc__lib;
49581         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49582                 && test "x$with_stdc__lib" != xdefault; then
49583           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49584         fi
49585 
49586 else
49587   with_stdc__lib=default
49588 
49589 fi
49590 
49591 
49592   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49593     # Test if -lstdc++ works.
49594     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49595 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49596     ac_ext=cpp
49597 ac_cpp='$CXXCPP $CPPFLAGS'
49598 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49599 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49600 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49601 
49602     OLD_CXXFLAGS="$CXXFLAGS"
49603     CXXFLAGS="$CXXFLAGS -lstdc++"
49604     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49605 /* end confdefs.h.  */
49606 
49607 int
49608 main ()
49609 {
49610 return 0;
49611   ;
49612   return 0;
49613 }
49614 _ACEOF
49615 if ac_fn_cxx_try_link "$LINENO"; then :
49616   has_dynamic_libstdcxx=yes
49617 else
49618   has_dynamic_libstdcxx=no
49619 fi
49620 rm -f core conftest.err conftest.$ac_objext \
49621     conftest$ac_exeext conftest.$ac_ext
49622     CXXFLAGS="$OLD_CXXFLAGS"
49623     ac_ext=cpp
49624 ac_cpp='$CXXCPP $CPPFLAGS'
49625 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49626 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49627 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49628 
49629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49630 $as_echo "$has_dynamic_libstdcxx" >&6; }
49631 
49632     # Test if stdc++ can be linked statically.
49633     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49634 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49635     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49636     ac_ext=cpp
49637 ac_cpp='$CXXCPP $CPPFLAGS'
49638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49641 
49642     OLD_LIBS="$LIBS"
49643     OLD_CXX="$CXX"
49644     LIBS="$STATIC_STDCXX_FLAGS"
49645     CXX="$CC"
49646     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49647 /* end confdefs.h.  */
49648 
49649 int
49650 main ()
49651 {
49652 return 0;
49653   ;
49654   return 0;
49655 }
49656 _ACEOF
49657 if ac_fn_cxx_try_link "$LINENO"; then :
49658   has_static_libstdcxx=yes
49659 else
49660   has_static_libstdcxx=no
49661 fi
49662 rm -f core conftest.err conftest.$ac_objext \
49663     conftest$ac_exeext conftest.$ac_ext
49664     LIBS="$OLD_LIBS"
49665     CXX="$OLD_CXX"
49666     ac_ext=cpp
49667 ac_cpp='$CXXCPP $CPPFLAGS'
49668 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49669 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49670 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49671 
49672     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49673 $as_echo "$has_static_libstdcxx" >&6; }
49674 
49675     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49676       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49677     fi
49678 
49679     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49680       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49681     fi
49682 
49683     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49684       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49685     fi
49686 
49687     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49688 $as_echo_n "checking how to link with libstdc++... " >&6; }
49689     # If dynamic was requested, it's available since it would fail above otherwise.
49690     # If dynamic wasn't requested, go with static unless it isn't available.
49691     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49692       LIBCXX="$LIBCXX -lstdc++"
49693       LDCXX="$CXX"
49694       STATIC_CXX_SETTING="STATIC_CXX=false"
49695       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49696 $as_echo "dynamic" >&6; }
49697     else
49698       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49699       LDCXX="$CC"
49700       STATIC_CXX_SETTING="STATIC_CXX=true"
49701       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49702 $as_echo "static" >&6; }
49703     fi
49704   fi
49705 
49706 
49707   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49708     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49709 
49710 pkg_failed=no
49711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49712 $as_echo_n "checking for LIBFFI... " >&6; }
49713 
49714 if test -n "$LIBFFI_CFLAGS"; then
49715     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49716  elif test -n "$PKG_CONFIG"; then
49717     if test -n "$PKG_CONFIG" && \
49718     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49719   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49720   ac_status=$?
49721   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49722   test $ac_status = 0; }; then
49723   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49724 else
49725   pkg_failed=yes
49726 fi
49727  else
49728     pkg_failed=untried
49729 fi
49730 if test -n "$LIBFFI_LIBS"; then
49731     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49732  elif test -n "$PKG_CONFIG"; then
49733     if test -n "$PKG_CONFIG" && \
49734     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49735   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49736   ac_status=$?
49737   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49738   test $ac_status = 0; }; then
49739   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49740 else
49741   pkg_failed=yes
49742 fi
49743  else
49744     pkg_failed=untried
49745 fi
49746 
49747 
49748 
49749 if test $pkg_failed = yes; then
49750 
49751 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49752         _pkg_short_errors_supported=yes
49753 else
49754         _pkg_short_errors_supported=no
49755 fi
49756         if test $_pkg_short_errors_supported = yes; then
49757                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49758         else
49759                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49760         fi
49761         # Put the nasty error message in config.log where it belongs
49762         echo "$LIBFFI_PKG_ERRORS" >&5
49763 
49764         as_fn_error $? "Package requirements (libffi) were not met:
49765 
49766 $LIBFFI_PKG_ERRORS
49767 
49768 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49769 installed software in a non-standard prefix.
49770 
49771 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49772 and LIBFFI_LIBS to avoid the need to call pkg-config.
49773 See the pkg-config man page for more details.
49774 " "$LINENO" 5
49775 elif test $pkg_failed = untried; then
49776         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49777 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49778 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49779 is in your PATH or set the PKG_CONFIG environment variable to the full
49780 path to pkg-config.
49781 
49782 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49783 and LIBFFI_LIBS to avoid the need to call pkg-config.
49784 See the pkg-config man page for more details.
49785 
49786 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49787 See \`config.log' for more details" "$LINENO" 5; }
49788 else
49789         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49790         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49792 $as_echo "yes" >&6; }
49793         :
49794 fi
49795 
49796   fi
49797 
49798   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49799     # Extract the first word of "llvm-config", so it can be a program name with args.
49800 set dummy llvm-config; ac_word=$2
49801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49802 $as_echo_n "checking for $ac_word... " >&6; }
49803 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49804   $as_echo_n "(cached) " >&6
49805 else
49806   if test -n "$LLVM_CONFIG"; then
49807   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49808 else
49809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49810 for as_dir in $PATH
49811 do
49812   IFS=$as_save_IFS
49813   test -z "$as_dir" && as_dir=.
49814     for ac_exec_ext in '' $ac_executable_extensions; do
49815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49816     ac_cv_prog_LLVM_CONFIG="llvm-config"
49817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49818     break 2
49819   fi
49820 done
49821   done
49822 IFS=$as_save_IFS
49823 
49824 fi
49825 fi
49826 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49827 if test -n "$LLVM_CONFIG"; then
49828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49829 $as_echo "$LLVM_CONFIG" >&6; }
49830 else
49831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49832 $as_echo "no" >&6; }
49833 fi
49834 
49835 
49836 
49837     if test "x$LLVM_CONFIG" != xllvm-config; then
49838       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49839     fi
49840 
49841     llvm_components="jit mcjit engine nativecodegen native"
49842     unset LLVM_CFLAGS
49843     for flag in $("$LLVM_CONFIG" --cxxflags); do
49844       if echo "${flag}" | grep -q '^-[ID]'; then
49845         if test "${flag}" != "-D_DEBUG" ; then
49846           if test "${LLVM_CFLAGS}" != "" ; then
49847             LLVM_CFLAGS="${LLVM_CFLAGS} "
49848           fi
49849           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49850         fi
49851       fi
49852     done
49853     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49854     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49855 
49856     unset LLVM_LDFLAGS
49857     for flag in $("${LLVM_CONFIG}" --ldflags); do
49858       if echo "${flag}" | grep -q '^-L'; then
49859         if test "${LLVM_LDFLAGS}" != ""; then
49860           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49861         fi
49862         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49863       fi
49864     done
49865 
49866     unset LLVM_LIBS
49867     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49868       if echo "${flag}" | grep -q '^-l'; then
49869         if test "${LLVM_LIBS}" != ""; then
49870           LLVM_LIBS="${LLVM_LIBS} "
49871         fi
49872         LLVM_LIBS="${LLVM_LIBS}${flag}"
49873       fi
49874     done
49875 
49876 
49877 
49878 
49879   fi
49880 
49881   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49882   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49883     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49884   fi
49885 
49886   # TODO better (platform agnostic) test
49887   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49888     LIBCXX="-lstdc++"
49889   fi
49890 
49891 
49892 
49893 
49894   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49895 
49896 
49897 # Check whether --with-msvcr-dll was given.
49898 if test "${with_msvcr_dll+set}" = set; then :
49899   withval=$with_msvcr_dll;
49900 fi
49901 
49902 
49903   if test "x$with_msvcr_dll" != x; then
49904     # If given explicitely by user, do not probe. If not present, fail directly.
49905 
49906   DLL_NAME="$DLL_NAME"
49907   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49908   METHOD="--with-msvcr-dll"
49909   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49910     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49911 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49912 
49913     # Need to check if the found msvcr is correct architecture
49914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49915 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49916     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49917     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49918       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49919       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49920       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49921         CORRECT_MSVCR_ARCH="PE32 executable"
49922       else
49923         CORRECT_MSVCR_ARCH="PE32+ executable"
49924       fi
49925     else
49926       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49927         CORRECT_MSVCR_ARCH=386
49928       else
49929         CORRECT_MSVCR_ARCH=x86-64
49930       fi
49931     fi
49932     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49933       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49934 $as_echo "ok" >&6; }
49935       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49936       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49937 $as_echo_n "checking for $DLL_NAME... " >&6; }
49938       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49939 $as_echo "$MSVC_DLL" >&6; }
49940     else
49941       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49942 $as_echo "incorrect, ignoring" >&6; }
49943       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49944 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49945     fi
49946   fi
49947 
49948     if test "x$MSVC_DLL" = x; then
49949       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49950     fi
49951   else
49952 
49953   VAR_NAME="MSVCR_DLL"
49954   DLL_NAME="${MSVCR_NAME}"
49955   MSVC_DLL=
49956 
49957   if test "x$MSVC_DLL" = x; then
49958     # Probe: Using well-known location from Visual Studio 10.0
49959     if test "x$VCINSTALLDIR" != x; then
49960       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49961 
49962   windows_path="$CYGWIN_VC_INSTALL_DIR"
49963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49964     unix_path=`$CYGPATH -u "$windows_path"`
49965     CYGWIN_VC_INSTALL_DIR="$unix_path"
49966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49968     CYGWIN_VC_INSTALL_DIR="$unix_path"
49969   fi
49970 
49971       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49972         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49973       else
49974         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49975       fi
49976       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49977 
49978   DLL_NAME="$DLL_NAME"
49979   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49980   METHOD="well-known location in VCINSTALLDIR"
49981   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49982     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49983 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49984 
49985     # Need to check if the found msvcr is correct architecture
49986     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49987 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49988     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49989     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49990       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49991       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49992       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49993         CORRECT_MSVCR_ARCH="PE32 executable"
49994       else
49995         CORRECT_MSVCR_ARCH="PE32+ executable"
49996       fi
49997     else
49998       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49999         CORRECT_MSVCR_ARCH=386
50000       else
50001         CORRECT_MSVCR_ARCH=x86-64
50002       fi
50003     fi
50004     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50005       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50006 $as_echo "ok" >&6; }
50007       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50008       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50009 $as_echo_n "checking for $DLL_NAME... " >&6; }
50010       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50011 $as_echo "$MSVC_DLL" >&6; }
50012     else
50013       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50014 $as_echo "incorrect, ignoring" >&6; }
50015       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50016 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50017     fi
50018   fi
50019 
50020     fi
50021   fi
50022 
50023   if test "x$MSVC_DLL" = x; then
50024     # Probe: Check in the Boot JDK directory.
50025     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50026 
50027   DLL_NAME="$DLL_NAME"
50028   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50029   METHOD="well-known location in Boot JDK"
50030   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50031     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50032 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50033 
50034     # Need to check if the found msvcr is correct architecture
50035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50036 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50037     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50038     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50039       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50040       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50041       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50042         CORRECT_MSVCR_ARCH="PE32 executable"
50043       else
50044         CORRECT_MSVCR_ARCH="PE32+ executable"
50045       fi
50046     else
50047       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50048         CORRECT_MSVCR_ARCH=386
50049       else
50050         CORRECT_MSVCR_ARCH=x86-64
50051       fi
50052     fi
50053     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50054       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50055 $as_echo "ok" >&6; }
50056       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50057       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50058 $as_echo_n "checking for $DLL_NAME... " >&6; }
50059       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50060 $as_echo "$MSVC_DLL" >&6; }
50061     else
50062       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50063 $as_echo "incorrect, ignoring" >&6; }
50064       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50065 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50066     fi
50067   fi
50068 
50069   fi
50070 
50071   if test "x$MSVC_DLL" = x; then
50072     # Probe: Look in the Windows system32 directory
50073     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50074 
50075   windows_path="$CYGWIN_SYSTEMROOT"
50076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50077     unix_path=`$CYGPATH -u "$windows_path"`
50078     CYGWIN_SYSTEMROOT="$unix_path"
50079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50081     CYGWIN_SYSTEMROOT="$unix_path"
50082   fi
50083 
50084     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50085 
50086   DLL_NAME="$DLL_NAME"
50087   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50088   METHOD="well-known location in SYSTEMROOT"
50089   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50090     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50091 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50092 
50093     # Need to check if the found msvcr is correct architecture
50094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50095 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50096     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50097     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50098       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50099       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50100       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50101         CORRECT_MSVCR_ARCH="PE32 executable"
50102       else
50103         CORRECT_MSVCR_ARCH="PE32+ executable"
50104       fi
50105     else
50106       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50107         CORRECT_MSVCR_ARCH=386
50108       else
50109         CORRECT_MSVCR_ARCH=x86-64
50110       fi
50111     fi
50112     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50113       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50114 $as_echo "ok" >&6; }
50115       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50116       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50117 $as_echo_n "checking for $DLL_NAME... " >&6; }
50118       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50119 $as_echo "$MSVC_DLL" >&6; }
50120     else
50121       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50122 $as_echo "incorrect, ignoring" >&6; }
50123       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50124 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50125     fi
50126   fi
50127 
50128   fi
50129 
50130   if test "x$MSVC_DLL" = x; then
50131     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50132     if test "x$VS100COMNTOOLS" != x; then
50133       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50134 
50135   windows_path="$CYGWIN_VS_TOOLS_DIR"
50136   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50137     unix_path=`$CYGPATH -u "$windows_path"`
50138     CYGWIN_VS_TOOLS_DIR="$unix_path"
50139   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50140     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50141     CYGWIN_VS_TOOLS_DIR="$unix_path"
50142   fi
50143 
50144       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50145         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50146             | $GREP -i /x64/ | $HEAD --lines 1`
50147       else
50148         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50149             | $GREP -i /x86/ | $HEAD --lines 1`
50150       fi
50151 
50152   DLL_NAME="$DLL_NAME"
50153   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50154   METHOD="search of VS100COMNTOOLS"
50155   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50156     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50157 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50158 
50159     # Need to check if the found msvcr is correct architecture
50160     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50161 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50162     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50164       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50165       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50166       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50167         CORRECT_MSVCR_ARCH="PE32 executable"
50168       else
50169         CORRECT_MSVCR_ARCH="PE32+ executable"
50170       fi
50171     else
50172       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50173         CORRECT_MSVCR_ARCH=386
50174       else
50175         CORRECT_MSVCR_ARCH=x86-64
50176       fi
50177     fi
50178     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50179       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50180 $as_echo "ok" >&6; }
50181       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50182       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50183 $as_echo_n "checking for $DLL_NAME... " >&6; }
50184       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50185 $as_echo "$MSVC_DLL" >&6; }
50186     else
50187       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50188 $as_echo "incorrect, ignoring" >&6; }
50189       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50190 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50191     fi
50192   fi
50193 
50194     fi
50195   fi
50196 
50197   if test "x$MSVC_DLL" = x; then
50198     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50199     # (This was the original behaviour; kept since it might turn something up)
50200     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50201       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50202         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50203             | $GREP x64 | $HEAD --lines 1`
50204       else
50205         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50206             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50207         if test "x$POSSIBLE_MSVC_DLL" = x; then
50208           # We're grasping at straws now...
50209           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50210               | $HEAD --lines 1`
50211         fi
50212       fi
50213 
50214 
50215   DLL_NAME="$DLL_NAME"
50216   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50217   METHOD="search of VCINSTALLDIR"
50218   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50219     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50220 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50221 
50222     # Need to check if the found msvcr is correct architecture
50223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50224 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50225     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50226     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50227       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50228       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50229       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50230         CORRECT_MSVCR_ARCH="PE32 executable"
50231       else
50232         CORRECT_MSVCR_ARCH="PE32+ executable"
50233       fi
50234     else
50235       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50236         CORRECT_MSVCR_ARCH=386
50237       else
50238         CORRECT_MSVCR_ARCH=x86-64
50239       fi
50240     fi
50241     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50242       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50243 $as_echo "ok" >&6; }
50244       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50245       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50246 $as_echo_n "checking for $DLL_NAME... " >&6; }
50247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50248 $as_echo "$MSVC_DLL" >&6; }
50249     else
50250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50251 $as_echo "incorrect, ignoring" >&6; }
50252       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50253 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50254     fi
50255   fi
50256 
50257     fi
50258   fi
50259 
50260   if test "x$MSVC_DLL" = x; then
50261     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50262 $as_echo_n "checking for $DLL_NAME... " >&6; }
50263     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50264 $as_echo "no" >&6; }
50265     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50266   fi
50267 
50268   MSVCR_DLL=$MSVC_DLL
50269 
50270   # Only process if variable expands to non-empty
50271 
50272   if test "x$MSVCR_DLL" != x; then
50273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50274 
50275   # Input might be given as Windows format, start by converting to
50276   # unix format.
50277   path="$MSVCR_DLL"
50278   new_path=`$CYGPATH -u "$path"`
50279 
50280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50283   # "foo.exe" is OK but "foo" is an error.
50284   #
50285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50286   # It is also a way to make sure we got the proper file name for the real test later on.
50287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50288   if test "x$test_shortpath" = x; then
50289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50290 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50291     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50292   fi
50293 
50294   # Call helper function which possibly converts this using DOS-style short mode.
50295   # If so, the updated path is stored in $new_path.
50296 
50297   input_path="$new_path"
50298   # Check if we need to convert this using DOS-style short mode. If the path
50299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50300   # take no chances and rewrite it.
50301   # Note: m4 eats our [], so we need to use [ and ] instead.
50302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50303   if test "x$has_forbidden_chars" != x; then
50304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50308       # Going to short mode and back again did indeed matter. Since short mode is
50309       # case insensitive, let's make it lowercase to improve readability.
50310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50311       # Now convert it back to Unix-stile (cygpath)
50312       input_path=`$CYGPATH -u "$shortmode_path"`
50313       new_path="$input_path"
50314     fi
50315   fi
50316 
50317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50318   if test "x$test_cygdrive_prefix" = x; then
50319     # As a simple fix, exclude /usr/bin since it's not a real path.
50320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50322       # a path prefixed by /cygdrive for fixpath to work.
50323       new_path="$CYGWIN_ROOT_PATH$input_path"
50324     fi
50325   fi
50326 
50327 
50328   if test "x$path" != "x$new_path"; then
50329     MSVCR_DLL="$new_path"
50330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50331 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50332   fi
50333 
50334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50335 
50336   path="$MSVCR_DLL"
50337   has_colon=`$ECHO $path | $GREP ^.:`
50338   new_path="$path"
50339   if test "x$has_colon" = x; then
50340     # Not in mixed or Windows style, start by that.
50341     new_path=`cmd //c echo $path`
50342   fi
50343 
50344 
50345   input_path="$new_path"
50346   # Check if we need to convert this using DOS-style short mode. If the path
50347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50348   # take no chances and rewrite it.
50349   # Note: m4 eats our [], so we need to use [ and ] instead.
50350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50351   if test "x$has_forbidden_chars" != x; then
50352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50354   fi
50355 
50356 
50357   windows_path="$new_path"
50358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50359     unix_path=`$CYGPATH -u "$windows_path"`
50360     new_path="$unix_path"
50361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50363     new_path="$unix_path"
50364   fi
50365 
50366   if test "x$path" != "x$new_path"; then
50367     MSVCR_DLL="$new_path"
50368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50369 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50370   fi
50371 
50372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50374 
50375     else
50376       # We're on a unix platform. Hooray! :)
50377       path="$MSVCR_DLL"
50378       has_space=`$ECHO "$path" | $GREP " "`
50379       if test "x$has_space" != x; then
50380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50381 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50383       fi
50384 
50385       # Use eval to expand a potential ~
50386       eval path="$path"
50387       if test ! -f "$path" && test ! -d "$path"; then
50388         as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50389       fi
50390 
50391       MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50392     fi
50393   fi
50394 
50395   MSVCR_DLL=$MSVCR_DLL
50396 
50397 
50398   fi
50399 
50400 
50401 # Check whether --with-msvcp-dll was given.
50402 if test "${with_msvcp_dll+set}" = set; then :
50403   withval=$with_msvcp_dll;
50404 fi
50405 
50406 
50407   if test "x$MSVCP_NAME" != "x"; then
50408     if test "x$with_msvcp_dll" != x; then
50409       # If given explicitely by user, do not probe. If not present, fail directly.
50410 
50411   DLL_NAME="$DLL_NAME"
50412   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50413   METHOD="--with-msvcp-dll"
50414   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50415     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50416 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50417 
50418     # Need to check if the found msvcr is correct architecture
50419     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50420 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50421     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50422     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50423       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50424       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50425       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50426         CORRECT_MSVCR_ARCH="PE32 executable"
50427       else
50428         CORRECT_MSVCR_ARCH="PE32+ executable"
50429       fi
50430     else
50431       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50432         CORRECT_MSVCR_ARCH=386
50433       else
50434         CORRECT_MSVCR_ARCH=x86-64
50435       fi
50436     fi
50437     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50438       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50439 $as_echo "ok" >&6; }
50440       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50441       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50442 $as_echo_n "checking for $DLL_NAME... " >&6; }
50443       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50444 $as_echo "$MSVC_DLL" >&6; }
50445     else
50446       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50447 $as_echo "incorrect, ignoring" >&6; }
50448       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50449 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50450     fi
50451   fi
50452 
50453       if test "x$MSVC_DLL" = x; then
50454         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50455       fi
50456     else
50457 
50458   VAR_NAME="MSVCP_DLL"
50459   DLL_NAME="${MSVCP_NAME}"
50460   MSVC_DLL=
50461 
50462   if test "x$MSVC_DLL" = x; then
50463     # Probe: Using well-known location from Visual Studio 10.0
50464     if test "x$VCINSTALLDIR" != x; then
50465       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50466 
50467   windows_path="$CYGWIN_VC_INSTALL_DIR"
50468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50469     unix_path=`$CYGPATH -u "$windows_path"`
50470     CYGWIN_VC_INSTALL_DIR="$unix_path"
50471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50473     CYGWIN_VC_INSTALL_DIR="$unix_path"
50474   fi
50475 
50476       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50477         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50478       else
50479         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50480       fi
50481       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50482 
50483   DLL_NAME="$DLL_NAME"
50484   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50485   METHOD="well-known location in VCINSTALLDIR"
50486   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50487     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50488 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50489 
50490     # Need to check if the found msvcr is correct architecture
50491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50492 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50493     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50494     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50495       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50496       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50497       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50498         CORRECT_MSVCR_ARCH="PE32 executable"
50499       else
50500         CORRECT_MSVCR_ARCH="PE32+ executable"
50501       fi
50502     else
50503       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50504         CORRECT_MSVCR_ARCH=386
50505       else
50506         CORRECT_MSVCR_ARCH=x86-64
50507       fi
50508     fi
50509     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50510       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50511 $as_echo "ok" >&6; }
50512       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50513       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50514 $as_echo_n "checking for $DLL_NAME... " >&6; }
50515       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50516 $as_echo "$MSVC_DLL" >&6; }
50517     else
50518       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50519 $as_echo "incorrect, ignoring" >&6; }
50520       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50521 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50522     fi
50523   fi
50524 
50525     fi
50526   fi
50527 
50528   if test "x$MSVC_DLL" = x; then
50529     # Probe: Check in the Boot JDK directory.
50530     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50531 
50532   DLL_NAME="$DLL_NAME"
50533   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50534   METHOD="well-known location in Boot JDK"
50535   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50536     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50537 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50538 
50539     # Need to check if the found msvcr is correct architecture
50540     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50541 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50542     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50543     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50544       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50545       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50546       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50547         CORRECT_MSVCR_ARCH="PE32 executable"
50548       else
50549         CORRECT_MSVCR_ARCH="PE32+ executable"
50550       fi
50551     else
50552       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50553         CORRECT_MSVCR_ARCH=386
50554       else
50555         CORRECT_MSVCR_ARCH=x86-64
50556       fi
50557     fi
50558     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50559       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50560 $as_echo "ok" >&6; }
50561       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50562       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50563 $as_echo_n "checking for $DLL_NAME... " >&6; }
50564       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50565 $as_echo "$MSVC_DLL" >&6; }
50566     else
50567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50568 $as_echo "incorrect, ignoring" >&6; }
50569       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50570 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50571     fi
50572   fi
50573 
50574   fi
50575 
50576   if test "x$MSVC_DLL" = x; then
50577     # Probe: Look in the Windows system32 directory
50578     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50579 
50580   windows_path="$CYGWIN_SYSTEMROOT"
50581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50582     unix_path=`$CYGPATH -u "$windows_path"`
50583     CYGWIN_SYSTEMROOT="$unix_path"
50584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50586     CYGWIN_SYSTEMROOT="$unix_path"
50587   fi
50588 
50589     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50590 
50591   DLL_NAME="$DLL_NAME"
50592   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50593   METHOD="well-known location in SYSTEMROOT"
50594   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50595     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50596 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50597 
50598     # Need to check if the found msvcr is correct architecture
50599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50600 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50601     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50602     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50603       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50604       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50605       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50606         CORRECT_MSVCR_ARCH="PE32 executable"
50607       else
50608         CORRECT_MSVCR_ARCH="PE32+ executable"
50609       fi
50610     else
50611       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50612         CORRECT_MSVCR_ARCH=386
50613       else
50614         CORRECT_MSVCR_ARCH=x86-64
50615       fi
50616     fi
50617     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50619 $as_echo "ok" >&6; }
50620       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50621       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50622 $as_echo_n "checking for $DLL_NAME... " >&6; }
50623       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50624 $as_echo "$MSVC_DLL" >&6; }
50625     else
50626       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50627 $as_echo "incorrect, ignoring" >&6; }
50628       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50629 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50630     fi
50631   fi
50632 
50633   fi
50634 
50635   if test "x$MSVC_DLL" = x; then
50636     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50637     if test "x$VS100COMNTOOLS" != x; then
50638       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50639 
50640   windows_path="$CYGWIN_VS_TOOLS_DIR"
50641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50642     unix_path=`$CYGPATH -u "$windows_path"`
50643     CYGWIN_VS_TOOLS_DIR="$unix_path"
50644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50646     CYGWIN_VS_TOOLS_DIR="$unix_path"
50647   fi
50648 
50649       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50650         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50651             | $GREP -i /x64/ | $HEAD --lines 1`
50652       else
50653         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50654             | $GREP -i /x86/ | $HEAD --lines 1`
50655       fi
50656 
50657   DLL_NAME="$DLL_NAME"
50658   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50659   METHOD="search of VS100COMNTOOLS"
50660   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50661     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50662 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50663 
50664     # Need to check if the found msvcr is correct architecture
50665     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50666 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50667     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50668     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50669       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50670       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50671       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50672         CORRECT_MSVCR_ARCH="PE32 executable"
50673       else
50674         CORRECT_MSVCR_ARCH="PE32+ executable"
50675       fi
50676     else
50677       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50678         CORRECT_MSVCR_ARCH=386
50679       else
50680         CORRECT_MSVCR_ARCH=x86-64
50681       fi
50682     fi
50683     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50685 $as_echo "ok" >&6; }
50686       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50687       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50688 $as_echo_n "checking for $DLL_NAME... " >&6; }
50689       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50690 $as_echo "$MSVC_DLL" >&6; }
50691     else
50692       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50693 $as_echo "incorrect, ignoring" >&6; }
50694       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50695 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50696     fi
50697   fi
50698 
50699     fi
50700   fi
50701 
50702   if test "x$MSVC_DLL" = x; then
50703     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50704     # (This was the original behaviour; kept since it might turn something up)
50705     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50706       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50707         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50708             | $GREP x64 | $HEAD --lines 1`
50709       else
50710         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50711             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50712         if test "x$POSSIBLE_MSVC_DLL" = x; then
50713           # We're grasping at straws now...
50714           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50715               | $HEAD --lines 1`
50716         fi
50717       fi
50718 
50719 
50720   DLL_NAME="$DLL_NAME"
50721   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50722   METHOD="search of VCINSTALLDIR"
50723   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50724     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50725 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50726 
50727     # Need to check if the found msvcr is correct architecture
50728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50729 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50730     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50732       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50733       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50734       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50735         CORRECT_MSVCR_ARCH="PE32 executable"
50736       else
50737         CORRECT_MSVCR_ARCH="PE32+ executable"
50738       fi
50739     else
50740       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50741         CORRECT_MSVCR_ARCH=386
50742       else
50743         CORRECT_MSVCR_ARCH=x86-64
50744       fi
50745     fi
50746     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50748 $as_echo "ok" >&6; }
50749       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50750       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50751 $as_echo_n "checking for $DLL_NAME... " >&6; }
50752       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50753 $as_echo "$MSVC_DLL" >&6; }
50754     else
50755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50756 $as_echo "incorrect, ignoring" >&6; }
50757       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50758 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50759     fi
50760   fi
50761 
50762     fi
50763   fi
50764 
50765   if test "x$MSVC_DLL" = x; then
50766     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50767 $as_echo_n "checking for $DLL_NAME... " >&6; }
50768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50769 $as_echo "no" >&6; }
50770     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50771   fi
50772 
50773   MSVCP_DLL=$MSVC_DLL
50774 
50775   # Only process if variable expands to non-empty
50776 
50777   if test "x$MSVCP_DLL" != x; then
50778     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50779 
50780   # Input might be given as Windows format, start by converting to
50781   # unix format.
50782   path="$MSVCP_DLL"
50783   new_path=`$CYGPATH -u "$path"`
50784 
50785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50788   # "foo.exe" is OK but "foo" is an error.
50789   #
50790   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50791   # It is also a way to make sure we got the proper file name for the real test later on.
50792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50793   if test "x$test_shortpath" = x; then
50794     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50795 $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50796     as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50797   fi
50798 
50799   # Call helper function which possibly converts this using DOS-style short mode.
50800   # If so, the updated path is stored in $new_path.
50801 
50802   input_path="$new_path"
50803   # Check if we need to convert this using DOS-style short mode. If the path
50804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50805   # take no chances and rewrite it.
50806   # Note: m4 eats our [], so we need to use [ and ] instead.
50807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50808   if test "x$has_forbidden_chars" != x; then
50809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50810     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50811     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50812     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50813       # Going to short mode and back again did indeed matter. Since short mode is
50814       # case insensitive, let's make it lowercase to improve readability.
50815       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50816       # Now convert it back to Unix-stile (cygpath)
50817       input_path=`$CYGPATH -u "$shortmode_path"`
50818       new_path="$input_path"
50819     fi
50820   fi
50821 
50822   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50823   if test "x$test_cygdrive_prefix" = x; then
50824     # As a simple fix, exclude /usr/bin since it's not a real path.
50825     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50826       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50827       # a path prefixed by /cygdrive for fixpath to work.
50828       new_path="$CYGWIN_ROOT_PATH$input_path"
50829     fi
50830   fi
50831 
50832 
50833   if test "x$path" != "x$new_path"; then
50834     MSVCP_DLL="$new_path"
50835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50836 $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50837   fi
50838 
50839     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50840 
50841   path="$MSVCP_DLL"
50842   has_colon=`$ECHO $path | $GREP ^.:`
50843   new_path="$path"
50844   if test "x$has_colon" = x; then
50845     # Not in mixed or Windows style, start by that.
50846     new_path=`cmd //c echo $path`
50847   fi
50848 
50849 
50850   input_path="$new_path"
50851   # Check if we need to convert this using DOS-style short mode. If the path
50852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50853   # take no chances and rewrite it.
50854   # Note: m4 eats our [], so we need to use [ and ] instead.
50855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50856   if test "x$has_forbidden_chars" != x; then
50857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50858     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50859   fi
50860 
50861 
50862   windows_path="$new_path"
50863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50864     unix_path=`$CYGPATH -u "$windows_path"`
50865     new_path="$unix_path"
50866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50868     new_path="$unix_path"
50869   fi
50870 
50871   if test "x$path" != "x$new_path"; then
50872     MSVCP_DLL="$new_path"
50873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50874 $as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50875   fi
50876 
50877   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50878   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50879 
50880     else
50881       # We're on a unix platform. Hooray! :)
50882       path="$MSVCP_DLL"
50883       has_space=`$ECHO "$path" | $GREP " "`
50884       if test "x$has_space" != x; then
50885         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50886 $as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50887         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50888       fi
50889 
50890       # Use eval to expand a potential ~
50891       eval path="$path"
50892       if test ! -f "$path" && test ! -d "$path"; then
50893         as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50894       fi
50895 
50896       MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50897     fi
50898   fi
50899 
50900   MSVCP_DLL=$MSVCP_DLL
50901 
50902 
50903     fi
50904   fi
50905 
50906 
50907 
50908 # Check whether --with-dxsdk was given.
50909 if test "${with_dxsdk+set}" = set; then :
50910   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50911 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50912 fi
50913 
50914 
50915 
50916 
50917 # Check whether --with-dxsdk-lib was given.
50918 if test "${with_dxsdk_lib+set}" = set; then :
50919   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50920 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50921 fi
50922 
50923 
50924 
50925 
50926 # Check whether --with-dxsdk-include was given.
50927 if test "${with_dxsdk_include+set}" = set; then :
50928   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50929 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50930 fi
50931 
50932 
50933   fi
50934 
50935 
50936 ###############################################################################
50937 #
50938 # We need to do some final tweaking, when everything else is done.
50939 #
50940 ###############################################################################
50941 
50942 
50943   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50944 
50945 
50946   # The name of the Service Agent jar.
50947   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50948   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50949     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50950   fi
50951 
50952 
50953 
50954     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50955 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50956 
50957     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50958       ENABLE_INTREE_EC=yes
50959       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50960 $as_echo "yes" >&6; }
50961     else
50962       ENABLE_INTREE_EC=no
50963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50964 $as_echo "no" >&6; }
50965     fi
50966 
50967 
50968 
50969 
50970 ###############################################################################
50971 #
50972 # Configure parts of the build that only affect the build performance,
50973 # not the result.
50974 #
50975 ###############################################################################
50976 
50977 
50978   # How many cores do we have on this build system?
50979 
50980 # Check whether --with-num-cores was given.
50981 if test "${with_num_cores+set}" = set; then :
50982   withval=$with_num_cores;
50983 fi
50984 
50985   if test "x$with_num_cores" = x; then
50986     # The number of cores were not specified, try to probe them.
50987 
50988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50989 $as_echo_n "checking for number of cores... " >&6; }
50990   NUM_CORES=1
50991   FOUND_CORES=no
50992 
50993   if test -f /proc/cpuinfo; then
50994     # Looks like a Linux (or cygwin) system
50995     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50996     FOUND_CORES=yes
50997   elif test -x /usr/sbin/psrinfo; then
50998     # Looks like a Solaris system
50999     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
51000     FOUND_CORES=yes
51001   elif test -x /usr/sbin/system_profiler; then
51002     # Looks like a MacOSX system
51003     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
51004     FOUND_CORES=yes
51005   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
51006     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
51007     FOUND_CORES=yes
51008   elif test -n "$NUMBER_OF_PROCESSORS"; then
51009     # On windows, look in the env
51010     NUM_CORES=$NUMBER_OF_PROCESSORS
51011     FOUND_CORES=yes
51012   fi
51013 
51014   if test "x$FOUND_CORES" = xyes; then
51015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
51016 $as_echo "$NUM_CORES" >&6; }
51017   else
51018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
51019 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
51020     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
51021 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
51022   fi
51023 
51024   else
51025     NUM_CORES=$with_num_cores
51026   fi
51027 
51028 
51029 
51030   # How much memory do we have on this build system?
51031 
51032 # Check whether --with-memory-size was given.
51033 if test "${with_memory_size+set}" = set; then :
51034   withval=$with_memory_size;
51035 fi
51036 
51037   if test "x$with_memory_size" = x; then
51038     # The memory size was not specified, try to probe it.
51039 
51040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
51041 $as_echo_n "checking for memory size... " >&6; }
51042   # Default to 1024 MB
51043   MEMORY_SIZE=1024
51044   FOUND_MEM=no
51045 
51046   if test -f /proc/meminfo; then
51047     # Looks like a Linux (or cygwin) system
51048     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51049     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51050     FOUND_MEM=yes
51051   elif test -x /usr/sbin/prtconf; then
51052     # Looks like a Solaris or AIX system
51053     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51054     FOUND_MEM=yes
51055   elif test -x /usr/sbin/system_profiler; then
51056     # Looks like a MacOSX system
51057     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51058     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51059     FOUND_MEM=yes
51060   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51061     # Windows, but without cygwin
51062     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51063     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51064     FOUND_MEM=yes
51065   fi
51066 
51067   if test "x$FOUND_MEM" = xyes; then
51068     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51069 $as_echo "$MEMORY_SIZE MB" >&6; }
51070   else
51071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51072 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51073     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51074 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51075   fi
51076 
51077   else
51078     MEMORY_SIZE=$with_memory_size
51079   fi
51080 
51081 
51082 
51083   # Provide a decent default number of parallel jobs for make depending on
51084   # number of cores, amount of memory and machine architecture.
51085 
51086 # Check whether --with-jobs was given.
51087 if test "${with_jobs+set}" = set; then :
51088   withval=$with_jobs;
51089 fi
51090 
51091   if test "x$with_jobs" = x; then
51092     # Number of jobs was not specified, calculate.
51093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51094 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51095     # Approximate memory in GB.
51096     memory_gb=`expr $MEMORY_SIZE / 1024`
51097     # Pick the lowest of memory in gb and number of cores.
51098     if test "$memory_gb" -lt "$NUM_CORES"; then
51099       JOBS="$memory_gb"
51100     else
51101       JOBS="$NUM_CORES"
51102       # On bigger machines, leave some room for other processes to run
51103       if test "$JOBS" -gt "4"; then
51104         JOBS=`expr $JOBS '*' 90 / 100`
51105       fi
51106     fi
51107     # Cap number of jobs to 16
51108     if test "$JOBS" -gt "16"; then
51109       JOBS=16
51110     fi
51111     if test "$JOBS" -eq "0"; then
51112       JOBS=1
51113     fi
51114     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51115 $as_echo "$JOBS" >&6; }
51116   else
51117     JOBS=$with_jobs
51118   fi
51119 
51120 
51121 
51122 # Setup arguments for the boot jdk (after cores and memory have been setup)
51123 
51124   ##############################################################################
51125   #
51126   # Specify jvm options for anything that is run with the Boot JDK.
51127   # Not all JVM:s accept the same arguments on the command line.
51128   #
51129 
51130 # Check whether --with-boot-jdk-jvmargs was given.
51131 if test "${with_boot_jdk_jvmargs+set}" = set; then :
51132   withval=$with_boot_jdk_jvmargs;
51133 fi
51134 
51135 
51136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51137 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
51138 
51139   # Disable special log output when a debug build is used as Boot JDK...
51140 
51141   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51142   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51143   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51144   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51145   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51146   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51147     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51148     JVM_ARG_OK=true
51149   else
51150     $ECHO "Arg failed:" >&5
51151     $ECHO "$OUTPUT" >&5
51152     JVM_ARG_OK=false
51153   fi
51154 
51155 
51156   # Apply user provided options.
51157 
51158   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51159   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51160   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51161   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51162   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51163   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51164     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51165     JVM_ARG_OK=true
51166   else
51167     $ECHO "Arg failed:" >&5
51168     $ECHO "$OUTPUT" >&5
51169     JVM_ARG_OK=false
51170   fi
51171 
51172 
51173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51174 $as_echo "$boot_jdk_jvmargs" >&6; }
51175 
51176   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51177   JAVA_FLAGS=$boot_jdk_jvmargs
51178 
51179 
51180 
51181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51182 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51183 
51184   # Starting amount of heap memory.
51185 
51186   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51187   $ECHO "Command: $JAVA -Xms64M -version" >&5
51188   OUTPUT=`$JAVA -Xms64M -version 2>&1`
51189   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51190   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51191   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51192     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51193     JVM_ARG_OK=true
51194   else
51195     $ECHO "Arg failed:" >&5
51196     $ECHO "$OUTPUT" >&5
51197     JVM_ARG_OK=false
51198   fi
51199 
51200 
51201   # Maximum amount of heap memory.
51202   # Maximum stack size.
51203   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51204   if test "x$BUILD_NUM_BITS" = x32; then
51205     if test "$JVM_MAX_HEAP" -gt "1100"; then
51206       JVM_MAX_HEAP=1100
51207     elif test "$JVM_MAX_HEAP" -lt "512"; then
51208       JVM_MAX_HEAP=512
51209     fi
51210     STACK_SIZE=768
51211   else
51212     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51213     # pointers are used. Apparently, we need to increase the heap and stack
51214     # space for the jvm. More specifically, when running javac to build huge
51215     # jdk batch
51216     if test "$JVM_MAX_HEAP" -gt "1600"; then
51217       JVM_MAX_HEAP=1600
51218     elif test "$JVM_MAX_HEAP" -lt "512"; then
51219       JVM_MAX_HEAP=512
51220     fi
51221     STACK_SIZE=1536
51222   fi
51223 
51224   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51225   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51226   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51227   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51228   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51229   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51230     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51231     JVM_ARG_OK=true
51232   else
51233     $ECHO "Arg failed:" >&5
51234     $ECHO "$OUTPUT" >&5
51235     JVM_ARG_OK=false
51236   fi
51237 
51238 
51239   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51240   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51241   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51242   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51243   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51244   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51245     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51246     JVM_ARG_OK=true
51247   else
51248     $ECHO "Arg failed:" >&5
51249     $ECHO "$OUTPUT" >&5
51250     JVM_ARG_OK=false
51251   fi
51252 
51253 
51254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51255 $as_echo "$boot_jdk_jvmargs_big" >&6; }
51256 
51257   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51258 
51259 
51260 
51261   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51262 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51263 
51264   # Use serial gc for small short lived tools if possible
51265 
51266   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51267   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51268   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51269   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51270   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51271   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51272     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51273     JVM_ARG_OK=true
51274   else
51275     $ECHO "Arg failed:" >&5
51276     $ECHO "$OUTPUT" >&5
51277     JVM_ARG_OK=false
51278   fi
51279 
51280 
51281   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51282   $ECHO "Command: $JAVA -Xms32M -version" >&5
51283   OUTPUT=`$JAVA -Xms32M -version 2>&1`
51284   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51285   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51286   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51287     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51288     JVM_ARG_OK=true
51289   else
51290     $ECHO "Arg failed:" >&5
51291     $ECHO "$OUTPUT" >&5
51292     JVM_ARG_OK=false
51293   fi
51294 
51295 
51296   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51297   $ECHO "Command: $JAVA -Xmx512M -version" >&5
51298   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51299   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51300   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51301   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51302     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51303     JVM_ARG_OK=true
51304   else
51305     $ECHO "Arg failed:" >&5
51306     $ECHO "$OUTPUT" >&5
51307     JVM_ARG_OK=false
51308   fi
51309 
51310 
51311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51312 $as_echo "$boot_jdk_jvmargs_small" >&6; }
51313 
51314   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51315 
51316 
51317   JAVA_TOOL_FLAGS_SMALL=""
51318   for f in $JAVA_FLAGS_SMALL; do
51319     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51320   done
51321 
51322 
51323 
51324 # Setup smart javac (after cores and memory have been setup)
51325 
51326 
51327 # Check whether --with-sjavac-server-java was given.
51328 if test "${with_sjavac_server_java+set}" = set; then :
51329   withval=$with_sjavac_server_java;
51330 fi
51331 
51332 
51333   if test "x$with_sjavac_server_java" != x; then
51334     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51335     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51336     if test "x$FOUND_VERSION" = x; then
51337       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51338     fi
51339   else
51340     SJAVAC_SERVER_JAVA="$JAVA"
51341   fi
51342 
51343 
51344   if test "$MEMORY_SIZE" -gt "3000"; then
51345 
51346   $ECHO "Check if jvm arg is ok: -d64" >&5
51347   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51348   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51349   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51350   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51351   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51352     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51353     JVM_ARG_OK=true
51354   else
51355     $ECHO "Arg failed:" >&5
51356     $ECHO "$OUTPUT" >&5
51357     JVM_ARG_OK=false
51358   fi
51359 
51360     if test "$JVM_ARG_OK" = true; then
51361       JVM_64BIT=true
51362       JVM_ARG_OK=false
51363     fi
51364   fi
51365 
51366   MX_VALUE=`expr $MEMORY_SIZE / 2`
51367   if test "$JVM_64BIT" = true; then
51368     # Set ms lower than mx since more than one instance of the server might
51369     # get launched at the same time before they figure out which instance won.
51370     MS_VALUE=512
51371     if test "$MX_VALUE" -gt "2048"; then
51372       MX_VALUE=2048
51373     fi
51374   else
51375     MS_VALUE=256
51376     if test "$MX_VALUE" -gt "1500"; then
51377       MX_VALUE=1500
51378     fi
51379   fi
51380   if test "$MX_VALUE" -lt "512"; then
51381     MX_VALUE=512
51382   fi
51383 
51384   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51385   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51386   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51387   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51388   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51389   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51390     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51391     JVM_ARG_OK=true
51392   else
51393     $ECHO "Arg failed:" >&5
51394     $ECHO "$OUTPUT" >&5
51395     JVM_ARG_OK=false
51396   fi
51397 
51398 
51399 
51400   # Check whether --enable-sjavac was given.
51401 if test "${enable_sjavac+set}" = set; then :
51402   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51403 else
51404   ENABLE_SJAVAC='no'
51405 fi
51406 
51407   if test "x$JVM_ARG_OK" = "xfalse"; then
51408     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51409 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51410     ENABLE_SJAVAC=no;
51411   fi
51412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51413 $as_echo_n "checking whether to use sjavac... " >&6; }
51414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51415 $as_echo "$ENABLE_SJAVAC" >&6; }
51416 
51417 
51418   if test "x$ENABLE_SJAVAC" = xyes; then
51419     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51420   else
51421     SJAVAC_SERVER_DIR=
51422   fi
51423 
51424 
51425 
51426 # Can the C/C++ compiler use precompiled headers?
51427 
51428 
51429   ###############################################################################
51430   #
51431   # Can the C/C++ compiler use precompiled headers?
51432   #
51433   # Check whether --enable-precompiled-headers was given.
51434 if test "${enable_precompiled_headers+set}" = set; then :
51435   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51436 else
51437   ENABLE_PRECOMPH=yes
51438 fi
51439 
51440 
51441   USE_PRECOMPILED_HEADER=1
51442   if test "x$ENABLE_PRECOMPH" = xno; then
51443     USE_PRECOMPILED_HEADER=0
51444   fi
51445 
51446   if test "x$ENABLE_PRECOMPH" = xyes; then
51447     # Check that the compiler actually supports precomp headers.
51448     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51449       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51450 $as_echo_n "checking that precompiled headers work... " >&6; }
51451       echo "int alfa();" > conftest.h
51452       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51453       if test ! -f conftest.hpp.gch; then
51454         USE_PRECOMPILED_HEADER=0
51455         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51456 $as_echo "no" >&6; }
51457       else
51458         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51459 $as_echo "yes" >&6; }
51460       fi
51461       rm -f conftest.h conftest.hpp.gch
51462     fi
51463   fi
51464 
51465 
51466 
51467 
51468 # Setup use of ccache, if available
51469 
51470   # Check whether --enable-ccache was given.
51471 if test "${enable_ccache+set}" = set; then :
51472   enableval=$enable_ccache;
51473 fi
51474 
51475 
51476   CCACHE=
51477   CCACHE_STATUS=
51478   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51479 $as_echo_n "checking is ccache enabled... " >&6; }
51480   if test "x$enable_ccache" = xyes; then
51481     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51482       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51483 $as_echo "yes" >&6; }
51484       OLD_PATH="$PATH"
51485       if test "x$TOOLCHAIN_PATH" != x; then
51486         PATH=$TOOLCHAIN_PATH:$PATH
51487       fi
51488 
51489 
51490 
51491   # Publish this variable in the help.
51492 
51493 
51494   if test "x$CCACHE" = x; then
51495     # The variable is not set by user, try to locate tool using the code snippet
51496     for ac_prog in ccache
51497 do
51498   # Extract the first word of "$ac_prog", so it can be a program name with args.
51499 set dummy $ac_prog; ac_word=$2
51500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51501 $as_echo_n "checking for $ac_word... " >&6; }
51502 if ${ac_cv_path_CCACHE+:} false; then :
51503   $as_echo_n "(cached) " >&6
51504 else
51505   case $CCACHE in
51506   [\\/]* | ?:[\\/]*)
51507   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51508   ;;
51509   *)
51510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51511 for as_dir in $PATH
51512 do
51513   IFS=$as_save_IFS
51514   test -z "$as_dir" && as_dir=.
51515     for ac_exec_ext in '' $ac_executable_extensions; do
51516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51517     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51519     break 2
51520   fi
51521 done
51522   done
51523 IFS=$as_save_IFS
51524 
51525   ;;
51526 esac
51527 fi
51528 CCACHE=$ac_cv_path_CCACHE
51529 if test -n "$CCACHE"; then
51530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51531 $as_echo "$CCACHE" >&6; }
51532 else
51533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51534 $as_echo "no" >&6; }
51535 fi
51536 
51537 
51538   test -n "$CCACHE" && break
51539 done
51540 
51541   else
51542     # The variable is set, but is it from the command line or the environment?
51543 
51544     # Try to remove the string !CCACHE! from our list.
51545     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51546     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51547       # If it failed, the variable was not from the command line. Ignore it,
51548       # but warn the user (except for BASH, which is always set by the calling BASH).
51549       if test "xCCACHE" != xBASH; then
51550         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51551 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51552       fi
51553       # Try to locate tool using the code snippet
51554       for ac_prog in ccache
51555 do
51556   # Extract the first word of "$ac_prog", so it can be a program name with args.
51557 set dummy $ac_prog; ac_word=$2
51558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51559 $as_echo_n "checking for $ac_word... " >&6; }
51560 if ${ac_cv_path_CCACHE+:} false; then :
51561   $as_echo_n "(cached) " >&6
51562 else
51563   case $CCACHE in
51564   [\\/]* | ?:[\\/]*)
51565   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51566   ;;
51567   *)
51568   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51569 for as_dir in $PATH
51570 do
51571   IFS=$as_save_IFS
51572   test -z "$as_dir" && as_dir=.
51573     for ac_exec_ext in '' $ac_executable_extensions; do
51574   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51575     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51576     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51577     break 2
51578   fi
51579 done
51580   done
51581 IFS=$as_save_IFS
51582 
51583   ;;
51584 esac
51585 fi
51586 CCACHE=$ac_cv_path_CCACHE
51587 if test -n "$CCACHE"; then
51588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51589 $as_echo "$CCACHE" >&6; }
51590 else
51591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51592 $as_echo "no" >&6; }
51593 fi
51594 
51595 
51596   test -n "$CCACHE" && break
51597 done
51598 
51599     else
51600       # If it succeeded, then it was overridden by the user. We will use it
51601       # for the tool.
51602 
51603       # First remove it from the list of overridden variables, so we can test
51604       # for unknown variables in the end.
51605       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51606 
51607       # Check if the provided tool contains a complete path.
51608       tool_specified="$CCACHE"
51609       tool_basename="${tool_specified##*/}"
51610       if test "x$tool_basename" = "x$tool_specified"; then
51611         # A command without a complete path is provided, search $PATH.
51612         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51613 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51614         # Extract the first word of "$tool_basename", so it can be a program name with args.
51615 set dummy $tool_basename; ac_word=$2
51616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51617 $as_echo_n "checking for $ac_word... " >&6; }
51618 if ${ac_cv_path_CCACHE+:} false; then :
51619   $as_echo_n "(cached) " >&6
51620 else
51621   case $CCACHE in
51622   [\\/]* | ?:[\\/]*)
51623   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51624   ;;
51625   *)
51626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51627 for as_dir in $PATH
51628 do
51629   IFS=$as_save_IFS
51630   test -z "$as_dir" && as_dir=.
51631     for ac_exec_ext in '' $ac_executable_extensions; do
51632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51633     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51635     break 2
51636   fi
51637 done
51638   done
51639 IFS=$as_save_IFS
51640 
51641   ;;
51642 esac
51643 fi
51644 CCACHE=$ac_cv_path_CCACHE
51645 if test -n "$CCACHE"; then
51646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51647 $as_echo "$CCACHE" >&6; }
51648 else
51649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51650 $as_echo "no" >&6; }
51651 fi
51652 
51653 
51654         if test "x$CCACHE" = x; then
51655           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51656         fi
51657       else
51658         # Otherwise we believe it is a complete path. Use it as it is.
51659         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51660 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51662 $as_echo_n "checking for CCACHE... " >&6; }
51663         if test ! -x "$tool_specified"; then
51664           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51665 $as_echo "not found" >&6; }
51666           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51667         fi
51668         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51669 $as_echo "$tool_specified" >&6; }
51670       fi
51671     fi
51672   fi
51673 
51674 
51675 
51676   if test "x$CCACHE" = x; then
51677     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51678   fi
51679 
51680 
51681       PATH="$OLD_PATH"
51682       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
51683       CCACHE_STATUS="Active ($CCACHE_VERSION)"
51684     else
51685       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51686 $as_echo "no" >&6; }
51687       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
51688 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
51689     fi
51690   elif test "x$enable_ccache" = xno; then
51691     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51692 $as_echo "no, explicitly disabled" >&6; }
51693     CCACHE_STATUS="Disabled"
51694   elif test "x$enable_ccache" = x; then
51695     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51696 $as_echo "no" >&6; }
51697   else
51698     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51699 $as_echo "unknown" >&6; }
51700     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51701   fi
51702 
51703 
51704 
51705 # Check whether --with-ccache-dir was given.
51706 if test "${with_ccache_dir+set}" = set; then :
51707   withval=$with_ccache_dir;
51708 fi
51709 
51710 
51711   if test "x$with_ccache_dir" != x; then
51712     # When using a non home ccache directory, assume the use is to share ccache files
51713     # with other users. Thus change the umask.
51714     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51715     if test "x$CCACHE" = x; then
51716       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51717 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51718     fi
51719   fi
51720 
51721   if test "x$CCACHE" != x; then
51722 
51723   if test "x$CCACHE" != x; then
51724     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
51725       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
51726           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
51727       if test "x$HAS_BAD_CCACHE" != "x"; then
51728         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
51729       fi
51730       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51731 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51732       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
51733       PUSHED_FLAGS="$CXXFLAGS"
51734       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
51735       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51736 /* end confdefs.h.  */
51737 
51738 int
51739 main ()
51740 {
51741 
51742   ;
51743   return 0;
51744 }
51745 _ACEOF
51746 if ac_fn_cxx_try_compile "$LINENO"; then :
51747   CC_KNOWS_CCACHE_TRICK=yes
51748 else
51749   CC_KNOWS_CCACHE_TRICK=no
51750 fi
51751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51752       CXXFLAGS="$PUSHED_FLAGS"
51753       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51754         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51755 $as_echo "yes" >&6; }
51756         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
51757 
51758         CCACHE_SLOPPINESS=pch_defines,time_macros
51759       else
51760         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51761 $as_echo "no" >&6; }
51762         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
51763       fi
51764     fi
51765 
51766     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
51767         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
51768 
51769     if test "x$SET_CCACHE_DIR" != x; then
51770       mkdir -p $CCACHE_DIR > /dev/null 2>&1
51771       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51772     fi
51773   fi
51774 
51775   fi
51776 
51777 
51778 ###############################################################################
51779 #
51780 # And now the finish...
51781 #
51782 ###############################################################################
51783 
51784 # Check for some common pitfalls
51785 
51786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51787     file_to_test="$SRC_ROOT/LICENSE"
51788     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51789       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
51790     fi
51791   fi
51792 
51793 
51794   # Did user specify any unknown variables?
51795 
51796   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51797     # Replace the separating ! with spaces before presenting for end user.
51798     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51799     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51800 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51801   fi
51802 
51803 
51804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51805 $as_echo_n "checking if build directory is on local disk... " >&6; }
51806 
51807   # df -l lists only local disks; if the given directory is not found then
51808   # a non-zero exit code is given
51809   if test "x$DF" = x; then
51810     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51811       # msys does not have df; use Windows "net use" instead.
51812       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51813       if test "x$IS_NETWORK_DISK" = x; then
51814         OUTPUT_DIR_IS_LOCAL="yes"
51815       else
51816         OUTPUT_DIR_IS_LOCAL="no"
51817       fi
51818     else
51819       # No df here, say it's local
51820       OUTPUT_DIR_IS_LOCAL="yes"
51821     fi
51822   else
51823     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51824       OUTPUT_DIR_IS_LOCAL="yes"
51825     else
51826       OUTPUT_DIR_IS_LOCAL="no"
51827     fi
51828   fi
51829 
51830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51831 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51832 
51833 
51834 
51835   # Check if the user has any old-style ALT_ variables set.
51836   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51837 
51838   # Before generating output files, test if they exist. If they do, this is a reconfigure.
51839   # Since we can't properly handle the dependencies for this, warn the user about the situation
51840   if test -e $OUTPUT_ROOT/spec.gmk; then
51841     IS_RECONFIGURE=yes
51842   else
51843     IS_RECONFIGURE=no
51844   fi
51845 
51846 
51847 # At the end, call the custom hook. (Dummy macro if no custom sources available)
51848 
51849 
51850 # We're messing a bit with internal autoconf variables to put the config.status
51851 # in the output directory instead of the current directory.
51852 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51853 
51854 # Create the actual output files. Now the main work of configure is done.
51855 cat >confcache <<\_ACEOF
51856 # This file is a shell script that caches the results of configure
51857 # tests run on this system so they can be shared between configure
51858 # scripts and configure runs, see configure's option --config-cache.
51859 # It is not useful on other systems.  If it contains results you don't
51860 # want to keep, you may remove or edit it.
51861 #
51862 # config.status only pays attention to the cache file if you give it
51863 # the --recheck option to rerun configure.
51864 #
51865 # `ac_cv_env_foo' variables (set or unset) will be overridden when
51866 # loading this file, other *unset* `ac_cv_foo' will be assigned the
51867 # following values.
51868 
51869 _ACEOF
51870 
51871 # The following way of writing the cache mishandles newlines in values,
51872 # but we know of no workaround that is simple, portable, and efficient.
51873 # So, we kill variables containing newlines.
51874 # Ultrix sh set writes to stderr and can't be redirected directly,
51875 # and sets the high bit in the cache file unless we assign to the vars.
51876 (
51877   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51878     eval ac_val=\$$ac_var
51879     case $ac_val in #(
51880     *${as_nl}*)
51881       case $ac_var in #(
51882       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51883 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51884       esac
51885       case $ac_var in #(
51886       _ | IFS | as_nl) ;; #(
51887       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51888       *) { eval $ac_var=; unset $ac_var;} ;;
51889       esac ;;
51890     esac
51891   done
51892 
51893   (set) 2>&1 |
51894     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51895     *${as_nl}ac_space=\ *)
51896       # `set' does not quote correctly, so add quotes: double-quote
51897       # substitution turns \\\\ into \\, and sed turns \\ into \.
51898       sed -n \
51899         "s/'/'\\\\''/g;
51900           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51901       ;; #(
51902     *)
51903       # `set' quotes correctly as required by POSIX, so do not add quotes.
51904       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51905       ;;
51906     esac |
51907     sort
51908 ) |
51909   sed '
51910      /^ac_cv_env_/b end
51911      t clear
51912      :clear
51913      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51914      t end
51915      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51916      :end' >>confcache
51917 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51918   if test -w "$cache_file"; then
51919     if test "x$cache_file" != "x/dev/null"; then
51920       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51921 $as_echo "$as_me: updating cache $cache_file" >&6;}
51922       if test ! -f "$cache_file" || test -h "$cache_file"; then
51923         cat confcache >"$cache_file"
51924       else
51925         case $cache_file in #(
51926         */* | ?:*)
51927           mv -f confcache "$cache_file"$$ &&
51928           mv -f "$cache_file"$$ "$cache_file" ;; #(
51929         *)
51930           mv -f confcache "$cache_file" ;;
51931         esac
51932       fi
51933     fi
51934   else
51935     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51936 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51937   fi
51938 fi
51939 rm -f confcache
51940 
51941 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51942 # Let make expand exec_prefix.
51943 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51944 
51945 # Transform confdefs.h into DEFS.
51946 # Protect against shell expansion while executing Makefile rules.
51947 # Protect against Makefile macro expansion.
51948 #
51949 # If the first sed substitution is executed (which looks for macros that
51950 # take arguments), then branch to the quote section.  Otherwise,
51951 # look for a macro that doesn't take arguments.
51952 ac_script='
51953 :mline
51954 /\\$/{
51955  N
51956  s,\\\n,,
51957  b mline
51958 }
51959 t clear
51960 :clear
51961 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
51962 t quote
51963 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
51964 t quote
51965 b any
51966 :quote
51967 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51968 s/\[/\\&/g
51969 s/\]/\\&/g
51970 s/\$/$$/g
51971 H
51972 :any
51973 ${
51974         g
51975         s/^\n//
51976         s/\n/ /g
51977         p
51978 }
51979 '
51980 DEFS=`sed -n "$ac_script" confdefs.h`
51981 
51982 
51983 ac_libobjs=
51984 ac_ltlibobjs=
51985 U=
51986 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51987   # 1. Remove the extension, and $U if already installed.
51988   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51989   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51990   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51991   #    will be set to the directory where LIBOBJS objects are built.
51992   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51993   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51994 done
51995 LIBOBJS=$ac_libobjs
51996 
51997 LTLIBOBJS=$ac_ltlibobjs
51998 
51999 
52000 
52001 : "${CONFIG_STATUS=./config.status}"
52002 ac_write_fail=0
52003 ac_clean_files_save=$ac_clean_files
52004 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
52005 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
52006 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
52007 as_write_fail=0
52008 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
52009 #! $SHELL
52010 # Generated by $as_me.
52011 # Run this file to recreate the current configuration.
52012 # Compiler output produced by configure, useful for debugging
52013 # configure, is in config.log if it exists.
52014 
52015 debug=false
52016 ac_cs_recheck=false
52017 ac_cs_silent=false
52018 
52019 SHELL=\${CONFIG_SHELL-$SHELL}
52020 export SHELL
52021 _ASEOF
52022 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
52023 ## -------------------- ##
52024 ## M4sh Initialization. ##
52025 ## -------------------- ##
52026 
52027 # Be more Bourne compatible
52028 DUALCASE=1; export DUALCASE # for MKS sh
52029 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
52030   emulate sh
52031   NULLCMD=:
52032   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
52033   # is contrary to our usage.  Disable this feature.
52034   alias -g '${1+"$@"}'='"$@"'
52035   setopt NO_GLOB_SUBST
52036 else
52037   case `(set -o) 2>/dev/null` in #(
52038   *posix*) :
52039     set -o posix ;; #(
52040   *) :
52041      ;;
52042 esac
52043 fi
52044 
52045 
52046 as_nl='
52047 '
52048 export as_nl
52049 # Printing a long string crashes Solaris 7 /usr/bin/printf.
52050 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52051 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52052 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52053 # Prefer a ksh shell builtin over an external printf program on Solaris,
52054 # but without wasting forks for bash or zsh.
52055 if test -z "$BASH_VERSION$ZSH_VERSION" \
52056     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52057   as_echo='print -r --'
52058   as_echo_n='print -rn --'
52059 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52060   as_echo='printf %s\n'
52061   as_echo_n='printf %s'
52062 else
52063   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52064     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52065     as_echo_n='/usr/ucb/echo -n'
52066   else
52067     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52068     as_echo_n_body='eval
52069       arg=$1;
52070       case $arg in #(
52071       *"$as_nl"*)
52072         expr "X$arg" : "X\\(.*\\)$as_nl";
52073         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52074       esac;
52075       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52076     '
52077     export as_echo_n_body
52078     as_echo_n='sh -c $as_echo_n_body as_echo'
52079   fi
52080   export as_echo_body
52081   as_echo='sh -c $as_echo_body as_echo'
52082 fi
52083 
52084 # The user is always right.
52085 if test "${PATH_SEPARATOR+set}" != set; then
52086   PATH_SEPARATOR=:
52087   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52088     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52089       PATH_SEPARATOR=';'
52090   }
52091 fi
52092 
52093 
52094 # IFS
52095 # We need space, tab and new line, in precisely that order.  Quoting is
52096 # there to prevent editors from complaining about space-tab.
52097 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
52098 # splitting by setting IFS to empty value.)
52099 IFS=" ""        $as_nl"
52100 
52101 # Find who we are.  Look in the path if we contain no directory separator.
52102 as_myself=
52103 case $0 in #((
52104   *[\\/]* ) as_myself=$0 ;;
52105   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52106 for as_dir in $PATH
52107 do
52108   IFS=$as_save_IFS
52109   test -z "$as_dir" && as_dir=.
52110     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52111   done
52112 IFS=$as_save_IFS
52113 
52114      ;;
52115 esac
52116 # We did not find ourselves, most probably we were run as `sh COMMAND'
52117 # in which case we are not to be found in the path.
52118 if test "x$as_myself" = x; then
52119   as_myself=$0
52120 fi
52121 if test ! -f "$as_myself"; then
52122   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52123   exit 1
52124 fi
52125 
52126 # Unset variables that we do not need and which cause bugs (e.g. in
52127 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52128 # suppresses any "Segmentation fault" message there.  '((' could
52129 # trigger a bug in pdksh 5.2.14.
52130 for as_var in BASH_ENV ENV MAIL MAILPATH
52131 do eval test x\${$as_var+set} = xset \
52132   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52133 done
52134 PS1='$ '
52135 PS2='> '
52136 PS4='+ '
52137 
52138 # NLS nuisances.
52139 LC_ALL=C
52140 export LC_ALL
52141 LANGUAGE=C
52142 export LANGUAGE
52143 
52144 # CDPATH.
52145 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52146 
52147 
52148 # as_fn_error STATUS ERROR [LINENO LOG_FD]
52149 # ----------------------------------------
52150 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52151 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52152 # script with STATUS, using 1 if that was 0.
52153 as_fn_error ()
52154 {
52155   as_status=$1; test $as_status -eq 0 && as_status=1
52156   if test "$4"; then
52157     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52158     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52159   fi
52160   $as_echo "$as_me: error: $2" >&2
52161   as_fn_exit $as_status
52162 } # as_fn_error
52163 
52164 
52165 # as_fn_set_status STATUS
52166 # -----------------------
52167 # Set $? to STATUS, without forking.
52168 as_fn_set_status ()
52169 {
52170   return $1
52171 } # as_fn_set_status
52172 
52173 # as_fn_exit STATUS
52174 # -----------------
52175 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52176 as_fn_exit ()
52177 {
52178   set +e
52179   as_fn_set_status $1
52180   exit $1
52181 } # as_fn_exit
52182 
52183 # as_fn_unset VAR
52184 # ---------------
52185 # Portably unset VAR.
52186 as_fn_unset ()
52187 {
52188   { eval $1=; unset $1;}
52189 }
52190 as_unset=as_fn_unset
52191 # as_fn_append VAR VALUE
52192 # ----------------------
52193 # Append the text in VALUE to the end of the definition contained in VAR. Take
52194 # advantage of any shell optimizations that allow amortized linear growth over
52195 # repeated appends, instead of the typical quadratic growth present in naive
52196 # implementations.
52197 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52198   eval 'as_fn_append ()
52199   {
52200     eval $1+=\$2
52201   }'
52202 else
52203   as_fn_append ()
52204   {
52205     eval $1=\$$1\$2
52206   }
52207 fi # as_fn_append
52208 
52209 # as_fn_arith ARG...
52210 # ------------------
52211 # Perform arithmetic evaluation on the ARGs, and store the result in the
52212 # global $as_val. Take advantage of shells that can avoid forks. The arguments
52213 # must be portable across $(()) and expr.
52214 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52215   eval 'as_fn_arith ()
52216   {
52217     as_val=$(( $* ))
52218   }'
52219 else
52220   as_fn_arith ()
52221   {
52222     as_val=`expr "$@" || test $? -eq 1`
52223   }
52224 fi # as_fn_arith
52225 
52226 
52227 if expr a : '\(a\)' >/dev/null 2>&1 &&
52228    test "X`expr 00001 : '.*\(...\)'`" = X001; then
52229   as_expr=expr
52230 else
52231   as_expr=false
52232 fi
52233 
52234 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52235   as_basename=basename
52236 else
52237   as_basename=false
52238 fi
52239 
52240 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52241   as_dirname=dirname
52242 else
52243   as_dirname=false
52244 fi
52245 
52246 as_me=`$as_basename -- "$0" ||
52247 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52248          X"$0" : 'X\(//\)$' \| \
52249          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52250 $as_echo X/"$0" |
52251     sed '/^.*\/\([^/][^/]*\)\/*$/{
52252             s//\1/
52253             q
52254           }
52255           /^X\/\(\/\/\)$/{
52256             s//\1/
52257             q
52258           }
52259           /^X\/\(\/\).*/{
52260             s//\1/
52261             q
52262           }
52263           s/.*/./; q'`
52264 
52265 # Avoid depending upon Character Ranges.
52266 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52267 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52268 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52269 as_cr_digits='0123456789'
52270 as_cr_alnum=$as_cr_Letters$as_cr_digits
52271 
52272 ECHO_C= ECHO_N= ECHO_T=
52273 case `echo -n x` in #(((((
52274 -n*)
52275   case `echo 'xy\c'` in
52276   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
52277   xy)  ECHO_C='\c';;
52278   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52279        ECHO_T=' ';;
52280   esac;;
52281 *)
52282   ECHO_N='-n';;
52283 esac
52284 
52285 rm -f conf$$ conf$$.exe conf$$.file
52286 if test -d conf$$.dir; then
52287   rm -f conf$$.dir/conf$$.file
52288 else
52289   rm -f conf$$.dir
52290   mkdir conf$$.dir 2>/dev/null
52291 fi
52292 if (echo >conf$$.file) 2>/dev/null; then
52293   if ln -s conf$$.file conf$$ 2>/dev/null; then
52294     as_ln_s='ln -s'
52295     # ... but there are two gotchas:
52296     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52297     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52298     # In both cases, we have to default to `cp -pR'.
52299     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52300       as_ln_s='cp -pR'
52301   elif ln conf$$.file conf$$ 2>/dev/null; then
52302     as_ln_s=ln
52303   else
52304     as_ln_s='cp -pR'
52305   fi
52306 else
52307   as_ln_s='cp -pR'
52308 fi
52309 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52310 rmdir conf$$.dir 2>/dev/null
52311 
52312 
52313 # as_fn_mkdir_p
52314 # -------------
52315 # Create "$as_dir" as a directory, including parents if necessary.
52316 as_fn_mkdir_p ()
52317 {
52318 
52319   case $as_dir in #(
52320   -*) as_dir=./$as_dir;;
52321   esac
52322   test -d "$as_dir" || eval $as_mkdir_p || {
52323     as_dirs=
52324     while :; do
52325       case $as_dir in #(
52326       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52327       *) as_qdir=$as_dir;;
52328       esac
52329       as_dirs="'$as_qdir' $as_dirs"
52330       as_dir=`$as_dirname -- "$as_dir" ||
52331 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52332          X"$as_dir" : 'X\(//\)[^/]' \| \
52333          X"$as_dir" : 'X\(//\)$' \| \
52334          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52335 $as_echo X"$as_dir" |
52336     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52337             s//\1/
52338             q
52339           }
52340           /^X\(\/\/\)[^/].*/{
52341             s//\1/
52342             q
52343           }
52344           /^X\(\/\/\)$/{
52345             s//\1/
52346             q
52347           }
52348           /^X\(\/\).*/{
52349             s//\1/
52350             q
52351           }
52352           s/.*/./; q'`
52353       test -d "$as_dir" && break
52354     done
52355     test -z "$as_dirs" || eval "mkdir $as_dirs"
52356   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52357 
52358 
52359 } # as_fn_mkdir_p
52360 if mkdir -p . 2>/dev/null; then
52361   as_mkdir_p='mkdir -p "$as_dir"'
52362 else
52363   test -d ./-p && rmdir ./-p
52364   as_mkdir_p=false
52365 fi
52366 
52367 
52368 # as_fn_executable_p FILE
52369 # -----------------------
52370 # Test if FILE is an executable regular file.
52371 as_fn_executable_p ()
52372 {
52373   test -f "$1" && test -x "$1"
52374 } # as_fn_executable_p
52375 as_test_x='test -x'
52376 as_executable_p=as_fn_executable_p
52377 
52378 # Sed expression to map a string onto a valid CPP name.
52379 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52380 
52381 # Sed expression to map a string onto a valid variable name.
52382 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52383 
52384 
52385 exec 6>&1
52386 ## ----------------------------------- ##
52387 ## Main body of $CONFIG_STATUS script. ##
52388 ## ----------------------------------- ##
52389 _ASEOF
52390 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52391 
52392 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52393 # Save the log message, to keep $0 and so on meaningful, and to
52394 # report actual input values of CONFIG_FILES etc. instead of their
52395 # values after options handling.
52396 ac_log="
52397 This file was extended by OpenJDK $as_me jdk9, which was
52398 generated by GNU Autoconf 2.69.  Invocation command line was
52399 
52400   CONFIG_FILES    = $CONFIG_FILES
52401   CONFIG_HEADERS  = $CONFIG_HEADERS
52402   CONFIG_LINKS    = $CONFIG_LINKS
52403   CONFIG_COMMANDS = $CONFIG_COMMANDS
52404   $ $0 $@
52405 
52406 on `(hostname || uname -n) 2>/dev/null | sed 1q`
52407 "
52408 
52409 _ACEOF
52410 
52411 case $ac_config_files in *"
52412 "*) set x $ac_config_files; shift; ac_config_files=$*;;
52413 esac
52414 
52415 
52416 
52417 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52418 # Files that config.status was made for.
52419 config_files="$ac_config_files"
52420 
52421 _ACEOF
52422 
52423 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52424 ac_cs_usage="\
52425 \`$as_me' instantiates files and other configuration actions
52426 from templates according to the current configuration.  Unless the files
52427 and actions are specified as TAGs, all are instantiated by default.
52428 
52429 Usage: $0 [OPTION]... [TAG]...
52430 
52431   -h, --help       print this help, then exit
52432   -V, --version    print version number and configuration settings, then exit
52433       --config     print configuration, then exit
52434   -q, --quiet, --silent
52435                    do not print progress messages
52436   -d, --debug      don't remove temporary files
52437       --recheck    update $as_me by reconfiguring in the same conditions
52438       --file=FILE[:TEMPLATE]
52439                    instantiate the configuration file FILE
52440 
52441 Configuration files:
52442 $config_files
52443 
52444 Report bugs to <build-dev@openjdk.java.net>.
52445 OpenJDK home page: <http://openjdk.java.net>."
52446 
52447 _ACEOF
52448 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52449 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52450 ac_cs_version="\\
52451 OpenJDK config.status jdk9
52452 configured by $0, generated by GNU Autoconf 2.69,
52453   with options \\"\$ac_cs_config\\"
52454 
52455 Copyright (C) 2012 Free Software Foundation, Inc.
52456 This config.status script is free software; the Free Software Foundation
52457 gives unlimited permission to copy, distribute and modify it."
52458 
52459 ac_pwd='$ac_pwd'
52460 srcdir='$srcdir'
52461 AWK='$AWK'
52462 test -n "\$AWK" || AWK=awk
52463 _ACEOF
52464 
52465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52466 # The default lists apply if the user does not specify any file.
52467 ac_need_defaults=:
52468 while test $# != 0
52469 do
52470   case $1 in
52471   --*=?*)
52472     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52473     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52474     ac_shift=:
52475     ;;
52476   --*=)
52477     ac_option=`expr "X$1" : 'X\([^=]*\)='`
52478     ac_optarg=
52479     ac_shift=:
52480     ;;
52481   *)
52482     ac_option=$1
52483     ac_optarg=$2
52484     ac_shift=shift
52485     ;;
52486   esac
52487 
52488   case $ac_option in
52489   # Handling of the options.
52490   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52491     ac_cs_recheck=: ;;
52492   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52493     $as_echo "$ac_cs_version"; exit ;;
52494   --config | --confi | --conf | --con | --co | --c )
52495     $as_echo "$ac_cs_config"; exit ;;
52496   --debug | --debu | --deb | --de | --d | -d )
52497     debug=: ;;
52498   --file | --fil | --fi | --f )
52499     $ac_shift
52500     case $ac_optarg in
52501     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52502     '') as_fn_error $? "missing file argument" ;;
52503     esac
52504     as_fn_append CONFIG_FILES " '$ac_optarg'"
52505     ac_need_defaults=false;;
52506   --he | --h |  --help | --hel | -h )
52507     $as_echo "$ac_cs_usage"; exit ;;
52508   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52509   | -silent | --silent | --silen | --sile | --sil | --si | --s)
52510     ac_cs_silent=: ;;
52511 
52512   # This is an error.
52513   -*) as_fn_error $? "unrecognized option: \`$1'
52514 Try \`$0 --help' for more information." ;;
52515 
52516   *) as_fn_append ac_config_targets " $1"
52517      ac_need_defaults=false ;;
52518 
52519   esac
52520   shift
52521 done
52522 
52523 ac_configure_extra_args=
52524 
52525 if $ac_cs_silent; then
52526   exec 6>/dev/null
52527   ac_configure_extra_args="$ac_configure_extra_args --silent"
52528 fi
52529 
52530 _ACEOF
52531 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52532 if \$ac_cs_recheck; then
52533   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52534   shift
52535   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52536   CONFIG_SHELL='$SHELL'
52537   export CONFIG_SHELL
52538   exec "\$@"
52539 fi
52540 
52541 _ACEOF
52542 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52543 exec 5>>config.log
52544 {
52545   echo
52546   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52547 ## Running $as_me. ##
52548 _ASBOX
52549   $as_echo "$ac_log"
52550 } >&5
52551 
52552 _ACEOF
52553 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52554 _ACEOF
52555 
52556 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52557 
52558 # Handling of arguments.
52559 for ac_config_target in $ac_config_targets
52560 do
52561   case $ac_config_target in
52562     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52563     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52564     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52565     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52566     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52567 
52568   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52569   esac
52570 done
52571 
52572 
52573 # If the user did not use the arguments to specify the items to instantiate,
52574 # then the envvar interface is used.  Set only those that are not.
52575 # We use the long form for the default assignment because of an extremely
52576 # bizarre bug on SunOS 4.1.3.
52577 if $ac_need_defaults; then
52578   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52579 fi
52580 
52581 # Have a temporary directory for convenience.  Make it in the build tree
52582 # simply because there is no reason against having it here, and in addition,
52583 # creating and moving files from /tmp can sometimes cause problems.
52584 # Hook for its removal unless debugging.
52585 # Note that there is a small window in which the directory will not be cleaned:
52586 # after its creation but before its name has been assigned to `$tmp'.
52587 $debug ||
52588 {
52589   tmp= ac_tmp=
52590   trap 'exit_status=$?
52591   : "${ac_tmp:=$tmp}"
52592   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52593 ' 0
52594   trap 'as_fn_exit 1' 1 2 13 15
52595 }
52596 # Create a (secure) tmp directory for tmp files.
52597 
52598 {
52599   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52600   test -d "$tmp"
52601 }  ||
52602 {
52603   tmp=./conf$$-$RANDOM
52604   (umask 077 && mkdir "$tmp")
52605 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52606 ac_tmp=$tmp
52607 
52608 # Set up the scripts for CONFIG_FILES section.
52609 # No need to generate them if there are no CONFIG_FILES.
52610 # This happens for instance with `./config.status config.h'.
52611 if test -n "$CONFIG_FILES"; then
52612 
52613 
52614 ac_cr=`echo X | tr X '\015'`
52615 # On cygwin, bash can eat \r inside `` if the user requested igncr.
52616 # But we know of no other shell where ac_cr would be empty at this
52617 # point, so we can use a bashism as a fallback.
52618 if test "x$ac_cr" = x; then
52619   eval ac_cr=\$\'\\r\'
52620 fi
52621 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52622 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52623   ac_cs_awk_cr='\\r'
52624 else
52625   ac_cs_awk_cr=$ac_cr
52626 fi
52627 
52628 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52629 _ACEOF
52630 
52631 
52632 {
52633   echo "cat >conf$$subs.awk <<_ACEOF" &&
52634   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52635   echo "_ACEOF"
52636 } >conf$$subs.sh ||
52637   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52638 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52639 ac_delim='%!_!# '
52640 for ac_last_try in false false false false false :; do
52641   . ./conf$$subs.sh ||
52642     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52643 
52644   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52645   if test $ac_delim_n = $ac_delim_num; then
52646     break
52647   elif $ac_last_try; then
52648     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52649   else
52650     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52651   fi
52652 done
52653 rm -f conf$$subs.sh
52654 
52655 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52656 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52657 _ACEOF
52658 sed -n '
52659 h
52660 s/^/S["/; s/!.*/"]=/
52661 p
52662 g
52663 s/^[^!]*!//
52664 :repl
52665 t repl
52666 s/'"$ac_delim"'$//
52667 t delim
52668 :nl
52669 h
52670 s/\(.\{148\}\)..*/\1/
52671 t more1
52672 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52673 p
52674 n
52675 b repl
52676 :more1
52677 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52678 p
52679 g
52680 s/.\{148\}//
52681 t nl
52682 :delim
52683 h
52684 s/\(.\{148\}\)..*/\1/
52685 t more2
52686 s/["\\]/\\&/g; s/^/"/; s/$/"/
52687 p
52688 b
52689 :more2
52690 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52691 p
52692 g
52693 s/.\{148\}//
52694 t delim
52695 ' <conf$$subs.awk | sed '
52696 /^[^""]/{
52697   N
52698   s/\n//
52699 }
52700 ' >>$CONFIG_STATUS || ac_write_fail=1
52701 rm -f conf$$subs.awk
52702 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52703 _ACAWK
52704 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52705   for (key in S) S_is_set[key] = 1
52706   FS = ""
52707 
52708 }
52709 {
52710   line = $ 0
52711   nfields = split(line, field, "@")
52712   substed = 0
52713   len = length(field[1])
52714   for (i = 2; i < nfields; i++) {
52715     key = field[i]
52716     keylen = length(key)
52717     if (S_is_set[key]) {
52718       value = S[key]
52719       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52720       len += length(value) + length(field[++i])
52721       substed = 1
52722     } else
52723       len += 1 + keylen
52724   }
52725 
52726   print line
52727 }
52728 
52729 _ACAWK
52730 _ACEOF
52731 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52732 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52733   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52734 else
52735   cat
52736 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52737   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52738 _ACEOF
52739 
52740 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52741 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52742 # trailing colons and then remove the whole line if VPATH becomes empty
52743 # (actually we leave an empty line to preserve line numbers).
52744 if test "x$srcdir" = x.; then
52745   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
52746 h
52747 s///
52748 s/^/:/
52749 s/[      ]*$/:/
52750 s/:\$(srcdir):/:/g
52751 s/:\${srcdir}:/:/g
52752 s/:@srcdir@:/:/g
52753 s/^:*//
52754 s/:*$//
52755 x
52756 s/\(=[   ]*\).*/\1/
52757 G
52758 s/\n//
52759 s/^[^=]*=[       ]*$//
52760 }'
52761 fi
52762 
52763 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52764 fi # test -n "$CONFIG_FILES"
52765 
52766 
52767 eval set X "  :F $CONFIG_FILES      "
52768 shift
52769 for ac_tag
52770 do
52771   case $ac_tag in
52772   :[FHLC]) ac_mode=$ac_tag; continue;;
52773   esac
52774   case $ac_mode$ac_tag in
52775   :[FHL]*:*);;
52776   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52777   :[FH]-) ac_tag=-:-;;
52778   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52779   esac
52780   ac_save_IFS=$IFS
52781   IFS=:
52782   set x $ac_tag
52783   IFS=$ac_save_IFS
52784   shift
52785   ac_file=$1
52786   shift
52787 
52788   case $ac_mode in
52789   :L) ac_source=$1;;
52790   :[FH])
52791     ac_file_inputs=
52792     for ac_f
52793     do
52794       case $ac_f in
52795       -) ac_f="$ac_tmp/stdin";;
52796       *) # Look for the file first in the build tree, then in the source tree
52797          # (if the path is not absolute).  The absolute path cannot be DOS-style,
52798          # because $ac_f cannot contain `:'.
52799          test -f "$ac_f" ||
52800            case $ac_f in
52801            [\\/$]*) false;;
52802            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52803            esac ||
52804            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52805       esac
52806       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52807       as_fn_append ac_file_inputs " '$ac_f'"
52808     done
52809 
52810     # Let's still pretend it is `configure' which instantiates (i.e., don't
52811     # use $as_me), people would be surprised to read:
52812     #    /* config.h.  Generated by config.status.  */
52813     configure_input='Generated from '`
52814           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52815         `' by configure.'
52816     if test x"$ac_file" != x-; then
52817       configure_input="$ac_file.  $configure_input"
52818       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52819 $as_echo "$as_me: creating $ac_file" >&6;}
52820     fi
52821     # Neutralize special characters interpreted by sed in replacement strings.
52822     case $configure_input in #(
52823     *\&* | *\|* | *\\* )
52824        ac_sed_conf_input=`$as_echo "$configure_input" |
52825        sed 's/[\\\\&|]/\\\\&/g'`;; #(
52826     *) ac_sed_conf_input=$configure_input;;
52827     esac
52828 
52829     case $ac_tag in
52830     *:-:* | *:-) cat >"$ac_tmp/stdin" \
52831       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52832     esac
52833     ;;
52834   esac
52835 
52836   ac_dir=`$as_dirname -- "$ac_file" ||
52837 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52838          X"$ac_file" : 'X\(//\)[^/]' \| \
52839          X"$ac_file" : 'X\(//\)$' \| \
52840          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52841 $as_echo X"$ac_file" |
52842     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52843             s//\1/
52844             q
52845           }
52846           /^X\(\/\/\)[^/].*/{
52847             s//\1/
52848             q
52849           }
52850           /^X\(\/\/\)$/{
52851             s//\1/
52852             q
52853           }
52854           /^X\(\/\).*/{
52855             s//\1/
52856             q
52857           }
52858           s/.*/./; q'`
52859   as_dir="$ac_dir"; as_fn_mkdir_p
52860   ac_builddir=.
52861 
52862 case "$ac_dir" in
52863 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52864 *)
52865   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52866   # A ".." for each directory in $ac_dir_suffix.
52867   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52868   case $ac_top_builddir_sub in
52869   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52870   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52871   esac ;;
52872 esac
52873 ac_abs_top_builddir=$ac_pwd
52874 ac_abs_builddir=$ac_pwd$ac_dir_suffix
52875 # for backward compatibility:
52876 ac_top_builddir=$ac_top_build_prefix
52877 
52878 case $srcdir in
52879   .)  # We are building in place.
52880     ac_srcdir=.
52881     ac_top_srcdir=$ac_top_builddir_sub
52882     ac_abs_top_srcdir=$ac_pwd ;;
52883   [\\/]* | ?:[\\/]* )  # Absolute name.
52884     ac_srcdir=$srcdir$ac_dir_suffix;
52885     ac_top_srcdir=$srcdir
52886     ac_abs_top_srcdir=$srcdir ;;
52887   *) # Relative name.
52888     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52889     ac_top_srcdir=$ac_top_build_prefix$srcdir
52890     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52891 esac
52892 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52893 
52894 
52895   case $ac_mode in
52896   :F)
52897   #
52898   # CONFIG_FILE
52899   #
52900 
52901 _ACEOF
52902 
52903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52904 # If the template does not know about datarootdir, expand it.
52905 # FIXME: This hack should be removed a few years after 2.60.
52906 ac_datarootdir_hack=; ac_datarootdir_seen=
52907 ac_sed_dataroot='
52908 /datarootdir/ {
52909   p
52910   q
52911 }
52912 /@datadir@/p
52913 /@docdir@/p
52914 /@infodir@/p
52915 /@localedir@/p
52916 /@mandir@/p'
52917 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52918 *datarootdir*) ac_datarootdir_seen=yes;;
52919 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52920   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52921 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52922 _ACEOF
52923 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52924   ac_datarootdir_hack='
52925   s&@datadir@&$datadir&g
52926   s&@docdir@&$docdir&g
52927   s&@infodir@&$infodir&g
52928   s&@localedir@&$localedir&g
52929   s&@mandir@&$mandir&g
52930   s&\\\${datarootdir}&$datarootdir&g' ;;
52931 esac
52932 _ACEOF
52933 
52934 # Neutralize VPATH when `$srcdir' = `.'.
52935 # Shell code in configure.ac might set extrasub.
52936 # FIXME: do we really want to maintain this feature?
52937 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52938 ac_sed_extra="$ac_vpsub
52939 $extrasub
52940 _ACEOF
52941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52942 :t
52943 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52944 s|@configure_input@|$ac_sed_conf_input|;t t
52945 s&@top_builddir@&$ac_top_builddir_sub&;t t
52946 s&@top_build_prefix@&$ac_top_build_prefix&;t t
52947 s&@srcdir@&$ac_srcdir&;t t
52948 s&@abs_srcdir@&$ac_abs_srcdir&;t t
52949 s&@top_srcdir@&$ac_top_srcdir&;t t
52950 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52951 s&@builddir@&$ac_builddir&;t t
52952 s&@abs_builddir@&$ac_abs_builddir&;t t
52953 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52954 $ac_datarootdir_hack
52955 "
52956 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52957   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52958 
52959 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52960   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52961   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
52962       "$ac_tmp/out"`; test -z "$ac_out"; } &&
52963   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52964 which seems to be undefined.  Please make sure it is defined" >&5
52965 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52966 which seems to be undefined.  Please make sure it is defined" >&2;}
52967 
52968   rm -f "$ac_tmp/stdin"
52969   case $ac_file in
52970   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52971   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52972   esac \
52973   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52974  ;;
52975 
52976 
52977 
52978   esac
52979 
52980 done # for ac_tag
52981 
52982 
52983 as_fn_exit 0
52984 _ACEOF
52985 ac_clean_files=$ac_clean_files_save
52986 
52987 test $ac_write_fail = 0 ||
52988   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52989 
52990 
52991 # configure is writing to config.log, and then calls config.status.
52992 # config.status does its own redirection, appending to config.log.
52993 # Unfortunately, on DOS this fails, as config.log is still kept open
52994 # by configure, so config.status won't be able to write to it; its
52995 # output is simply discarded.  So we exec the FD to /dev/null,
52996 # effectively closing config.log, so it can be properly (re)opened and
52997 # appended to by config.status.  When coming back to configure, we
52998 # need to make the FD available again.
52999 if test "$no_create" != yes; then
53000   ac_cs_success=:
53001   ac_config_status_args=
53002   test "$silent" = yes &&
53003     ac_config_status_args="$ac_config_status_args --quiet"
53004   exec 5>/dev/null
53005   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53006   exec 5>>config.log
53007   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53008   # would make configure fail if this is the last instruction.
53009   $ac_cs_success || as_fn_exit 1
53010 fi
53011 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53012   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53013 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53014 fi
53015 
53016 
53017 
53018 # Try to move the config.log file to the output directory.
53019 if test -e ./config.log; then
53020   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
53021 fi
53022 
53023 # Make the compare script executable
53024 $CHMOD +x $OUTPUT_ROOT/compare.sh
53025 
53026 # Finally output some useful information to the user
53027 
53028   # Finally output some useful information to the user
53029 
53030   printf "\n"
53031   printf "====================================================\n"
53032   if test "x$no_create" != "xyes"; then
53033     if test "x$IS_RECONFIGURE" != "xyes"; then
53034       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
53035     else
53036       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
53037     fi
53038   else
53039     if test "x$IS_RECONFIGURE" != "xyes"; then
53040       printf "A configuration has been successfully checked but not created\n"
53041     else
53042       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
53043     fi
53044   fi
53045   if test "x$CONFIGURE_COMMAND_LINE" != x; then
53046     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53047   else
53048     printf "using default settings.\n"
53049   fi
53050 
53051   printf "\n"
53052   printf "Configuration summary:\n"
53053   printf "* Debug level:    $DEBUG_LEVEL\n"
53054   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53055   printf "* JDK variant:    $JDK_VARIANT\n"
53056   printf "* JVM variants:   $with_jvm_variants\n"
53057   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53058 
53059   printf "\n"
53060   printf "Tools summary:\n"
53061   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53062     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53063   fi
53064   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53065   if test "x$TOOLCHAIN_VERSION" != "x"; then
53066     print_version=" $TOOLCHAIN_VERSION"
53067   fi
53068   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53069   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53070   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53071 
53072   printf "\n"
53073   printf "Build performance summary:\n"
53074   printf "* Cores to use:   $JOBS\n"
53075   printf "* Memory limit:   $MEMORY_SIZE MB\n"
53076   if test "x$CCACHE_STATUS" != "x"; then
53077     printf "* ccache status:  $CCACHE_STATUS\n"
53078   fi
53079   printf "\n"
53080 
53081   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53082     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53083     printf "will result in longer build times.\n"
53084     printf "\n"
53085   fi
53086 
53087   if test "x$FOUND_ALT_VARIABLES" != "x"; then
53088     printf "WARNING: You have old-style ALT_ environment variables set.\n"
53089     printf "These are not respected, and will be ignored. It is recommended\n"
53090     printf "that you clean your environment. The following variables are set:\n"
53091     printf "$FOUND_ALT_VARIABLES\n"
53092     printf "\n"
53093   fi
53094 
53095   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53096     printf "WARNING: Your build output directory is not on a local disk.\n"
53097     printf "This will severely degrade build performance!\n"
53098     printf "It is recommended that you create an output directory on a local disk,\n"
53099     printf "and run the configure script again from that directory.\n"
53100     printf "\n"
53101   fi
53102 
53103   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53104     printf "WARNING: The result of this configuration has overridden an older\n"
53105     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53106     printf "proper build. Failure to do so might result in strange build problems.\n"
53107     printf "\n"
53108   fi
53109 
53110   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53111     printf "WARNING: The result of this configuration was not saved.\n"
53112     printf "You should run without '--no-create | -n' to create the configuration.\n"
53113     printf "\n"
53114   fi
53115 
53116 
53117 
53118 if test -e "$OUTPUT_ROOT/config.log"; then
53119   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53120   if test $? -eq 0; then
53121     printf "The following warnings were produced. Repeated here for convenience:\n"
53122     # We must quote sed expression (using []) to stop m4 from eating the [].
53123     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53124     printf "\n"
53125   fi
53126 fi
53127 
53128